hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c413f0c6c48d231c8c9a0d72162ab5fbe5a184d
972
py
Python
api/views.py
antonybholmes/edbw-django-app
2268fa7f983347742ee55145269ef1222776a838
[ "MIT" ]
null
null
null
api/views.py
antonybholmes/edbw-django-app
2268fa7f983347742ee55145269ef1222776a838
[ "MIT" ]
null
null
null
api/views.py
antonybholmes/edbw-django-app
2268fa7f983347742ee55145269ef1222776a838
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse from django.http import JsonResponse import base64 def about(request): return JsonResponse({"name":"edbw","version":"10.0","copyright":"Copyright (C) 2014-2019 Antony Holmes"}, safe=False) def json_page_resp(name, page, paginator): """ ...
29.454545
139
0.691358
from django.shortcuts import render from django.http import HttpResponse from django.http import JsonResponse import base64 def about(request): return JsonResponse({"name":"edbw","version":"10.0","copyright":"Copyright (C) 2014-2019 Antony Holmes"}, safe=False) def json_page_resp(name, page, paginator): ...
true
true
1c413f15125157ec009507190c422d87a08b1a46
548
py
Python
pettingzoo/utils/wrappers/capture_stdout.py
vstark21/PettingZoo
0ebd8fb540e195f9dd91d996f190e9a89dedcf26
[ "Apache-2.0" ]
3
2021-10-14T19:53:19.000Z
2022-02-22T01:14:44.000Z
pettingzoo/utils/wrappers/capture_stdout.py
vstark21/PettingZoo
0ebd8fb540e195f9dd91d996f190e9a89dedcf26
[ "Apache-2.0" ]
null
null
null
pettingzoo/utils/wrappers/capture_stdout.py
vstark21/PettingZoo
0ebd8fb540e195f9dd91d996f190e9a89dedcf26
[ "Apache-2.0" ]
1
2022-02-22T11:06:40.000Z
2022-02-22T11:06:40.000Z
from ..capture_stdout import capture_stdout from .base import BaseWrapper class CaptureStdoutWrapper(BaseWrapper): def __init__(self, env): super().__init__(env) self.metadata['render.modes'].append("ansi") def render(self, mode="human"): if mode == "human": super().render...
23.826087
52
0.574818
from ..capture_stdout import capture_stdout from .base import BaseWrapper class CaptureStdoutWrapper(BaseWrapper): def __init__(self, env): super().__init__(env) self.metadata['render.modes'].append("ansi") def render(self, mode="human"): if mode == "human": super().render...
true
true
1c413f828e94e3b740b15c03f550800b97795557
23,545
py
Python
uml/__init__.py
palibhasataolamang/paml
f3f2c113f0925e42557820416199bd6eaaeb091c
[ "MIT" ]
null
null
null
uml/__init__.py
palibhasataolamang/paml
f3f2c113f0925e42557820416199bd6eaaeb091c
[ "MIT" ]
null
null
null
uml/__init__.py
palibhasataolamang/paml
f3f2c113f0925e42557820416199bd6eaaeb091c
[ "MIT" ]
null
null
null
import os import posixpath from collections import Counter from typing import List, Set, Iterable from sbol_factory import SBOLFactory, UMLFactory import sbol3 # Load ontology and create uml submodule SBOLFactory('uml_submodule', posixpath.join(os.path.dirname(os.path.realpath(__file__)), 'uml....
41.672566
133
0.707199
import os import posixpath from collections import Counter from typing import List, Set, Iterable from sbol_factory import SBOLFactory, UMLFactory import sbol3 SBOLFactory('uml_submodule', posixpath.join(os.path.dirname(os.path.realpath(__file__)), 'uml.ttl'), 'http://bioprotocols....
true
true
1c41404389143339eb4f57dd0181b52f80ff8ebc
3,571
py
Python
cassiopeia/dto/championmasteryapi.py
BubblegumDiscord/LoLTrivia
70070dc2e8c59d7210d8b30ad2525bafaee4bba7
[ "MIT" ]
null
null
null
cassiopeia/dto/championmasteryapi.py
BubblegumDiscord/LoLTrivia
70070dc2e8c59d7210d8b30ad2525bafaee4bba7
[ "MIT" ]
null
null
null
cassiopeia/dto/championmasteryapi.py
BubblegumDiscord/LoLTrivia
70070dc2e8c59d7210d8b30ad2525bafaee4bba7
[ "MIT" ]
1
2018-05-06T15:49:33.000Z
2018-05-06T15:49:33.000Z
import cassiopeia.dto.requests import cassiopeia.type.core.common import cassiopeia.type.dto.championmastery def get_champion_mastery(summoner_id, champion_id): """ https://developer.riotgames.com/api/methods#!/1034/3545 Args: summoner_id (int): the summoner ID to get champion mastery for ...
42.511905
241
0.745449
import cassiopeia.dto.requests import cassiopeia.type.core.common import cassiopeia.type.dto.championmastery def get_champion_mastery(summoner_id, champion_id): region = cassiopeia.type.core.common.Region(cassiopeia.dto.requests.region) platform = cassiopeia.type.core.common.Platform[region.name] re...
true
true
1c41409be5507ec7c63c1033a60216618fd2e6c2
1,327
py
Python
skychain/endpoints/node_endpoint.py
OneTesseractInMultiverse/SkyTrack
f39c9296f7dfb559dcc33af1776ea2dbbab94e01
[ "MIT" ]
null
null
null
skychain/endpoints/node_endpoint.py
OneTesseractInMultiverse/SkyTrack
f39c9296f7dfb559dcc33af1776ea2dbbab94e01
[ "MIT" ]
1
2017-12-06T02:20:51.000Z
2017-12-06T02:20:51.000Z
skychain/endpoints/node_endpoint.py
OneTesseractInMultiverse/SkyTrack
f39c9296f7dfb559dcc33af1776ea2dbbab94e01
[ "MIT" ]
null
null
null
from skychain import sky_app, blockchain, node_id from flask import jsonify, request # -------------------------------------------------------------------------- # GET: /API/V1/NODE/ # -------------------------------------------------------------------------- @sky_app.route('/api/v1/node', methods=['POST']) def post_...
34.025641
76
0.477016
from skychain import sky_app, blockchain, node_id from flask import jsonify, request @sky_app.route('/api/v1/node', methods=['POST']) def post_node(): values = request.get_json() nodes = values.get('nodes') if nodes is None: return jsonify({"msg", "Please supply a valid list of nodes"}), 400 ...
true
true
1c4140b67994c9da77953fe26af386ef913aca28
23,927
py
Python
ucsmsdk/mometa/sw/SwEthLanBorder.py
Curlyfingers/ucsmsdk
982ff2d8faa12ffb88e1f8cba98cf5749f05c93d
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/sw/SwEthLanBorder.py
Curlyfingers/ucsmsdk
982ff2d8faa12ffb88e1f8cba98cf5749f05c93d
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/sw/SwEthLanBorder.py
Curlyfingers/ucsmsdk
982ff2d8faa12ffb88e1f8cba98cf5749f05c93d
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for SwEthLanBorder ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class SwEthLanBorderConsts: FSM_PREV_DEPLOY_BEGIN = "DeployBegin" FSM_PREV_DEPLOY_FAIL = "DeployFail" ...
92.382239
3,748
0.757596
from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class SwEthLanBorderConsts: FSM_PREV_DEPLOY_BEGIN = "DeployBegin" FSM_PREV_DEPLOY_FAIL = "DeployFail" FSM_PREV_DEPLOY_SUCCESS = "DeploySuccess" FSM_PREV_DEPLOY_UPDATE_CONNECTIVITY =...
true
true
1c4140b8f07e0f6bb144293974f33c848b5399b7
792
py
Python
django_autoutils/serializer_utils.py
rezazeiny/django-autoutils
268181cbe2e08b2ea042ec02e4145b5578218382
[ "MIT" ]
null
null
null
django_autoutils/serializer_utils.py
rezazeiny/django-autoutils
268181cbe2e08b2ea042ec02e4145b5578218382
[ "MIT" ]
null
null
null
django_autoutils/serializer_utils.py
rezazeiny/django-autoutils
268181cbe2e08b2ea042ec02e4145b5578218382
[ "MIT" ]
null
null
null
""" Some good utils for serializer """ from rest_framework.fields import HiddenField, CurrentUserDefault class ContextFieldSerializer: """ Get current voice """ requires_context = True def __init__(self, field): self.field = field def __call__(self, serializer_field): ...
22.628571
72
0.685606
from rest_framework.fields import HiddenField, CurrentUserDefault class ContextFieldSerializer: requires_context = True def __init__(self, field): self.field = field def __call__(self, serializer_field): return serializer_field.context[self.field] def __repr__(self): return ...
true
true
1c41413e201c255b13f6b59e8dcfabfe09c3066f
7,725
py
Python
intuitlib/client.py
nicholas-ramsey/oauth-pythonclient
6a40386a17cc913828b1d9c420cc91f937813299
[ "Apache-2.0" ]
null
null
null
intuitlib/client.py
nicholas-ramsey/oauth-pythonclient
6a40386a17cc913828b1d9c420cc91f937813299
[ "Apache-2.0" ]
null
null
null
intuitlib/client.py
nicholas-ramsey/oauth-pythonclient
6a40386a17cc913828b1d9c420cc91f937813299
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 Intuit # # 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 applicable law or agreed to in writ...
38.625
163
0.660194
from __future__ import absolute_import import json import requests from future.moves.urllib.parse import urlencode from intuitlib.utils import ( get_discovery_doc, generate_token, scopes_to_string, get_auth_header, send_request, ) class AuthClient(requests.Session): ...
true
true
1c414405098f4d8de3926b8b81db921ab8604753
619
py
Python
python/send_udp.py
zhangwp-cn/study-notes
2c4a136741288fa9ce1a480ce5e03c5a0ca48880
[ "Apache-2.0" ]
null
null
null
python/send_udp.py
zhangwp-cn/study-notes
2c4a136741288fa9ce1a480ce5e03c5a0ca48880
[ "Apache-2.0" ]
null
null
null
python/send_udp.py
zhangwp-cn/study-notes
2c4a136741288fa9ce1a480ce5e03c5a0ca48880
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: UTF-8 -*- import socket def main(): # 创建一个udp套接字 udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # 可以使用套接字收发数据 # udp_socket.sendto(内容(必须是bytes类型), 对方的ip以及port) # udp_socket.sendto(b'test', ('127.0.0.1', 8000)) while True: # 从键盘获取数据(第二种方法) ...
22.925926
73
0.588045
import socket def main(): udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) while True: send_data = raw_input('请输入要发送的内容:') if send_data == 'exit': break udp_socket.sendto(send_data.encode('utf-8'), ('127.0.0.1', 8000)) ...
true
true
1c4144f7a7b43a32656b17956b5c813f53af84c4
57
py
Python
TD3/TD3.py
jordan-schneider/TD3
39d368e1e3412f97785bdd55a90ef06691e9ad0e
[ "MIT" ]
null
null
null
TD3/TD3.py
jordan-schneider/TD3
39d368e1e3412f97785bdd55a90ef06691e9ad0e
[ "MIT" ]
null
null
null
TD3/TD3.py
jordan-schneider/TD3
39d368e1e3412f97785bdd55a90ef06691e9ad0e
[ "MIT" ]
null
null
null
from .td3_arch import Td3 as TD3 from .td3_arch import *
19
32
0.77193
from .td3_arch import Td3 as TD3 from .td3_arch import *
true
true
1c4146664f300917a2b0a45b90930582a8f1102a
732
py
Python
Math/NumberSystems/ChangeBases.py
xdanielsb/Marathon-book
620f1eb9ce54fc05a923e087ef1b130c98251b60
[ "MIT" ]
4
2017-01-15T04:59:55.000Z
2018-04-06T19:51:49.000Z
Math/NumberSystems/ChangeBases.py
xdanielsb/MarathonBook
620f1eb9ce54fc05a923e087ef1b130c98251b60
[ "MIT" ]
1
2017-02-21T01:00:51.000Z
2017-03-06T03:24:27.000Z
Math/NumberSystems/ChangeBases.py
xdanielsb/MarathonBook
620f1eb9ce54fc05a923e087ef1b130c98251b60
[ "MIT" ]
null
null
null
# coding=utf-8 """ CHANGE THE BASE OF A NUMBER ob -> origin base od -> destiny base """ chars = "0123456789ABCDEFGHIJKLMNÑOPQRSTUVWXYZ" def changeBase(number, ob,od): if ob == 10: return tob(number, od) return tob(to10(number,ob),od) """ FROM ANY BASE TO BASE 10 b -> base of the number n ...
22.181818
49
0.575137
chars = "0123456789ABCDEFGHIJKLMNÑOPQRSTUVWXYZ" def changeBase(number, ob,od): if ob == 10: return tob(number, od) return tob(to10(number,ob),od) def to10(n, b, mul=1): if n == 0: return 0 return (n % 10)* mul + to10(n // 10, b, mul*b) def tob(n, b): if n == 0: return '' return tob(n...
true
true
1c4146794a59767ffd3142e8770516dba7b49a0a
1,085
py
Python
Database_test_git.py
prashankkadam/Maer_1
e201866429a1231df7f439797ef100f9e4e6da37
[ "MIT" ]
null
null
null
Database_test_git.py
prashankkadam/Maer_1
e201866429a1231df7f439797ef100f9e4e6da37
[ "MIT" ]
null
null
null
Database_test_git.py
prashankkadam/Maer_1
e201866429a1231df7f439797ef100f9e4e6da37
[ "MIT" ]
null
null
null
# -*- coding:/ utf-8 -*- """ Created on Tue Jul 23 12:07:20 2019 This piece of software is bound by The MIT License (MIT) Copyright (c) 2019 Prashank Kadam Code written by : Prashank Kadam User name - ADM-PKA187 Email ID : prashank.kadam@maersktankers.com Created on - Tue Jul 30 09:12:00 2019 version : 1.0 ""...
27.125
69
0.530876
import pyodbc import pandas as pd conn = pyodbc.connect('Driver={########################};' 'Server=##########################;' 'Database=########################;' 'uid=####################;' 'pwd=####################...
true
true
1c414684afb6797e41e60598c7a2d4084b0e1a4a
155
py
Python
config.py
TomBursch/Custom-Physics
d3a8eed2ac0129de6c6716be5ddd8e570fcb8c7d
[ "MIT" ]
null
null
null
config.py
TomBursch/Custom-Physics
d3a8eed2ac0129de6c6716be5ddd8e570fcb8c7d
[ "MIT" ]
null
null
null
config.py
TomBursch/Custom-Physics
d3a8eed2ac0129de6c6716be5ddd8e570fcb8c7d
[ "MIT" ]
null
null
null
def can_build(env, platform): return True def configure(env): pass def get_doc_classes(): return [ ] def get_doc_path(): return ""
11.071429
29
0.625806
def can_build(env, platform): return True def configure(env): pass def get_doc_classes(): return [ ] def get_doc_path(): return ""
true
true
1c41469b5ae72bc6e196a08036b5af82bec49d17
49,782
py
Python
discord/channel.py
wasi-master/discord.py
99aa562ca1c206ee0c41f0fc64599a293af45855
[ "MIT" ]
null
null
null
discord/channel.py
wasi-master/discord.py
99aa562ca1c206ee0c41f0fc64599a293af45855
[ "MIT" ]
null
null
null
discord/channel.py
wasi-master/discord.py
99aa562ca1c206ee0c41f0fc64599a293af45855
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
32.601179
124
0.596702
import time import asyncio import discord.abc from .permissions import Permissions from .enums import ChannelType, try_enum, VoiceRegion, PartyType from .mixins import Hashable from . import utils from .asset import Asset from .errors import ClientException, NoMoreItems, InvalidArgument __all__ = ( 'TextChannel'...
true
true
1c414808ed560fff7c12a3bf6402cdaca7a2f7f6
504
py
Python
project_name/wsgi.py
se42/djroku-temp1
97293faccad1aaf9a7ad0a7ee9d05066ece286c7
[ "MIT" ]
14
2016-07-05T15:08:24.000Z
2020-10-10T16:52:17.000Z
project_name/wsgi.py
se42/djroku-temp1
97293faccad1aaf9a7ad0a7ee9d05066ece286c7
[ "MIT" ]
1
2019-03-14T00:48:17.000Z
2019-03-14T00:48:17.000Z
project_name/wsgi.py
se42/djroku-temp1
97293faccad1aaf9a7ad0a7ee9d05066ece286c7
[ "MIT" ]
5
2016-07-08T12:42:25.000Z
2020-12-15T06:56:17.000Z
""" WSGI config for {{ project_name }} project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from whitenoise.django im...
26.526316
78
0.787698
import os from django.core.wsgi import get_wsgi_application from whitenoise.django import DjangoWhiteNoise os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") application = get_wsgi_application() application = DjangoWhiteNoise(application)
true
true
1c41488973978a7c770aed118e7b8cd0c1c01af0
36,199
py
Python
pandas/core/indexes/datetimelike.py
NeehaK/pandas
0815c433b58920c658f1be9c7eb00cf7e75a3e2b
[ "BSD-3-Clause" ]
1
2019-04-27T15:15:15.000Z
2019-04-27T15:15:15.000Z
pandas/core/indexes/datetimelike.py
NeehaK/pandas
0815c433b58920c658f1be9c7eb00cf7e75a3e2b
[ "BSD-3-Clause" ]
null
null
null
pandas/core/indexes/datetimelike.py
NeehaK/pandas
0815c433b58920c658f1be9c7eb00cf7e75a3e2b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Base and utility classes for tseries type pandas objects. """ import warnings import operator from datetime import datetime, timedelta from pandas import compat from pandas.compat.numpy import function as nv from pandas.core.tools.timedeltas import to_timedelta import numpy as np from pan...
32.848457
79
0.56148
import warnings import operator from datetime import datetime, timedelta from pandas import compat from pandas.compat.numpy import function as nv from pandas.core.tools.timedeltas import to_timedelta import numpy as np from pandas._libs import lib, iNaT, NaT from pandas._libs.tslibs.period import Period from pandas...
true
true
1c414889fae1a3c3b88f00ad952b2fd6174bbd2d
5,416
py
Python
test/unit/cypherpunkpay/bitcoin/pwuille/segwit_addr_test.py
RandyMcMillan/CypherpunkPay
997fc1e06865d6be75c46b719e673b2f50546f44
[ "MIT", "Unlicense" ]
null
null
null
test/unit/cypherpunkpay/bitcoin/pwuille/segwit_addr_test.py
RandyMcMillan/CypherpunkPay
997fc1e06865d6be75c46b719e673b2f50546f44
[ "MIT", "Unlicense" ]
null
null
null
test/unit/cypherpunkpay/bitcoin/pwuille/segwit_addr_test.py
RandyMcMillan/CypherpunkPay
997fc1e06865d6be75c46b719e673b2f50546f44
[ "MIT", "Unlicense" ]
null
null
null
# Copyright (c) 2017 Pieter Wuille # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distr...
39.246377
99
0.722304
import binascii import unittest from cypherpunkpay.bitcoin.pwuille import segwit_addr def segwit_scriptpubkey(witver, witprog): return bytes([witver + 0x50 if witver else 0, len(witprog)] + witprog) VALID_CHECKSUM = [ "A12UEL5L", "an83characterlonghumanreadablepartthatcontainsthen...
true
true
1c41492182a3eacb4f51a6f4a44790719a7da00d
2,062
py
Python
src/testcase.py
JeremyCCHsu/test-debug
88b3d153a4fa8d2b3eb905e9e3fd74bc9b5f9f55
[ "Apache-2.0" ]
null
null
null
src/testcase.py
JeremyCCHsu/test-debug
88b3d153a4fa8d2b3eb905e9e3fd74bc9b5f9f55
[ "Apache-2.0" ]
null
null
null
src/testcase.py
JeremyCCHsu/test-debug
88b3d153a4fa8d2b3eb905e9e3fd74bc9b5f9f55
[ "Apache-2.0" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from wavegrad.params import params from wavegrad.preprocess import transform from wavegrad.inference import predict import soundfile as sf import torchaudio # params = { 'noise_schedule': np.load('/path/to/noise_schedule.npy') } from pathlib import Path Fs = params....
30.323529
100
0.694956
import numpy as np import matplotlib.pyplot as plt from wavegrad.params import params from wavegrad.preprocess import transform from wavegrad.inference import predict import soundfile as sf import torchaudio from pathlib import Path Fs = params.sample_rate model_dir = "wavegrad-16khz-libri.pt" filename = Path( ...
true
true
1c4149e6490ac6ab923b2339c90a9b498e267805
9,718
py
Python
src/detection/scripts/aggregate_predictions.py
anuragreddygv323/raster-vision
db2bc35f21968618a333cee2f5e86f29e7d56483
[ "Apache-2.0" ]
null
null
null
src/detection/scripts/aggregate_predictions.py
anuragreddygv323/raster-vision
db2bc35f21968618a333cee2f5e86f29e7d56483
[ "Apache-2.0" ]
null
null
null
src/detection/scripts/aggregate_predictions.py
anuragreddygv323/raster-vision
db2bc35f21968618a333cee2f5e86f29e7d56483
[ "Apache-2.0" ]
1
2021-06-08T17:33:23.000Z
2021-06-08T17:33:23.000Z
import json import argparse from os import makedirs from os.path import join, splitext import numpy as np from scipy.ndimage import imread from scipy.misc import imsave import matplotlib as mpl mpl.use('Agg') # NOQA import matplotlib.pyplot as plt from cv2 import groupRectangles from object_detection.utils import lab...
30.949045
105
0.63758
import json import argparse from os import makedirs from os.path import join, splitext import numpy as np from scipy.ndimage import imread from scipy.misc import imsave import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from cv2 import groupRectangles from object_detection.utils import label_map...
true
true
1c414a4addd8bde6c44e18dfb7a96743e832ec1b
384
py
Python
day6/d6p2.py
francois07/advent-of-code-2020
7e0857406520a7cd2b7a6394639c6e69e357a34a
[ "MIT" ]
null
null
null
day6/d6p2.py
francois07/advent-of-code-2020
7e0857406520a7cd2b7a6394639c6e69e357a34a
[ "MIT" ]
null
null
null
day6/d6p2.py
francois07/advent-of-code-2020
7e0857406520a7cd2b7a6394639c6e69e357a34a
[ "MIT" ]
null
null
null
input = [x for x in open('input.txt', 'r').read().strip().split("\n\n")] def get_common_answers(data): answers = set() persons = data.splitlines() for person in persons: for answer in person: if data.count(answer) == len(persons): answers.add(answer) return len(answ...
24
72
0.601563
input = [x for x in open('input.txt', 'r').read().strip().split("\n\n")] def get_common_answers(data): answers = set() persons = data.splitlines() for person in persons: for answer in person: if data.count(answer) == len(persons): answers.add(answer) return len(answ...
true
true
1c414a664c656b48812aa2ed17578881e93d5cdc
3,573
py
Python
asposepdfcloud/models/raster_images_saving_modes.py
kaferi/aspose-pdf-cloud-python
48f70742fec1e41644ec0b658db3f174ba845304
[ "MIT" ]
7
2018-06-11T17:44:44.000Z
2022-02-08T05:52:48.000Z
asposepdfcloud/models/raster_images_saving_modes.py
kaferi/aspose-pdf-cloud-python
48f70742fec1e41644ec0b658db3f174ba845304
[ "MIT" ]
1
2021-03-20T22:16:15.000Z
2021-06-27T15:11:52.000Z
asposepdfcloud/models/raster_images_saving_modes.py
kaferi/aspose-pdf-cloud-python
48f70742fec1e41644ec0b658db3f174ba845304
[ "MIT" ]
4
2018-04-18T19:41:12.000Z
2021-06-21T13:12:24.000Z
# coding: utf-8 """ Aspose.PDF Cloud API Reference Copyright (c) 2021 Aspose.PDF Cloud Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the r...
29.04878
78
0.620767
from pprint import pformat from six import iteritems import re class RasterImagesSavingModes(object): ASPNGIMAGESEMBEDDEDINTOSVG = "AsPngImagesEmbeddedIntoSvg" ASEXTERNALPNGFILESREFERENCEDVIASVG = "AsExternalPngFilesReferencedViaSvg" ASEMBEDDEDPARTSOFPNGPAGEBACKGROUND = "AsEmbeddedPartsOfPngPageBackg...
true
true
1c414bb40d653e292e566df382e6f807b691cba3
10,268
py
Python
pyfda/filter_designs/cheby1.py
toddrme2178/pyfda
c20355fb36ace6902aebd1a6bc6c1a71771b84f4
[ "MIT" ]
1
2021-05-17T21:27:39.000Z
2021-05-17T21:27:39.000Z
pyfda/filter_designs/cheby1.py
toddrme2178/pyfda
c20355fb36ace6902aebd1a6bc6c1a71771b84f4
[ "MIT" ]
null
null
null
pyfda/filter_designs/cheby1.py
toddrme2178/pyfda
c20355fb36ace6902aebd1a6bc6c1a71771b84f4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of the pyFDA project hosted at https://github.com/chipmuenk/pyfda # # Copyright © pyFDA Project Contributors # Licensed under the terms of the MIT License # (see file LICENSE in root directory for details) """ Design Chebychev 1 filters (LP, HP, BP, BS) with fixed or minim...
40.908367
101
0.571289
import scipy.signal as sig from scipy.signal import cheb1ord from pyfda.pyfda_lib import fil_save, SOS_AVAIL, lin2unit from pyfda.pyfda_qt_lib import qfilter_warning from .common import Common __version__ = "2.2" classes = {'Cheby1':'Chebychev 1'} class Cheby1(object): if SOS_AVAIL: FRMT = ...
true
true
1c414ded33c00441a31fb53a36c808e64b51b991
18,195
py
Python
jsonpickle/pickler.py
juggernautbooks/jsonpickle
e819193cfac6cc2c30bf90b2ccfc92f1e6d967d9
[ "BSD-3-Clause" ]
null
null
null
jsonpickle/pickler.py
juggernautbooks/jsonpickle
e819193cfac6cc2c30bf90b2ccfc92f1e6d967d9
[ "BSD-3-Clause" ]
null
null
null
jsonpickle/pickler.py
juggernautbooks/jsonpickle
e819193cfac6cc2c30bf90b2ccfc92f1e6d967d9
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2008 John Paulett (john -at- paulett.org) # Copyright (C) 2009, 2011, 2013 David Aguilar (davvid -at- gmail.com) and contributors # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution...
32.961957
87
0.547843
from __future__ import absolute_import, division, unicode_literals import base64 import warnings import sys from itertools import chain, islice from . import util from . import tags from . import handlers from .backend import JSONBackend from .compat import numeric_types, unicode, PY3, PY2 def encode(value, ...
true
true
1c414df555fb5193e1798c9639acfa8994ea9cdb
42
py
Python
test/__init__.py
arthurtofani/footprint
572401d4cba3299ae9915fca2a7d08ea1a3a9bc4
[ "MIT" ]
null
null
null
test/__init__.py
arthurtofani/footprint
572401d4cba3299ae9915fca2a7d08ea1a3a9bc4
[ "MIT" ]
null
null
null
test/__init__.py
arthurtofani/footprint
572401d4cba3299ae9915fca2a7d08ea1a3a9bc4
[ "MIT" ]
null
null
null
from . import audio from . import project
14
21
0.761905
from . import audio from . import project
true
true
1c414e07399e5fbe74a7cf5f9b12c516dc90deb9
814
py
Python
xlsxwriter/test/comparison/test_textbox33.py
timgates42/XlsxWriter
129044ed821de67895b4562c6b71f90eba5be6b4
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_textbox33.py
timgates42/XlsxWriter
129044ed821de67895b4562c6b71f90eba5be6b4
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_textbox33.py
timgates42/XlsxWriter
129044ed821de67895b4562c6b71f90eba5be6b4
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
23.941176
83
0.615479
true
true
1c414ec054ba0da54f927fb23732049665126be2
799
py
Python
octopus/task/utils.py
quaintm/octopus
95a732207ee5f43cd0065d8ea6c643cbf3df2d61
[ "BSD-3-Clause" ]
null
null
null
octopus/task/utils.py
quaintm/octopus
95a732207ee5f43cd0065d8ea6c643cbf3df2d61
[ "BSD-3-Clause" ]
null
null
null
octopus/task/utils.py
quaintm/octopus
95a732207ee5f43cd0065d8ea6c643cbf3df2d61
[ "BSD-3-Clause" ]
null
null
null
from flask import flash from flask.ext.login import current_user from octopus.models import User, Task def create_query(args, q): valid = True user_id = args.get('user_id') type = args.get('type') if user_id: if user_id == "me": user = User.get_by_id(current_user.id) else: try: u...
21.594595
52
0.598248
from flask import flash from flask.ext.login import current_user from octopus.models import User, Task def create_query(args, q): valid = True user_id = args.get('user_id') type = args.get('type') if user_id: if user_id == "me": user = User.get_by_id(current_user.id) else: try: u...
true
true
1c414f10a2e3083a64cdc99b0ec3e514d4ff6780
2,133
py
Python
teach.py
JMagee03/BabysFirstWords
31245b499c34cf4deaab7011c74a8aac265426a2
[ "Apache-2.0" ]
null
null
null
teach.py
JMagee03/BabysFirstWords
31245b499c34cf4deaab7011c74a8aac265426a2
[ "Apache-2.0" ]
null
null
null
teach.py
JMagee03/BabysFirstWords
31245b499c34cf4deaab7011c74a8aac265426a2
[ "Apache-2.0" ]
null
null
null
from teachFiles import files, greetings, operations, quizes, breakQues, correct, readSentence, playVideo def teach(): learning_data = files() greetings(0) end_game = 1 while end_game != 0: res = operations() print(res) section = 1 # name = section(res) ...
41.823529
150
0.35443
from teachFiles import files, greetings, operations, quizes, breakQues, correct, readSentence, playVideo def teach(): learning_data = files() greetings(0) end_game = 1 while end_game != 0: res = operations() print(res) section = 1 if res[0] == 3: ...
true
true
1c414f959bd6404040555021e10416c878fce4db
7,733
py
Python
py/vtproto/vttest_pb2.py
paralin/vitess
7b048c5442679ce6cf48773cf17a184c1ce91295
[ "Apache-2.0" ]
8
2017-08-14T15:19:04.000Z
2021-06-07T10:36:52.000Z
py/vtproto/vttest_pb2.py
paralin/vitess
7b048c5442679ce6cf48773cf17a184c1ce91295
[ "Apache-2.0" ]
19
2020-09-25T15:41:41.000Z
2022-03-25T23:06:54.000Z
py/vtproto/vttest_pb2.py
paralin/vitess
7b048c5442679ce6cf48773cf17a184c1ce91295
[ "Apache-2.0" ]
7
2021-03-07T03:24:39.000Z
2022-02-16T06:46:10.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: vttest.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflec...
37.357488
669
0.73723
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db =...
true
true
1c41506e1f1ff6771be6cdc6dfbec700f86ff83a
14,332
py
Python
scripts/devops_tasks/common_tasks.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
null
null
null
scripts/devops_tasks/common_tasks.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
null
null
null
scripts/devops_tasks/common_tasks.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
32.947126
157
0.662155
import glob from subprocess import check_call, CalledProcessError import os import errno import shutil import sys import logging import ast import textwrap import io import re import pdb from pkg_resources import parse_version, parse_requirements, Requirement, WorkingSet, working_set from packaging.specif...
true
true
1c415330ea5efeebcb714170df4355ed6072565d
1,448
py
Python
tools/pubsub2inbox/test/helpers.py
marcosgm/professional-services
f332b425c2f3b6538ebf65afda7e67de3bed1b3d
[ "Apache-2.0" ]
2,116
2017-05-18T19:33:05.000Z
2022-03-31T13:34:48.000Z
tools/pubsub2inbox/test/helpers.py
hyuatpc/professional-services
e5c811a8752e91fdf9f959a0414931010b0ea1ba
[ "Apache-2.0" ]
548
2017-05-20T05:05:35.000Z
2022-03-28T16:38:12.000Z
tools/pubsub2inbox/test/helpers.py
hyuatpc/professional-services
e5c811a8752e91fdf9f959a0414931010b0ea1ba
[ "Apache-2.0" ]
1,095
2017-05-19T00:02:36.000Z
2022-03-31T05:21:39.000Z
# Copyright 2021 Google LLC # # 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 applicable law or agreed to i...
34.47619
76
0.665055
import json import yaml from google.cloud.functions.context import Context def load_config(config_name, params=None): with open('test/configs/%s.yaml' % config_name) as config_file: configuration = config_file.read() if params: for k, v in params.items(): configuratio...
true
true
1c4154cfa8ff7d4d1877f98c4f6d29d63c17d20c
13,107
py
Python
safe_eval/eval.py
bentheiii/safe_eval
caf9e7a6df3d6029e4bdac2abe11326d55c09ed2
[ "MIT" ]
1
2021-05-16T17:24:05.000Z
2021-05-16T17:24:05.000Z
safe_eval/eval.py
bentheiii/safe_eval
caf9e7a6df3d6029e4bdac2abe11326d55c09ed2
[ "MIT" ]
null
null
null
safe_eval/eval.py
bentheiii/safe_eval
caf9e7a6df3d6029e4bdac2abe11326d55c09ed2
[ "MIT" ]
null
null
null
from __future__ import annotations import operator as op from _ast import Name, Call, Starred, Constant, BinOp, Compare, UnaryOp, BoolOp, Attribute, FormattedValue, \ JoinedStr, IfExp, Lambda, Subscript, \ ListComp, SetComp, GeneratorExp, \ DictComp, \ expr, \ List, Tuple, Set, \ Add, Sub, Mult...
41.609524
116
0.572976
from __future__ import annotations import operator as op from _ast import Name, Call, Starred, Constant, BinOp, Compare, UnaryOp, BoolOp, Attribute, FormattedValue, \ JoinedStr, IfExp, Lambda, Subscript, \ ListComp, SetComp, GeneratorExp, \ DictComp, \ expr, \ List, Tuple, Set, \ Add, Sub, Mult...
true
true
1c41553ba4e6165690f9a5e5c27ea482b29ea8af
249
py
Python
transformers/data/processors/__init__.py
mandubian/transformers
0cb163865a4c761c226b151283309eedb2b1ca4d
[ "Apache-2.0" ]
19
2019-12-11T02:16:47.000Z
2021-10-04T05:11:22.000Z
transformers/data/processors/__init__.py
mandubian/transformers
0cb163865a4c761c226b151283309eedb2b1ca4d
[ "Apache-2.0" ]
9
2020-09-25T20:49:41.000Z
2022-02-10T00:32:07.000Z
transformers/data/processors/__init__.py
mandubian/transformers
0cb163865a4c761c226b151283309eedb2b1ca4d
[ "Apache-2.0" ]
5
2020-02-10T07:16:54.000Z
2021-06-16T19:11:12.000Z
from .utils import InputExample, InputFeatures, DataProcessor from .glue import glue_output_modes, glue_processors, glue_tasks_num_labels, glue_convert_examples_to_features from .xnli import xnli_output_modes, xnli_processors, xnli_tasks_num_labels
62.25
110
0.883534
from .utils import InputExample, InputFeatures, DataProcessor from .glue import glue_output_modes, glue_processors, glue_tasks_num_labels, glue_convert_examples_to_features from .xnli import xnli_output_modes, xnli_processors, xnli_tasks_num_labels
true
true
1c41575a029ee3631339212c2f2268f57c9ea296
1,681
py
Python
logging_config.py
Vinz87/DSNMonitor
0c4a8d84f5adf99394963a75701cdd59ce9bd073
[ "MIT" ]
2
2022-01-06T17:52:16.000Z
2022-01-06T23:21:46.000Z
logging_config.py
Vinz87/DSNMonitor
0c4a8d84f5adf99394963a75701cdd59ce9bd073
[ "MIT" ]
null
null
null
logging_config.py
Vinz87/DSNMonitor
0c4a8d84f5adf99394963a75701cdd59ce9bd073
[ "MIT" ]
null
null
null
import os import sys import pwd import grp import requests import logging import logging.handlers # Disable requests warnings requests.packages.urllib3.disable_warnings() logging.getLogger("requests").setLevel(logging.WARNING) logging.getLogger("requests").addHandler(logging.NullHandler()) # Create log folder parent_...
35.765957
102
0.775729
import os import sys import pwd import grp import requests import logging import logging.handlers requests.packages.urllib3.disable_warnings() logging.getLogger("requests").setLevel(logging.WARNING) logging.getLogger("requests").addHandler(logging.NullHandler()) parent_folder = os.path.dirname(os.path.realpath(sys....
true
true
1c4158d92d4823278228983279c764c40df5def5
146,387
py
Python
src/sage/rings/asymptotic/asymptotic_ring.py
robertwb/sage
1b1e6f608d1ef8ee664bb19e991efbbc68cbd51f
[ "BSL-1.0" ]
2
2018-06-30T01:37:35.000Z
2018-06-30T01:37:39.000Z
src/sage/rings/asymptotic/asymptotic_ring.py
boothby/sage
1b1e6f608d1ef8ee664bb19e991efbbc68cbd51f
[ "BSL-1.0" ]
null
null
null
src/sage/rings/asymptotic/asymptotic_ring.py
boothby/sage
1b1e6f608d1ef8ee664bb19e991efbbc68cbd51f
[ "BSL-1.0" ]
null
null
null
r""" Asymptotic Ring This module provides a ring (called :class:`AsymptoticRing`) for computations with :wikipedia:`asymptotic expansions <Asymptotic_expansion>`. .. _asymptotic_ring_definition: (Informal) Definition ===================== An asymptotic expansion is a sum such as .. MATH:: 5z^3 + 4z^2 + O(z) ...
32.523217
121
0.538668
from __future__ import print_function from __future__ import absolute_import from sage.rings.ring import Algebra from sage.structure.element import CommutativeAlgebraElement from sage.structure.unique_representation import UniqueRepresentation from sage.misc.defaults import series_precision from sage.misc.s...
true
true
1c415974dbb17efd80c002344c32610098e1e9c0
386
py
Python
tests/test_comments.py
derrokip34/Blog
ec6d6acb0c69ea42a8ea99c6836d943ad7417984
[ "MIT" ]
null
null
null
tests/test_comments.py
derrokip34/Blog
ec6d6acb0c69ea42a8ea99c6836d943ad7417984
[ "MIT" ]
null
null
null
tests/test_comments.py
derrokip34/Blog
ec6d6acb0c69ea42a8ea99c6836d943ad7417984
[ "MIT" ]
null
null
null
import unittest from app.models import Comments class CommentTest(unittest.TestCase): def setUp(self): self.new_comment = Comments(comment="Great Idea") def test_instance(self): self.assertTrue(isinstance(self.new_comment,Comments)) def test_save_comment(self): self.new_comment.s...
27.571429
62
0.715026
import unittest from app.models import Comments class CommentTest(unittest.TestCase): def setUp(self): self.new_comment = Comments(comment="Great Idea") def test_instance(self): self.assertTrue(isinstance(self.new_comment,Comments)) def test_save_comment(self): self.new_comment.s...
true
true
1c415b018bc2ea14b606ce70a1d3704a8e03c347
14,497
bzl
Python
third_party/systemlibs/protobuf.bzl
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
26
2019-11-10T15:33:34.000Z
2022-03-24T19:56:57.000Z
third_party/systemlibs/protobuf.bzl
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
6
2022-01-15T07:17:47.000Z
2022-02-14T15:28:22.000Z
third_party/systemlibs/protobuf.bzl
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
6
2020-03-29T11:10:53.000Z
2021-06-14T05:39:14.000Z
def _GetPath(ctx, path): if ctx.label.workspace_root: return ctx.label.workspace_root + "/" + path else: return path def _IsNewExternal(ctx): # Bazel 0.4.4 and older have genfiles paths that look like: # bazel-out/local-fastbuild/genfiles/external/repo/foo # After the exec root re...
33.95082
92
0.618266
def _GetPath(ctx, path): if ctx.label.workspace_root: return ctx.label.workspace_root + "/" + path else: return path def _IsNewExternal(ctx): return ctx.label.workspace_root.startswith("../") def _GenDir(ctx): if _IsNewExternal(ctx): return...
true
true
1c415ce4cd5e6ed0e7a362c262c6aebfe3a7ea7b
4,153
py
Python
func_TDX.py
nanomiter/stock-analysis
3b2abd48e6419733c0508f7a974c559d734d31e8
[ "Apache-2.0" ]
25
2021-01-27T14:45:11.000Z
2022-03-30T06:10:42.000Z
func_TDX.py
nanomiter/stock-analysis
3b2abd48e6419733c0508f7a974c559d734d31e8
[ "Apache-2.0" ]
3
2021-05-17T14:12:55.000Z
2021-05-18T08:43:40.000Z
func_TDX.py
wkingnet/stock-analysis
74dc99a3acd871b558607078a1ee7787a73a9c85
[ "Apache-2.0" ]
16
2021-03-26T03:51:43.000Z
2022-03-28T03:05:19.000Z
#!/usr/bin/python # -*- coding: UTF-8 -*- """ 模仿通达信语句的函数库,如MA(C,5) REF(C,1)等样式。函数简单,只为了和通达信公式看起来一致,方便排查。 传入类型必须是pandas Series类型。 传出类型:只有MA输出具体数值,其他所有函数传出仍然是Series类型 作者:wking [http://wkings.net] """ import pandas as pd def rolling_window(a, window): """ copy from http://stackoverflow.com/questions/6811183/rol...
25.323171
105
0.58223
import pandas as pd def rolling_window(a, window): from numpy.lib.stride_tricks import sliding_window_view return sliding_window_view(a, window_shape=window) def REF(value, day): if 'list' in str(type(value)): result = value[~day] elif 'series' in str(type(value)): result = value....
true
true
1c415d07096084a318cac7610f73c87dd5816ce6
2,290
py
Python
dfvfs/encryption/manager.py
dfjxs/dfvfs
a4154b07bb08c3c86afa2847f3224189dd80c138
[ "Apache-2.0" ]
176
2015-01-02T13:55:39.000Z
2022-03-12T11:44:37.000Z
dfvfs/encryption/manager.py
dfjxs/dfvfs
a4154b07bb08c3c86afa2847f3224189dd80c138
[ "Apache-2.0" ]
495
2015-01-13T06:47:06.000Z
2022-03-12T11:07:03.000Z
dfvfs/encryption/manager.py
dfjxs/dfvfs
a4154b07bb08c3c86afa2847f3224189dd80c138
[ "Apache-2.0" ]
62
2015-02-23T08:19:38.000Z
2022-03-18T06:01:22.000Z
# -*- coding: utf-8 -*- """The encryption manager.""" class EncryptionManager(object): """Encryption manager.""" _decrypters = {} @classmethod def DeregisterDecrypter(cls, decrypter): """Deregisters a decrypter for a specific encryption method. Args: decrypter (type): decrypter class. Ra...
27.926829
78
0.695197
class EncryptionManager(object): _decrypters = {} @classmethod def DeregisterDecrypter(cls, decrypter): encryption_method = decrypter.ENCRYPTION_METHOD.lower() if encryption_method not in cls._decrypters: raise KeyError( 'Decrypter for encryption method: {0:s} not set.'.format( ...
true
true
1c415de3cd60b3921a89fd82651df715b22e74fa
1,029
py
Python
tests/test_math.py
ssube/redesigned-barnacle
314ea415b6f725c798cc97d6e619fbedc7f8bd21
[ "MIT" ]
null
null
null
tests/test_math.py
ssube/redesigned-barnacle
314ea415b6f725c798cc97d6e619fbedc7f8bd21
[ "MIT" ]
1
2021-11-04T16:00:15.000Z
2021-11-04T16:00:15.000Z
tests/test_math.py
ssube/redesigned-barnacle
314ea415b6f725c798cc97d6e619fbedc7f8bd21
[ "MIT" ]
null
null
null
from redesigned_barnacle.math import scale, temp_ftoc from unittest import TestCase class TempFToCTest(TestCase): def test_convert(self): self.assertAlmostEqual(temp_ftoc(-50), -45.56, 2) self.assertAlmostEqual(temp_ftoc(-40), -40.00, 2) self.assertAlmostEqual(temp_ftoc(-30), -34.44, 2) ...
38.111111
57
0.638484
from redesigned_barnacle.math import scale, temp_ftoc from unittest import TestCase class TempFToCTest(TestCase): def test_convert(self): self.assertAlmostEqual(temp_ftoc(-50), -45.56, 2) self.assertAlmostEqual(temp_ftoc(-40), -40.00, 2) self.assertAlmostEqual(temp_ftoc(-30), -34.44, 2) ...
true
true
1c415e73bea6d4794cd0d3190380c24ee48d1f1b
159
py
Python
Scripts/django-admin.py
brandongallagher1999/Django_CRUD
e7da7c7c63f26e59804a578f1ba5d9562753805f
[ "bzip2-1.0.6" ]
null
null
null
Scripts/django-admin.py
brandongallagher1999/Django_CRUD
e7da7c7c63f26e59804a578f1ba5d9562753805f
[ "bzip2-1.0.6" ]
null
null
null
Scripts/django-admin.py
brandongallagher1999/Django_CRUD
e7da7c7c63f26e59804a578f1ba5d9562753805f
[ "bzip2-1.0.6" ]
null
null
null
#!c:\users\crypt\desktop\hatchw~1\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
26.5
52
0.779874
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
1c416042ef8064181370445b109ff0d2c35f5a88
3,704
py
Python
contrib/macdeploy/custom_dsstore.py
BramandUn/PALLY1
036c473dddc7534c0979b159ca458e8a3a8a10cb
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
BramandUn/PALLY1
036c473dddc7534c0979b159ca458e8a3a8a10cb
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
BramandUn/PALLY1
036c473dddc7534c0979b159ca458e8a3a8a10cb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import biplist from ds_store import DSStore from mac_alias import Alias import sys output_file = sys.argv...
61.733333
1,817
0.723812
import biplist from ds_store import DSStore from mac_alias import Alias import sys output_file = sys.argv[1] package_name_ns = sys.argv[2] ds = DSStore.open(output_file, 'w+') ds['.']['bwsp'] = { 'ShowStatusBar': False, 'WindowBounds': b'{{300, 280}, {500, 343}}', 'ContainerShowSidebar': False, 'S...
true
true
1c41610b8152ea716012d657c593c398587210ff
1,934
py
Python
app/modules/user.py
hboueix/PyCheckers
c1339a004f30f76a33461b52f9633bbbd1204bb0
[ "MIT" ]
null
null
null
app/modules/user.py
hboueix/PyCheckers
c1339a004f30f76a33461b52f9633bbbd1204bb0
[ "MIT" ]
null
null
null
app/modules/user.py
hboueix/PyCheckers
c1339a004f30f76a33461b52f9633bbbd1204bb0
[ "MIT" ]
null
null
null
import sys import socket import errno HEADER_LENGTH = 10 IP = "hboueix.fr" PORT = 63000 class User: def __init__(self, username): self.username = username self.client_socket = self.get_client_socket() self.recv_text = '' def get_client_socket(self): client_socket = socket.s...
32.233333
83
0.59514
import sys import socket import errno HEADER_LENGTH = 10 IP = "hboueix.fr" PORT = 63000 class User: def __init__(self, username): self.username = username self.client_socket = self.get_client_socket() self.recv_text = '' def get_client_socket(self): client_socket = socket.s...
true
true
1c41615ee564edd382539594e6811f0465ddaaf7
2,389
py
Python
HouseSpider/HouseSpider/middlewares.py
wangzihan424/HouseSpider
a3592d4fe4e8bc04a3972dabdbb1edeca3fee036
[ "MIT" ]
null
null
null
HouseSpider/HouseSpider/middlewares.py
wangzihan424/HouseSpider
a3592d4fe4e8bc04a3972dabdbb1edeca3fee036
[ "MIT" ]
null
null
null
HouseSpider/HouseSpider/middlewares.py
wangzihan424/HouseSpider
a3592d4fe4e8bc04a3972dabdbb1edeca3fee036
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your spider middleware # # See documentation in: # http://doc.scrapy.org/en/latest/topics/spider-middleware.html from scrapy import signals class HousespiderSpiderMiddleware(object): # Not all methods need to be defined. If a method is not defined, # scra...
31.853333
78
0.672666
from scrapy import signals class HousespiderSpiderMiddleware(object): @classmethod def from_crawler(cls, crawler): s = cls() crawler.signals.connect(s.spider_opened, signal=signals.spider_opened) return s def process_spider_input(self, response, spi...
true
true
1c4161c3a422be6f32faf81d7ea781eb278f2d1c
38
py
Python
aws_toolbox/__init__.py
miniche/aws-toolbox
8d334ca1f3eec449db258843cf3e396fe7879484
[ "MIT" ]
null
null
null
aws_toolbox/__init__.py
miniche/aws-toolbox
8d334ca1f3eec449db258843cf3e396fe7879484
[ "MIT" ]
null
null
null
aws_toolbox/__init__.py
miniche/aws-toolbox
8d334ca1f3eec449db258843cf3e396fe7879484
[ "MIT" ]
null
null
null
__author__ = 'Charles-Emmanuel CAMUS'
19
37
0.789474
__author__ = 'Charles-Emmanuel CAMUS'
true
true
1c41630a00c44705730ff4723c8867290a108324
6,236
py
Python
meme_clusters2sqlite.py
musically-ut/datasets2sqlite
b9f40cf763b632343e1f35011826239952d9441c
[ "MIT" ]
1
2015-10-25T21:23:23.000Z
2015-10-25T21:23:23.000Z
meme_clusters2sqlite.py
musically-ut/datasets2sqlite
b9f40cf763b632343e1f35011826239952d9441c
[ "MIT" ]
null
null
null
meme_clusters2sqlite.py
musically-ut/datasets2sqlite
b9f40cf763b632343e1f35011826239952d9441c
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import sqlite3 import gzip import bz2 import sys import argparse import datetime as D def logTime(chkpoint): print('*** Checkpoint: {} at \x1b[31m{}\x1b[0m'.format(chkpoint, D.datetime.now())) sys.stdout.flush() argParser = argparse.ArgumentParser() ...
34.453039
140
0.527101
from __future__ import print_function import sqlite3 import gzip import bz2 import sys import argparse import datetime as D def logTime(chkpoint): print('*** Checkpoint: {} at \x1b[31m{}\x1b[0m'.format(chkpoint, D.datetime.now())) sys.stdout.flush() argParser = argparse.ArgumentParser() argParser.add_argumen...
true
true
1c4164c5f31496240c8e2857c60e11d8b7730cbe
2,729
py
Python
IMERG_LR/main.py
VSCHY/download_SatPP
58ccffbce639496afdb54bbf41cd965f2c3b7037
[ "MIT" ]
1
2021-12-11T07:41:14.000Z
2021-12-11T07:41:14.000Z
IMERG_LR/main.py
VSCHY/download_SatPP
58ccffbce639496afdb54bbf41cd965f2c3b7037
[ "MIT" ]
null
null
null
IMERG_LR/main.py
VSCHY/download_SatPP
58ccffbce639496afdb54bbf41cd965f2c3b7037
[ "MIT" ]
null
null
null
import sys sys.path.append("./library") import requests from datetime import date, timedelta import numpy as np import os import subprocess import time import multiprocessing import random import glob from imerg_func import * import download_function as down from calendar import monthrange import configparser confi...
34.544304
124
0.562111
import sys sys.path.append("./library") import requests from datetime import date, timedelta import numpy as np import os import subprocess import time import multiprocessing import random import glob from imerg_func import * import download_function as down from calendar import monthrange import configparser confi...
true
true
1c4164f928ee5e3d0296312887baf66d219abfbf
774
py
Python
reader/models/entry.py
joyfulflyer/billboard-viewer
40b1c27f22858f45f0d745a216697db05a4f8e66
[ "MIT" ]
null
null
null
reader/models/entry.py
joyfulflyer/billboard-viewer
40b1c27f22858f45f0d745a216697db05a4f8e66
[ "MIT" ]
2
2021-08-09T17:18:15.000Z
2021-08-09T17:18:20.000Z
reader/models/entry.py
joyfulflyer/billboard-viewer
40b1c27f22858f45f0d745a216697db05a4f8e66
[ "MIT" ]
null
null
null
from sqlalchemy import Column, ForeignKey, Integer, String from .base import Base from .song import Song class Entry(Base): __tablename__ = 'entries' id = Column(Integer, primary_key=True) name = Column(String(256), nullable=False) artist = Column(String(128), nullable=False) place = Column(Inte...
33.652174
73
0.682171
from sqlalchemy import Column, ForeignKey, Integer, String from .base import Base from .song import Song class Entry(Base): __tablename__ = 'entries' id = Column(Integer, primary_key=True) name = Column(String(256), nullable=False) artist = Column(String(128), nullable=False) place = Column(Inte...
true
true
1c4166cf120940029f565f6c6ea135b19e969666
1,789
py
Python
bounties_api/std_bounties/views/issuer_leaderboard_views.py
tenthirtyone/BountiesAPI
2bb449a947d987072be24633ba36fbd67c0ab29b
[ "MIT" ]
45
2018-03-24T21:37:59.000Z
2021-11-12T11:53:04.000Z
bounties_api/std_bounties/views/issuer_leaderboard_views.py
tenthirtyone/BountiesAPI
2bb449a947d987072be24633ba36fbd67c0ab29b
[ "MIT" ]
192
2018-03-15T22:42:51.000Z
2022-02-12T11:42:20.000Z
bounties_api/std_bounties/views/issuer_leaderboard_views.py
tenthirtyone/BountiesAPI
2bb449a947d987072be24633ba36fbd67c0ab29b
[ "MIT" ]
27
2018-03-23T17:12:27.000Z
2021-12-06T02:21:26.000Z
from django.http import JsonResponse from django.db import connection from rest_framework.views import APIView from bounties.utils import extractInParams, limitOffsetParams, sqlGenerateOrList, dictfetchall from std_bounties.serializers import LeaderboardIssuerSerializer from std_bounties.queries import LEADERBOARD_ISSU...
44.725
97
0.658468
from django.http import JsonResponse from django.db import connection from rest_framework.views import APIView from bounties.utils import extractInParams, limitOffsetParams, sqlGenerateOrList, dictfetchall from std_bounties.serializers import LeaderboardIssuerSerializer from std_bounties.queries import LEADERBOARD_ISSU...
true
true
1c41671304cbc88eb8f5cf188d0401df08e5547c
6,002
py
Python
celery/utils/compat.py
westurner/celery
41964f24df4c8ca5d96bf0d644e40778212e10cb
[ "BSD-3-Clause" ]
1
2015-02-27T00:56:02.000Z
2015-02-27T00:56:02.000Z
celery/utils/compat.py
westurner/celery
41964f24df4c8ca5d96bf0d644e40778212e10cb
[ "BSD-3-Clause" ]
null
null
null
celery/utils/compat.py
westurner/celery
41964f24df4c8ca5d96bf0d644e40778212e10cb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ celery.utils.compat ~~~~~~~~~~~~~~~~~~~ Backward compatible implementations of features only available in newer Python versions. :copyright: (c) 2009 - 2012 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import #####...
35.099415
77
0.545485
from __future__ import absolute_import
true
true
1c4167493f0b56ba96ed1136204fbfbc16070956
268
py
Python
sshspawner/__init__.py
andersy005/jupyterhub-sshspawner
f9a7d3e79933fb09e5d1ad047dc7360650355a7e
[ "BSD-3-Clause" ]
null
null
null
sshspawner/__init__.py
andersy005/jupyterhub-sshspawner
f9a7d3e79933fb09e5d1ad047dc7360650355a7e
[ "BSD-3-Clause" ]
null
null
null
sshspawner/__init__.py
andersy005/jupyterhub-sshspawner
f9a7d3e79933fb09e5d1ad047dc7360650355a7e
[ "BSD-3-Clause" ]
null
null
null
# flake8: noqa from pkg_resources import DistributionNotFound, get_distribution from sshspawner.spawner import SSHSpawner try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed __version__ = '0.0.0'
24.363636
64
0.791045
from pkg_resources import DistributionNotFound, get_distribution from sshspawner.spawner import SSHSpawner try: __version__ = get_distribution(__name__).version except DistributionNotFound: __version__ = '0.0.0'
true
true
1c4167d76d465eec4113edccbecd76a3932b315b
1,723
py
Python
test/augmenter/word/test_wordnet.py
booltime/nlpaug
d21e51bacd170dcd3dddfc34a401f0215f91dbf1
[ "MIT" ]
1
2021-09-08T09:18:02.000Z
2021-09-08T09:18:02.000Z
test/augmenter/word/test_wordnet.py
booltime/nlpaug
d21e51bacd170dcd3dddfc34a401f0215f91dbf1
[ "MIT" ]
null
null
null
test/augmenter/word/test_wordnet.py
booltime/nlpaug
d21e51bacd170dcd3dddfc34a401f0215f91dbf1
[ "MIT" ]
null
null
null
import unittest import nlpaug.augmenter.word as naw class TestWordNet(unittest.TestCase): def test_substitute(self): texts = [ 'The quick brown fox jumps over the lazy dog' ] aug = naw.WordNetAug() for text in texts: self.assertLess(0, len(text)) ...
25.716418
65
0.56065
import unittest import nlpaug.augmenter.word as naw class TestWordNet(unittest.TestCase): def test_substitute(self): texts = [ 'The quick brown fox jumps over the lazy dog' ] aug = naw.WordNetAug() for text in texts: self.assertLess(0, len(text)) ...
true
true
1c4168eceaf0cb531cc307193aca0764d0846993
7,239
py
Python
tools/extra/plot_training_log.py
liuxianming/DistillingCaffe
2dec7f33c1873c4edc1068602d282982df1f18f4
[ "BSD-2-Clause" ]
null
null
null
tools/extra/plot_training_log.py
liuxianming/DistillingCaffe
2dec7f33c1873c4edc1068602d282982df1f18f4
[ "BSD-2-Clause" ]
null
null
null
tools/extra/plot_training_log.py
liuxianming/DistillingCaffe
2dec7f33c1873c4edc1068602d282982df1f18f4
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python import inspect import os import random import sys import matplotlib.cm as cmx import matplotlib.colors as colors import matplotlib.pyplot as plt import matplotlib.legend as lgd import matplotlib.markers as mks def get_log_parsing_script(): dirname = os.path.dirname(os.path.abspath(inspect.get...
37.314433
87
0.64042
import inspect import os import random import sys import matplotlib.cm as cmx import matplotlib.colors as colors import matplotlib.pyplot as plt import matplotlib.legend as lgd import matplotlib.markers as mks def get_log_parsing_script(): dirname = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentf...
false
true
1c41694e4fca0b78923596a73b7d57d20fdf84da
2,063
py
Python
pymagnitude/third_party/allennlp/data/fields/array_field.py
tpeng/magnitude
aec98628b5547773ca8c4114ec6d1ad51e21b230
[ "MIT" ]
1,520
2018-03-01T13:37:49.000Z
2022-03-25T11:40:20.000Z
pymagnitude/third_party/allennlp/data/fields/array_field.py
tpeng/magnitude
aec98628b5547773ca8c4114ec6d1ad51e21b230
[ "MIT" ]
87
2018-03-03T15:12:50.000Z
2022-02-21T15:24:12.000Z
pymagnitude/third_party/allennlp/data/fields/array_field.py
tpeng/magnitude
aec98628b5547773ca8c4114ec6d1ad51e21b230
[ "MIT" ]
121
2018-03-03T08:40:53.000Z
2022-03-16T05:19:38.000Z
from __future__ import absolute_import #typing import numpy import torch #overrides from allennlp.data.fields.field import Field class ArrayField(Field): u""" A class representing an array, which could have arbitrary dimensions. A batch of these arrays are padded to the max dimension length in the batc...
37.509091
102
0.635967
from __future__ import absolute_import import numpy import torch from allennlp.data.fields.field import Field class ArrayField(Field): def __init__(self, array , padding_value = 0) : self.array = array self.padding_value = padding_value def get_padding_leng...
true
true
1c4169d6afe30d4591c02c39ec558246c822c3b8
5,504
py
Python
zerogercrnn/lib/attn.py
zerogerc/rnn-autocomplete
39dc8dd7c431cb8ac9e15016388ec823771388e4
[ "Apache-2.0" ]
7
2019-02-27T09:48:39.000Z
2021-11-30T19:01:01.000Z
zerogercrnn/lib/attn.py
ZeRoGerc/rnn-autocomplete
39dc8dd7c431cb8ac9e15016388ec823771388e4
[ "Apache-2.0" ]
null
null
null
zerogercrnn/lib/attn.py
ZeRoGerc/rnn-autocomplete
39dc8dd7c431cb8ac9e15016388ec823771388e4
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from zerogercrnn.lib.calculation import drop_matrix_rows_3d, calc_attention_combination from zerogercrnn.lib.core import BaseModule from zerogercrnn.lib.utils import init_layers_uniform, get_best_device class CyclicBuffer: def __init__(self, buff...
36.693333
115
0.640625
import torch import torch.nn as nn import torch.nn.functional as F from zerogercrnn.lib.calculation import drop_matrix_rows_3d, calc_attention_combination from zerogercrnn.lib.core import BaseModule from zerogercrnn.lib.utils import init_layers_uniform, get_best_device class CyclicBuffer: def __init__(self, buff...
true
true
1c416a7d77536a53872baee1f19eacd7b3113bd7
565
py
Python
Screw up/kindleNetwork.py
Narcolapser/Little-News-Processor
e408ebd05f8e36f139bb413c91c4b831cd1213c7
[ "Apache-2.0" ]
1
2016-01-14T15:06:03.000Z
2016-01-14T15:06:03.000Z
Screw up/kindleNetwork.py
Narcolapser/Little-News-Processor
e408ebd05f8e36f139bb413c91c4b831cd1213c7
[ "Apache-2.0" ]
null
null
null
Screw up/kindleNetwork.py
Narcolapser/Little-News-Processor
e408ebd05f8e36f139bb413c91c4b831cd1213c7
[ "Apache-2.0" ]
null
null
null
import bibleIn import tldrnewsIn import weatherIn import bibleProc import tldrnewsProc import weatherProc import textOut kindle = "/media/toben/Kindle/documents/" def run(): data = [] print("fectching bible") data.append(bibleProc.consume(bibleIn.fetch())) print("done. Fetching news") data.append(tldrnewsProc....
20.925926
54
0.755752
import bibleIn import tldrnewsIn import weatherIn import bibleProc import tldrnewsProc import weatherProc import textOut kindle = "/media/toben/Kindle/documents/" def run(): data = [] print("fectching bible") data.append(bibleProc.consume(bibleIn.fetch())) print("done. Fetching news") data.append(tldrnewsProc....
true
true
1c416ad3b001b32caf18c969dccb9449dc1f7c37
4,768
py
Python
app/main/views.py
Mbaire/Blog-app
e1f0fc620f87306c27bb84d84255e2ef186bab4f
[ "MIT" ]
null
null
null
app/main/views.py
Mbaire/Blog-app
e1f0fc620f87306c27bb84d84255e2ef186bab4f
[ "MIT" ]
null
null
null
app/main/views.py
Mbaire/Blog-app
e1f0fc620f87306c27bb84d84255e2ef186bab4f
[ "MIT" ]
null
null
null
from flask import (render_template,redirect,url_for,request,flash,abort) from . import main from flask_bootstrap import Bootstrap from flask_login import login_required,current_user from ..models import User,Blog,Comment from .forms import UpdateProfile,BlogForm,CommentForm from .. import db,photos from ..requests impo...
31.576159
122
0.67219
from flask import (render_template,redirect,url_for,request,flash,abort) from . import main from flask_bootstrap import Bootstrap from flask_login import login_required,current_user from ..models import User,Blog,Comment from .forms import UpdateProfile,BlogForm,CommentForm from .. import db,photos from ..requests impo...
true
true
1c416b3376e346843d4cd363d7cf4889424efc6a
3,515
py
Python
controller_manager_tests/test/multi_cm_dummy.py
matthew-reynolds/ros_control
43388ac8cc803625412b9cb71afe9e50d07ca472
[ "BSD-3-Clause" ]
375
2015-01-15T06:48:33.000Z
2022-03-27T13:49:24.000Z
controller_manager_tests/test/multi_cm_dummy.py
matthew-reynolds/ros_control
43388ac8cc803625412b9cb71afe9e50d07ca472
[ "BSD-3-Clause" ]
291
2015-01-07T09:39:28.000Z
2022-03-28T07:48:03.000Z
controller_manager_tests/test/multi_cm_dummy.py
matthew-reynolds/ros_control
43388ac8cc803625412b9cb71afe9e50d07ca472
[ "BSD-3-Clause" ]
269
2015-01-15T14:06:17.000Z
2022-03-28T14:50:45.000Z
#!/usr/bin/env python # Copyright (C) 2014, PAL Robotics S.L. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
45.064103
79
0.712091
import rospy from controller_manager_tests import ControllerManagerDummy from controller_manager_msgs.msg import ControllerState as CtrlState from controller_manager_msgs.msg import HardwareInterfaceResources from controller_manager_msgs.srv import ListControllersResponse, LoadController if ...
true
true
1c416bb07c0b20dc238752ad979fbb68f6ce530c
657
py
Python
metaci/release/migrations/0020_auto_20210920_2127.py
sfdc-qbranch/MetaCI
78ac0d2bccd2db381998321ebd71029dd5d9ab39
[ "BSD-3-Clause" ]
48
2018-10-24T14:52:06.000Z
2022-03-25T21:14:50.000Z
metaci/release/migrations/0020_auto_20210920_2127.py
sfdc-qbranch/MetaCI
78ac0d2bccd2db381998321ebd71029dd5d9ab39
[ "BSD-3-Clause" ]
2,034
2018-10-31T20:59:16.000Z
2022-03-22T21:38:03.000Z
metaci/release/migrations/0020_auto_20210920_2127.py
sfdc-qbranch/MetaCI
78ac0d2bccd2db381998321ebd71029dd5d9ab39
[ "BSD-3-Clause" ]
27
2018-12-24T18:16:23.000Z
2021-12-15T17:57:27.000Z
# Generated by Django 3.1.13 on 2021-09-20 21:27 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("release", "0019_release_cohort"), ] operations = [ migrations.AlterField( model_name="release"...
24.333333
60
0.550989
import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("release", "0019_release_cohort"), ] operations = [ migrations.AlterField( model_name="release", name="release_cohort", ...
true
true
1c416bf824b73dc45e4d5fe27304f6fcc55f3728
4,038
py
Python
scrapy/http/response/text.py
Digenis/scrapy
a7b86137d03c57cc6a91fd02b56ebb76fa9f4faa
[ "BSD-3-Clause" ]
1
2015-08-25T09:42:58.000Z
2015-08-25T09:42:58.000Z
scrapy/http/response/text.py
Digenis/scrapy
a7b86137d03c57cc6a91fd02b56ebb76fa9f4faa
[ "BSD-3-Clause" ]
null
null
null
scrapy/http/response/text.py
Digenis/scrapy
a7b86137d03c57cc6a91fd02b56ebb76fa9f4faa
[ "BSD-3-Clause" ]
1
2019-07-17T09:23:13.000Z
2019-07-17T09:23:13.000Z
""" This module implements the TextResponse class which adds encoding handling and discovering (through HTTP headers) to base Response class. See documentation in docs/topics/request-response.rst """ import six from six.moves.urllib.parse import urljoin from w3lib.encoding import html_to_unicode, resolve_encoding, \...
35.421053
84
0.65478
import six from six.moves.urllib.parse import urljoin from w3lib.encoding import html_to_unicode, resolve_encoding, \ html_body_declared_encoding, http_content_type_encoding from scrapy.http.response import Response from scrapy.utils.response import get_base_url from scrapy.utils.python import memoizemethod_noarg...
true
true
1c416c30ca7e1171cf6de53fb05f0ececb547c54
434
py
Python
accounts/migrations/0002_alter_account_id.py
shaymk1/Felicia-s-ecommerce-store
aaf9d5aed018e451602c6c39bf8e5e24f9cedc01
[ "MIT" ]
null
null
null
accounts/migrations/0002_alter_account_id.py
shaymk1/Felicia-s-ecommerce-store
aaf9d5aed018e451602c6c39bf8e5e24f9cedc01
[ "MIT" ]
null
null
null
accounts/migrations/0002_alter_account_id.py
shaymk1/Felicia-s-ecommerce-store
aaf9d5aed018e451602c6c39bf8e5e24f9cedc01
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-07-22 14:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0001_initial'), ] operations = [ migrations.AlterField( model_name='account', name='id', fie...
22.842105
111
0.617512
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0001_initial'), ] operations = [ migrations.AlterField( model_name='account', name='id', field=models.BigAutoField(auto_created=True, prima...
true
true
1c416c46aac908f7df53aab0aa8bef175ade8e4c
149
py
Python
test/test_queue.py
shivankurkapoor/moleculardating
4a72c3e92a09ab321e0d92840cc7619857bbab8a
[ "BSD-3-Clause" ]
1
2018-04-24T04:38:33.000Z
2018-04-24T04:38:33.000Z
test/test_queue.py
shivankurkapoor/molecular-dating
4a72c3e92a09ab321e0d92840cc7619857bbab8a
[ "BSD-3-Clause" ]
null
null
null
test/test_queue.py
shivankurkapoor/molecular-dating
4a72c3e92a09ab321e0d92840cc7619857bbab8a
[ "BSD-3-Clause" ]
null
null
null
import queue.qscript_utility import sys queue.qscript_utility.submit_job_into_queue("single", sys.argv[1], "%s %s %s" % ("fenv", sys.argv[1], "0"))
29.8
107
0.711409
import queue.qscript_utility import sys queue.qscript_utility.submit_job_into_queue("single", sys.argv[1], "%s %s %s" % ("fenv", sys.argv[1], "0"))
true
true
1c416d6019ab4b179bb84736851d12f87e2ce72f
712
py
Python
Code/INA219/INA219.py
OlegErmolaev/INA219_servo
a7e449e9d6d48b1a89283a08effb8016866ae497
[ "MIT" ]
null
null
null
Code/INA219/INA219.py
OlegErmolaev/INA219_servo
a7e449e9d6d48b1a89283a08effb8016866ae497
[ "MIT" ]
null
null
null
Code/INA219/INA219.py
OlegErmolaev/INA219_servo
a7e449e9d6d48b1a89283a08effb8016866ae497
[ "MIT" ]
null
null
null
#!/usr/bin/env python from ina219 import INA219 from ina219 import DeviceRangeError import time SHUNT_OHMS = 0.05 def read(): ina = INA219(SHUNT_OHMS) ina.configure(ina.RANGE_16V) print("Bus Voltage: %.3f V" % ina.voltage()) try: print("Bus Current: %.3f mA" % ina.current()) print("Po...
24.551724
67
0.605337
from ina219 import INA219 from ina219 import DeviceRangeError import time SHUNT_OHMS = 0.05 def read(): ina = INA219(SHUNT_OHMS) ina.configure(ina.RANGE_16V) print("Bus Voltage: %.3f V" % ina.voltage()) try: print("Bus Current: %.3f mA" % ina.current()) print("Power: %.3f mW" % ina.p...
true
true
1c416ead727ca5614fba355f9150c4c908701582
27,350
py
Python
glitter2/analysis/export_widget.py
matham/glitter2
ebede5a18edb1b2e34f1824e4262d01a148cf2f3
[ "MIT" ]
null
null
null
glitter2/analysis/export_widget.py
matham/glitter2
ebede5a18edb1b2e34f1824e4262d01a148cf2f3
[ "MIT" ]
null
null
null
glitter2/analysis/export_widget.py
matham/glitter2
ebede5a18edb1b2e34f1824e4262d01a148cf2f3
[ "MIT" ]
null
null
null
from typing import Type, Optional, Dict, List, Any, Tuple, Union, Callable from functools import partial from bisect import insort_left from os.path import exists, join from kivy.factory import Factory from kivy.uix.boxlayout import BoxLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.label import Label ...
33.031401
80
0.643108
from typing import Type, Optional, Dict, List, Any, Tuple, Union, Callable from functools import partial from bisect import insort_left from os.path import exists, join from kivy.factory import Factory from kivy.uix.boxlayout import BoxLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.label import Label ...
true
true
1c416f457472d08d2f9a3fddfc3e144d9ac07bc8
400
py
Python
example.py
julianogv/investpy2
8966b079539f4ca5bf42fcd23e8c8dce6c29aa36
[ "MIT" ]
null
null
null
example.py
julianogv/investpy2
8966b079539f4ca5bf42fcd23e8c8dce6c29aa36
[ "MIT" ]
null
null
null
example.py
julianogv/investpy2
8966b079539f4ca5bf42fcd23e8c8dce6c29aa36
[ "MIT" ]
null
null
null
import investpy res = investpy.search_quotes(text='EIMI', countries=['united kingdom']) res = res[0] if type(res) == list else res # pick the first one hist = investpy.get_stock_historical_data(stock=res.symbol, name=res.name, country=res.country, stock_currency='USD', id_=re...
44.444444
117
0.6675
import investpy res = investpy.search_quotes(text='EIMI', countries=['united kingdom']) res = res[0] if type(res) == list else res hist = investpy.get_stock_historical_data(stock=res.symbol, name=res.name, country=res.country, stock_currency='USD', id_=res.id_, from_date='01...
true
true
1c4171607f92874d2574726ebd569d40c20b9946
280
py
Python
Part_2_intermediate/mod_1/lesson_7/ex_3_import_as/school/promote.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_2_intermediate/mod_1/lesson_7/ex_3_import_as/school/promote.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_2_intermediate/mod_1/lesson_7/ex_3_import_as/school/promote.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
from estudent.school import promotion_status FAILED_GRADE = 1 def check_promotion(subjects_final_grades): for subject, grade in subjects_final_grades.items(): if grade == FAILED_GRADE: return promotion_status.FAILED return promotion_status.PASSED
21.538462
56
0.75
from estudent.school import promotion_status FAILED_GRADE = 1 def check_promotion(subjects_final_grades): for subject, grade in subjects_final_grades.items(): if grade == FAILED_GRADE: return promotion_status.FAILED return promotion_status.PASSED
true
true
1c4172d29421db4b828034da6fb4f48e9971b40d
849
py
Python
kubernetes/test/test_discovery_api.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_discovery_api.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_discovery_api.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unitte...
21.225
124
0.705536
from __future__ import absolute_import import unittest import kubernetes.client from kubernetes.client.api.discovery_api import DiscoveryApi from kubernetes.client.rest import ApiException class TestDiscoveryApi(unittest.TestCase): def setUp(self): self.api = kubernetes.client.api.discovery_api.D...
true
true
1c417417a4317b7aa66ae1ad89506f681b25cbf7
6,003
py
Python
loadlimit/util.py
arielmakestuff/loadlimit
70d3d23eecfe7922699098ea4901cc8673d14576
[ "MIT" ]
null
null
null
loadlimit/util.py
arielmakestuff/loadlimit
70d3d23eecfe7922699098ea4901cc8673d14576
[ "MIT" ]
5
2016-11-28T16:59:44.000Z
2017-03-18T17:10:40.000Z
loadlimit/util.py
arielmakestuff/loadlimit
70d3d23eecfe7922699098ea4901cc8673d14576
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # loadlimit/util.py # Copyright (C) 2016 authors and contributors (see AUTHORS file) # # This module is released under the MIT License. """Utility objects and functions""" # ============================================================================ # Imports # ===============================...
28.860577
79
0.479927
import argparse from collections import ChainMap from collections.abc import Sequence from enum import Enum from functools import partial import json import logging from pandas import Timestamp from pytz import UTC LogLevel = Enum('LogLevel', [(k, v) for k, v in logging._nameToLevel.items() ...
true
true
1c4174a9a2d7e5bac4683caf8717aa9d50040e27
145
py
Python
apache/apr_strings.py
GrahamDumpleton-abandoned/apswigpy
b821b94a78ceed5b8991f7c345aeeadca3729a90
[ "Apache-2.0" ]
null
null
null
apache/apr_strings.py
GrahamDumpleton-abandoned/apswigpy
b821b94a78ceed5b8991f7c345aeeadca3729a90
[ "Apache-2.0" ]
null
null
null
apache/apr_strings.py
GrahamDumpleton-abandoned/apswigpy
b821b94a78ceed5b8991f7c345aeeadca3729a90
[ "Apache-2.0" ]
null
null
null
import apache if apache.version == (2, 2): from apache22.apr_strings import * else: raise RuntimeError('Apache version not supported.')
20.714286
55
0.717241
import apache if apache.version == (2, 2): from apache22.apr_strings import * else: raise RuntimeError('Apache version not supported.')
true
true
1c41757ec6aa6ba62ffac192081d3aa8fce2cbf2
21,768
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/aio/operations/_express_route_connections_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/aio/operations/_express_route_connections_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/aio/operations/_express_route_connections_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
52.453012
250
0.692301
from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impo...
true
true
1c4176014c51bfce06a5403ed939263bcadfe2e2
40,754
py
Python
tests/file_storage/tests.py
imjvdn/scratch-game-1
5dffd79f17e0b66d3d2e57262749311aca28e850
[ "PSF-2.0", "BSD-3-Clause" ]
5
2019-10-17T21:29:53.000Z
2021-06-23T16:27:02.000Z
tests/file_storage/tests.py
imjvdn/scratch-game-1
5dffd79f17e0b66d3d2e57262749311aca28e850
[ "PSF-2.0", "BSD-3-Clause" ]
7
2021-03-26T03:13:38.000Z
2022-03-12T00:42:03.000Z
tests/file_storage/tests.py
imjvdn/scratch-game-1
5dffd79f17e0b66d3d2e57262749311aca28e850
[ "PSF-2.0", "BSD-3-Clause" ]
11
2019-09-14T20:57:30.000Z
2022-01-19T17:59:26.000Z
import os import shutil import sys import tempfile import threading import time import unittest from datetime import datetime, timedelta from io import StringIO from urllib.request import urlopen from django.core.cache import cache from django.core.exceptions import SuspiciousFileOperation from django.core.files.base ...
40.470705
113
0.65331
import os import shutil import sys import tempfile import threading import time import unittest from datetime import datetime, timedelta from io import StringIO from urllib.request import urlopen from django.core.cache import cache from django.core.exceptions import SuspiciousFileOperation from django.core.files.base ...
true
true
1c41768beb0f8028fb918ee5a723b4aee1287030
1,678
py
Python
source/tests/csvImplementation_test.py
staujd02/Pi-RFID-Video-Player
613d5a9355b660afb5414b3f4a9dad219b69fc36
[ "Apache-2.0" ]
1
2020-02-15T15:21:03.000Z
2020-02-15T15:21:03.000Z
source/tests/csvImplementation_test.py
staujd02/Pi-RFID-Video-Player
613d5a9355b660afb5414b3f4a9dad219b69fc36
[ "Apache-2.0" ]
8
2019-12-14T16:31:13.000Z
2021-05-22T23:06:35.000Z
source/tests/csvImplementation_test.py
staujd02/Pi-RFID-Video-Player
613d5a9355b660afb5414b3f4a9dad219b69fc36
[ "Apache-2.0" ]
null
null
null
import unittest import os from source.informationManagers.dataStorageMethods.csvImplementation import CSVImplementation from source.informationManagers.dataStorageMethods.database import Database class CSVImplementation_test(unittest.TestCase): TEST_DB = "TestDb.csv" def test_csv_can_query_by_the_first_colu...
38.136364
93
0.672229
import unittest import os from source.informationManagers.dataStorageMethods.csvImplementation import CSVImplementation from source.informationManagers.dataStorageMethods.database import Database class CSVImplementation_test(unittest.TestCase): TEST_DB = "TestDb.csv" def test_csv_can_query_by_the_first_colu...
true
true
1c4177b9378b12a3aa1d7c8f56dd135d26e15a9d
3,889
py
Python
prediction/src/algorithms/classify/src/classification_model.py
yasiriqbal1/concept-to-clinic-1
3b7d34a6b31e8d3924934f3e5c990c49813c670e
[ "MIT" ]
346
2017-08-04T12:26:11.000Z
2018-10-16T06:51:45.000Z
prediction/src/algorithms/classify/src/classification_model.py
yasiriqbal1/concept-to-clinic-1
3b7d34a6b31e8d3924934f3e5c990c49813c670e
[ "MIT" ]
296
2017-08-02T10:17:05.000Z
2018-07-31T05:29:43.000Z
prediction/src/algorithms/classify/src/classification_model.py
yasiriqbal1/concept-to-clinic-1
3b7d34a6b31e8d3924934f3e5c990c49813c670e
[ "MIT" ]
159
2017-08-04T07:34:52.000Z
2018-10-16T18:34:08.000Z
import abc import collections class ClassificationModel(abc.ABC): """ Args: init_model (bool | str): whether to initialise the model. If str, then the model will be loaded from the init_model path. pull_size (int): maximum amount of batches allowed to be stored in RAM....
29.687023
87
0.4901
import abc import collections class ClassificationModel(abc.ABC): def __init__(self, init_model=True, pull_size=10, batch_size=32, data_format=None): self.model = None if not isinstance(batch_size, int): raise ValueError('`batch_size` should be of type int') if batch_size < 1:...
true
true
1c4177cb554a2f15962cc028608078160d73c8e5
622
py
Python
tests/test_fixtures.py
adammichaelwood/omk_core
9f3a845aeadad0b1de91d7f20da3ae6b686a07d0
[ "MIT" ]
null
null
null
tests/test_fixtures.py
adammichaelwood/omk_core
9f3a845aeadad0b1de91d7f20da3ae6b686a07d0
[ "MIT" ]
3
2019-01-28T16:50:27.000Z
2019-02-20T01:55:19.000Z
tests/test_fixtures.py
adammichaelwood/omk_core
9f3a845aeadad0b1de91d7f20da3ae6b686a07d0
[ "MIT" ]
1
2018-06-04T10:32:05.000Z
2018-06-04T10:32:05.000Z
import pytest import omk_core as omk @pytest.fixture def tonal_tuples(): MS = [ (0, 0), (1, 2), (2, 4), (3, 5), (4, 7), (5, 9), (6,11) ] return [(x[0],(x[1]+m)%12) for m in [0,1,2,-1,-2] for x in MS] @pytest.fixture def tonal_vectors(tonal_tuple...
20.064516
73
0.585209
import pytest import omk_core as omk @pytest.fixture def tonal_tuples(): MS = [ (0, 0), (1, 2), (2, 4), (3, 5), (4, 7), (5, 9), (6,11) ] return [(x[0],(x[1]+m)%12) for m in [0,1,2,-1,-2] for x in MS] @pytest.fixture def tonal_vectors(tonal_tuple...
true
true
1c417959169a956a504ba3f6f0e6131c46d10cbf
3,304
py
Python
athena/transform/feats/pitch_test.py
wgfi110/athena
e704884ec6a3a947769d892aa267578038e49ecb
[ "Apache-2.0" ]
791
2019-12-22T03:09:04.000Z
2022-03-26T01:57:42.000Z
athena/transform/feats/pitch_test.py
wgfi110/athena
e704884ec6a3a947769d892aa267578038e49ecb
[ "Apache-2.0" ]
198
2019-12-22T03:06:27.000Z
2022-03-29T02:57:59.000Z
athena/transform/feats/pitch_test.py
wgfi110/athena
e704884ec6a3a947769d892aa267578038e49ecb
[ "Apache-2.0" ]
194
2019-12-24T03:59:29.000Z
2022-03-25T02:44:51.000Z
# Copyright (C) ATHENA AUTHORS # All rights reserved. # # 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 applicable law ...
35.913043
80
0.51816
import os from pathlib import Path import tensorflow as tf from tensorflow.python.framework.ops import disable_eager_execution from athena.transform.feats.read_wav import ReadWav from athena.transform.feats.pitch import Pitch os.environ["CUDA_VISIBLE_DEVICES"] = "-1" class SpectrumTest(tf.test.TestCa...
true
true
1c4179c2af86b60e626c745a4b3a99ddb5f6562c
12,362
py
Python
tests/test_functional_config.py
smilers/sabnzbd
ed0e5bbf9b963113f4962e7aec297266f19d6615
[ "MIT", "PSF-2.0", "0BSD" ]
1,354
2015-01-02T11:53:23.000Z
2022-03-30T01:32:46.000Z
tests/test_functional_config.py
smilers/sabnzbd
ed0e5bbf9b963113f4962e7aec297266f19d6615
[ "MIT", "PSF-2.0", "0BSD" ]
1,742
2015-01-01T20:17:35.000Z
2022-03-30T21:05:00.000Z
tests/test_functional_config.py
smilers/sabnzbd
ed0e5bbf9b963113f4962e7aec297266f19d6615
[ "MIT", "PSF-2.0", "0BSD" ]
410
2015-01-24T05:32:46.000Z
2022-03-20T12:56:49.000Z
#!/usr/bin/python3 -OO # Copyright 2007-2021 The SABnzbd-Team <team@sabnzbd.org> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any late...
39.621795
119
0.653697
from selenium.common.exceptions import NoSuchElementException, UnexpectedAlertPresentException, NoAlertPresentException from pytest_httpserver import HTTPServer from tests.testhelper import * class TestBasicPages(SABnzbdBaseTest): def test_base_pages(self): test_urls = ["confi...
true
true
1c417b1be04154897dcdf094d3d71149d36c36f0
773
py
Python
turret/layers/shuffle.py
hemantranvir/turret
bc3df21541ce2f808c749c985db47a210149f22c
[ "MIT" ]
4
2019-03-14T18:27:33.000Z
2021-07-05T05:34:30.000Z
turret/layers/shuffle.py
hemantranvir/turret
bc3df21541ce2f808c749c985db47a210149f22c
[ "MIT" ]
1
2019-06-07T06:03:04.000Z
2019-06-07T06:03:04.000Z
turret/layers/shuffle.py
hemantranvir/turret
bc3df21541ce2f808c749c985db47a210149f22c
[ "MIT" ]
4
2019-10-30T10:30:47.000Z
2019-10-30T11:15:40.000Z
# -*- coding: utf-8 -*- from .builtin import shuffle_and_reshape from ..foundational import Dimension from ..foundational import Dimensions def shuffle(input, order): """Layer to shuffle. Args: input(turret.Tensor): The tensor which will be processed by layer. order(tuple): The permutation app...
32.208333
74
0.68564
from .builtin import shuffle_and_reshape from ..foundational import Dimension from ..foundational import Dimensions def shuffle(input, order): in_dims = input.dimensions out_dims = Dimensions([ Dimension(in_dims[j].size, in_dims[i].type) for i, j in enumerate(order)]) return shuf...
true
true
1c417b30e5340b842772007aa29eace4c6887c3a
6,782
py
Python
src/models/LCALSTM_after.py
jacksonlli/learn-hippo
7695d22e73c334b6d9df7e35cb6e30855db187fe
[ "MIT" ]
13
2020-12-06T02:31:02.000Z
2022-02-16T16:20:31.000Z
src/models/LCALSTM_after.py
jacksonlli/learn-hippo
7695d22e73c334b6d9df7e35cb6e30855db187fe
[ "MIT" ]
1
2021-09-19T20:55:32.000Z
2021-09-19T20:55:32.000Z
src/models/LCALSTM_after.py
jacksonlli/learn-hippo
7695d22e73c334b6d9df7e35cb6e30855db187fe
[ "MIT" ]
3
2020-12-24T00:52:43.000Z
2021-12-15T02:12:15.000Z
import torch import torch.nn as nn import torch.nn.functional as F import pdb from models.EM import EM from torch.distributions import Categorical from models.initializer import initialize_weights # constants # number of vector signal (lstm gates) N_VSIG = 3 # number of scalar signal (sigma) N_SSIG = 1 # the ordering ...
31.990566
78
0.607785
import torch import torch.nn as nn import torch.nn.functional as F import pdb from models.EM import EM from torch.distributions import Categorical from models.initializer import initialize_weights N_VSIG = 3 N_SSIG = 1 scalar_signal_names = ['input strength'] vector_signal_names = ['f', 'i', 'o'] sigmoid = nn.Sigm...
true
true
1c417d3507e5fd27f874af4f2ff4b442ad88aad4
1,170
py
Python
cs28_project/cs28/tests/test_award_override.py
desuderata/cs28_project
d8e84e2ee30f36ce964370580730396b8c211315
[ "MIT" ]
null
null
null
cs28_project/cs28/tests/test_award_override.py
desuderata/cs28_project
d8e84e2ee30f36ce964370580730396b8c211315
[ "MIT" ]
null
null
null
cs28_project/cs28/tests/test_award_override.py
desuderata/cs28_project
d8e84e2ee30f36ce964370580730396b8c211315
[ "MIT" ]
1
2021-04-29T15:40:57.000Z
2021-04-29T15:40:57.000Z
""" Tests Award Override - Tests if award is successfully overridden author: Yee Hou, Teoh (2471020t) """ import json from django.test import TestCase from .test_setup import login, populate from cs28.models import Student, AcademicPlan, GraduationYear, Grade class AwardOverrideTest(TestCase): def setUp(self):...
28.536585
68
0.553846
import json from django.test import TestCase from .test_setup import login, populate from cs28.models import Student, AcademicPlan, GraduationYear, Grade class AwardOverrideTest(TestCase): def setUp(self): login(self) populate(self) def test_updated_award(self): self.client.post("/cs...
true
true
1c417ed357be01c7c65be0b3db6473fd9b7e9af1
1,042
py
Python
app/core/migrations/0004_recipe.py
lohithn4/recipe-app-api
5174dd4ac0fdb3f853d5f6071e8ea3871e54ba44
[ "MIT" ]
null
null
null
app/core/migrations/0004_recipe.py
lohithn4/recipe-app-api
5174dd4ac0fdb3f853d5f6071e8ea3871e54ba44
[ "MIT" ]
null
null
null
app/core/migrations/0004_recipe.py
lohithn4/recipe-app-api
5174dd4ac0fdb3f853d5f6071e8ea3871e54ba44
[ "MIT" ]
null
null
null
# Generated by Django 3.0.4 on 2020-03-13 05:20 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0003_ingredient'), ] operations = [ migrations.CreateModel( ...
35.931034
118
0.603647
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0003_ingredient'), ] operations = [ migrations.CreateModel( name='Recipe', fields=[ ...
true
true
1c417f5033c5beabccf8f4711766183b6d5dece8
3,150
py
Python
tests/unit/commands/env_test.py
gamechanger/dusty
dd9778e3a4f0c623209e53e98aa9dc1fe76fc309
[ "MIT" ]
421
2015-06-02T16:29:59.000Z
2021-06-03T18:44:42.000Z
tests/unit/commands/env_test.py
gamechanger/dusty
dd9778e3a4f0c623209e53e98aa9dc1fe76fc309
[ "MIT" ]
404
2015-06-02T20:23:42.000Z
2019-08-21T16:59:41.000Z
tests/unit/commands/env_test.py
gamechanger/dusty
dd9778e3a4f0c623209e53e98aa9dc1fe76fc309
[ "MIT" ]
16
2015-06-16T17:21:02.000Z
2020-03-27T02:27:09.000Z
import os import tempfile from dusty.commands import env from dusty.commands.bundles import activate_bundle from ...testcases import DustyTestCase class TestEnvCommands(DustyTestCase): def setUp(self): super(TestEnvCommands, self).setUp() activate_bundle(['bundle-a', 'bundle-b'], False) s...
39.873418
96
0.632698
import os import tempfile from dusty.commands import env from dusty.commands.bundles import activate_bundle from ...testcases import DustyTestCase class TestEnvCommands(DustyTestCase): def setUp(self): super(TestEnvCommands, self).setUp() activate_bundle(['bundle-a', 'bundle-b'], False) s...
false
true
1c41806ee11d36933267fb4b998421647b5d9827
13,696
py
Python
loggers/serializers.py
drguggiana/bonDjango
820df735f60dbe198144235b45de514272edba20
[ "MIT" ]
null
null
null
loggers/serializers.py
drguggiana/bonDjango
820df735f60dbe198144235b45de514272edba20
[ "MIT" ]
null
null
null
loggers/serializers.py
drguggiana/bonDjango
820df735f60dbe198144235b45de514272edba20
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import * from django.contrib.auth.models import User, Group # define the common extra kwargs common_extra_kwargs = {'mouse': {'lookup_field': 'mouse_name'}} # define a function to put the url first and then sort all the other fields def sort_fields(fields): if ...
38.044444
120
0.656104
from rest_framework import serializers from .models import * from django.contrib.auth.models import User, Group common_extra_kwargs = {'mouse': {'lookup_field': 'mouse_name'}} def sort_fields(fields): if 'mouse' in fields: fields.remove('mouse') sorted_fields = (['url', 'mouse'] + sorted(fields...
true
true
1c4181a23401c75c1fd869a4dcc6e5a4b784b918
2,170
py
Python
test/actions-multiple/gyptest-all.py
uilianries/gyp
d995c5b0906571e0037869e3c9b008f344e8ca92
[ "BSD-3-Clause" ]
null
null
null
test/actions-multiple/gyptest-all.py
uilianries/gyp
d995c5b0906571e0037869e3c9b008f344e8ca92
[ "BSD-3-Clause" ]
null
null
null
test/actions-multiple/gyptest-all.py
uilianries/gyp
d995c5b0906571e0037869e3c9b008f344e8ca92
[ "BSD-3-Clause" ]
3
2018-11-20T12:04:16.000Z
2019-07-01T02:52:04.000Z
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies two actions can be attached to the same input files. """ import sys import TestGyp test = TestGyp.TestGyp() if test.format ...
28.552632
77
0.689401
import sys import TestGyp test = TestGyp.TestGyp() if test.format == 'xcode-ninja': test.skip(bug=527) test.run_gyp('actions.gyp', chdir='src') test.relocate('src', 'relocate/src') if test.format in ['make', 'ninja']: if test.format == 'make': target = 'multi2.txt' elif test.format...
true
true
1c4181d2be11ed270ed6292731e8d25169755c2d
42,380
py
Python
tests/test_regressions.py
takizuka/drf-spectacular
208429b7ace8c37a79e5e51bd8532dfaa8e0c853
[ "BSD-3-Clause" ]
null
null
null
tests/test_regressions.py
takizuka/drf-spectacular
208429b7ace8c37a79e5e51bd8532dfaa8e0c853
[ "BSD-3-Clause" ]
null
null
null
tests/test_regressions.py
takizuka/drf-spectacular
208429b7ace8c37a79e5e51bd8532dfaa8e0c853
[ "BSD-3-Clause" ]
null
null
null
import uuid from unittest import mock import pytest from django.core import validators from django.db import models from django.db.models import fields from django.urls import path, re_path from rest_framework import ( filters, generics, mixins, pagination, parsers, routers, serializers, views, viewsets, ) from re...
36.724437
143
0.674445
import uuid from unittest import mock import pytest from django.core import validators from django.db import models from django.db.models import fields from django.urls import path, re_path from rest_framework import ( filters, generics, mixins, pagination, parsers, routers, serializers, views, viewsets, ) from re...
true
true
1c41823bc3beaf18ca16772937ec5ad26af8e9c7
4,019
py
Python
examples/seismic/poroelastic/poroelastic_example.py
rwalkerlewis/devito
262364e5f2855ad01a281d517d400704b7667420
[ "MIT" ]
null
null
null
examples/seismic/poroelastic/poroelastic_example.py
rwalkerlewis/devito
262364e5f2855ad01a281d517d400704b7667420
[ "MIT" ]
null
null
null
examples/seismic/poroelastic/poroelastic_example.py
rwalkerlewis/devito
262364e5f2855ad01a281d517d400704b7667420
[ "MIT" ]
null
null
null
import numpy as np from argparse import ArgumentParser from devito.logger import info from examples.seismic.poroelastic import PoroelasticWaveSolver, demo_model from examples.seismic import AcquisitionGeometry def poroelastic_setup(shape=(50, 50), spacing=(15.0, 15.0), tn=500., num=200, space_order=4, nbpml=10, ...
44.655556
102
0.623289
import numpy as np from argparse import ArgumentParser from devito.logger import info from examples.seismic.poroelastic import PoroelasticWaveSolver, demo_model from examples.seismic import AcquisitionGeometry def poroelastic_setup(shape=(50, 50), spacing=(15.0, 15.0), tn=500., num=200, space_order=4, nbpml=10, ...
true
true
1c418584edcca91d53edc9629e0784c93c3b3636
2,550
py
Python
sprites/vertex.py
lmason98/PyGraph
22d734cfd97333578c91ba4e331716df0aec668e
[ "MIT" ]
null
null
null
sprites/vertex.py
lmason98/PyGraph
22d734cfd97333578c91ba4e331716df0aec668e
[ "MIT" ]
null
null
null
sprites/vertex.py
lmason98/PyGraph
22d734cfd97333578c91ba4e331716df0aec668e
[ "MIT" ]
null
null
null
""" File: sprites/vertex.py Author: Luke Mason Description: A graph vertex pygame sprite """ from settings import COLOR from pygame.sprite import Sprite from pygame import Surface, draw TEXT = COLOR.get('white') class Vertex(Sprite): def __init__(self, x: int, y: int, color: (int, int, int) = TEXT, radius: int = ...
25.247525
107
0.666275
from settings import COLOR from pygame.sprite import Sprite from pygame import Surface, draw TEXT = COLOR.get('white') class Vertex(Sprite): def __init__(self, x: int, y: int, color: (int, int, int) = TEXT, radius: int = 10) -> None: Sprite.__init__(self) self.drag = False self.selected = False self.col...
true
true
1c41858c96b1c576aa3a7fdf95abe38872adc09e
5,381
py
Python
scons/scons-local-2.5.0/SCons/Tool/gdc.py
emamanto/Soar
72d2bc095068dd87ac78dad4f48938f6edc0353a
[ "BSD-2-Clause" ]
72
2020-06-12T06:33:41.000Z
2021-03-22T03:15:56.000Z
scons/scons-local-2.5.0/SCons/Tool/gdc.py
emamanto/Soar
72d2bc095068dd87ac78dad4f48938f6edc0353a
[ "BSD-2-Clause" ]
9
2020-07-02T09:36:49.000Z
2021-03-25T23:54:00.000Z
scons/scons-local-2.5.0/SCons/Tool/gdc.py
emamanto/Soar
72d2bc095068dd87ac78dad4f48938f6edc0353a
[ "BSD-2-Clause" ]
14
2020-06-12T03:08:03.000Z
2021-02-03T11:43:09.000Z
"""SCons.Tool.gdc Tool-specific initialization for the GDC compiler. (https://github.com/D-Programming-GDC/GDC) Developed by Russel Winder (russel@winder.org.uk) 2012-05-09 onwards Compiler variables: DC - The name of the D compiler to use. Defaults to gdc. DPATH - List of paths to search for import modules...
38.435714
128
0.693737
__revision__ = "src/engine/SCons/Tool/gdc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Defaults import SCons.Tool import SCons.Tool.DCommon def generate(env): static_obj, shared_obj = SCons.Tool.createObjBuilders(env) static_obj.add_a...
true
true
1c41860d2a7923dca193e3a89e401e2e5bd2cf72
33,054
py
Python
boto/vpc/__init__.py
yola/boto
dccded53cc1eedd565fa50b32cadbdba3990225a
[ "MIT" ]
null
null
null
boto/vpc/__init__.py
yola/boto
dccded53cc1eedd565fa50b32cadbdba3990225a
[ "MIT" ]
null
null
null
boto/vpc/__init__.py
yola/boto
dccded53cc1eedd565fa50b32cadbdba3990225a
[ "MIT" ]
null
null
null
# Copyright (c) 2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, m...
36.283205
110
0.621438
from boto.ec2.connection import EC2Connection from boto.resultset import ResultSet from boto.vpc.vpc import VPC from boto.vpc.customergateway import CustomerGateway from boto.vpc.routetable import RouteTable from boto.vpc.internetgateway import InternetGateway from boto.vpc.vpngateway import VpnGa...
true
true
1c4186e2439425542f19dd835149f20ff44767fe
234
py
Python
saleor/product_max_min/error_codes.py
hoangtuananh97/saleor
94ad493ef61302fb458822868fc2b4a884ec2065
[ "CC-BY-4.0" ]
null
null
null
saleor/product_max_min/error_codes.py
hoangtuananh97/saleor
94ad493ef61302fb458822868fc2b4a884ec2065
[ "CC-BY-4.0" ]
4
2021-09-06T03:55:32.000Z
2021-10-15T08:47:58.000Z
saleor/product_max_min/error_codes.py
hoangtuananh97/saleor
94ad493ef61302fb458822868fc2b4a884ec2065
[ "CC-BY-4.0" ]
null
null
null
from enum import Enum class ProductMaxMinErrorCode(Enum): ALREADY_EXISTS = "already_exists" GRAPHQL_ERROR = "graphql_error" INVALID = "invalid" NOT_FOUND = "not_found" REQUIRED = "required" UNIQUE = "unique"
21.272727
37
0.696581
from enum import Enum class ProductMaxMinErrorCode(Enum): ALREADY_EXISTS = "already_exists" GRAPHQL_ERROR = "graphql_error" INVALID = "invalid" NOT_FOUND = "not_found" REQUIRED = "required" UNIQUE = "unique"
true
true
1c4187ab85b90cb3e63425592c1c4a9c55e75c74
2,908
py
Python
src/primaires/vehicule/__init__.py
vlegoff/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
14
2015-08-21T19:15:21.000Z
2017-11-26T13:59:17.000Z
src/primaires/vehicule/__init__.py
vincent-lg/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
20
2015-09-29T20:50:45.000Z
2018-06-21T12:58:30.000Z
src/primaires/vehicule/__init__.py
vlegoff/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
3
2015-05-02T19:42:03.000Z
2018-09-06T10:55:00.000Z
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 DAVY Guillaume # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this #...
37.766234
79
0.69945
from abstraits.module import * from .vehicule import Vehicule from .vecteur import Vecteur import time VIRTSEC = 1 class Module(BaseModule): def __init__(self, importeur): BaseModule.__init__(self, importeur, "vehicule", "primaire") self.commandes = [] ...
true
true
1c4187b0631d6e15249459ffc9c5679b90301371
2,560
py
Python
modules/generator/aligner.py
vliu15/tts-gan
6246c584a83f67dedaa25155c3b1491b99658319
[ "MIT" ]
12
2021-02-17T23:37:52.000Z
2021-09-05T08:24:58.000Z
modules/generator/aligner.py
vliu15/tts-gan
6246c584a83f67dedaa25155c3b1491b99658319
[ "MIT" ]
null
null
null
modules/generator/aligner.py
vliu15/tts-gan
6246c584a83f67dedaa25155c3b1491b99658319
[ "MIT" ]
2
2021-04-27T12:41:58.000Z
2021-08-18T08:31:32.000Z
# Copyright (c) 2020 Vincent Liu # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distr...
40
128
0.676953
import torch import torch.nn as nn import torch.nn.functional as F class Aligner(nn.Module): def __init__(self, gamma: float = 10.0): super().__init__() self.gamma = gamma def forward(self, x_latents, x_lengths, x_mask, y_len, y_offset=None): if y_offset is None...
true
true
1c4187e00768efc44391aa55dd3463f0a0e8db54
789
py
Python
convert_savedmodel.py
anhlnt/age-gender-estimation
0a1c3a289a33c96c586ae8219911dbe51724f6d9
[ "MIT" ]
null
null
null
convert_savedmodel.py
anhlnt/age-gender-estimation
0a1c3a289a33c96c586ae8219911dbe51724f6d9
[ "MIT" ]
null
null
null
convert_savedmodel.py
anhlnt/age-gender-estimation
0a1c3a289a33c96c586ae8219911dbe51724f6d9
[ "MIT" ]
null
null
null
import tensorflow as tf from src.factory import get_model from omegaconf import OmegaConf from pathlib import Path def getModel(): weight_file = "pretrained_models/EfficientNetB3_224_weights.26-3.15.hdf5" model_name, img_size = Path(weight_file).stem.split("_")[:2] print('model_name: ', model_name, 'img_...
28.178571
98
0.723701
import tensorflow as tf from src.factory import get_model from omegaconf import OmegaConf from pathlib import Path def getModel(): weight_file = "pretrained_models/EfficientNetB3_224_weights.26-3.15.hdf5" model_name, img_size = Path(weight_file).stem.split("_")[:2] print('model_name: ', model_name, 'img_...
true
true
1c41884da87b914bbcb7a7f6201224677146687c
11,952
py
Python
telegram/EnglishBot.py
eprivalov/-k5-kt4ltj3l4rn3k4jrbjr34hbr3jhrv34
387cf92a275e5b1fc4f32d1638b62c65bcc8c1c5
[ "Apache-2.0" ]
null
null
null
telegram/EnglishBot.py
eprivalov/-k5-kt4ltj3l4rn3k4jrbjr34hbr3jhrv34
387cf92a275e5b1fc4f32d1638b62c65bcc8c1c5
[ "Apache-2.0" ]
null
null
null
telegram/EnglishBot.py
eprivalov/-k5-kt4ltj3l4rn3k4jrbjr34hbr3jhrv34
387cf92a275e5b1fc4f32d1638b62c65bcc8c1c5
[ "Apache-2.0" ]
1
2018-07-16T07:55:45.000Z
2018-07-16T07:55:45.000Z
import telebot import psycopg2 import re from telebot import types import datetime """ Команда Insydia приветствует вас. Здесь вы можете узнать о последних новостях на нашем портале. Мы будем поддерживать данное направление и обновлять функционал нашего робота. Спасибо, что начали пользоваться InsydiaAsiaBot. """ TO...
45.793103
194
0.536647
import telebot import psycopg2 import re from telebot import types import datetime TOKEN = "196531742:AAGUaoxgMbin0gAAzOfulW58RPtbECrCkK0" bot = telebot.TeleBot(TOKEN) DB_NAME = "test" USER = "testuser" PASSWORD = "test" CONNECT_DB = "dbname='%s' user='%s' host='' password='%s'" % (DB_NAME, USER, PASSWORD) @b...
true
true
1c418861fb6e75e48a46198115b66dd8dd3e8209
137
py
Python
app/main/errors.py
geoffrey45/Baseline-news
d211a84e087a222cf1720808f4abe31b9315c632
[ "MIT" ]
null
null
null
app/main/errors.py
geoffrey45/Baseline-news
d211a84e087a222cf1720808f4abe31b9315c632
[ "MIT" ]
null
null
null
app/main/errors.py
geoffrey45/Baseline-news
d211a84e087a222cf1720808f4abe31b9315c632
[ "MIT" ]
null
null
null
from flask import render_template from . import main @main.app_errorhandler(404) def fof(error): return render_template('fof.html'),404
22.833333
39
0.79562
from flask import render_template from . import main @main.app_errorhandler(404) def fof(error): return render_template('fof.html'),404
true
true
1c4188cfd7f0d0d43d11e3f374e78faf058b8467
8,710
py
Python
vkwave/bots/utils/keyboards/keyboard.py
krasnovmv/vkwave
e0db86cc16f97797765aadfb811ec87ff7945b1f
[ "MIT" ]
null
null
null
vkwave/bots/utils/keyboards/keyboard.py
krasnovmv/vkwave
e0db86cc16f97797765aadfb811ec87ff7945b1f
[ "MIT" ]
null
null
null
vkwave/bots/utils/keyboards/keyboard.py
krasnovmv/vkwave
e0db86cc16f97797765aadfb811ec87ff7945b1f
[ "MIT" ]
null
null
null
import json import typing from enum import Enum from vkwave.bots.core.types.json_types import JSONEncoder from vkwave.bots.utils.keyboards._types import Button from vkwave.bots.utils.keyboards._vkpayaction import ( VKPayAction, VKPayActionTransferToUser, VKPayActionTransferToGroup, VKPayActionPayToUse...
27.916667
113
0.559013
import json import typing from enum import Enum from vkwave.bots.core.types.json_types import JSONEncoder from vkwave.bots.utils.keyboards._types import Button from vkwave.bots.utils.keyboards._vkpayaction import ( VKPayAction, VKPayActionTransferToUser, VKPayActionTransferToGroup, VKPayActionPayToUse...
true
true
1c41892a9cf0cd7b8e924beef7797f773203bc37
23,526
py
Python
ClientGenerator/src/googleapis/codegen/api_test.py
Ramkarthik/google-api-dotnet-client
d752f96e8a6de53922c22eedc73ea7077628b106
[ "Apache-2.0" ]
3
2017-06-11T10:55:49.000Z
2022-01-07T18:49:47.000Z
ClientGenerator/src/googleapis/codegen/api_test.py
Alexisblues/google-api-dotnet-client
c06374c2ebe79068add7ab445c4aa3308370fb8a
[ "Apache-2.0" ]
null
null
null
ClientGenerator/src/googleapis/codegen/api_test.py
Alexisblues/google-api-dotnet-client
c06374c2ebe79068add7ab445c4aa3308370fb8a
[ "Apache-2.0" ]
2
2019-12-30T03:32:56.000Z
2022-03-21T10:19:38.000Z
#!/usr/bin/python2.7 # Copyright 2010 Google Inc. All Rights Reserved. # # 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 requi...
39.21
80
0.655233
__author__ = 'aiuto@google.com (Tony Aiuto)' import json import os import gflags as flags from google.apputils import basetest from googleapis.codegen import data_types from googleapis.codegen import language_model from googleapis.codegen.api import Api from googleapis.codegen.api import AuthScope f...
true
true
1c41896d23db8966b5ca3fc9304f280ab04c2298
126
py
Python
pychatwork/api/model/Account.py
a-yasui/pyChatWork
5a4d60d8927ee288bdaafe86d09c6c5065bebccb
[ "MIT" ]
null
null
null
pychatwork/api/model/Account.py
a-yasui/pyChatWork
5a4d60d8927ee288bdaafe86d09c6c5065bebccb
[ "MIT" ]
null
null
null
pychatwork/api/model/Account.py
a-yasui/pyChatWork
5a4d60d8927ee288bdaafe86d09c6c5065bebccb
[ "MIT" ]
null
null
null
# coding: utf-8 from . import Model class Account (Model): def __init__(self, data): Model.__init__(self, data)
15.75
34
0.650794
from . import Model class Account (Model): def __init__(self, data): Model.__init__(self, data)
true
true
1c41898a988ebc460ec7deaedfd5f5390c2f5fb8
1,844
py
Python
colour/models/rgb/__init__.py
gutenzwerg/colour
299eceb57483213e2544d532a6d3727887e49426
[ "BSD-3-Clause" ]
6
2019-06-18T18:53:29.000Z
2021-09-10T21:02:45.000Z
colour/models/rgb/__init__.py
gutenzwerg/colour
299eceb57483213e2544d532a6d3727887e49426
[ "BSD-3-Clause" ]
null
null
null
colour/models/rgb/__init__.py
gutenzwerg/colour
299eceb57483213e2544d532a6d3727887e49426
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from .derivation import (normalised_primary_matrix, chromatically_adapted_primaries, primaries_whitepoint, RGB_luminance_equation, RGB_luminance) from .rgb_colourspace import RGB_Colourspace from .rgb_colourspace import XYZ_to_RGB, RGB_to_XYZ fr...
44.97561
79
0.756508
from .derivation import (normalised_primary_matrix, chromatically_adapted_primaries, primaries_whitepoint, RGB_luminance_equation, RGB_luminance) from .rgb_colourspace import RGB_Colourspace from .rgb_colourspace import XYZ_to_RGB, RGB_to_XYZ from .rgb_colourspace imp...
true
true
1c418a5bd251b0ee4e7ca16f98c471e981f7b315
50,101
py
Python
src/cclib/parser/adfparser.py
maxscheurer/cclib
722a8b534686465d4e3ae57b8dd285a56f197e4a
[ "BSD-3-Clause" ]
null
null
null
src/cclib/parser/adfparser.py
maxscheurer/cclib
722a8b534686465d4e3ae57b8dd285a56f197e4a
[ "BSD-3-Clause" ]
null
null
null
src/cclib/parser/adfparser.py
maxscheurer/cclib
722a8b534686465d4e3ae57b8dd285a56f197e4a
[ "BSD-3-Clause" ]
null
null
null
## -*- coding: utf-8 -*- # # Copyright (c) 2017, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Parser for ADF output files""" from __future__ import print_function import itertools import re impor...
43.415078
159
0.479352
_ import print_function import itertools import re import numpy from cclib.parser import logfileparser from cclib.parser import utils class ADF(logfileparser.Logfile): def __init__(self, *args, **kwargs): super(ADF, self).__init__(logname="ADF", *args, **kwargs) def __s...
true
true
1c418a988521dac163fc228ae9f26b9acd41b1f5
3,101
py
Python
api/job.py
chonho/singa-web
d6e5354af3d641753a730b3d1ad31b1002fa61c1
[ "Apache-2.0" ]
null
null
null
api/job.py
chonho/singa-web
d6e5354af3d641753a730b3d1ad31b1002fa61c1
[ "Apache-2.0" ]
null
null
null
api/job.py
chonho/singa-web
d6e5354af3d641753a730b3d1ad31b1002fa61c1
[ "Apache-2.0" ]
null
null
null
import os import json import subprocess import zipfile from collections import OrderedDict from threading import Thread from flask import Flask, request, make_response, send_from_directory SINGA_ROOT = '../' FOOD_WORKSPACE = SINGA_ROOT + 'foodology/' class Job(Thread): workspace = '' def __init__(self): i...
27.442478
164
0.597227
import os import json import subprocess import zipfile from collections import OrderedDict from threading import Thread from flask import Flask, request, make_response, send_from_directory SINGA_ROOT = '../' FOOD_WORKSPACE = SINGA_ROOT + 'foodology/' class Job(Thread): workspace = '' def __init__(self): i...
false
true
1c418ae6d868b44c271c4cbc30d61ab7f197e815
11,954
py
Python
tests/integration/cqlengine/test_lwt_conditional.py
clohfink/python-driver
30a0e27cd1b8999267c146f0a93adf962a50790b
[ "Apache-2.0" ]
1,163
2015-01-01T03:02:05.000Z
2022-03-22T13:04:00.000Z
tests/integration/cqlengine/test_lwt_conditional.py
clohfink/python-driver
30a0e27cd1b8999267c146f0a93adf962a50790b
[ "Apache-2.0" ]
556
2015-01-05T16:39:29.000Z
2022-03-26T20:51:36.000Z
tests/integration/cqlengine/test_lwt_conditional.py
clohfink/python-driver
30a0e27cd1b8999267c146f0a93adf962a50790b
[ "Apache-2.0" ]
449
2015-01-05T10:28:59.000Z
2022-03-14T23:15:32.000Z
# Copyright DataStax, Inc. # # 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 applicable law or agreed to in writing, softwa...
39.846667
111
0.672829
try: import unittest2 as unittest except ImportError: import unittest import mock import six from uuid import uuid4 from cassandra.cqlengine import columns from cassandra.cqlengine.management import sync_table, drop_table from cassandra.cqlengine.models import Model from cassandra.cqlengine.que...
true
true