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
1c075510455030822b5d896f845e45a10870fd40
2,484
py
Python
examples/other_languages.py
emattia/sigopt-python
e6b4e5240261ddbdc84a3b4061b8935873612c23
[ "MIT" ]
67
2015-03-01T02:16:47.000Z
2021-05-10T16:17:21.000Z
examples/other_languages.py
emattia/sigopt-python
e6b4e5240261ddbdc84a3b4061b8935873612c23
[ "MIT" ]
150
2015-10-22T21:59:37.000Z
2022-03-10T00:55:19.000Z
examples/other_languages.py
emattia/sigopt-python
e6b4e5240261ddbdc84a3b4061b8935873612c23
[ "MIT" ]
19
2016-07-10T03:46:33.000Z
2022-02-05T12:13:01.000Z
import argparse import os from subprocess import PIPE, Popen import sys from sigopt import Connection class SubProcessEvaluator(object): def __init__(self, command): self.command = command # Take a suggestion from sigopt and evaluate your function # Sends command line arguments to your executable file with...
44.357143
118
0.745169
import argparse import os from subprocess import PIPE, Popen import sys from sigopt import Connection class SubProcessEvaluator(object): def __init__(self, command): self.command = command def evaluate_metric(self, assignments): arguments = [ '--{}={}'.format(param_name, assignment) ...
true
true
1c075538294fd227f862c40164b65f8c1e9ac8de
36,137
py
Python
cac/pruning/examples/resnet110/resnet110.py
FujitsuLaboratories/CAC
d12df8e47f61eaf7d7b0ed355e2d1aa296453f86
[ "Apache-2.0" ]
8
2021-09-30T07:24:43.000Z
2022-02-21T07:30:46.000Z
cac/pruning/examples/resnet110/resnet110.py
FujitsuLaboratories/CAC
d12df8e47f61eaf7d7b0ed355e2d1aa296453f86
[ "Apache-2.0" ]
null
null
null
cac/pruning/examples/resnet110/resnet110.py
FujitsuLaboratories/CAC
d12df8e47f61eaf7d7b0ed355e2d1aa296453f86
[ "Apache-2.0" ]
null
null
null
# resnet110.py COPYRIGHT Fujitsu Limited 2021 import torch import torch.nn as nn import torch.nn.functional as F class LambdaLayer(nn.Module): def __init__(self, lambd): super(LambdaLayer, self).__init__() self.lambd = lambd def forward(self, x): return self.lambd(x) # ...
45.114856
132
0.589839
import torch import torch.nn as nn import torch.nn.functional as F class LambdaLayer(nn.Module): def __init__(self, lambd): super(LambdaLayer, self).__init__() self.lambd = lambd def forward(self, x): return self.lambd(x) class ResNet110(nn.Module): def __init__( ...
true
true
1c0755754055fb1c2ac166576fb91480c91f5269
2,671
py
Python
flasky.py
mhcvs2/forum
36f6e61171328e39cc96fa439dbf29e10634397c
[ "MIT" ]
null
null
null
flasky.py
mhcvs2/forum
36f6e61171328e39cc96fa439dbf29e10634397c
[ "MIT" ]
3
2020-03-24T15:56:21.000Z
2021-02-02T21:48:41.000Z
flasky.py
mhcvs2/forum
36f6e61171328e39cc96fa439dbf29e10634397c
[ "MIT" ]
null
null
null
import os from dotenv import load_dotenv dotenv_path = os.path.join(os.path.dirname(__file__), '.env') if os.path.exists(dotenv_path): load_dotenv(dotenv_path) COV = None if os.environ.get('FLASK_COVERAGE'): import coverage COV = coverage.coverage(branch=True, include='app/*') COV.start() import sys...
30.352273
76
0.679146
import os from dotenv import load_dotenv dotenv_path = os.path.join(os.path.dirname(__file__), '.env') if os.path.exists(dotenv_path): load_dotenv(dotenv_path) COV = None if os.environ.get('FLASK_COVERAGE'): import coverage COV = coverage.coverage(branch=True, include='app/*') COV.start() import sys...
true
true
1c075596cdd027300ac051d32c0dafe8c8ae86a0
522
py
Python
setup.py
mongoishere/HawkEye
f5b9512c5fc47f294ec0855fd41e24e11863318c
[ "BSD-2-Clause" ]
2
2019-09-02T02:44:38.000Z
2021-04-28T21:52:37.000Z
setup.py
mongoishere/HawkEye
f5b9512c5fc47f294ec0855fd41e24e11863318c
[ "BSD-2-Clause" ]
null
null
null
setup.py
mongoishere/HawkEye
f5b9512c5fc47f294ec0855fd41e24e11863318c
[ "BSD-2-Clause" ]
1
2021-04-28T21:52:38.000Z
2021-04-28T21:52:38.000Z
from setuptools import setup, find_packages with open('README.rst') as tmp_file: readme = tmp_file.read() with open('LICENSE') as tmp_file: license = tmp_file.read() setup( name='New Python Project', version='0.1.0dev', description='New Python Project Description', long_description='readme', ...
22.695652
55
0.653257
from setuptools import setup, find_packages with open('README.rst') as tmp_file: readme = tmp_file.read() with open('LICENSE') as tmp_file: license = tmp_file.read() setup( name='New Python Project', version='0.1.0dev', description='New Python Project Description', long_description='readme', ...
true
true
1c0755b7c64d0ea8d86535396ebfbb1b5426456b
514
py
Python
Bidirectional RNN for Text Classification/variables.py
Zuu97/Advanced-Natural-Language-Processing-with-RNN
a8b7fb3b7bd0d7f8a0f8ba689275f297dc099b9d
[ "MIT" ]
1
2020-03-30T14:58:08.000Z
2020-03-30T14:58:08.000Z
Bidirectional RNN for Text Classification/variables.py
Zuu97/Advanced-Natural-Language-Processing-with-RNN
a8b7fb3b7bd0d7f8a0f8ba689275f297dc099b9d
[ "MIT" ]
null
null
null
Bidirectional RNN for Text Classification/variables.py
Zuu97/Advanced-Natural-Language-Processing-with-RNN
a8b7fb3b7bd0d7f8a0f8ba689275f297dc099b9d
[ "MIT" ]
null
null
null
import os embedded_dim = 100 max_length = 120 vocab_size = 20000 oov_tok = '<OOV>' pad_type = 'post' trunc_type = 'post' lstm_dim = 32 num_classes = 6 batch_size = 128 epoch = 20 Train_size = 20000 Validation_size = 4000 Test_size = 4000 data_path = os.path.join(os.getcwd(), 'Data/train.csv') preprocessed_path = os.p...
27.052632
75
0.741245
import os embedded_dim = 100 max_length = 120 vocab_size = 20000 oov_tok = '<OOV>' pad_type = 'post' trunc_type = 'post' lstm_dim = 32 num_classes = 6 batch_size = 128 epoch = 20 Train_size = 20000 Validation_size = 4000 Test_size = 4000 data_path = os.path.join(os.getcwd(), 'Data/train.csv') preprocessed_path = os.p...
true
true
1c07591ce65fe4f3a9fefe79e2579d3b09fe6845
368
py
Python
dynamic_array.py
anudeep586/Codechef_hackerrank_codeforces1
39a536d6ad6d670e0bce2ba8657cf5715b0037e0
[ "0BSD" ]
null
null
null
dynamic_array.py
anudeep586/Codechef_hackerrank_codeforces1
39a536d6ad6d670e0bce2ba8657cf5715b0037e0
[ "0BSD" ]
null
null
null
dynamic_array.py
anudeep586/Codechef_hackerrank_codeforces1
39a536d6ad6d670e0bce2ba8657cf5715b0037e0
[ "0BSD" ]
null
null
null
n,tests=[int(x) for x in input().split(" ")] la=0 z=[] s=[] for i in range(n): s.append([]) for _ in range(tests): q,x,y=[int(x) for x in input().split(" ")] if q==1: a=((x^la)%n) s[a].append(y) if q==2: a=((x^la)%n) b=y%len(s[a]) la=s[a][b] ...
18.4
47
0.407609
n,tests=[int(x) for x in input().split(" ")] la=0 z=[] s=[] for i in range(n): s.append([]) for _ in range(tests): q,x,y=[int(x) for x in input().split(" ")] if q==1: a=((x^la)%n) s[a].append(y) if q==2: a=((x^la)%n) b=y%len(s[a]) la=s[a][b] ...
true
true
1c07598b11fbdd7b9fafccf0f0c53ffba74b94db
3,548
py
Python
setup.py
k-ship/bilby
916d5c4ee4cdb102f1408bd20bc25fa250ab92f0
[ "MIT" ]
null
null
null
setup.py
k-ship/bilby
916d5c4ee4cdb102f1408bd20bc25fa250ab92f0
[ "MIT" ]
null
null
null
setup.py
k-ship/bilby
916d5c4ee4cdb102f1408bd20bc25fa250ab92f0
[ "MIT" ]
null
null
null
#!/usr/bin/env python from setuptools import setup import subprocess import sys import os # check that python version is 3.5 or above python_version = sys.version_info if python_version < (3, 5): sys.exit("Python < 3.5 is not supported, aborting setup") print("Confirmed Python version {}.{}.{} >= 3.5.0".format(*p...
32.550459
80
0.583427
from setuptools import setup import subprocess import sys import os python_version = sys.version_info if python_version < (3, 5): sys.exit("Python < 3.5 is not supported, aborting setup") print("Confirmed Python version {}.{}.{} >= 3.5.0".format(*python_version[:3])) def write_version_file(version): try: ...
true
true
1c075b04150393425e1982e94bdb72ce80a5d249
829,272
py
Python
lib/NS3/src/wimax/bindings/modulegen__gcc_LP64.py
HauserV/madv
588f24b1bcbc66946526ea2768629c778a8d8dfb
[ "MIT" ]
null
null
null
lib/NS3/src/wimax/bindings/modulegen__gcc_LP64.py
HauserV/madv
588f24b1bcbc66946526ea2768629c778a8d8dfb
[ "MIT" ]
null
null
null
lib/NS3/src/wimax/bindings/modulegen__gcc_LP64.py
HauserV/madv
588f24b1bcbc66946526ea2768629c778a8d8dfb
[ "MIT" ]
null
null
null
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
64.625312
748
0.621136
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
true
true
1c075c2e9df75ff6fc1f289f7f0f6a34ca92972f
6,857
py
Python
nintendo/nex/debug.py
pawel-ch/NintendoClients
0fc390c504661e1f35108bab85a2f595f81a9c4e
[ "MIT" ]
null
null
null
nintendo/nex/debug.py
pawel-ch/NintendoClients
0fc390c504661e1f35108bab85a2f595f81a9c4e
[ "MIT" ]
null
null
null
nintendo/nex/debug.py
pawel-ch/NintendoClients
0fc390c504661e1f35108bab85a2f595f81a9c4e
[ "MIT" ]
null
null
null
# This file was generated automatically by generate_protocols.py from nintendo.nex import notification, rmc, common, streams import logging logger = logging.getLogger(__name__) class ApiCall(common.Structure): def __init__(self): super().__init__() self.name = None self.time = None self.pid = None def ...
36.668449
125
0.756307
from nintendo.nex import notification, rmc, common, streams import logging logger = logging.getLogger(__name__) class ApiCall(common.Structure): def __init__(self): super().__init__() self.name = None self.time = None self.pid = None def check_required(self, settings): for field in ['name', 'time', '...
true
true
1c075c3cf5ebc034c792a4aee4ff57815ae1706c
6,530
py
Python
src/Players.py
AlexJamesWright/Blackjack
83587866ddd58b784adcb00428170bd647849bb4
[ "MIT" ]
null
null
null
src/Players.py
AlexJamesWright/Blackjack
83587866ddd58b784adcb00428170bd647849bb4
[ "MIT" ]
1
2020-03-24T11:36:26.000Z
2020-03-31T13:22:52.000Z
src/Players.py
AlexJamesWright/Blackjack
83587866ddd58b784adcb00428170bd647849bb4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Oct 26 13:53:59 2019 @author: ajw1e16 Various blackjack players. """ import utilityFunctions as ut class Player(object): """ Base player. All other players will inherit from this with their own playing style. Parameters ---------...
21.409836
95
0.530168
import utilityFunctions as ut class Player(object): def __init__(self, bank=1000): self.bankHistory = [] self.bank = bank self.roundBetting = 0 self.payout = 0 self.broadcast = None @property def bank(self): ret...
true
true
1c075c7268cd3bd25e7a9f8ce58c0d3c41c76a98
454
py
Python
remoteappmanager/tests/test_user.py
simphony/simphony-remote
fc5f0aef01165a497170684c40353a1bca3d6c2d
[ "BSD-3-Clause" ]
6
2016-10-17T18:37:56.000Z
2021-12-16T09:38:08.000Z
remoteappmanager/tests/test_user.py
simphony/simphony-remote
fc5f0aef01165a497170684c40353a1bca3d6c2d
[ "BSD-3-Clause" ]
570
2016-06-23T12:09:31.000Z
2022-03-15T17:04:00.000Z
remoteappmanager/tests/test_user.py
simphony/simphony-remote
fc5f0aef01165a497170684c40353a1bca3d6c2d
[ "BSD-3-Clause" ]
8
2018-03-23T00:00:51.000Z
2021-08-30T18:54:40.000Z
from unittest import TestCase from remoteappmanager.user import User class TestUser(TestCase): def setUp(self): self.user = User(name='test-user', login_service='Basic', demo_applications=['some-image']) def test_init(self): self.assertEqual...
26.705882
58
0.625551
from unittest import TestCase from remoteappmanager.user import User class TestUser(TestCase): def setUp(self): self.user = User(name='test-user', login_service='Basic', demo_applications=['some-image']) def test_init(self): self.assertEqual...
true
true
1c075d7bd438b435868baa328c7f2c0fe32d5d5b
26,039
py
Python
src/py21cmfast/cli.py
daviesje/21cmFAST
f36885a813ace72f34c881d80473208d06e3829a
[ "MIT" ]
28
2019-10-02T08:48:13.000Z
2022-03-10T08:02:28.000Z
src/py21cmfast/cli.py
daviesje/21cmFAST
f36885a813ace72f34c881d80473208d06e3829a
[ "MIT" ]
232
2019-06-13T22:36:21.000Z
2022-03-30T15:45:06.000Z
src/py21cmfast/cli.py
daviesje/21cmFAST
f36885a813ace72f34c881d80473208d06e3829a
[ "MIT" ]
21
2019-06-14T16:53:26.000Z
2022-03-29T19:50:17.000Z
"""Module that contains the command line app.""" import builtins import click import inspect import logging import matplotlib.pyplot as plt import numpy as np import warnings import yaml from os import path, remove from pathlib import Path from . import _cfg, cache_tools, global_params, plotting from . import wrapper ...
29.356257
97
0.611352
import builtins import click import inspect import logging import matplotlib.pyplot as plt import numpy as np import warnings import yaml from os import path, remove from pathlib import Path from . import _cfg, cache_tools, global_params, plotting from . import wrapper as lib def _get_config(config=None): if con...
true
true
1c075e54f814220ab945fb5829f3484e384af8d4
696
py
Python
yenidil.py
yasirmohamedfathi/Pythontur
4607c12a952116a865fae43f182a7f208aeca9d1
[ "MIT" ]
1
2022-03-10T17:11:51.000Z
2022-03-10T17:11:51.000Z
yenidil.py
yasirmohame/Pythontur
4607c12a952116a865fae43f182a7f208aeca9d1
[ "MIT" ]
null
null
null
yenidil.py
yasirmohame/Pythontur
4607c12a952116a865fae43f182a7f208aeca9d1
[ "MIT" ]
null
null
null
class Tip: def __init__(self,obje_şey) -> None: self.obje_şey=obje_şey def __str__(self) -> None: return str(type(self.obje_şey)) class ondalık(int): def __float__(self) -> float: return super().__float__() class Tamsayı(int): def __int__(self) -> int: return super().__i...
26.769231
44
0.581897
class Tip: def __init__(self,obje_şey) -> None: self.obje_şey=obje_şey def __str__(self) -> None: return str(type(self.obje_şey)) class ondalık(int): def __float__(self) -> float: return super().__float__() class Tamsayı(int): def __int__(self) -> int: return super().__i...
true
true
1c075e7f68114b4aabb89b2c00cbe1cd0320dfb9
3,130
py
Python
src/models/n-gram/ngram.py
awesome-archive/Automatic_Speech_Recognition
28c7f78064006a68fb12001b37e3893a87cb798c
[ "MIT" ]
null
null
null
src/models/n-gram/ngram.py
awesome-archive/Automatic_Speech_Recognition
28c7f78064006a68fb12001b37e3893a87cb798c
[ "MIT" ]
null
null
null
src/models/n-gram/ngram.py
awesome-archive/Automatic_Speech_Recognition
28c7f78064006a68fb12001b37e3893a87cb798c
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- #!/usr/bin/python ''' Language modelling for automatic speech recognition based on n-gram author: iiiiiiiiiiii iiiiiiiiiiii !!!!!!! !!!!!! # ### # ### ### I# #: # ### # ...
32.604167
93
0.45655
''' Language modelling for automatic speech recognition based on n-gram author: iiiiiiiiiiii iiiiiiiiiiii !!!!!!! !!!!!! # ### # ### ### I# #: # ### # I##; ##; ## #...
false
true
1c075f34dca283714195a979ceda054e43bd4f75
13,010
py
Python
original/baselines/train/JointE+ONE.py
thunlp/JointNRE
29e2070910d0940bf4d32a8b8c97800bceff98fb
[ "MIT" ]
186
2018-01-29T09:33:59.000Z
2022-03-17T08:20:44.000Z
original/baselines/train/JointE+ONE.py
thunlp/JointNRE
29e2070910d0940bf4d32a8b8c97800bceff98fb
[ "MIT" ]
19
2018-03-01T01:55:08.000Z
2022-02-17T03:38:21.000Z
original/baselines/train/JointE+ONE.py
thunlp/JointNRE
29e2070910d0940bf4d32a8b8c97800bceff98fb
[ "MIT" ]
36
2018-02-02T06:29:29.000Z
2021-01-22T08:36:00.000Z
#coding:utf-8 import numpy as np import tensorflow as tf import os import time import datetime import ctypes import threading import json ll1 = ctypes.cdll.LoadLibrary lib_cnn = ll1("./init_cnn.so") ll2 = ctypes.cdll.LoadLibrary lib_kg = ll2("./init_know.so") class Config(object): def __init__(self): self.in...
41.301587
321
0.711299
import numpy as np import tensorflow as tf import os import time import datetime import ctypes import threading import json ll1 = ctypes.cdll.LoadLibrary lib_cnn = ll1("./init_cnn.so") ll2 = ctypes.cdll.LoadLibrary lib_kg = ll2("./init_know.so") class Config(object): def __init__(self): self.instanceTot = li...
false
true
1c075f43bce1df2eb7f6c84dbdf4ae820f939b86
3,407
py
Python
app.py
Afafabdb/Instahawk
43e380980968fdf9102dc439161fa2fe288e488a
[ "Apache-2.0" ]
null
null
null
app.py
Afafabdb/Instahawk
43e380980968fdf9102dc439161fa2fe288e488a
[ "Apache-2.0" ]
null
null
null
app.py
Afafabdb/Instahawk
43e380980968fdf9102dc439161fa2fe288e488a
[ "Apache-2.0" ]
1
2021-11-08T11:34:05.000Z
2021-11-08T11:34:05.000Z
import instaloader from flask import Flask, render_template, request, jsonify from instaloader import Profile, Post from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer import numpy as np app = Flask(__name__) loader = instaloader.Instaloader() @app.route('/', methods=['GET']) def home(): return...
29.885965
76
0.650719
import instaloader from flask import Flask, render_template, request, jsonify from instaloader import Profile, Post from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer import numpy as np app = Flask(__name__) loader = instaloader.Instaloader() @app.route('/', methods=['GET']) def home(): return...
true
true
1c0760057857b18b81035eac64e12cf554a1ca2d
4,312
py
Python
how-to-use-azureml/training-with-deep-learning/train-hyperparameter-tune-deploy-with-keras/keras_mnist.py
jakeatmsft/MachineLearningNotebooks
f918280668e6d4f6ff98dc2c9ea04527b716fc60
[ "MIT" ]
null
null
null
how-to-use-azureml/training-with-deep-learning/train-hyperparameter-tune-deploy-with-keras/keras_mnist.py
jakeatmsft/MachineLearningNotebooks
f918280668e6d4f6ff98dc2c9ea04527b716fc60
[ "MIT" ]
null
null
null
how-to-use-azureml/training-with-deep-learning/train-hyperparameter-tune-deploy-with-keras/keras_mnist.py
jakeatmsft/MachineLearningNotebooks
f918280668e6d4f6ff98dc2c9ea04527b716fc60
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import numpy as np import argparse import os import glob import matplotlib.pyplot as plt import tensorflow as tf from tensorflow.keras.models import Sequential, model_from_json from tensorflow.keras.layers import Dense from...
33.6875
117
0.718228
import numpy as np import argparse import os import glob import matplotlib.pyplot as plt import tensorflow as tf from tensorflow.keras.models import Sequential, model_from_json from tensorflow.keras.layers import Dense from tensorflow.keras.optimizers import RMSprop from tensorflow.keras.callbacks import Callback ...
true
true
1c07607a77f67176f62322f7479bba2e98a331b2
8,524
py
Python
src/runner/predictors/vipcup_seg_predictor.py
Tung-I/nips2019_template
a1fcf35b7633d192d2706a533731cb8c457ac230
[ "MIT" ]
null
null
null
src/runner/predictors/vipcup_seg_predictor.py
Tung-I/nips2019_template
a1fcf35b7633d192d2706a533731cb8c457ac230
[ "MIT" ]
null
null
null
src/runner/predictors/vipcup_seg_predictor.py
Tung-I/nips2019_template
a1fcf35b7633d192d2706a533731cb8c457ac230
[ "MIT" ]
null
null
null
import csv import torch import logging import numpy as np import nibabel as nib from tqdm import tqdm from src.data.transforms import compose class VIPCUPSegPredictor(object): """The predictor for the VIPCUP 2018 segmentation task. Args: data_dir (Path): The directory of the saved data. data_...
46.579235
137
0.559596
import csv import torch import logging import numpy as np import nibabel as nib from tqdm import tqdm from src.data.transforms import compose class VIPCUPSegPredictor(object): def __init__(self, data_dir, data_split_csv, preprocessings, transforms, sample_size, shift, device, net, metric_fns, sa...
true
true
1c07609fb955cbd4f32234b183683a1d27505b92
1,184
py
Python
curso-em-video/ex056.2.py
joseluizbrits/sobre-python
316143c341e5a44070a3b13877419082774bd730
[ "MIT" ]
null
null
null
curso-em-video/ex056.2.py
joseluizbrits/sobre-python
316143c341e5a44070a3b13877419082774bd730
[ "MIT" ]
null
null
null
curso-em-video/ex056.2.py
joseluizbrits/sobre-python
316143c341e5a44070a3b13877419082774bd730
[ "MIT" ]
null
null
null
# Analisador completo '''Desenvolva um programa que leia o NOME, IDADE e SEXO de 4 PESSOAS. No final do programa, mostre: > A MÉDIA DE IDADE do grupo > Qual é o nome do homem MAIS VELHO > Quantas mulheres têm MENOS DE 20 ANOS''' somaidade = 0 maioridadehomem = 0 nomevelho = '' totmulher20 = 0 for p in range(1, 5): ...
39.466667
124
0.64527
somaidade = 0 maioridadehomem = 0 nomevelho = '' totmulher20 = 0 for p in range(1, 5): print('\033[7:1:32m---- {}ª PESSOA ----\033[m'.format(p)) nome = str(input('Nome: ')).strip() idade = int(input('Idade: ')) sexo = str(input('Sexo [M/F]: ')).strip() somaidade += idade if p == 1 and sexo in '...
true
true
1c07611810754dd9ac89f3859bb7912fbbd5a593
964
py
Python
electrum_zcash/scripts/peers.py
zebra-lucky/electrum-zcash
2e66d47fa043d8c5ea536cd27a09dfb9e4ec314b
[ "MIT" ]
11
2018-08-06T22:37:42.000Z
2021-09-19T12:44:16.000Z
electrum_zcash/scripts/peers.py
zebra-lucky/electrum-zcash
2e66d47fa043d8c5ea536cd27a09dfb9e4ec314b
[ "MIT" ]
9
2019-04-28T18:33:24.000Z
2021-07-12T07:17:48.000Z
electrum_zcash/scripts/peers.py
zebra-lucky/electrum-zcash
2e66d47fa043d8c5ea536cd27a09dfb9e4ec314b
[ "MIT" ]
14
2018-04-29T16:30:44.000Z
2022-03-25T13:42:40.000Z
#!/usr/bin/env python3 import asyncio from electrum_zcash.network import filter_protocol, Network from electrum_zcash.util import create_and_start_event_loop, log_exceptions from electrum_zcash.blockchain import hash_raw_header from electrum_zcash.simple_config import SimpleConfig config = SimpleConfig() loop, stop...
32.133333
97
0.733402
import asyncio from electrum_zcash.network import filter_protocol, Network from electrum_zcash.util import create_and_start_event_loop, log_exceptions from electrum_zcash.blockchain import hash_raw_header from electrum_zcash.simple_config import SimpleConfig config = SimpleConfig() loop, stopping_fut, loop_thread =...
true
true
1c076183e2320f8b03e02c68640eb5eeb4e56021
5,076
py
Python
glance/common/semver_db.py
wkoathp/glance
eb0c47047ddc28371f546437118986ed904f41d3
[ "Apache-2.0" ]
null
null
null
glance/common/semver_db.py
wkoathp/glance
eb0c47047ddc28371f546437118986ed904f41d3
[ "Apache-2.0" ]
null
null
null
glance/common/semver_db.py
wkoathp/glance
eb0c47047ddc28371f546437118986ed904f41d3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 Mirantis, 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 writin...
35.006897
79
0.660362
import semantic_version from glance.common import exception from glance import i18n MAX_COMPONENT_LENGTH = pow(2, 16) - 1 MAX_NUMERIC_PRERELEASE_LENGTH = 6 _ = i18n._ class DBVersion(object): def __init__(self, components_long, prerelease, build): version_string = '%s.%s.%s' % _long_to_components(com...
true
true
1c0761a419818297e7b8f08484f29b5512ea7aeb
40,928
py
Python
selfdrive/car/hyundai/values.py
steerapi/openpilot
32d317239a1804d6b8132b49d6de91646e111f63
[ "MIT" ]
1
2021-04-10T05:11:50.000Z
2021-04-10T05:11:50.000Z
selfdrive/car/hyundai/values.py
steerapi/openpilot
32d317239a1804d6b8132b49d6de91646e111f63
[ "MIT" ]
null
null
null
selfdrive/car/hyundai/values.py
steerapi/openpilot
32d317239a1804d6b8132b49d6de91646e111f63
[ "MIT" ]
null
null
null
# flake8: noqa from cereal import car from selfdrive.car import dbc_dict Ecu = car.CarParams.Ecu # Steer torque limits class CarControllerParams: def __init__(self, CP): if CP.carFingerprint in [CAR.SONATA, CAR.PALISADE, CAR.SANTA_FE, CAR.VELOSTER, CAR.GENESIS_G70, CAR.IONIQ_EV_2020, CAR.KIA_CEED]: self.S...
85.623431
928
0.59182
from cereal import car from selfdrive.car import dbc_dict Ecu = car.CarParams.Ecu class CarControllerParams: def __init__(self, CP): if CP.carFingerprint in [CAR.SONATA, CAR.PALISADE, CAR.SANTA_FE, CAR.VELOSTER, CAR.GENESIS_G70, CAR.IONIQ_EV_2020, CAR.KIA_CEED]: self.STEER_MAX = 384 else: self.S...
true
true
1c0761ef0a8fdcb9c8b7cfb7b963795dec066840
2,738
py
Python
example/crabcav.py
bauerca/maxwell
cf8e2decb42f8ee5235c26314af4eee7b39c9411
[ "Unlicense" ]
2
2015-08-18T17:12:01.000Z
2017-08-10T08:51:20.000Z
example/crabcav.py
bauerca/maxwell
cf8e2decb42f8ee5235c26314af4eee7b39c9411
[ "Unlicense" ]
null
null
null
example/crabcav.py
bauerca/maxwell
cf8e2decb42f8ee5235c26314af4eee7b39c9411
[ "Unlicense" ]
3
2017-06-24T14:15:52.000Z
2021-07-23T02:01:35.000Z
import os import math import sys sys.path.insert(0, "../src") import mx baseName = "crabcav" dim = 3 # crab cav parameters # user set: numCells = 4 cellLen = 2.0 * 0.0192 cavRad = 0.04719 irisRad = 0.015 cavRho = 0.0136 irisRho = 0.00331 # calculated: irisTorMajRad = irisRad + irisRho irisTorMinRad = irisRho ca...
24.017544
103
0.687363
import os import math import sys sys.path.insert(0, "../src") import mx baseName = "crabcav" dim = 3 numCells = 4 cellLen = 2.0 * 0.0192 cavRad = 0.04719 irisRad = 0.015 cavRho = 0.0136 irisRho = 0.00331 irisTorMajRad = irisRad + irisRho irisTorMinRad = irisRho cavTorMajRad = cavRad - cavRho cavTorMinRad = cavRho r...
false
true
1c0761f4d75bf46b7d76bfb8e717fca938c68115
4,783
py
Python
python/GafferAppleseedTest/InteractiveAppleseedRenderTest.py
ddesmond/gaffer
4f25df88103b7893df75865ea919fb035f92bac0
[ "BSD-3-Clause" ]
561
2016-10-18T04:30:48.000Z
2022-03-30T06:52:04.000Z
python/GafferAppleseedTest/InteractiveAppleseedRenderTest.py
ddesmond/gaffer
4f25df88103b7893df75865ea919fb035f92bac0
[ "BSD-3-Clause" ]
1,828
2016-10-14T19:01:46.000Z
2022-03-30T16:07:19.000Z
python/GafferAppleseedTest/InteractiveAppleseedRenderTest.py
ddesmond/gaffer
4f25df88103b7893df75865ea919fb035f92bac0
[ "BSD-3-Clause" ]
120
2016-10-18T15:19:13.000Z
2021-12-20T16:28:23.000Z
########################################################################## # # Copyright (c) 2018, Esteban Tovagliari. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribution...
33.447552
171
0.729877
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, import os import unittest import IECore import IECoreScene import IECoreImage import Gaffer import GafferTest import GafferScene import GafferSceneTest import GafferImage import GafferOSL import GafferAppleseed from .AppleseedTest import c...
true
true
1c07620cf615122287e64a0965a93ee9f27faed2
5,606
py
Python
pde_superresolution/duckarray.py
yohai/pde-superresolution
5ed0d4c4d039c9a8ed2b197a07839c83fea89251
[ "Apache-2.0" ]
null
null
null
pde_superresolution/duckarray.py
yohai/pde-superresolution
5ed0d4c4d039c9a8ed2b197a07839c83fea89251
[ "Apache-2.0" ]
null
null
null
pde_superresolution/duckarray.py
yohai/pde-superresolution
5ed0d4c4d039c9a8ed2b197a07839c83fea89251
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
29.661376
80
0.660186
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from typing import List, Sequence, Optional, Tuple, TypeVar, Union T = TypeVar('T') def concatenate(arrays: List[T], axis: int) -> T: if isinstance(arrays[0], tf...
true
true
1c0763562ebbcbea476833df1613d071809e7488
8,647
py
Python
app/main/views.py
chen940303/Diaosier_home
58e0713703d7f902739c7fe3495c0d964151bcc8
[ "MIT" ]
2
2016-09-05T15:46:23.000Z
2016-09-05T15:46:27.000Z
app/main/views.py
chen940303/Diaosier_home
58e0713703d7f902739c7fe3495c0d964151bcc8
[ "MIT" ]
null
null
null
app/main/views.py
chen940303/Diaosier_home
58e0713703d7f902739c7fe3495c0d964151bcc8
[ "MIT" ]
null
null
null
# -*-coding:utf-8-*- from datetime import datetime from flask import render_template ,session ,redirect, url_for, flash,request,current_app,make_response,abort from flask.ext.login import current_user, login_required #这个需要吗,有用吗 from . import main from .forms import NameForm,EditProfileForm, EditProfileAdminForm,PostFo...
40.596244
164
0.723372
from datetime import datetime from flask import render_template ,session ,redirect, url_for, flash,request,current_app,make_response,abort from flask.ext.login import current_user, login_required from . import main from .forms import NameForm,EditProfileForm, EditProfileAdminForm,PostForm,CommentForm from .. import db...
true
true
1c07635b2a510dba70772bc809db713293001201
5,366
py
Python
src/tespy/components/basics/cycle_closer.py
drjod/tespy
b90508178ff3527665781b99d20d3dddd8cb23a2
[ "MIT" ]
null
null
null
src/tespy/components/basics/cycle_closer.py
drjod/tespy
b90508178ff3527665781b99d20d3dddd8cb23a2
[ "MIT" ]
null
null
null
src/tespy/components/basics/cycle_closer.py
drjod/tespy
b90508178ff3527665781b99d20d3dddd8cb23a2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 """Module for class CycleCloser This file is part of project TESPy (github.com/oemof/tespy). It's copyrighted by the contributors recorded in the version control history of the file, available from its original location tespy/components/basics/cycle_closer.py SPDX-License-Identifier: MIT """ im...
31.380117
88
0.636042
import numpy as np from tespy.components.component import Component from tespy.tools.data_containers import ComponentProperties as dc_cp class CycleCloser(Component): @staticmethod def component(): return 'cycle closer' @staticmethod def get_variables(): return { 'mas...
true
true
1c0763930f07ebea7944c4b7940e25b2eaefc39b
541
py
Python
contact/migrations/0003_auto_20171217_1144.py
vanessa/djangogirls
e56423ceda172858147dfa7006353f23264d4c67
[ "BSD-3-Clause" ]
446
2015-01-04T20:58:26.000Z
2022-03-30T23:08:26.000Z
contact/migrations/0003_auto_20171217_1144.py
vanessa/djangogirls
e56423ceda172858147dfa7006353f23264d4c67
[ "BSD-3-Clause" ]
649
2015-01-09T23:42:14.000Z
2022-03-31T17:27:19.000Z
contact/migrations/0003_auto_20171217_1144.py
vanessa/djangogirls
e56423ceda172858147dfa7006353f23264d4c67
[ "BSD-3-Clause" ]
319
2015-01-06T20:58:42.000Z
2022-03-30T06:29:04.000Z
# Generated by Django 2.0 on 2017-12-17 11:44 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('contact', '0002_contactemail_event'), ] operations = [ migrations.AlterField( model_name='contact...
27.05
169
0.659889
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('contact', '0002_contactemail_event'), ] operations = [ migrations.AlterField( model_name='contactemail', name='event', ...
true
true
1c076480f665b6acdd78616e54189f9b2b9d5c49
970
py
Python
examples/tube_example.py
dongyan1024/overtime
4f722a823585890026fe9584ba5985963b2a586c
[ "MIT" ]
9
2020-10-15T13:53:36.000Z
2022-03-08T12:08:09.000Z
examples/tube_example.py
dongyan1024/overtime
4f722a823585890026fe9584ba5985963b2a586c
[ "MIT" ]
6
2021-02-07T15:43:12.000Z
2021-04-24T04:03:39.000Z
examples/tube_example.py
dongyan1024/overtime
4f722a823585890026fe9584ba5985963b2a586c
[ "MIT" ]
7
2020-10-15T13:55:12.000Z
2022-03-12T03:54:02.000Z
from inputs.classes import CsvInput from components.digraphs import TemporalDiGraph from plots.plotter import Plotter from plots.circle import Circle from plots.slice import Slice from algorithms.foremost import calculate_foremost_tree tube = TemporalDiGraph('TubeNetwork', data=CsvInput('./tube.csv')) tube...
44.090909
134
0.772165
from inputs.classes import CsvInput from components.digraphs import TemporalDiGraph from plots.plotter import Plotter from plots.circle import Circle from plots.slice import Slice from algorithms.foremost import calculate_foremost_tree tube = TemporalDiGraph('TubeNetwork', data=CsvInput('./tube.csv')) tube...
true
true
1c0764ebf0d3fbef4fce0bb8c35224dab5ba63b1
4,391
py
Python
app/src/thirdparty/telemetry/core/util.py
ta2edchimp/big-rig
d08ffaa34b1496ca6c8e69a8797d280583472156
[ "Apache-2.0" ]
925
2015-11-06T03:04:46.000Z
2017-09-16T19:08:43.000Z
app/src/thirdparty/telemetry/core/util.py
ta2edchimp/big-rig
d08ffaa34b1496ca6c8e69a8797d280583472156
[ "Apache-2.0" ]
29
2015-11-09T17:37:28.000Z
2017-08-16T17:50:11.000Z
app/src/thirdparty/telemetry/core/util.py
ta2edchimp/big-rig
d08ffaa34b1496ca6c8e69a8797d280583472156
[ "Apache-2.0" ]
51
2015-11-08T07:06:38.000Z
2017-08-21T07:27:19.000Z
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import glob import imp import inspect import logging import os import socket import sys import time from telemetry.core import exceptions def GetBaseDir():...
29.07947
80
0.687543
import glob import imp import inspect import logging import os import socket import sys import time from telemetry.core import exceptions def GetBaseDir(): main_module = sys.modules['__main__'] if hasattr(main_module, '__file__'): return os.path.dirname(os.path.abspath(main_module.__file__)) else: retu...
true
true
1c076562399c12556761ea0c49eaf66af6b278f4
4,986
py
Python
fig.py
Velcon-Zheng/scPretrain
e12081cbfeb9b014e7e780770ada3e816d2a856c
[ "MIT" ]
14
2020-10-31T03:44:16.000Z
2022-03-29T12:49:48.000Z
fig.py
Velcon-Zheng/scPretrain
e12081cbfeb9b014e7e780770ada3e816d2a856c
[ "MIT" ]
1
2021-07-20T12:33:35.000Z
2021-07-20T12:33:35.000Z
fig.py
Velcon-Zheng/scPretrain
e12081cbfeb9b014e7e780770ada3e816d2a856c
[ "MIT" ]
3
2020-12-03T00:49:08.000Z
2022-03-14T22:56:33.000Z
import config import re import matplotlib.pyplot as plt import numpy as np import matplotlib.ticker as ticker from tqdm import tqdm from matplotlib.pyplot import MultipleLocator fold=config.fold1 fold2=config.fold2 acc_pt,acc_ft=[[] for i in range(fold*fold2)],[[] for i in range(fold*fold2)] kappa_pt,kappa_ft=[[] fo...
35.870504
83
0.667469
import config import re import matplotlib.pyplot as plt import numpy as np import matplotlib.ticker as ticker from tqdm import tqdm from matplotlib.pyplot import MultipleLocator fold=config.fold1 fold2=config.fold2 acc_pt,acc_ft=[[] for i in range(fold*fold2)],[[] for i in range(fold*fold2)] kappa_pt,kappa_ft=[[] fo...
true
true
1c076666f7db4bc6e2e1224cde83b3ee1d5ff117
4,605
py
Python
modules/dense.py
ZAKAUDD/LightNet
58353b28d33e69cc877db878c4a888aabc2118ce
[ "MIT" ]
737
2018-03-21T12:28:04.000Z
2021-07-07T16:03:09.000Z
modules/dense.py
ZAKAUDD/LightNet
58353b28d33e69cc877db878c4a888aabc2118ce
[ "MIT" ]
23
2018-03-22T01:19:53.000Z
2021-03-26T15:08:26.000Z
modules/dense.py
ZAKAUDD/LightNet
58353b28d33e69cc877db878c4a888aabc2118ce
[ "MIT" ]
189
2018-03-22T08:55:43.000Z
2021-07-01T12:14:08.000Z
from collections import OrderedDict import torch import torch.nn as nn from .bn import ABN class DenseModule(nn.Module): def __init__(self, in_chns, squeeze_ratio, out_chns, n_layers, dilate_sec=(1, 2, 4, 8, 16), norm_act=ABN): super(DenseModule, self).__init__() self.n_layers = n_layers ...
46.989796
120
0.421498
from collections import OrderedDict import torch import torch.nn as nn from .bn import ABN class DenseModule(nn.Module): def __init__(self, in_chns, squeeze_ratio, out_chns, n_layers, dilate_sec=(1, 2, 4, 8, 16), norm_act=ABN): super(DenseModule, self).__init__() self.n_layers = n_layers ...
true
true
1c0767e1b1f9a81e2dac90983d8c900cbe26e1a7
5,525
py
Python
src/main/python/cosmopusher/demo_stream.py
konz/cosmopusher
7701b3ecd5d2e7fa90e34e75cb53a0dd12c6124c
[ "Apache-2.0" ]
null
null
null
src/main/python/cosmopusher/demo_stream.py
konz/cosmopusher
7701b3ecd5d2e7fa90e34e75cb53a0dd12c6124c
[ "Apache-2.0" ]
null
null
null
src/main/python/cosmopusher/demo_stream.py
konz/cosmopusher
7701b3ecd5d2e7fa90e34e75cb53a0dd12c6124c
[ "Apache-2.0" ]
null
null
null
from io import StringIO from time import sleep DATA = '''sóme garbäge first 29-Dec-17 07:18:43 99 66 12 29-Dec-17 07:18:45 99 66 17 MO 29-Dec-17 07:18:47 99 66 18 MO 29-Dec-17 07:18:49 99 66 52 ...
54.70297
80
0.329231
from io import StringIO from time import sleep DATA = '''sóme garbäge first 29-Dec-17 07:18:43 99 66 12 29-Dec-17 07:18:45 99 66 17 MO 29-Dec-17 07:18:47 99 66 18 MO 29-Dec-17 07:18:49 99 66 52 ...
true
true
1c07680f9a01b6d936414923e8d60139a6dc261b
1,662
py
Python
hard/python/c0077_403_frog-jump/00_leetcode_0077.py
drunkwater/leetcode
8cc4a07763e71efbaedb523015f0c1eff2927f60
[ "Ruby" ]
null
null
null
hard/python/c0077_403_frog-jump/00_leetcode_0077.py
drunkwater/leetcode
8cc4a07763e71efbaedb523015f0c1eff2927f60
[ "Ruby" ]
null
null
null
hard/python/c0077_403_frog-jump/00_leetcode_0077.py
drunkwater/leetcode
8cc4a07763e71efbaedb523015f0c1eff2927f60
[ "Ruby" ]
3
2018-02-09T02:46:48.000Z
2021-02-20T08:32:03.000Z
# DRUNKWATER TEMPLATE(add description and prototypes) # Question Title and Description on leetcode.com # Function Declaration and Function Prototypes on leetcode.com #403. Frog Jump #A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can jump on a...
47.485714
235
0.716005
#If the frog's last jump was k units, then its next jump must be either k - 1, k, or k + 1 units. Note that the frog can only jump in the forward direction. #The first stone's position is always 0. # :type stones: List[int] # :rtype: bool # """
true
true
1c07683ce5c8809f6589c29652232a6056d80a55
41,016
py
Python
ross/fluid_flow/cylindrical.py
LMEst-Rotor/ross
33aaa4b32ff7c32465cb81840f3cb2d6b2cdd65a
[ "MIT" ]
1
2021-07-20T04:24:19.000Z
2021-07-20T04:24:19.000Z
ross/fluid_flow/cylindrical.py
LMEst-Rotor/ross
33aaa4b32ff7c32465cb81840f3cb2d6b2cdd65a
[ "MIT" ]
null
null
null
ross/fluid_flow/cylindrical.py
LMEst-Rotor/ross
33aaa4b32ff7c32465cb81840f3cb2d6b2cdd65a
[ "MIT" ]
null
null
null
import time import numpy as np from numpy.linalg import pinv from scipy.optimize import curve_fit, minimize from ross.units import Q_, check_units class THDCylindrical: """This class calculates the pressure and temperature field in oil film of a cylindrical bearing, with two (2) pads. It is also possible to obt...
38.512676
284
0.360786
import time import numpy as np from numpy.linalg import pinv from scipy.optimize import curve_fit, minimize from ross.units import Q_, check_units class THDCylindrical: @check_units def __init__( self, L, R, c_r, n_theta, n_z, n_y, n_gap, ...
true
true
1c07686a96edd64d730d716b4a6285a98de61e9b
6,429
py
Python
bwtougu/model/portfolio.py
luhouxiang/byrobot
e110e7865965a344d2b61cb925c959cee1387758
[ "Apache-2.0" ]
null
null
null
bwtougu/model/portfolio.py
luhouxiang/byrobot
e110e7865965a344d2b61cb925c959cee1387758
[ "Apache-2.0" ]
null
null
null
bwtougu/model/portfolio.py
luhouxiang/byrobot
e110e7865965a344d2b61cb925c959cee1387758
[ "Apache-2.0" ]
1
2018-09-28T08:59:38.000Z
2018-09-28T08:59:38.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import six import jsonpickle from bwtougu.environment import Environment from bwtougu.const import DAYS_CNT, DEFAULT_ACCOUNT_TYPE from bwtougu.utils import get_account_type, merge_dicts from bwtougu.utils.repr import property_repr from bwtougu.events import EVENT class ...
27.474359
115
0.616737
import six import jsonpickle from bwtougu.environment import Environment from bwtougu.const import DAYS_CNT, DEFAULT_ACCOUNT_TYPE from bwtougu.utils import get_account_type, merge_dicts from bwtougu.utils.repr import property_repr from bwtougu.events import EVENT class Portfolio(object): __repr__ = property_rep...
true
true
1c076a5a2c5154bdd528c549e7d45b500967e572
4,001
py
Python
mmx-send-test.py
retheoff/mmx-sender
d312435d919826e810b4fca459ca5e6af8445c3c
[ "Apache-2.0" ]
2
2022-01-03T12:39:39.000Z
2022-01-26T20:20:21.000Z
mmx-send-test.py
retheoff/mmx-sender
d312435d919826e810b4fca459ca5e6af8445c3c
[ "Apache-2.0" ]
null
null
null
mmx-send-test.py
retheoff/mmx-sender
d312435d919826e810b4fca459ca5e6af8445c3c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import sys,os,time import json import subprocess import argparse import platform import textwrap import random def quickPopen(cmd): cmd = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) out, err = cmd.communicate() return out, err def run(pargs): indexArgs =...
26.322368
108
0.665334
import sys,os,time import json import subprocess import argparse import platform import textwrap import random def quickPopen(cmd): cmd = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) out, err = cmd.communicate() return out, err def run(pargs): indexArgs = lambda key: getattr(pa...
true
true
1c076b402c353c343598c8094afc0189145fbe91
15,366
py
Python
webapp/views.py
bsodhi/books_scraper
829fa9efcfd49403be4c32fb2fafb7a9097dcea0
[ "MIT" ]
null
null
null
webapp/views.py
bsodhi/books_scraper
829fa9efcfd49403be4c32fb2fafb7a9097dcea0
[ "MIT" ]
null
null
null
webapp/views.py
bsodhi/books_scraper
829fa9efcfd49403be4c32fb2fafb7a9097dcea0
[ "MIT" ]
null
null
null
from werkzeug.utils import secure_filename from datetime import datetime as DT from flask.helpers import flash, send_file from getpass import getpass from pathlib import Path from passlib.hash import pbkdf2_sha256 from subprocess import Popen from markupsafe import escape from functools import wraps from flask import F...
37.115942
109
0.597097
from werkzeug.utils import secure_filename from datetime import datetime as DT from flask.helpers import flash, send_file from getpass import getpass from pathlib import Path from passlib.hash import pbkdf2_sha256 from subprocess import Popen from markupsafe import escape from functools import wraps from flask import F...
true
true
1c076beb7a91999fa2b7cb0f6bf8138322b61892
94,794
py
Python
jp.atcoder/abc028/abc028_d/17206564.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc028/abc028_d/17206564.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc028/abc028_d/17206564.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import itertools import math import string import sys from bisect import bisect_left as bi_l from bisect import bisect_right as bi_r from collections import Counter, defaultdict, deque from heapq import heappop, heappush from operator import or_, xor inf = float("inf") from functools import lru_cache, reduc...
31.992575
1,217
0.371015
import itertools import math import string import sys from bisect import bisect_left as bi_l from bisect import bisect_right as bi_r from collections import Counter, defaultdict, deque from heapq import heappop, heappush from operator import or_, xor inf = float("inf") from functools import lru_cache, reduc...
true
true
1c076dedd327711fd82ede330f8c1964afc14a4e
7,468
py
Python
i2vec_cli/__main__.py
rachmadaniHaryono/i2vec_cli
9e03ca1c930e5eab8e42ac882c66e18f7c7435ba
[ "MIT" ]
null
null
null
i2vec_cli/__main__.py
rachmadaniHaryono/i2vec_cli
9e03ca1c930e5eab8e42ac882c66e18f7c7435ba
[ "MIT" ]
null
null
null
i2vec_cli/__main__.py
rachmadaniHaryono/i2vec_cli
9e03ca1c930e5eab8e42ac882c66e18f7c7435ba
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """get tag from http://demo.illustration2vec.net/.""" # note: # - error 'ERROR: Request Entity Too Large' for file 1.1 mb # <span style="color:red;">ERROR: Request Entity Too Large</span> from collections import OrderedDict from pathlib import Path from pprint import pformat import imghdr import ...
30.987552
98
0.644215
from collections import OrderedDict from pathlib import Path from pprint import pformat import imghdr import logging import os import shutil import time import urllib import hashlib import click import requests import structlog import peewee from PIL import Image from i2vec_cli import models from i2vec_cli.requests_s...
true
true
1c0771ccdcfc87486188ef7ab12e6f9e1e4fd39f
88
py
Python
swagger_marshmallow_codegen/constants.py
Danil-Grigorev/swagger-marshmallow-codegen
4c077f6e1ef535bcbdbf1f643f97bc4cbc62c0e8
[ "MIT" ]
49
2017-02-05T17:32:18.000Z
2022-01-30T13:20:22.000Z
swagger_marshmallow_codegen/constants.py
Danil-Grigorev/swagger-marshmallow-codegen
4c077f6e1ef535bcbdbf1f643f97bc4cbc62c0e8
[ "MIT" ]
62
2016-12-27T15:38:28.000Z
2021-09-30T02:47:00.000Z
swagger_marshmallow_codegen/constants.py
Danil-Grigorev/swagger-marshmallow-codegen
4c077f6e1ef535bcbdbf1f643f97bc4cbc62c0e8
[ "MIT" ]
10
2017-07-19T12:38:25.000Z
2020-04-07T09:11:22.000Z
X_MARSHMALLOW_NAME = "x-marshmallow-name" X_MARSHMALLOW_INLINE = "x-marshmallow-inline"
29.333333
45
0.818182
X_MARSHMALLOW_NAME = "x-marshmallow-name" X_MARSHMALLOW_INLINE = "x-marshmallow-inline"
true
true
1c0772be53033f468f48f2b9ba68a48edd0a07db
7,924
py
Python
slack_sdk/webhook/client.py
y-adachi-00one/python-slack-sdk
8f65b9410e04be351b98f6b551b5edfb456b1de2
[ "MIT" ]
null
null
null
slack_sdk/webhook/client.py
y-adachi-00one/python-slack-sdk
8f65b9410e04be351b98f6b551b5edfb456b1de2
[ "MIT" ]
null
null
null
slack_sdk/webhook/client.py
y-adachi-00one/python-slack-sdk
8f65b9410e04be351b98f6b551b5edfb456b1de2
[ "MIT" ]
null
null
null
import json import logging import urllib from http.client import HTTPResponse from ssl import SSLContext from typing import Dict, Union, Sequence, Optional from urllib.error import HTTPError from urllib.request import Request, urlopen, OpenerDirector, ProxyHandler, HTTPSHandler from slack_sdk.errors import SlackReques...
39.034483
102
0.585941
import json import logging import urllib from http.client import HTTPResponse from ssl import SSLContext from typing import Dict, Union, Sequence, Optional from urllib.error import HTTPError from urllib.request import Request, urlopen, OpenerDirector, ProxyHandler, HTTPSHandler from slack_sdk.errors import SlackReques...
true
true
1c0772f0a37a40696ae505f99fd2289f5ab2a303
93
py
Python
app/app/calc.py
shojibhasan/racipe-app-api
f641b71ac7b5dc7e0a8d72614c80620bb265ae3e
[ "MIT" ]
null
null
null
app/app/calc.py
shojibhasan/racipe-app-api
f641b71ac7b5dc7e0a8d72614c80620bb265ae3e
[ "MIT" ]
null
null
null
app/app/calc.py
shojibhasan/racipe-app-api
f641b71ac7b5dc7e0a8d72614c80620bb265ae3e
[ "MIT" ]
null
null
null
def add(x,y): #add two number together return x+y def subtract(x,y): return y-x
13.285714
28
0.612903
def add(x,y): return x+y def subtract(x,y): return y-x
true
true
1c0773105709ccdb0bd7eff2af439c85015afb21
1,850
py
Python
docker_manage/Environments/EnvironmentIIIF.py
acdh-oeaw/docker-tools
4f0134f5220b7a78dba5adca6d6085b3379853d2
[ "MIT" ]
null
null
null
docker_manage/Environments/EnvironmentIIIF.py
acdh-oeaw/docker-tools
4f0134f5220b7a78dba5adca6d6085b3379853d2
[ "MIT" ]
null
null
null
docker_manage/Environments/EnvironmentIIIF.py
acdh-oeaw/docker-tools
4f0134f5220b7a78dba5adca6d6085b3379853d2
[ "MIT" ]
1
2020-06-08T07:23:34.000Z
2020-06-08T07:23:34.000Z
from . import * class EnvironmentIIIF(EnvironmentHTTP, IEnvironment): DockerfileDir = 'iiif' DropzoneDirMount = '/dropzone/' DropzoneDir = None DataDirMount = '/data/' DataDir = None LogDirMount = '/logs' LogDir = None def __init__(self, conf, owner): if 'Dockerfil...
33.035714
138
0.585946
from . import * class EnvironmentIIIF(EnvironmentHTTP, IEnvironment): DockerfileDir = 'iiif' DropzoneDirMount = '/dropzone/' DropzoneDir = None DataDirMount = '/data/' DataDir = None LogDirMount = '/logs' LogDir = None def __init__(self, conf, owner): if 'Dockerfil...
true
true
1c07734e6f9f5411973b9cb573478ee590a00af1
3,739
py
Python
var/spack/repos/builtin/packages/py-pybind11/package.py
healther/spack
389e9c11f6927ea27d629ed0e77ca0a52e402bc9
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/py-pybind11/package.py
abouteiller/spack
95f54195021d3d32dec75bed6d8dbbaeac3d921f
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/py-pybind11/package.py
abouteiller/spack
95f54195021d3d32dec75bed6d8dbbaeac3d921f
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import os class PyPybind11(CMakePackage): """pybind11 -- Seamless operability between C++11 and ...
42.011236
95
0.669698
from spack import * import os class PyPybind11(CMakePackage): homepage = "https://pybind11.readthedocs.io" url = "https://github.com/pybind/pybind11/archive/v2.1.0.tar.gz" git = "https://github.com/pybind/pybind11.git" maintainers = ['ax3l'] version('master', branch='master') ver...
true
true
1c07749c76995a8a5797aa28a838f9c66455f42d
41,566
py
Python
pyboto3/detective.py
gehad-shaat/pyboto3
4a0c2851a8bc04fb1c71c36086f7bb257e48181d
[ "MIT" ]
91
2016-12-31T11:38:37.000Z
2021-09-16T19:33:23.000Z
pyboto3/detective.py
gehad-shaat/pyboto3
4a0c2851a8bc04fb1c71c36086f7bb257e48181d
[ "MIT" ]
7
2017-01-02T18:54:23.000Z
2020-08-11T13:54:02.000Z
pyboto3/detective.py
gehad-shaat/pyboto3
4a0c2851a8bc04fb1c71c36086f7bb257e48181d
[ "MIT" ]
26
2016-12-31T13:11:00.000Z
2022-03-03T21:01:12.000Z
''' The MIT License (MIT) Copyright (c) 2016 WavyCloud 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, p...
38.666047
505
0.719963
def accept_invitation(GraphArn=None): pass def can_paginate(operation_name=None): pass def create_graph(): pass def create_members(GraphArn=None, Message=None, Accounts=None): pass def delete_graph(GraphArn=None): pass def delete_members(GraphArn=None, AccountIds=None): pass def disassoci...
true
true
1c07752395f8ffb9e6712ec67394f6f97fcc5034
69,298
py
Python
tests/providers/google/cloud/hooks/test_cloud_sql.py
mebelousov/airflow
d99833c9b5be9eafc0c7851343ee86b6c20aed40
[ "Apache-2.0" ]
1
2020-10-16T06:13:41.000Z
2020-10-16T06:13:41.000Z
tests/providers/google/cloud/hooks/test_cloud_sql.py
mebelousov/airflow
d99833c9b5be9eafc0c7851343ee86b6c20aed40
[ "Apache-2.0" ]
null
null
null
tests/providers/google/cloud/hooks/test_cloud_sql.py
mebelousov/airflow
d99833c9b5be9eafc0c7851343ee86b6c20aed40
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
52.538287
110
0.700785
import json import unittest import httplib2 import mock from googleapiclient.errors import HttpError from mock import PropertyMock from parameterized import parameterized from airflow.exceptions import AirflowException from airflow.models import Connection from airflow.providers.google.cloud.hooks.cloud_sql import ...
true
true
1c0775bee5ea74c06e1d197ba94503a5b1ca1517
434
py
Python
tests/handlers/input/test_handlers_aws_input.py
kiconiaworks/igata
1d8a4b82a65eb936d5d8f8ff70747ba82ddef31a
[ "BSD-2-Clause" ]
1
2021-12-31T14:29:44.000Z
2021-12-31T14:29:44.000Z
tests/handlers/input/test_handlers_aws_input.py
kiconiaworks/igata
1d8a4b82a65eb936d5d8f8ff70747ba82ddef31a
[ "BSD-2-Clause" ]
6
2019-11-25T04:20:26.000Z
2021-12-13T05:23:16.000Z
tests/handlers/input/test_handlers_aws_input.py
kiconiaworks/igata
1d8a4b82a65eb936d5d8f8ff70747ba82ddef31a
[ "BSD-2-Clause" ]
null
null
null
from igata.handlers import INPUT_CONTEXT_MANAGERS class DummyException(Exception): pass def test_registered_input_context_managers(): supported_input_context_managers = ( "S3BucketImageInputCtxManager", "SQSMessageS3InputImageCtxManager", "SQSMessageS3InputCSVPandasDataFrameCtxManage...
28.933333
103
0.794931
from igata.handlers import INPUT_CONTEXT_MANAGERS class DummyException(Exception): pass def test_registered_input_context_managers(): supported_input_context_managers = ( "S3BucketImageInputCtxManager", "SQSMessageS3InputImageCtxManager", "SQSMessageS3InputCSVPandasDataFrameCtxManage...
true
true
1c0775e489649f1466df5df12592b46a1b43d1ce
388
py
Python
tests/flu/run_flu_tests.py
Dynamical-Systems-Laboratory/ABM-Multitown
517de26074feaf13f9b8478eaf464a14d6b33b4a
[ "MIT" ]
null
null
null
tests/flu/run_flu_tests.py
Dynamical-Systems-Laboratory/ABM-Multitown
517de26074feaf13f9b8478eaf464a14d6b33b4a
[ "MIT" ]
null
null
null
tests/flu/run_flu_tests.py
Dynamical-Systems-Laboratory/ABM-Multitown
517de26074feaf13f9b8478eaf464a14d6b33b4a
[ "MIT" ]
1
2021-12-22T12:53:11.000Z
2021-12-22T12:53:11.000Z
import subprocess import sys py_path = '../../scripts/' sys.path.insert(0, py_path) import utils as ut from colors import * py_version = 'python3' # # Compile and run all the agent class specific tests # # Compile subprocess.call([py_version + ' compilation.py'], shell=True) # Test suite 1 ut.msg('Flu class funct...
16.869565
61
0.719072
import subprocess import sys py_path = '../../scripts/' sys.path.insert(0, py_path) import utils as ut from colors import * py_version = 'python3' subprocess.call([py_version + ' compilation.py'], shell=True) ut.msg('Flu class functionality tests', CYAN) subprocess.call(['./flu_test'], shell=True)
true
true
1c07768225e4006fd4e1a1ec57c4ff5d22c7f656
39,174
py
Python
mindspore/train/model.py
chncwang/mindspore
6dac92aedf0aa1541d181e6aedab29aaadc2dafb
[ "Apache-2.0" ]
null
null
null
mindspore/train/model.py
chncwang/mindspore
6dac92aedf0aa1541d181e6aedab29aaadc2dafb
[ "Apache-2.0" ]
null
null
null
mindspore/train/model.py
chncwang/mindspore
6dac92aedf0aa1541d181e6aedab29aaadc2dafb
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
48.663354
120
0.600041
from collections.abc import Iterable import os import math import numpy as np from mindspore import log as logger from ..common.tensor import Tensor from ..nn.metrics import get_metrics from .._checkparam import check_input_data, check_output_data, Validator from .callback import _InternalCallbackParam, RunContext, _...
true
true
1c0777e8223a3285f17f6617fdd12999ab59d4aa
17,099
py
Python
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "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 ...
53.434375
239
0.691561
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pi...
true
true
1c0779b8a259789fd2236ba5ecfc879e13423dcd
6,093
py
Python
odmf/webpage/lib/renderer.py
jlu-ilr-hydro/odmf
4b52da282d6bdf7e571d9c8eb51ae2177c5136e6
[ "MIT" ]
3
2019-06-07T08:08:20.000Z
2022-02-14T11:42:59.000Z
odmf/webpage/lib/renderer.py
jlu-ilr-hydro/odmf
4b52da282d6bdf7e571d9c8eb51ae2177c5136e6
[ "MIT" ]
91
2018-05-22T08:36:00.000Z
2022-03-11T08:50:21.000Z
odmf/webpage/lib/renderer.py
jlu-ilr-hydro/odmf
4b52da282d6bdf7e571d9c8eb51ae2177c5136e6
[ "MIT" ]
4
2018-05-23T13:38:42.000Z
2022-02-07T10:58:57.000Z
""" Tools to render html templates """ import inspect import kajiki import kajiki.entities from kajiki.template import literal from pathlib import Path from .. import auth from ...config import conf from . import render_tools from . import conversion def escape(text, quotes=True): """Create a Markup string from...
27.200893
129
0.592811
import inspect import kajiki import kajiki.entities from kajiki.template import literal from pathlib import Path from .. import auth from ...config import conf from . import render_tools from . import conversion def escape(text, quotes=True): if not text: return '' text = text.replace('&', '&amp;') ...
true
true
1c0779eaecccda04f6f98ca53f2e61ed80b640ea
625
py
Python
pastry/resources/pushy.py
stephenbm/pastry
bb92e615765cf1244617db2bf02891d18d3b5d65
[ "MIT" ]
null
null
null
pastry/resources/pushy.py
stephenbm/pastry
bb92e615765cf1244617db2bf02891d18d3b5d65
[ "MIT" ]
null
null
null
pastry/resources/pushy.py
stephenbm/pastry
bb92e615765cf1244617db2bf02891d18d3b5d65
[ "MIT" ]
null
null
null
'''Nodes provides the methods for chef node resources''' from .base import Base from pastry.pastry_client import PastryClient class Pushy(Base): ''' Provides access to the chef pushy api ''' _base_url = '/organizations/%(org)s/pushy' @classmethod def status(cls, nodename): ''' ...
25
61
0.6224
from .base import Base from pastry.pastry_client import PastryClient class Pushy(Base): _base_url = '/organizations/%(org)s/pushy' @classmethod def status(cls, nodename): return PastryClient.call( '%s/node_states/%s' % (cls.base_url(), nodename))
true
true
1c077a084146ca9f3963812d382b82f364f7771c
368
py
Python
example/usstock_demo.py
jjcc/OpenData
795dac9fb36e7256ea60356f90eaeb84dbc532fe
[ "Apache-2.0" ]
1,179
2018-05-28T07:14:41.000Z
2022-03-27T16:03:51.000Z
example/usstock_demo.py
suuuch/InvestOpenData
b07c0467629a88c33e21dd99d7c8ff00231ff349
[ "Apache-2.0" ]
42
2018-07-05T02:44:56.000Z
2022-03-29T12:12:30.000Z
example/usstock_demo.py
suuuch/InvestOpenData
b07c0467629a88c33e21dd99d7c8ff00231ff349
[ "Apache-2.0" ]
297
2018-05-28T07:39:38.000Z
2022-03-28T02:35:59.000Z
#encoding: utf - 8 from opendatatools import usstock if __name__ == '__main__': #usstock.set_proxies({"https": "https://127.0.0.1:1080"}) df, msg = usstock.get_symbols() print(df) #df, msg = usstock.get_daily('AAPL') #print(df) #df, msg = usstock.get_dividend('AAPL') #print(df) #df...
20.444444
61
0.616848
from opendatatools import usstock if __name__ == '__main__': df, msg = usstock.get_symbols() print(df)
true
true
1c077b063cac2edf7430a908b59a19ca5f69c349
5,252
py
Python
jasmin/vendor/smpp/twisted/client.py
2naive/jasmin
7609a50ded4ebf5873b607cb4a500be4b1be6be1
[ "Apache-2.0" ]
2
2020-05-14T18:27:01.000Z
2021-03-21T17:26:19.000Z
jasmin/vendor/smpp/twisted/client.py
2naive/jasmin
7609a50ded4ebf5873b607cb4a500be4b1be6be1
[ "Apache-2.0" ]
null
null
null
jasmin/vendor/smpp/twisted/client.py
2naive/jasmin
7609a50ded4ebf5873b607cb4a500be4b1be6be1
[ "Apache-2.0" ]
1
2020-11-24T06:48:22.000Z
2020-11-24T06:48:22.000Z
""" Copyright 2009-2010 Mozes, 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 ...
34.103896
107
0.687928
import logging from OpenSSL import SSL from twisted.internet.protocol import ClientFactory from twisted.internet import defer, reactor, ssl from twisted.application import service from jasmin.vendor.smpp.twisted.protocol import SMPPClientProtocol, DataHandlerResponse LOG_CATEGORY="smpp.twisted.client" class SMPPClien...
true
true
1c077be48689cbae48e5b26ae639387dd71fb682
13,670
py
Python
src/stats/svGPFA/expectedLogLikelihood.py
joacorapela/svGPFA
181c03f47a3b7023ac7f873c2ec98cba54a73feb
[ "MIT" ]
2
2020-09-01T16:46:20.000Z
2022-02-28T19:43:04.000Z
src/stats/svGPFA/expectedLogLikelihood.py
joacorapela/svGPFA
181c03f47a3b7023ac7f873c2ec98cba54a73feb
[ "MIT" ]
13
2020-12-22T20:16:28.000Z
2021-06-01T16:18:00.000Z
src/stats/svGPFA/expectedLogLikelihood.py
joacorapela/svGPFA
181c03f47a3b7023ac7f873c2ec98cba54a73feb
[ "MIT" ]
1
2020-03-26T18:14:52.000Z
2020-03-26T18:14:52.000Z
import pdb from abc import ABC, abstractmethod import torch # import warnings class ExpectedLogLikelihood(ABC): def __init__(self, svEmbeddingAllTimes, linkFunction): self._svEmbeddingAllTimes = svEmbeddingAllTimes self._linkFunction = linkFunction @abstractmethod def evalSumAcrossTrials...
41.676829
149
0.684053
import pdb from abc import ABC, abstractmethod import torch class ExpectedLogLikelihood(ABC): def __init__(self, svEmbeddingAllTimes, linkFunction): self._svEmbeddingAllTimes = svEmbeddingAllTimes self._linkFunction = linkFunction @abstractmethod def evalSumAcrossTrialsAndNeurons(self, s...
true
true
1c077c2fd587fca6950a88b2f3451f1f6c6c7bb0
1,510
py
Python
tests/garage/tf/policies/test_gaussian_policies.py
arbenton/garage
5c398255fbfae375370483f18216996d82590a88
[ "MIT" ]
1
2019-07-31T06:53:38.000Z
2019-07-31T06:53:38.000Z
tests/garage/tf/policies/test_gaussian_policies.py
KornbergFresnel/garage
f4a6271edd0f9c280c306d1f0bbf4bc1591ab85e
[ "MIT" ]
null
null
null
tests/garage/tf/policies/test_gaussian_policies.py
KornbergFresnel/garage
f4a6271edd0f9c280c306d1f0bbf4bc1591ab85e
[ "MIT" ]
1
2020-02-05T00:34:07.000Z
2020-02-05T00:34:07.000Z
import gym import pytest from garage.envs import normalize from garage.experiment import LocalRunner from garage.np.baselines import LinearFeatureBaseline from garage.tf.algos import TRPO from garage.tf.envs import TfEnv from garage.tf.optimizers import ConjugateGradientOptimizer from garage.tf.optimizers import Finit...
34.318182
69
0.688079
import gym import pytest from garage.envs import normalize from garage.experiment import LocalRunner from garage.np.baselines import LinearFeatureBaseline from garage.tf.algos import TRPO from garage.tf.envs import TfEnv from garage.tf.optimizers import ConjugateGradientOptimizer from garage.tf.optimizers import Finit...
true
true
1c077c399ff9e5cce2711967f7f15242cfaaf929
2,286
py
Python
helpers/combine_docfiles.py
mdgraboski/terraform-google-vpc-service-controls
c0e8e11b86a9b6379635a87089a8552ddbfab825
[ "Apache-2.0" ]
null
null
null
helpers/combine_docfiles.py
mdgraboski/terraform-google-vpc-service-controls
c0e8e11b86a9b6379635a87089a8552ddbfab825
[ "Apache-2.0" ]
null
null
null
helpers/combine_docfiles.py
mdgraboski/terraform-google-vpc-service-controls
c0e8e11b86a9b6379635a87089a8552ddbfab825
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
33.617647
122
0.714348
import os import re import sys insert_separator_regex = r'(.*?\[\^\]\:\ \(autogen_docs_start\))(.*?)(\n\[\^\]\:\ \(autogen_docs_end\).*?$)' exclude_separator_regex = r'(.*?)Copyright 20\d\d Google LLC.*?limitations under the License.(.*?)$' if len(sys.argv) != 3: sys.exit(1) if not os.path.isfile(sys.argv[...
true
true
1c077c4ea34a7cf24a4a9d8389ed64b323804bdf
3,945
py
Python
bsz-lightgrain/bsz-lightgrain.py
Beinsezii/bsz-gimp-plugins
bb735ddbf47fa4f2d383f4e359518c0809ab6e09
[ "MIT" ]
6
2020-12-03T14:50:32.000Z
2022-02-04T03:15:44.000Z
bsz-lightgrain/bsz-lightgrain.py
Beinsezii/bsz-gimp-plugins
bb735ddbf47fa4f2d383f4e359518c0809ab6e09
[ "MIT" ]
null
null
null
bsz-lightgrain/bsz-lightgrain.py
Beinsezii/bsz-gimp-plugins
bb735ddbf47fa4f2d383f4e359518c0809ab6e09
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Gegl Operation references: http://www.gegl.org/operations/ https://gitlab.gnome.org/GNOME/gegl/-/tree/master/operations If on Linux: $ gegl --list-all $ gegl --info "operation-name" Also build the .gir files using g-ir-doc-tool for additional insight. If the docs do...
31.309524
78
0.646641
import gi gi.require_version('Gimp', '3.0') from gi.repository import Gimp gi.require_version('Gegl', '0.4') from gi.repository import Gegl import sys import os.path sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/../') from bsz_gimp_lib import PlugIn, ParamNumber, ParamBool def lightgrain(image, dr...
true
true
1c077d4e72db2acd05c7df9a734f99b19515d701
4,334
py
Python
Table/add_value_to_table/add_value_to_table_SQLite3.py
TimothyStephens/Utils
50203534607ca65ba101d4120a2698f7fa4c305a
[ "MIT" ]
null
null
null
Table/add_value_to_table/add_value_to_table_SQLite3.py
TimothyStephens/Utils
50203534607ca65ba101d4120a2698f7fa4c305a
[ "MIT" ]
null
null
null
Table/add_value_to_table/add_value_to_table_SQLite3.py
TimothyStephens/Utils
50203534607ca65ba101d4120a2698f7fa4c305a
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 DESCRIPTION = ''' add_value_to_table - Will add values into a table (via a new end column) given key:value pairs. NOTE: - Ignore comment ('#' by defult; can be turned off) and blank lines - Uses exact string matching. Can not do regex or partial matching - Assumes first...
38.696429
184
0.695201
DESCRIPTION = ''' add_value_to_table - Will add values into a table (via a new end column) given key:value pairs. NOTE: - Ignore comment ('#' by defult; can be turned off) and blank lines - Uses exact string matching. Can not do regex or partial matching - Assumes first column is 'key' and co...
true
true
1c077d6621083b8a24b99bf361fd3cbcebcd0510
11,368
py
Python
none/hash/tree.py
spack971/none
6313dd7d7095b301e8d49a38d1b39c9080008ae0
[ "MIT" ]
1
2020-09-28T17:57:33.000Z
2020-09-28T17:57:33.000Z
none/hash/tree.py
spack971/none
6313dd7d7095b301e8d49a38d1b39c9080008ae0
[ "MIT" ]
5
2020-09-02T15:30:39.000Z
2020-10-15T09:52:35.000Z
none/hash/tree.py
spack971/none
6313dd7d7095b301e8d49a38d1b39c9080008ae0
[ "MIT" ]
1
2020-09-19T05:10:02.000Z
2020-09-19T05:10:02.000Z
# none/hash/tree.py # ================= # # Copying # ------- # # Copyright (c) 2020 none authors and contributors. # # This file is part of the *none* project. # # None is a free software project. You can redistribute it and/or # modify it following the terms of the MIT License. # # This software project is distribute...
29.450777
80
0.553044
import typing as ty import hashlib from itertools import zip_longest from collections import deque from collections.abc import MutableSequence from _hashlib import HASH class Merkle(MutableSequence): __slots__ = ("_hash", "_leaves") LEAF_SEED = b"\x00" NODE_SEED = b"\x01" ...
true
true
1c077e77826df7b5e49e93b9d6e23422491bcca7
185,119
py
Python
nova/compute/api.py
jeffrey4l/nova
35375133398d862a61334783c1e7a90b95f34cdb
[ "Apache-2.0" ]
null
null
null
nova/compute/api.py
jeffrey4l/nova
35375133398d862a61334783c1e7a90b95f34cdb
[ "Apache-2.0" ]
1
2019-01-02T01:30:35.000Z
2019-01-02T01:38:02.000Z
nova/compute/api.py
jeffrey4l/nova
35375133398d862a61334783c1e7a90b95f34cdb
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012-2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
44.034015
79
0.605032
import base64 import copy import functools import re import string import uuid from oslo_config import cfg from oslo_log import log as logging from oslo_serialization import jsonutils from oslo_utils import excutils from oslo_utils import strutils from oslo_utils import timeutils from oslo_utils import uuidutils imp...
true
true
1c077e9f92940a89e34099ce68681ecadbee7795
10,468
py
Python
libs/create_library_skeleton.py
jnvance/hpx
258bf04aae03c6864e06a0fad0f5c5848310a300
[ "BSL-1.0" ]
null
null
null
libs/create_library_skeleton.py
jnvance/hpx
258bf04aae03c6864e06a0fad0f5c5848310a300
[ "BSL-1.0" ]
null
null
null
libs/create_library_skeleton.py
jnvance/hpx
258bf04aae03c6864e06a0fad0f5c5848310a300
[ "BSL-1.0" ]
null
null
null
#!/usr/bin/env python3 ''' Copyright (c) 2018 Thomas Heller SPDX-License-Identifier: BSL-1.0 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) create_library_skeleton.py - A tool to generate a library skeleton to be used ...
30.430233
97
0.685136
import sys, os if len(sys.argv) != 2: print('Usage: %s <lib_name>' % sys.argv[0]) print('Generates the skeleton for lib_name in the current working directory') sys.exit(1) lib_name = sys.argv[1] lib_name_upper = lib_name.upper() header_str = '=' * len(lib_name) cmake_version = '3.3.2' cmake_header = f'...
true
true
1c077efc66a6de65acf42e481e9ab8595b5f90ed
21,178
py
Python
grr/core/grr_response_core/lib/rdfvalues/client.py
AjitNair2/grr
2a2ea891b3927775872904cdd402a18e7bb3d143
[ "Apache-2.0" ]
1
2019-08-17T14:02:44.000Z
2019-08-17T14:02:44.000Z
grr/core/grr_response_core/lib/rdfvalues/client.py
AjitNair2/grr
2a2ea891b3927775872904cdd402a18e7bb3d143
[ "Apache-2.0" ]
null
null
null
grr/core/grr_response_core/lib/rdfvalues/client.py
AjitNair2/grr
2a2ea891b3927775872904cdd402a18e7bb3d143
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """AFF4 RDFValue implementations for client information. This module contains the RDFValue implementations used to communicate with the client. """ from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import binascii import hashlib impor...
30.7373
94
0.683351
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import binascii import hashlib import logging import platform import re import socket import struct import sys from future.builtins import str from future.utils import iteritems from future.utils import str...
true
true
1c077fd21b5243190c2783159675caa0083c4fe7
131,642
py
Python
tornado/web.py
gray0018/tornado-storminton
4fe350a6bedeb9a5c15872432ee65c469e0fe3e2
[ "MIT" ]
1
2018-04-25T02:48:55.000Z
2018-04-25T02:48:55.000Z
tornado/web.py
gray0018/tornado-storminton
4fe350a6bedeb9a5c15872432ee65c469e0fe3e2
[ "MIT" ]
null
null
null
tornado/web.py
gray0018/tornado-storminton
4fe350a6bedeb9a5c15872432ee65c469e0fe3e2
[ "MIT" ]
1
2020-10-06T12:33:40.000Z
2020-10-06T12:33:40.000Z
# # Copyright 2009 Facebook # # 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, s...
39.425577
119
0.618473
from __future__ import absolute_import, division, print_function import base64 import binascii import datetime import email.utils import functools import gzip import hashlib import hmac import mimetypes import numbers import os.path import re import stat import sys import threading import time import tornado import ...
true
true
1c077fd35fa7a10e4a358684d1950023bcbb6a9b
3,988
py
Python
setup.py
yalon/logbook
c426f277445aa5277170255d5d992fbc33c6d1f3
[ "BSD-3-Clause" ]
null
null
null
setup.py
yalon/logbook
c426f277445aa5277170255d5d992fbc33c6d1f3
[ "BSD-3-Clause" ]
null
null
null
setup.py
yalon/logbook
c426f277445aa5277170255d5d992fbc33c6d1f3
[ "BSD-3-Clause" ]
null
null
null
r""" Logbook ------- An awesome logging implementation that is fun to use. Quickstart `````````` :: from logbook import Logger log = Logger('A Fancy Name') log.warn('Logbook is too awesome for most applications') log.error("Can't touch this") Works for web apps too `````````````````````` :: ...
26.586667
87
0.610331
import os import sys from setuptools import setup, Extension, Feature from distutils.command.build_ext import build_ext from distutils.errors import CCompilerError, DistutilsExecError, \ DistutilsPlatformError extra = {} cmdclass = {} class BuildFailed(Exception): pass ext_errors = (CCompilerError, Distu...
true
true
1c0780e986a427a77b878481de645fe3f273be83
140,338
py
Python
Section 15, 16, 17/PythonSelFramework/venv/Lib/site-packages/youtube_dl/extractor/generic.py
PacktPublishing/Selenium-Python-Automation-Testing-from-Scratch-and-Frameworks
fe3166f6b0eb9b55ab084771bbfcdf2cadd0f97c
[ "MIT" ]
10
2021-03-23T03:46:19.000Z
2022-03-08T07:20:25.000Z
Section 15, 16, 17/PythonSelFramework/venv/Lib/site-packages/youtube_dl/extractor/generic.py
PacktPublishing/Selenium-Python-Automation-Testing-from-Scratch-and-Frameworks
fe3166f6b0eb9b55ab084771bbfcdf2cadd0f97c
[ "MIT" ]
null
null
null
Section 15, 16, 17/PythonSelFramework/venv/Lib/site-packages/youtube_dl/extractor/generic.py
PacktPublishing/Selenium-Python-Automation-Testing-from-Scratch-and-Frameworks
fe3166f6b0eb9b55ab084771bbfcdf2cadd0f97c
[ "MIT" ]
4
2021-04-21T00:49:34.000Z
2021-11-21T09:18:29.000Z
# coding: utf-8 from __future__ import unicode_literals import os import re import sys from .common import InfoExtractor from .youtube import YoutubeIE from ..compat import ( compat_etree_fromstring, compat_str, compat_urllib_parse_unquote, compat_urlparse, compat_xml_parse_error, ) from ..utils ...
40.891026
432
0.517629
from __future__ import unicode_literals import os import re import sys from .common import InfoExtractor from .youtube import YoutubeIE from ..compat import ( compat_etree_fromstring, compat_str, compat_urllib_parse_unquote, compat_urlparse, compat_xml_parse_error, ) from ..utils import ( det...
true
true
1c07820dc23af660befc3ffb20eca9f0004f6347
104
py
Python
quaternion/version.py
Hasenpfote/quaternion
d2ef7419e4488e5c60c44eb80878dfd86475187d
[ "MIT" ]
null
null
null
quaternion/version.py
Hasenpfote/quaternion
d2ef7419e4488e5c60c44eb80878dfd86475187d
[ "MIT" ]
1
2021-01-09T07:56:22.000Z
2021-01-09T07:56:22.000Z
fpq/version.py
Hasenpfote/fpq
3154ed1b1d5eca08255e8359b5027439af43691c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __version__ = '0.12.0' VERSION = __version__.split('.')
20.8
32
0.615385
__version__ = '0.12.0' VERSION = __version__.split('.')
true
true
1c078341486c078915b08b4347c0f0f31424ac07
266
py
Python
gammapy/obs/tests/test_observation.py
joleroi/gammapy
c4e0c4bd74c79d30e0837559d18b7a1a269f70d9
[ "BSD-3-Clause" ]
null
null
null
gammapy/obs/tests/test_observation.py
joleroi/gammapy
c4e0c4bd74c79d30e0837559d18b7a1a269f70d9
[ "BSD-3-Clause" ]
null
null
null
gammapy/obs/tests/test_observation.py
joleroi/gammapy
c4e0c4bd74c79d30e0837559d18b7a1a269f70d9
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function, division from ...obs import ObservationTable # def test_Observation(): # Observation(GLON=42, GLAT=43) def test_ObservationTable(): ObservationTable()
22.166667
63
0.759398
from __future__ import print_function, division from ...obs import ObservationTable def test_ObservationTable(): ObservationTable()
true
true
1c078422ca2d7b8acf236b4c29c439476d1e01a4
4,023
py
Python
tools/test_net.py
Zhangyongtao123/maskrcnn_benchmark
059f04c26df2c1bd19dd7360ee2487ce3461da37
[ "MIT" ]
null
null
null
tools/test_net.py
Zhangyongtao123/maskrcnn_benchmark
059f04c26df2c1bd19dd7360ee2487ce3461da37
[ "MIT" ]
null
null
null
tools/test_net.py
Zhangyongtao123/maskrcnn_benchmark
059f04c26df2c1bd19dd7360ee2487ce3461da37
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # Set up custom environment before nearly anything else is imported # NOTE: this should be the first import (no not reorder) from maskrcnn_benchmark.utils.env import setup_environment # noqa F401 isort:skip import argparse import os import torch...
34.384615
109
0.715635
from maskrcnn_benchmark.utils.env import setup_environment import argparse import os import torch from maskrcnn_benchmark.config import cfg from maskrcnn_benchmark.data import make_data_loader from maskrcnn_benchmark.engine.inference import inference from maskrcnn_benchmark.modeling.detector import build_detection_m...
true
true
1c0784a1811408d86c57da2749a3c18961db6c34
518
py
Python
tagalog/shipper/formatter.py
alphagov/tagalog
96336539214a96bd05d600c77c37205eca5cdb48
[ "MIT" ]
2
2015-03-12T07:33:38.000Z
2015-04-27T13:18:01.000Z
tagalog/shipper/formatter.py
alphagov/tagalog
96336539214a96bd05d600c77c37205eca5cdb48
[ "MIT" ]
null
null
null
tagalog/shipper/formatter.py
alphagov/tagalog
96336539214a96bd05d600c77c37205eca5cdb48
[ "MIT" ]
3
2015-03-12T07:33:41.000Z
2021-04-10T20:56:14.000Z
import json def elasticsearch_bulk_decorate(bulk_index, bulk_type, msg): """ Decorates the msg with elasticsearch bulk format and adds index and message type""" command = json.dumps({'index': {'_index': bulk_index, '_type': bulk_type}}) return '{0}\n{1}\n'.format(command, msg) def format_as_json(msg): ...
34.533333
91
0.745174
import json def elasticsearch_bulk_decorate(bulk_index, bulk_type, msg): command = json.dumps({'index': {'_index': bulk_index, '_type': bulk_type}}) return '{0}\n{1}\n'.format(command, msg) def format_as_json(msg): return json.dumps(msg) def format_as_elasticsearch_bulk_json(bulk_index, bulk_type, msg):...
true
true
1c0785774539e7ed25e1f7982d8f5eba11c98ac5
72,503
py
Python
pvlib/modelchain.py
Darth-Ozak/pvlib-python
8b98768818ee5ad85d9479877533651a2e9dc2cd
[ "BSD-3-Clause" ]
null
null
null
pvlib/modelchain.py
Darth-Ozak/pvlib-python
8b98768818ee5ad85d9479877533651a2e9dc2cd
[ "BSD-3-Clause" ]
1
2021-01-21T16:54:12.000Z
2021-01-21T16:54:12.000Z
pvlib/modelchain.py
AdamRJensen/pvlib-python
510f08ef8b2d0ee543c197a1433c6294ce410cde
[ "BSD-3-Clause" ]
null
null
null
""" The ``modelchain`` module contains functions and classes that combine many of the PV power modeling steps. These tools make it easy to get started with pvlib and demonstrate standard ways to use the library. With great power comes great responsibility: users should take the time to read the source code for the modu...
38.199684
83
0.611326
from functools import partial import itertools import warnings import pandas as pd from dataclasses import dataclass, field from typing import Union, Tuple, Optional, TypeVar from pvlib import (atmosphere, clearsky, inverter, pvsystem, solarposition, temperature, tools) from pvlib.tracking import S...
true
true
1c07859c1bbbe42d5c775ab77cfbab390c4ee33c
9,342
py
Python
tools/show_workenv.py
violas-core/bvexchange
74cf3197aad02e0f5e2dac457266d11c9c8cc746
[ "MIT" ]
null
null
null
tools/show_workenv.py
violas-core/bvexchange
74cf3197aad02e0f5e2dac457266d11c9c8cc746
[ "MIT" ]
null
null
null
tools/show_workenv.py
violas-core/bvexchange
74cf3197aad02e0f5e2dac457266d11c9c8cc746
[ "MIT" ]
1
2022-01-05T04:39:47.000Z
2022-01-05T04:39:47.000Z
#!/usr/bin/python3 import operator import sys import json import os sys.path.append(os.getcwd()) sys.path.append("..") sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")) import log import log.logger import traceback import datetime import sqlalchemy import stmanage import requests import r...
30.529412
141
0.632306
import operator import sys import json import os sys.path.append(os.getcwd()) sys.path.append("..") sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")) import log import log.logger import traceback import datetime import sqlalchemy import stmanage import requests import random import comm i...
true
true
1c0785e96be89d5b42d7606ba70a7ba1ae2bface
1,418
py
Python
setup.py
hanpannet/Git-ignore
0a639d948edabfba8dc0e128e1b3dfb3f8c4e907
[ "MIT" ]
1
2019-02-03T19:16:22.000Z
2019-02-03T19:16:22.000Z
setup.py
qqhann/Git-ignore
0a639d948edabfba8dc0e128e1b3dfb3f8c4e907
[ "MIT" ]
9
2019-02-03T19:36:25.000Z
2019-12-30T15:24:23.000Z
setup.py
qqhann/Git-ignore
0a639d948edabfba8dc0e128e1b3dfb3f8c4e907
[ "MIT" ]
null
null
null
import re from setuptools import find_packages, setup with open('README.md', 'rt', encoding='utf8') as f: readme = f.read() with open('git_ignore/__version__.py', 'rt', encoding='utf8') as f: VERSION = re.search(r'__version__ = \'(.*?)\'', f.read()).group(1) setup( name='git-ignore', version=VERSIO...
31.511111
70
0.627645
import re from setuptools import find_packages, setup with open('README.md', 'rt', encoding='utf8') as f: readme = f.read() with open('git_ignore/__version__.py', 'rt', encoding='utf8') as f: VERSION = re.search(r'__version__ = \'(.*?)\'', f.read()).group(1) setup( name='git-ignore', version=VERSIO...
true
true
1c0786ab1a0ba9bbca28cb86327a41adbd3d689c
140
py
Python
CorePythonProg/ch02/0204.py
mallius/CppPrimer
0285fabe5934492dfed0a9cf67ba5650982a5f76
[ "MIT" ]
null
null
null
CorePythonProg/ch02/0204.py
mallius/CppPrimer
0285fabe5934492dfed0a9cf67ba5650982a5f76
[ "MIT" ]
null
null
null
CorePythonProg/ch02/0204.py
mallius/CppPrimer
0285fabe5934492dfed0a9cf67ba5650982a5f76
[ "MIT" ]
1
2022-01-25T15:51:34.000Z
2022-01-25T15:51:34.000Z
#!/usr/bin/env python user = raw_input('Enter your name: ') print user num = raw_input('Enter a numuber: ') print 'number: %d' % (int(num))
23.333333
37
0.664286
user = raw_input('Enter your name: ') print user num = raw_input('Enter a numuber: ') print 'number: %d' % (int(num))
false
true
1c0786e47a2fa6fd006aa6c2ec70f94338917e8f
10,740
py
Python
mycv/models/probabilistic/logmixture.py
duanzhiihao/mycv
184b52f7a5c1b6f603122d4f4050952b65ba0ead
[ "MIT" ]
null
null
null
mycv/models/probabilistic/logmixture.py
duanzhiihao/mycv
184b52f7a5c1b6f603122d4f4050952b65ba0ead
[ "MIT" ]
null
null
null
mycv/models/probabilistic/logmixture.py
duanzhiihao/mycv
184b52f7a5c1b6f603122d4f4050952b65ba0ead
[ "MIT" ]
null
null
null
import math import torch import torch.nn as nn import torch.nn.functional as tnf def get_conv(in_ch, out_ch, kernel_size, stride, padding, zero_bias=True, zero_weights=False): conv = nn.Conv2d(in_ch, out_ch, kernel_size, stride, padding) if zero_bias: conv.bias.data.mul_(0.0) if zero_weights: ...
48.378378
178
0.590875
import math import torch import torch.nn as nn import torch.nn.functional as tnf def get_conv(in_ch, out_ch, kernel_size, stride, padding, zero_bias=True, zero_weights=False): conv = nn.Conv2d(in_ch, out_ch, kernel_size, stride, padding) if zero_bias: conv.bias.data.mul_(0.0) if zero_weights: ...
true
true
1c07880ded32e171110b317324136d85111cfc08
8,726
py
Python
addons/box/models.py
fabmiz/osf.io
8d86af3f0a6e5388bd5b18383e68e27b65a66247
[ "Apache-2.0" ]
1
2015-10-02T18:35:53.000Z
2015-10-02T18:35:53.000Z
addons/box/models.py
fabmiz/osf.io
8d86af3f0a6e5388bd5b18383e68e27b65a66247
[ "Apache-2.0" ]
5
2017-09-14T18:04:12.000Z
2017-10-03T17:43:55.000Z
addons/box/models.py
fabmiz/osf.io
8d86af3f0a6e5388bd5b18383e68e27b65a66247
[ "Apache-2.0" ]
1
2019-07-16T00:14:49.000Z
2019-07-16T00:14:49.000Z
import httplib as http import logging import os import requests from addons.base.models import (BaseOAuthNodeSettings, BaseOAuthUserSettings, BaseStorageAddon) from box import BoxClient, CredentialsV2 from box.client import BoxClientException from django.db import models from framework....
32.804511
96
0.587211
import httplib as http import logging import os import requests from addons.base.models import (BaseOAuthNodeSettings, BaseOAuthUserSettings, BaseStorageAddon) from box import BoxClient, CredentialsV2 from box.client import BoxClientException from django.db import models from framework....
true
true
1c07887fde7ec348c98855659e4e36faf9e384b5
4,592
py
Python
month05/Spider/Wholesale/Wholesale/spiders/wholesale.py
chaofan-zheng/python_learning_code
5d05848911d55aa49eaee4afd7ffd80536fad7aa
[ "Apache-2.0" ]
null
null
null
month05/Spider/Wholesale/Wholesale/spiders/wholesale.py
chaofan-zheng/python_learning_code
5d05848911d55aa49eaee4afd7ffd80536fad7aa
[ "Apache-2.0" ]
null
null
null
month05/Spider/Wholesale/Wholesale/spiders/wholesale.py
chaofan-zheng/python_learning_code
5d05848911d55aa49eaee4afd7ffd80536fad7aa
[ "Apache-2.0" ]
null
null
null
import json from urllib.parse import urlencode from ..items import WholesaleItem import scrapy import re from concurrent.futures import ThreadPoolExecutor import requests from fake_useragent import UserAgent from tqdm import tqdm class WholesaleSpider(scrapy.Spider): name = 'wholesale' allowed_domains = ['1688...
37.032258
134
0.575784
import json from urllib.parse import urlencode from ..items import WholesaleItem import scrapy import re from concurrent.futures import ThreadPoolExecutor import requests from fake_useragent import UserAgent from tqdm import tqdm class WholesaleSpider(scrapy.Spider): name = 'wholesale' allowed_domains = ['1688...
true
true
1c0788d8486dab580810ce5e0006e4645eae0057
2,192
py
Python
salt/beacons/wtmp.py
nielsk/salt
be5d400d903e68d99c216fd63a7146d86a64a55d
[ "Apache-2.0" ]
null
null
null
salt/beacons/wtmp.py
nielsk/salt
be5d400d903e68d99c216fd63a7146d86a64a55d
[ "Apache-2.0" ]
null
null
null
salt/beacons/wtmp.py
nielsk/salt
be5d400d903e68d99c216fd63a7146d86a64a55d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Beacon to fire events at login of users as registered in the wtmp file .. code-block:: yaml beacons: wtmp: {} ''' # Import Python libs from __future__ import absolute_import import os import struct # Import salt libs import salt.utils.files __virtualname__ = 'wtmp' WTMP = '/va...
22.597938
77
0.567518
from __future__ import absolute_import import os import struct import salt.utils.files __virtualname__ = 'wtmp' WTMP = '/var/log/wtmp' FMT = 'hi32s4s32s256shhiii4i20x' FIELDS = [ 'type', 'PID', 'line', 'inittab', 'user', 'hostname', 'exit_status',...
true
true
1c078a1691e057d0fb660a23f819b07975bff1ee
11,683
py
Python
frappe/utils/global_search.py
yaochang007/frappe
f9c03a0b54bace497bd96866cbec2aa5350a342c
[ "MIT" ]
1
2019-05-21T04:55:01.000Z
2019-05-21T04:55:01.000Z
frappe/utils/global_search.py
yaochang007/frappe
f9c03a0b54bace497bd96866cbec2aa5350a342c
[ "MIT" ]
null
null
null
frappe/utils/global_search.py
yaochang007/frappe
f9c03a0b54bace497bd96866cbec2aa5350a342c
[ "MIT" ]
1
2021-05-06T18:25:25.000Z
2021-05-06T18:25:25.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import re import redis from frappe.utils import cint, strip_html_tags from frappe.model.base_document import get_controller from frappe.m...
27.106729
95
0.705555
from __future__ import unicode_literals import frappe import re import redis from frappe.utils import cint, strip_html_tags from frappe.model.base_document import get_controller from frappe.model.db_schema import varchar_len from six import text_type def setup_global_search_table(): if not '__global_search' in frap...
true
true
1c078a304f85e80ef8ba65d0c449ae21dd2b7aed
3,530
py
Python
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/list_domain_permissions_for_agency_request.py
githubmilesma/huaweicloud-sdk-python-v3
9d9449ed68a609ca65f0aa50b5b2a1c28445bf03
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/list_domain_permissions_for_agency_request.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/list_domain_permissions_for_agency_request.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six class ListDomainPermissionsForAgencyRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name ...
26.742424
88
0.577054
import pprint import re import six class ListDomainPermissionsForAgencyRequest: sensitive_list = [] openapi_types = { 'domain_id': 'str', 'agency_id': 'str' } attribute_map = { 'domain_id': 'domain_id', 'agency_id': 'agency_id' } def __init__(self, do...
true
true
1c078c38f8a5a1c6c2736e9b6848b64a40d048de
788
py
Python
src/EncodingManager.py
laz08/dictionary-encoding
e3ed66277358e58286224473c33e0bbc604e4cf2
[ "Apache-2.0" ]
2
2017-12-17T09:04:23.000Z
2018-06-13T21:00:07.000Z
src/EncodingManager.py
laz08/dictionary-encoding
e3ed66277358e58286224473c33e0bbc604e4cf2
[ "Apache-2.0" ]
null
null
null
src/EncodingManager.py
laz08/dictionary-encoding
e3ed66277358e58286224473c33e0bbc604e4cf2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: UTF-8 -*- import algs.LZ77 as LZ77 import algs.LZ78 as LZ78 import algs.LZSS as LZSS import algs.LZW as LZW ##-------------------------------------------------------------- ##-------------------------- ENCODING -------------------------- ##----------------------------------------------...
20.205128
64
0.522843
import algs.LZ77 as LZ77 import algs.LZ78 as LZ78 import algs.LZSS as LZSS import algs.LZW as LZW def encodeLZ77(txt, s, t): return LZ77.encode(txt, s, t) def decodeLZ77(tok): return LZ77.decode(tok) def encodeLZSS(txt, s, t, m): return LZSS.encode(txt, s, t, m) def decodeLZSS(tok): return LZSS.d...
true
true
1c078cb10f1c9fb04f75287221bb142816886761
94,402
py
Python
tests/unit/gapic/service_v1/test_environments.py
LaudateCorpus1/python-orchestration-airflow
8e05a905ea8a5c760eeb65d15cea73da41eac4ab
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/service_v1/test_environments.py
LaudateCorpus1/python-orchestration-airflow
8e05a905ea8a5c760eeb65d15cea73da41eac4ab
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/service_v1/test_environments.py
LaudateCorpus1/python-orchestration-airflow
8e05a905ea8a5c760eeb65d15cea73da41eac4ab
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 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...
38.562908
133
0.687824
import os import mock import grpc from grpc.experimental import aio import math import pytest from proto.marshal.rules.dates import DurationRule, TimestampRule from google.api_core import client_options from google.api_core import exceptions as core_exceptions from google.api_core import future from google.api_core ...
true
true
1c078cbd556609194184df951d8baea88fe84e83
462
py
Python
utils/utils.py
bwosh/DLR_CollaborationAndCompetition
aee211990dbb889888df2397bdbd7e229acdc770
[ "MIT" ]
null
null
null
utils/utils.py
bwosh/DLR_CollaborationAndCompetition
aee211990dbb889888df2397bdbd7e229acdc770
[ "MIT" ]
null
null
null
utils/utils.py
bwosh/DLR_CollaborationAndCompetition
aee211990dbb889888df2397bdbd7e229acdc770
[ "MIT" ]
null
null
null
import numpy as np import torch def soft_update(local_model, target_model, tau): for target_param, local_param in zip(target_model.parameters(), local_model.parameters()): target_param.data.copy_(tau*local_param.data + (1.0-tau)*target_param.data) def tensor(t, device): return torch.tensor(t, dtype=to...
30.8
94
0.714286
import numpy as np import torch def soft_update(local_model, target_model, tau): for target_param, local_param in zip(target_model.parameters(), local_model.parameters()): target_param.data.copy_(tau*local_param.data + (1.0-tau)*target_param.data) def tensor(t, device): return torch.tensor(t, dtype=to...
true
true
1c078ccca33dd6fb118889354ac6651a2e838ea6
2,111
py
Python
models.py
drxzcl/iot_testbed
94e358e153d40327bfc2d8bd2a1abd730c4e444c
[ "Apache-2.0" ]
null
null
null
models.py
drxzcl/iot_testbed
94e358e153d40327bfc2d8bd2a1abd730c4e444c
[ "Apache-2.0" ]
null
null
null
models.py
drxzcl/iot_testbed
94e358e153d40327bfc2d8bd2a1abd730c4e444c
[ "Apache-2.0" ]
null
null
null
import datetime from google.appengine.ext import ndb class Sensor(ndb.Model): """ Manages the metadata of a single sensor. The shared "secret" lives here. """ identifier = ndb.StringProperty() name = ndb.StringProperty() description = ndb.TextProperty() secret = ndb.StringPrope...
32.984375
118
0.689247
import datetime from google.appengine.ext import ndb class Sensor(ndb.Model): identifier = ndb.StringProperty() name = ndb.StringProperty() description = ndb.TextProperty() secret = ndb.StringProperty() consolidate_every = ndb.IntegerProperty(default=0) measurements = ndb.StringProperty(repeat...
true
true
1c078d7d668a008c2e91fb034443562a7ab0aa4f
5,046
py
Python
crawl/album.py
lszbao/renrenBackup
14fd1621f47c95aa50d2b32eae5460d4da5d802e
[ "MIT" ]
1
2022-01-31T05:07:41.000Z
2022-01-31T05:07:41.000Z
crawl/album.py
lszbao/renrenBackup
14fd1621f47c95aa50d2b32eae5460d4da5d802e
[ "MIT" ]
null
null
null
crawl/album.py
lszbao/renrenBackup
14fd1621f47c95aa50d2b32eae5460d4da5d802e
[ "MIT" ]
null
null
null
# coding: utf8 from datetime import datetime import json import logging import re from config import config from models import Album, Photo from .utils import get_image, get_common_payload logger = logging.getLogger(__name__) crawler = config.crawler def get_album_payload(uid, aid, after=None): ...
32.554839
148
0.525961
from datetime import datetime import json import logging import re from config import config from models import Album, Photo from .utils import get_image, get_common_payload logger = logging.getLogger(__name__) crawler = config.crawler def get_album_payload(uid, aid, after=None): payload = c...
true
true
1c078dc3b6b89a7a8cb7899240636b8e142d8e1e
724
py
Python
parser/team04/Interpreter/Expression/sql.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
parser/team04/Interpreter/Expression/sql.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
parser/team04/Interpreter/Expression/sql.py
webdev188/tytus
847071edb17b218f51bb969d335a8ec093d13f94
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
from Interpreter.Expression.expression import Expression class As(Expression): def __init__(self, left, right): self.left = left self.right = right def getValue(self, env): leftValue = self.left.getValue(env) rightValue = self.right.getValue(env) if isinstance(leftVal...
26.814815
56
0.610497
from Interpreter.Expression.expression import Expression class As(Expression): def __init__(self, left, right): self.left = left self.right = right def getValue(self, env): leftValue = self.left.getValue(env) rightValue = self.right.getValue(env) if isinstance(leftVal...
true
true
1c078e0df4f3ba7cf8dbe6b07f9c16b0cdb5bed9
313
py
Python
Source/app.py
SanderGi/WiFiStrengthTester
78ee7cd02ba9c69fd3fc2dfbf7f68bbb8b9e937b
[ "MIT" ]
1
2022-02-15T06:32:05.000Z
2022-02-15T06:32:05.000Z
Source/app.py
SanderGi/WiFiStrengthTester
78ee7cd02ba9c69fd3fc2dfbf7f68bbb8b9e937b
[ "MIT" ]
1
2022-02-19T06:27:13.000Z
2022-02-19T07:16:33.000Z
Source/app.py
SanderGi/WiFiStrengthTester
78ee7cd02ba9c69fd3fc2dfbf7f68bbb8b9e937b
[ "MIT" ]
null
null
null
import eel from wlanapiWrapper import get_BSSI import time eel.init('web') @eel.expose def collectWifiData(times, waittime): for i in range(0,times): eel.sleep(waittime) eel.displayWifiData(i, str(get_BSSI())) eel.start('index.html', port=8080, size=(1024, 768), position=(0,0))
24.076923
68
0.670927
import eel from wlanapiWrapper import get_BSSI import time eel.init('web') @eel.expose def collectWifiData(times, waittime): for i in range(0,times): eel.sleep(waittime) eel.displayWifiData(i, str(get_BSSI())) eel.start('index.html', port=8080, size=(1024, 768), position=(0,0))
true
true
1c078e52cc43c3938fa81415d273f454ca469f08
5,635
py
Python
rootfs/api/tests/test_services.py
felixbuenemann/controller
d6023de4710c22791a52bca7ad4f235e8768910a
[ "MIT" ]
17
2017-10-16T19:32:14.000Z
2021-11-09T09:12:46.000Z
rootfs/api/tests/test_services.py
felixbuenemann/controller
d6023de4710c22791a52bca7ad4f235e8768910a
[ "MIT" ]
134
2017-10-30T19:47:44.000Z
2022-03-08T10:32:43.000Z
rootfs/api/tests/test_services.py
felixbuenemann/controller
d6023de4710c22791a52bca7ad4f235e8768910a
[ "MIT" ]
27
2017-10-30T19:44:03.000Z
2022-02-14T17:04:21.000Z
from django.contrib.auth.models import User from django.core.cache import cache from rest_framework.authtoken.models import Token from api.models import App from api.tests import DeisTransactionTestCase class TestServices(DeisTransactionTestCase): """Tests push notification from build system""" fixtures =...
39.964539
78
0.620231
from django.contrib.auth.models import User from django.core.cache import cache from rest_framework.authtoken.models import Token from api.models import App from api.tests import DeisTransactionTestCase class TestServices(DeisTransactionTestCase): fixtures = ['tests.json'] def setUp(self): self.u...
true
true
1c078f14b26e25ba6078da4caf17cee4aa2a4b72
11,130
py
Python
RO_annotator/nlpipe/NLPipe.py
racai-ai/MarcellSustainability
724fac1350f7b733d050b5aafcef5d2e5c472e8f
[ "MIT" ]
null
null
null
RO_annotator/nlpipe/NLPipe.py
racai-ai/MarcellSustainability
724fac1350f7b733d050b5aafcef5d2e5c472e8f
[ "MIT" ]
null
null
null
RO_annotator/nlpipe/NLPipe.py
racai-ai/MarcellSustainability
724fac1350f7b733d050b5aafcef5d2e5c472e8f
[ "MIT" ]
null
null
null
from functools import cmp_to_key import atexit import inspect import sys import platform import os from pathlib import Path from PipAlgo import PipAlgo from PipApi import PipApi from PipDTO import PipDTO # Import all NLP apps that are implemented. from tnorm.TextNorm import TextNorm from diac.DiacRestore import DiacR...
35.559105
105
0.539982
from functools import cmp_to_key import atexit import inspect import sys import platform import os from pathlib import Path from PipAlgo import PipAlgo from PipApi import PipApi from PipDTO import PipDTO from tnorm.TextNorm import TextNorm from diac.DiacRestore import DiacRestore from cubenlp.CubeNLP import CubeNLP f...
true
true
1c0791360ca194260916dd0d9c64a9a7c7bcf89f
11,389
py
Python
services/core/PlatformDriverAgent/platform_driver/interfaces/radiothermostat.py
cloudcomputingabc/volttron
6495e26e3185a7af8d0d79ad2586bdf8ea83992d
[ "Apache-2.0", "BSD-2-Clause" ]
406
2015-01-20T03:08:53.000Z
2022-03-31T20:59:07.000Z
services/core/PlatformDriverAgent/platform_driver/interfaces/radiothermostat.py
cloudcomputingabc/volttron
6495e26e3185a7af8d0d79ad2586bdf8ea83992d
[ "Apache-2.0", "BSD-2-Clause" ]
2,031
2015-01-05T21:35:45.000Z
2022-03-29T21:44:36.000Z
services/core/PlatformDriverAgent/platform_driver/interfaces/radiothermostat.py
cloudcomputingabc/volttron
6495e26e3185a7af8d0d79ad2586bdf8ea83992d
[ "Apache-2.0", "BSD-2-Clause" ]
219
2015-01-20T14:53:57.000Z
2022-03-06T00:37:41.000Z
''' Copyright (c) 2016, Alliance for Sustainable Energy, LLC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of condit...
39.961404
114
0.596453
from platform_driver.interfaces import BaseInterface, BaseRegister, DriverInterfaceError from . import thermostat_api from volttron.platform import jsonapi class Register(BaseRegister): def __init__(self, read_only, pointName, device_point_name, units, default_value): super(Register, self).__init__("by...
true
true
1c079192280d5efe50aa93f60f0ebe73118691b6
4,261
py
Python
web_scrapper/transform/main.py
Ericknht/DataEngineer
966dd45288ad9ec7bcea7fec5f198496dd54d0e9
[ "MIT" ]
null
null
null
web_scrapper/transform/main.py
Ericknht/DataEngineer
966dd45288ad9ec7bcea7fec5f198496dd54d0e9
[ "MIT" ]
null
null
null
web_scrapper/transform/main.py
Ericknht/DataEngineer
966dd45288ad9ec7bcea7fec5f198496dd54d0e9
[ "MIT" ]
null
null
null
import argparse import hashlib import nltk from nltk.corpus import stopwords import logging logging.basicConfig(level=logging.INFO) from urllib.parse import urlparse import pandas as pd logger = logging.getLogger(__name__) def main(filename): logger.info('Starting cleaning process') df = _read_data(filena...
28.406667
106
0.653368
import argparse import hashlib import nltk from nltk.corpus import stopwords import logging logging.basicConfig(level=logging.INFO) from urllib.parse import urlparse import pandas as pd logger = logging.getLogger(__name__) def main(filename): logger.info('Starting cleaning process') df = _read_data(filena...
true
true
1c0791d87314de2da09a835065918aabe00a642a
973
py
Python
scripts/training/sentiment/dataset_processing/combine.py
DanJSG/reflectiment
484ce5d0f20e1853095f049c880cdff3317fa47f
[ "MIT" ]
null
null
null
scripts/training/sentiment/dataset_processing/combine.py
DanJSG/reflectiment
484ce5d0f20e1853095f049c880cdff3317fa47f
[ "MIT" ]
null
null
null
scripts/training/sentiment/dataset_processing/combine.py
DanJSG/reflectiment
484ce5d0f20e1853095f049c880cdff3317fa47f
[ "MIT" ]
null
null
null
import random def combine_datasets(): train_x1 = open("./processed_datasets/sentiment_treebank/tri_validation_x.txt", "r").readlines() train_y1 = open("./processed_datasets/sentiment_treebank/tri_validation_y.txt", "r").readlines() train_x2 = open("./processed_datasets/sentiment140/tri_validation_x.txt", "...
46.333333
105
0.697842
import random def combine_datasets(): train_x1 = open("./processed_datasets/sentiment_treebank/tri_validation_x.txt", "r").readlines() train_y1 = open("./processed_datasets/sentiment_treebank/tri_validation_y.txt", "r").readlines() train_x2 = open("./processed_datasets/sentiment140/tri_validation_x.txt", "...
true
true
1c0795b4eef855223c9772807a34aa7821fdc5d3
3,030
py
Python
terminalManager/VehicleInterface.py
EmbeddedSoftwareCaiShuPeng/vehicleDispatcher
aacebb1656fe095485041de0bcbb67627e384abc
[ "MIT" ]
1
2016-04-27T14:23:53.000Z
2016-04-27T14:23:53.000Z
terminalManager/VehicleInterface.py
EmbeddedSoftwareCaiShuPeng/vehicleDispatcher
aacebb1656fe095485041de0bcbb67627e384abc
[ "MIT" ]
null
null
null
terminalManager/VehicleInterface.py
EmbeddedSoftwareCaiShuPeng/vehicleDispatcher
aacebb1656fe095485041de0bcbb67627e384abc
[ "MIT" ]
null
null
null
from django.http import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt from model import VehicleAccess, VehicleRecordAccess, UserAccess import json, pymongo, httplib, hashlib, uuid from datetime import datetime @csrf_exempt def vehicleRegister(request): res = {} if request....
30.3
87
0.540264
from django.http import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt from model import VehicleAccess, VehicleRecordAccess, UserAccess import json, pymongo, httplib, hashlib, uuid from datetime import datetime @csrf_exempt def vehicleRegister(request): res = {} if request....
true
true
1c07961d99ff3795d66e2bae53713bc7741000ff
5,142
py
Python
src/learn/RL_Atari/train_atari.py
benjaminaaron/GO_DILab
20630d1a1d513a25de20b2edaeeac097a1b53be4
[ "MIT" ]
8
2017-10-19T21:21:27.000Z
2018-01-31T14:36:21.000Z
src/learn/RL_Atari/train_atari.py
benjaminaaron/GO_DILab
20630d1a1d513a25de20b2edaeeac097a1b53be4
[ "MIT" ]
9
2017-10-19T15:28:09.000Z
2017-12-05T11:42:44.000Z
src/learn/RL_Atari/train_atari.py
nathanaelbosch/GO_DILab
20630d1a1d513a25de20b2edaeeac097a1b53be4
[ "MIT" ]
1
2018-04-23T17:36:35.000Z
2018-04-23T17:36:35.000Z
from src.play.model.Game import Game from src.play.model.Game import WHITE, BLACK, EMPTY from src.play.model.Move import Move import random import numpy as np import copy import time from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.optimizers import RMSprop def b...
35.462069
108
0.578958
from src.play.model.Game import Game from src.play.model.Game import WHITE, BLACK, EMPTY from src.play.model.Move import Move import random import numpy as np import copy import time from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.optimizers import RMSprop def b...
true
true
1c079634ef4058798430437eb20ed1003701c2d2
23,443
py
Python
cherrypy/lib/cptools.py
debrando/cherrypy
a92c5cc5d888b0aad327bce34e94da4a1f961e43
[ "BSD-3-Clause" ]
2
2019-03-04T15:17:49.000Z
2021-04-04T08:08:14.000Z
lib/cherrypy/lib/cptools.py
rrosajp/script.module.cherrypy
61ae795123755f3be43611e0f2667e85ef20c9d3
[ "BSD-3-Clause" ]
2
2019-11-16T13:20:55.000Z
2021-01-10T11:28:43.000Z
lib/cherrypy/lib/cptools.py
rrosajp/script.module.cherrypy
61ae795123755f3be43611e0f2667e85ef20c9d3
[ "BSD-3-Clause" ]
6
2020-05-22T15:25:34.000Z
2021-08-13T09:43:01.000Z
"""Functions for builtin CherryPy tools.""" import logging import re from hashlib import md5 import six from six.moves import urllib import cherrypy from cherrypy._cpcompat import text_or_bytes from cherrypy.lib import httputil as _httputil from cherrypy.lib import is_iterator # Conditional HTT...
36.572543
81
0.601971
import logging import re from hashlib import md5 import six from six.moves import urllib import cherrypy from cherrypy._cpcompat import text_or_bytes from cherrypy.lib import httputil as _httputil from cherrypy.lib import is_iterator def validate_etags(autotags=False, debug=False): response = cherrypy.serving...
true
true
1c0797871f2eb29df7aac51eb28b0f77c536fc05
12,496
py
Python
config/settings/base.py
Tobi-De/wgblog
13d4eb12ad337bfd882fdfe071d9ab34772902b3
[ "MIT" ]
null
null
null
config/settings/base.py
Tobi-De/wgblog
13d4eb12ad337bfd882fdfe071d9ab34772902b3
[ "MIT" ]
null
null
null
config/settings/base.py
Tobi-De/wgblog
13d4eb12ad337bfd882fdfe071d9ab34772902b3
[ "MIT" ]
null
null
null
""" Base settings to build other settings files upon. """ from pathlib import Path import environ ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent # wgblog/ APPS_DIR = ROOT_DIR / "wgblog" env = environ.Env() READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False) if READ_DOT_ENV_FI...
38.928349
93
0.639325
from pathlib import Path import environ ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent APPS_DIR = ROOT_DIR / "wgblog" env = environ.Env() READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False) if READ_DOT_ENV_FILE: env.read_env(str(ROOT_DIR / ".env")) DEBUG = env.bool("...
true
true
1c07987f4effbd0c8d4803898607d204cdc2a0ed
10,265
py
Python
rllib/utils/exploration/ornstein_uhlenbeck_noise.py
aryavohra/ray
6d884f1442c271329829ff0bceae588f3cd49d7d
[ "Apache-2.0" ]
39
2021-02-02T23:09:31.000Z
2022-03-28T16:39:12.000Z
rllib/utils/exploration/ornstein_uhlenbeck_noise.py
aryavohra/ray
6d884f1442c271329829ff0bceae588f3cd49d7d
[ "Apache-2.0" ]
70
2021-07-10T07:05:24.000Z
2022-03-26T07:05:20.000Z
rllib/utils/exploration/ornstein_uhlenbeck_noise.py
aryavohra/ray
6d884f1442c271329829ff0bceae588f3cd49d7d
[ "Apache-2.0" ]
20
2021-02-05T05:51:39.000Z
2022-03-04T21:13:24.000Z
import numpy as np from typing import Optional, Union from ray.rllib.models.action_dist import ActionDistribution from ray.rllib.utils.annotations import override from ray.rllib.utils.exploration.gaussian_noise import GaussianNoise from ray.rllib.utils.framework import try_import_tf, try_import_torch, \ get_variab...
42.770833
79
0.58451
import numpy as np from typing import Optional, Union from ray.rllib.models.action_dist import ActionDistribution from ray.rllib.utils.annotations import override from ray.rllib.utils.exploration.gaussian_noise import GaussianNoise from ray.rllib.utils.framework import try_import_tf, try_import_torch, \ get_variab...
true
true
1c07988be29f40352ebd9dc02fdf960aa6814d14
6,421
py
Python
chunk.py
dmimukto/discord-server-logger
21588ee9864406b8f54711555516c57b611fd34b
[ "MIT" ]
null
null
null
chunk.py
dmimukto/discord-server-logger
21588ee9864406b8f54711555516c57b611fd34b
[ "MIT" ]
null
null
null
chunk.py
dmimukto/discord-server-logger
21588ee9864406b8f54711555516c57b611fd34b
[ "MIT" ]
null
null
null
# 𝗗𝗜𝗦𝗖𝗢𝗥𝗗 𝗦𝗘𝗥𝗩𝗘𝗥 𝗟𝗢𝗚𝗚𝗘𝗥 - 𝗦𝗢𝗨𝗥𝗖𝗘 # @author dmimukto 2021 # @credits Replit's Discord Bot template, Stack Overflow, Cisc0-gif (https://github.com/Cisc0-gif/Discord-Bot-Template/blob/a53aad3ae91ed02d6f99a97328e1d9e4a9cc4a17/bot.py) # @license MIT License (https://github.com/dmimukto/discord-serve...
40.13125
172
0.597415
# @license MIT License (https://github.com/dmimukto/discord-server-logger/blob/main/LICENSE) # @copyright Asenturisk Corporation 2021 # Place the chunks in the appropriate locations. I will not be held responsible if anything goes wrong. # It's your life, your choices, your risks. def logwrite(msg, server): #...
true
true
1c079b188ac70b3a303a265ea7d1158b93776cf0
1,736
py
Python
examples/git/git.py
agustinhenze/docopt.debian
ce956a3673d2e15e741e7b2edbd4c3d6dc924cf1
[ "MIT" ]
1
2020-01-21T11:10:32.000Z
2020-01-21T11:10:32.000Z
online/build/docopt/examples/git/git.py
hiphopsmurf/bitcoin-secured
d280f82314de5aef66ccca60a001ee5dba08b5d7
[ "MIT" ]
null
null
null
online/build/docopt/examples/git/git.py
hiphopsmurf/bitcoin-secured
d280f82314de5aef66ccca60a001ee5dba08b5d7
[ "MIT" ]
null
null
null
#! /usr/bin/env python """ usage: git [--version] [--exec-path=<path>] [--html-path] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [-c name=value] <command> [<args>...] git [--help] The most commonly used git comman...
36.166667
79
0.600806
from subprocess import call from docopt import docopt if __name__ == '__main__': args = docopt(__doc__, version='git version 1.7.4.4', options_first=True) argv = [args['<command>']] + args['<args>'] if args['<command>'] == 'add': import git_add ...
true
true