text stringlengths 6 947k | repo_name stringlengths 5 100 | path stringlengths 4 231 | language stringclasses 1
value | license stringclasses 15
values | size int64 6 947k | score float64 0 0.34 |
|---|---|---|---|---|---|---|
from . import _ccallback_c
import ctypes
PyCFuncPtr = ctypes.CFUNCTYPE(ctypes.c_void_p).__bases__[0]
ffi = None
class CData(object):
pass
def _import_cffi():
global ffi, CData
if ffi is not None:
return
try:
import cffi
ffi = cffi.FFI()
CData = ffi.CData
except... | Eric89GXL/scipy | scipy/_lib/_ccallback.py | Python | bsd-3-clause | 6,196 | 0.001453 |
#!/usr/bin/env python
# coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unle... | QuantiModo/QuantiModo-SDK-Python | SwaggerPetstore/models/json_error_response.py | Python | gpl-2.0 | 1,773 | 0.00564 |
# -*- coding: utf-8 -*-
appid = 'example'
apikey = 'c5dd7e7dkjp27377l903c42c032b413b'
sender = '01000000000' # FIXME - MUST BE CHANGED AS REAL PHONE NUMBER
receivers = ['01000000000', ] # FIXME - MUST BE CHANGED AS REAL PHONE NUMBERS
content = u'나는 유리를 먹을 수 있어요. 그래도 아프지 않아요'
| BlueHouseLab/sms-openapi | python-requests/conf.py | Python | apache-2.0 | 324 | 0.003521 |
##
# Copyright 2009-2017 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | ULHPC/easybuild-easyblocks | easybuild/easyblocks/generic/cmakemake.py | Python | gpl-2.0 | 4,702 | 0.002552 |
# coding=utf-8
from __future__ import unicode_literals
"""
Name: MyArgparse
Author: Andy Liu
Email : andy.liu.ud@hotmail.com
Created: 3/26/2015
Copyright: All rights reserved.
Licence: This program is free software: you can redistribute it
and/or modify it under the te... | asiroliu/MyTools | MyArgparse.py | Python | gpl-2.0 | 2,738 | 0.004018 |
from django.contrib import admin
from trainer.models import Language, Word, Card, Set
admin.site.register(Language)
admin.site.register(Word)
admin.site.register(Card)
admin.site.register(Set)
| chrigu6/vocabulary | vocabulary/trainer/admin.py | Python | gpl-3.0 | 195 | 0 |
# -*- coding: utf-8 -*-
import logging
import random
from collections import (
namedtuple,
defaultdict,
)
from itertools import repeat
import cachetools
import gevent
from gevent.event import (
_AbstractLinkable,
AsyncResult,
Event,
)
from ethereum import slogging
from raiden.exceptions import (
... | tomashaber/raiden | raiden/network/protocol.py | Python | mit | 24,753 | 0.000485 |
# Copyright (C) 2012-2015 ASTRON (Netherlands Institute for Radio Astronomy)
# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This file is part of the LOFAR software suite.
# The LOFAR software suite is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as p... | kernsuite-debian/lofar | SAS/ResourceAssignment/ResourceAssignmentEditor/config/default.py | Python | gpl-3.0 | 967 | 0 |
# -*- coding: utf-8 -*-
import json
import logging
import vobject
from datetime import datetime
from contextlib import contextmanager
from radicale import ical
from yats.shortcuts import get_ticket_model, build_ticket_search_ext, touch_ticket, remember_changes, mail_ticket, jabber_ticket, check_references, add_histo... | mediafactory/yats | modules/yats/caldav/storage.py | Python | mit | 12,605 | 0.002697 |
# -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | our-city-app/oca-backend | src/rogerthat/bizz/payment/to.py | Python | apache-2.0 | 1,164 | 0.000859 |
# -*- coding: utf-8 -*-
# Copyright(C) 2012 Romain Bignon
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opti... | laurent-george/weboob | modules/cmso/__init__.py | Python | agpl-3.0 | 788 | 0 |
import datetime
import itertools
import re
import urllib2
import mimetypes
import operator
import logging
import sys
import traceback
import warnings
import tagging
import tagging.models
import vidscraper
from bs4 import BeautifulSoup
from django.conf import settings
from django.contrib.auth.models import User
from dj... | pculture/mirocommunity | localtv/models.py | Python | agpl-3.0 | 55,425 | 0.000902 |
from rest_framework import exceptions as drf_exceptions
from rest_framework import versioning as drf_versioning
from rest_framework.compat import unicode_http_header
from rest_framework.utils.mediatypes import _MediaType
from api.base import exceptions
from api.base import utils
from api.base.renderers import Browsabl... | caseyrollins/osf.io | api/base/versioning.py | Python | apache-2.0 | 5,741 | 0.003135 |
# -*- coding: utf-8 -*-
from module.plugins.internal.XFSAccount import XFSAccount
class FilerioCom(XFSAccount):
__name__ = "FilerioCom"
__type__ = "account"
__version__ = "0.07"
__status__ = "testing"
__description__ = """FileRio.in account plugin"""
__license__ = "GPLv3"
__au... | Guidobelix/pyload | module/plugins/accounts/FilerioCom.py | Python | gpl-3.0 | 407 | 0.014742 |
import pytest
from ray.train.callbacks.results_preprocessors import (
ExcludedKeysResultsPreprocessor,
IndexedResultsPreprocessor,
SequentialResultsPreprocessor,
AverageResultsPreprocessor,
MaxResultsPreprocessor,
WeightedAverageResultsPreprocessor,
)
def test_excluded_keys_results_preprocess... | ray-project/ray | python/ray/train/tests/test_results_preprocessors.py | Python | apache-2.0 | 7,269 | 0.001238 |
import re
from django.core.exceptions import ImproperlyConfigured
from sqlalchemy import create_engine, MetaData
from sqlalchemy.orm import sessionmaker
from tranquil.models import Importer
__all__ = ( 'engine', 'meta', 'Session', )
class EngineCache(object):
__shared_state = dict(
engine = None,
meta = None,
... | g2p/tranquil | tranquil/__init__.py | Python | bsd-3-clause | 1,717 | 0.041351 |
"""
Tests outgoing calls created with InitialAudio and/or InitialVideo, and
exposing the initial contents of incoming calls as values of InitialAudio and
InitialVideo
"""
import operator
from servicetest import (
assertContains, assertEquals, assertLength,
wrap_channel, EventPattern, call_async, make_channel_... | jku/telepathy-gabble | tests/twisted/jingle/initial-audio-video.py | Python | lgpl-2.1 | 7,213 | 0.004298 |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | markflyhigh/incubator-beam | sdks/python/apache_beam/io/textio_test.py | Python | apache-2.0 | 43,198 | 0.006898 |
from django.dispatch import receiver
from pretix.base.signals import register_payment_providers
@receiver(register_payment_providers, dispatch_uid="payment_paypal")
def register_payment_provider(sender, **kwargs):
from .payment import Paypal
return Paypal
| awg24/pretix | src/pretix/plugins/paypal/signals.py | Python | apache-2.0 | 267 | 0 |
from django.db import models
class AdjacencyListModel(models.Model):
title = models.CharField(max_length=100)
parent = models.ForeignKey(
'self', related_name='%(class)s_parent', on_delete=models.CASCADE, db_index=True, null=True, blank=True)
def __str__(self):
return 'adjacencylistmode... | idlesign/django-admirarchy | admirarchy/tests/testapp/models.py | Python | bsd-3-clause | 633 | 0.00158 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2019-04-10 03:58
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('netdevice', '0006_auto_20190409_0325'),
]
operations = [
migrations.RenameField(
... | lkmhaqer/gtools-python | netdevice/migrations/0007_auto_20190410_0358.py | Python | mit | 567 | 0 |
from functools import reduce
class ScopedString (object):
def __init__ (self):
self._stack = []
def push (self, frame):
self._stack.append (frame)
def pop (self):
frame = self._stack.pop()
return frame
def __str__ (self... | doffm/dbuf | src/dbuf/util.py | Python | bsd-3-clause | 3,108 | 0.026705 |
"""A likelihood function representing a Student-t distribution.
Author:
Ilias Bilionis
Date:
1/21/2013
"""
__all__ = ['StudentTLikelihoodFunction']
import numpy as np
import scipy
import math
from . import GaussianLikelihoodFunction
class StudentTLikelihoodFunction(GaussianLikelihoodFunction):
"""An... | ebilionis/py-best | best/random/_student_t_likelihood_function.py | Python | lgpl-3.0 | 2,586 | 0.001933 |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 119