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
f76a0ce4bbf044914da4e96df1cb88e542f42c5a
1,104
py
Python
zun/db/sqlalchemy/alembic/versions/5056c495abc2_add_image_tag_support_zun_create.py
cooldharma06/zun_glance_tag
555399275afdff748888036a2fca47bbf347956b
[ "Apache-2.0" ]
null
null
null
zun/db/sqlalchemy/alembic/versions/5056c495abc2_add_image_tag_support_zun_create.py
cooldharma06/zun_glance_tag
555399275afdff748888036a2fca47bbf347956b
[ "Apache-2.0" ]
null
null
null
zun/db/sqlalchemy/alembic/versions/5056c495abc2_add_image_tag_support_zun_create.py
cooldharma06/zun_glance_tag
555399275afdff748888036a2fca47bbf347956b
[ "Apache-2.0" ]
null
null
null
# 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, software # distr...
29.052632
77
0.694746
revision = '5056c495abc2' down_revision = '945569b3669f' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa import zun def upgrade(): op.add_column('container', sa.Column('image_tag', zun.db.sqlalchemy.models.JSONEncodedList(), ...
true
true
f76a0de4a2df8e41afe319a53e1564691e79196b
215
py
Python
Coding-Challenges/clockwiseSpiral/clockwise_spiral.py
iancdavis/Coders-Workshop
5f421722ff3e5b881909c97d6ca9e7be14fda594
[ "MIT" ]
1
2019-10-15T23:39:29.000Z
2019-10-15T23:39:29.000Z
Coding-Challenges/clockwiseSpiral/clockwise_spiral.py
iancdavis/Coders-Workshop
5f421722ff3e5b881909c97d6ca9e7be14fda594
[ "MIT" ]
null
null
null
Coding-Challenges/clockwiseSpiral/clockwise_spiral.py
iancdavis/Coders-Workshop
5f421722ff3e5b881909c97d6ca9e7be14fda594
[ "MIT" ]
null
null
null
def clockwise_spiral: print clockwise_spiral([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]])
26.875
47
0.330233
def clockwise_spiral: print clockwise_spiral([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]])
false
true
f76a0fd92ff54147a8d910af46cd83e49b2680ef
3,172
py
Python
datasets/prepare_thing_sem_from_lvis.py
abhishreeshetty/IDL-CrossViz
729baabd146980839544e274387bd5adb4640d03
[ "BSD-2-Clause" ]
null
null
null
datasets/prepare_thing_sem_from_lvis.py
abhishreeshetty/IDL-CrossViz
729baabd146980839544e274387bd5adb4640d03
[ "BSD-2-Clause" ]
null
null
null
datasets/prepare_thing_sem_from_lvis.py
abhishreeshetty/IDL-CrossViz
729baabd146980839544e274387bd5adb4640d03
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import functools import multiprocessing as mp import os import time import numpy as np from lvis import LVIS from pycocotools import mask as maskUtils def annToRLE(ann, img_size): h, w = img_size segm = ann['segmentation'] if type(se...
32.367347
108
0.651955
import functools import multiprocessing as mp import os import time import numpy as np from lvis import LVIS from pycocotools import mask as maskUtils def annToRLE(ann, img_size): h, w = img_size segm = ann['segmentation'] if type(segm) == list: rles = maskUtils.frPyObjects(segm,...
true
true
f76a103607b9ba5110e0dd867c4c053664c3eeb0
5,367
py
Python
visuals/visual.py
BierOne/VQA-AttReg
dc160fcc54b0a18cf321dfcff133761b5a8f5975
[ "MIT" ]
2
2021-03-08T12:19:04.000Z
2021-07-25T12:43:00.000Z
visuals/visual.py
BierOne/VQA-AttReg
dc160fcc54b0a18cf321dfcff133761b5a8f5975
[ "MIT" ]
null
null
null
visuals/visual.py
BierOne/VQA-AttReg
dc160fcc54b0a18cf321dfcff133761b5a8f5975
[ "MIT" ]
1
2021-03-24T09:47:49.000Z
2021-03-24T09:47:49.000Z
import sys # from visualize.visual import * import h5py import json import random import cv2 import numpy as np import os from skimage.transform import resize from skimage.filters import gaussian import matplotlib.pyplot as plt from scipy import misc font=cv2.FONT_HERSHEY_SIMPLEX false_results_dir = "vqa-mfb/mfb_coat...
36.760274
171
0.715297
import sys import h5py import json import random import cv2 import numpy as np import os from skimage.transform import resize from skimage.filters import gaussian import matplotlib.pyplot as plt from scipy import misc font=cv2.FONT_HERSHEY_SIMPLEX false_results_dir = "vqa-mfb/mfb_coatt_glove/false_temp/" true_results...
true
true
f76a10f21698b7b5f107f2816498678d35f18164
4,873
py
Python
booktags/crawlers/nbinet3_ncl/nbinet3_ncl_spider.py
MagicSword/Booktags
44142e19aec5ce75266233964d7ab21503bbe57c
[ "Apache-1.1" ]
null
null
null
booktags/crawlers/nbinet3_ncl/nbinet3_ncl_spider.py
MagicSword/Booktags
44142e19aec5ce75266233964d7ab21503bbe57c
[ "Apache-1.1" ]
9
2019-12-20T15:24:38.000Z
2021-12-13T20:28:48.000Z
booktags/crawlers/nbinet3_ncl/nbinet3_ncl_spider.py
MagicSword/BookTags
44142e19aec5ce75266233964d7ab21503bbe57c
[ "Apache-1.1" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ example.py ~~~~~~~~~ A simple command line application to run flask apps. :copyright: 2019 Miller :license: BSD-3-Clause """ # Known bugs that can't be fixed here: # - synopsis() cannot be prevented from clobbering existing # loaded modules. ...
26.058824
88
0.518367
# - synopsis() cannot be prevented from clobbering existing # loaded modules. # - If the __file__ attribute on a module is a relative path and # the current directory is changed with os.chdir(), an incorrect # path will be displayed. import re from booktags.crawlers.base import BaseCrawler # -------...
true
true
f76a1181d58ba4b83e35b310aff496e4aaac87c6
10,560
py
Python
charge/test/test_chargers.py
enitram/charge_assign
8925855b1ce854c012930e141bb3c16537d6996d
[ "Apache-2.0" ]
1
2021-10-30T05:02:46.000Z
2021-10-30T05:02:46.000Z
charge/test/test_chargers.py
enitram/charge_assign
8925855b1ce854c012930e141bb3c16537d6996d
[ "Apache-2.0" ]
5
2019-08-19T15:11:10.000Z
2021-06-11T22:20:27.000Z
charge/test/test_chargers.py
enitram/charge_assign
8925855b1ce854c012930e141bb3c16537d6996d
[ "Apache-2.0" ]
2
2019-04-15T08:36:17.000Z
2019-06-23T10:19:45.000Z
from math import log import pytest from charge.chargers import CDPCharger, DPCharger, ILPCharger, MeanCharger, MedianCharger, ModeCharger, \ SymmetricILPCharger, SymmetricDPCharger, SymmetricCDPCharger def test_mean_charger(mock_repository, ref_graph): charger = MeanCharger(mock_repository, 2) charger.c...
48.888889
105
0.694697
from math import log import pytest from charge.chargers import CDPCharger, DPCharger, ILPCharger, MeanCharger, MedianCharger, ModeCharger, \ SymmetricILPCharger, SymmetricDPCharger, SymmetricCDPCharger def test_mean_charger(mock_repository, ref_graph): charger = MeanCharger(mock_repository, 2) charger.c...
true
true
f76a12453aa26c291dd8ded0354b059f3cb2d2d8
6,484
py
Python
code/my_layers.py
saurabhgupta17888/Unsupervised-Aspect-Extraction
6967a06ec9ce77b4186fc577fd8beccd148d5729
[ "Apache-2.0" ]
338
2017-12-18T16:58:59.000Z
2022-03-30T17:09:46.000Z
code/my_layers.py
saurabhgupta17888/Unsupervised-Aspect-Extraction
6967a06ec9ce77b4186fc577fd8beccd148d5729
[ "Apache-2.0" ]
32
2017-12-26T23:32:41.000Z
2021-10-30T06:40:57.000Z
code/my_layers.py
saurabhgupta17888/Unsupervised-Aspect-Extraction
6967a06ec9ce77b4186fc577fd8beccd148d5729
[ "Apache-2.0" ]
120
2017-12-19T19:23:13.000Z
2022-03-30T17:09:52.000Z
import keras.backend as K from keras.engine.topology import Layer from keras import initializations from keras import regularizers from keras import constraints import numpy as np import theano.tensor as T class Attention(Layer): def __init__(self, W_regularizer=None, b_regularizer=None, W_constra...
33.081633
106
0.578347
import keras.backend as K from keras.engine.topology import Layer from keras import initializations from keras import regularizers from keras import constraints import numpy as np import theano.tensor as T class Attention(Layer): def __init__(self, W_regularizer=None, b_regularizer=None, W_constra...
true
true
f76a12622d09ed08734865a317e0079a0a7ccf01
158
py
Python
code/python/src/test_table.py
ShakeM/luago-book
ea7ceaea677454be714235b2982343684044922e
[ "MIT" ]
723
2018-01-08T04:55:42.000Z
2022-03-27T14:30:53.000Z
code/python/src/test_table.py
KEVINYZY/luago-book
88e64dfeb37b75a7fed147c51a199c41ef9f7bc4
[ "MIT" ]
23
2018-04-03T06:05:02.000Z
2021-07-06T00:58:31.000Z
code/python/src/test_table.py
KEVINYZY/luago-book
88e64dfeb37b75a7fed147c51a199c41ef9f7bc4
[ "MIT" ]
179
2018-01-08T08:16:32.000Z
2022-03-20T02:49:44.000Z
from vm.lua_state import LuaState def main(): ls = LuaState() ls.load('./lua/table.luac') ls.call(0, 0) if __name__ == '__main__': main()
13.166667
33
0.594937
from vm.lua_state import LuaState def main(): ls = LuaState() ls.load('./lua/table.luac') ls.call(0, 0) if __name__ == '__main__': main()
true
true
f76a1297558afb6cff6979fa7a4c85492a27257c
6,583
py
Python
model2D.py
hermannbene/BeamTomography
39eae19c54128f27eb90a2717b1876768d730f29
[ "Apache-2.0" ]
2
2021-01-25T12:31:21.000Z
2021-04-02T23:13:09.000Z
model2D.py
hermannbene/BeamTomography
39eae19c54128f27eb90a2717b1876768d730f29
[ "Apache-2.0" ]
null
null
null
model2D.py
hermannbene/BeamTomography
39eae19c54128f27eb90a2717b1876768d730f29
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt from loadData import gauss, loadAndPrepareInput from scipy import signal from generateTestData import loadTestData from plot import plotProjections2D, plotError2D from scipy.optimize import curve_fit def growthRate(X, x, bins, y, angle, convFu...
39.89697
178
0.601549
import numpy as np import matplotlib.pyplot as plt from loadData import gauss, loadAndPrepareInput from scipy import signal from generateTestData import loadTestData from plot import plotProjections2D, plotError2D from scipy.optimize import curve_fit def growthRate(X, x, bins, y, angle, convFunction = None, microChar...
true
true
f76a12b96799da69c972cea49f37b75894026a75
221
py
Python
schema_registry/client/__init__.py
oscarjohansson94/python-schema-registry-client
7ed99003a200d167e8a8bd66f34af8d51ad1de1d
[ "MIT" ]
95
2019-05-20T06:59:06.000Z
2022-03-01T05:30:57.000Z
schema_registry/client/__init__.py
oscarjohansson94/python-schema-registry-client
7ed99003a200d167e8a8bd66f34af8d51ad1de1d
[ "MIT" ]
94
2019-05-19T18:36:29.000Z
2022-03-30T18:54:52.000Z
schema_registry/client/__init__.py
oscarjohansson94/python-schema-registry-client
7ed99003a200d167e8a8bd66f34af8d51ad1de1d
[ "MIT" ]
41
2019-05-20T06:59:33.000Z
2022-03-06T16:09:53.000Z
from schema_registry.client import errors, schema # noqa from schema_registry.client.client import AsyncSchemaRegistryClient, SchemaRegistryClient # noqa __all__ = ["SchemaRegistryClient", "AsyncSchemaRegistryClient"]
44.2
97
0.837104
from schema_registry.client import errors, schema from schema_registry.client.client import AsyncSchemaRegistryClient, SchemaRegistryClient __all__ = ["SchemaRegistryClient", "AsyncSchemaRegistryClient"]
true
true
f76a12cd86b1cc0ac1cdd732c1273cc9c97a00cc
10,137
py
Python
trajectory/aerocalc/val_input.py
RobertPastor/flight-profile
bdc3bb9defeb347db26f96f7accd4d06cad1e33b
[ "MIT" ]
null
null
null
trajectory/aerocalc/val_input.py
RobertPastor/flight-profile
bdc3bb9defeb347db26f96f7accd4d06cad1e33b
[ "MIT" ]
null
null
null
trajectory/aerocalc/val_input.py
RobertPastor/flight-profile
bdc3bb9defeb347db26f96f7accd4d06cad1e33b
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # ############################################################################# # Copyright (c) 2008, Kevin Horton # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
34.362712
109
0.528756
# Return user input after validating it, offering the user a default value. # """ def get_input( prompt, type, error_string, check_list=[], default='', **kwds ): input_validated = False if type == 'float': while not input_validated: input_data = in...
true
true
f76a13059d12d81df2a039d98ea59bc935cd7af2
283
py
Python
src/backend/utils/__init__.py
josiahfmccoy/scholasterion
2d547bc56b47a46448a4f1e5b83eb56e15310926
[ "Apache-2.0" ]
null
null
null
src/backend/utils/__init__.py
josiahfmccoy/scholasterion
2d547bc56b47a46448a4f1e5b83eb56e15310926
[ "Apache-2.0" ]
null
null
null
src/backend/utils/__init__.py
josiahfmccoy/scholasterion
2d547bc56b47a46448a4f1e5b83eb56e15310926
[ "Apache-2.0" ]
null
null
null
import os def recursive_listdir(folderpath): ret = [] for x in os.listdir(folderpath): fpath = os.path.join(folderpath, x) if os.path.isfile(fpath): ret.append(fpath) else: ret.extend(recursive_listdir(fpath)) return ret
21.769231
48
0.597173
import os def recursive_listdir(folderpath): ret = [] for x in os.listdir(folderpath): fpath = os.path.join(folderpath, x) if os.path.isfile(fpath): ret.append(fpath) else: ret.extend(recursive_listdir(fpath)) return ret
true
true
f76a1338d94c1a24d0066c6272a44e73c48ccfd2
2,619
py
Python
alipay/aop/api/domain/AlipayAccount.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayAccount.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayAccount.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayAccount(object): def __init__(self): self._alipay_user_id = None self._available_amount = None self._freeze_amount = None self._total_amount = ...
30.453488
83
0.622757
import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayAccount(object): def __init__(self): self._alipay_user_id = None self._available_amount = None self._freeze_amount = None self._total_amount = None @property def alipay_user_id(sel...
true
true
f76a13be83f35df17dfe5ea4880ac8cea84ff715
494
py
Python
bitcoin/migrations/0004_auto_20211211_2256.py
neelarya19/CryptoPrice
e1985529e1c5117072c095780ed08225511d4aac
[ "MIT" ]
1
2022-01-03T11:44:32.000Z
2022-01-03T11:44:32.000Z
bitcoin/migrations/0004_auto_20211211_2256.py
neelarya19/CryptoPrice
e1985529e1c5117072c095780ed08225511d4aac
[ "MIT" ]
null
null
null
bitcoin/migrations/0004_auto_20211211_2256.py
neelarya19/CryptoPrice
e1985529e1c5117072c095780ed08225511d4aac
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-12-11 17:26 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('bitcoin', '0003_rename_prices_historic_prices'), ] operations = [ migrations.AlterModelOptions( name='historic', options={'o...
21.478261
58
0.562753
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('bitcoin', '0003_rename_prices_historic_prices'), ] operations = [ migrations.AlterModelOptions( name='historic', options={'ordering': ['-time']}, ), migrati...
true
true
f76a140467f2ebf23b57f8ad04f2b3390654cca6
292
py
Python
team_api/rest_auth/tests/serializers/test_token_serializer.py
cdriehuys/team-manager-api
aaefdbcb42b76f8c20f19ff4e016221d4454f5a3
[ "MIT" ]
1
2019-01-10T09:55:18.000Z
2019-01-10T09:55:18.000Z
team_api/rest_auth/tests/serializers/test_token_serializer.py
cdriehuys/team-manager-api
aaefdbcb42b76f8c20f19ff4e016221d4454f5a3
[ "MIT" ]
14
2017-06-02T18:28:38.000Z
2017-06-06T21:17:28.000Z
team_api/rest_auth/tests/serializers/test_token_serializer.py
cdriehuys/team-manager-api
aaefdbcb42b76f8c20f19ff4e016221d4454f5a3
[ "MIT" ]
1
2020-02-05T15:06:35.000Z
2020-02-05T15:06:35.000Z
from rest_auth.serializers import TokenSerializer def test_serialize(token_factory): """ Test serializing a token. """ token = token_factory() serializer = TokenSerializer(token) expected = { 'key': token.key, } assert serializer.data == expected
17.176471
49
0.65411
from rest_auth.serializers import TokenSerializer def test_serialize(token_factory): token = token_factory() serializer = TokenSerializer(token) expected = { 'key': token.key, } assert serializer.data == expected
true
true
f76a14776f704b7a0d1f47a93a4459dbee624f68
2,172
py
Python
rj_gameplay/stp/skill/__init__.py
RoboJackets/robocup-software
ae2920b8b98213e625d0565dd67005e7a8595fac
[ "Apache-2.0" ]
200
2015-01-26T01:45:34.000Z
2022-03-19T13:05:31.000Z
rj_gameplay/stp/skill/__init__.py
RoboJackets/robocup-software
ae2920b8b98213e625d0565dd67005e7a8595fac
[ "Apache-2.0" ]
1,254
2015-01-03T01:57:35.000Z
2022-03-16T06:32:21.000Z
rj_gameplay/stp/skill/__init__.py
RoboJackets/robocup-software
ae2920b8b98213e625d0565dd67005e7a8595fac
[ "Apache-2.0" ]
206
2015-01-21T02:03:18.000Z
2022-02-01T17:57:46.000Z
""" This module contains data structures for the Skills level of STP. """ from abc import ABC, abstractmethod from typing import Dict, List, Type, TypeVar import stp.role as role class ISkill(ABC): """ Interface for Skills. """ @abstractmethod def tick(self) -> None: ... SkillT = TypeVar("Ski...
27.493671
86
0.630755
from abc import ABC, abstractmethod from typing import Dict, List, Type, TypeVar import stp.role as role class ISkill(ABC): @abstractmethod def tick(self) -> None: ... SkillT = TypeVar("SkillT", bound=ISkill) class Registry: __slots__ = ["_dict"] def __init__(self): self._dict...
true
true
f76a14d0c8027130c6ab14664ba4b90a52ea45a7
2,215
py
Python
src/pytraits/extendable.py
Hc10b/py3traits
713eec35a5a2f4eba6801c1c7660b863eb692bcc
[ "Apache-2.0" ]
25
2015-05-25T20:27:43.000Z
2020-08-30T16:37:59.000Z
src/pytraits/extendable.py
Hc10b/py3traits
713eec35a5a2f4eba6801c1c7660b863eb692bcc
[ "Apache-2.0" ]
2
2017-11-02T09:02:37.000Z
2020-06-16T20:39:56.000Z
src/pytraits/extendable.py
Hc10b/py3traits
713eec35a5a2f4eba6801c1c7660b863eb692bcc
[ "Apache-2.0" ]
3
2015-05-25T20:34:13.000Z
2020-06-16T13:51:37.000Z
#!/usr/bin/python -tt # -*- coding: utf-8 -*- ''' Copyright 2014-2015 Teppo Perä 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 Un...
31.642857
79
0.674041
from pytraits.trait_composer import add_traits def extendable(target): class TypeFunction: def __init__(self): self._target_object = None def __call__(self, *args, **kwargs): add_traits(self._target_object, *args, **kwargs) def __get__(self, instance, clazz): ...
true
true
f76a15d5a214460f77c5f990a1f21e5a8a02763b
1,440
py
Python
leetcode/editor/cn/FriendsOfAppropriateAges.py
huangge1199/leet-code-python
5d01bbb6f12a495ea7ea0a90b5b3b4aa92bcc2f7
[ "Apache-2.0" ]
1
2022-02-12T13:55:41.000Z
2022-02-12T13:55:41.000Z
leetcode/editor/cn/FriendsOfAppropriateAges.py
huangge1199/leet-code-python
5d01bbb6f12a495ea7ea0a90b5b3b4aa92bcc2f7
[ "Apache-2.0" ]
null
null
null
leetcode/editor/cn/FriendsOfAppropriateAges.py
huangge1199/leet-code-python
5d01bbb6f12a495ea7ea0a90b5b3b4aa92bcc2f7
[ "Apache-2.0" ]
null
null
null
# 在社交媒体网站上有 n 个用户。给你一个整数数组 ages ,其中 ages[i] 是第 i 个用户的年龄。 # # 如果下述任意一个条件为真,那么用户 x 将不会向用户 y(x != y)发送好友请求: # # # age[y] <= 0.5 * age[x] + 7 # age[y] > age[x] # age[y] > 100 && age[x] < 100 # # # 否则,x 将会向 y 发送一条好友请求。 # # 注意,如果 x 向 y 发送一条好友请求,y 不必也向 x 发送一条好友请求。另外,用户不会向自己发送好友请求。 # # 返回在该社交媒体网站上产生的好友请求...
17.777778
66
0.506944
from typing import List class Solution: def numFriendRequests(self, ages: List[int]) -> int: n = len(ages) ages.sort() start = 0 end = 0 count = 0 for age in ages: if age < 15: continue while ages[start] <= 0.5 * age + 7: ...
true
true
f76a15ec1e43bbc3b467a0d9e0beefba1e606859
2,953
py
Python
run.py
ROUASAAD/PCOS
21bc2698f9893484eb6ee9af5f108134948465c6
[ "MIT" ]
null
null
null
run.py
ROUASAAD/PCOS
21bc2698f9893484eb6ee9af5f108134948465c6
[ "MIT" ]
null
null
null
run.py
ROUASAAD/PCOS
21bc2698f9893484eb6ee9af5f108134948465c6
[ "MIT" ]
1
2021-04-03T15:47:53.000Z
2021-04-03T15:47:53.000Z
import flask import pandas as pd import io from flask import request, jsonify, render_template, send_from_directory import warnings import pandas as pd from sklearn.model_selection import train_test_split from sklearn.svm import SVC #################################################### # Flask Config app = flask.Flask(_...
37.379747
111
0.627836
import flask import pandas as pd import io from flask import request, jsonify, render_template, send_from_directory import warnings import pandas as pd from sklearn.model_selection import train_test_split from sklearn.svm import SVC app = flask.Flask(__name__) app.config["DEBUG"] = True testData = pd.read_csv("./asset...
true
true
f76a1635ab47e8a7552dbc411a53abfa792b5366
312
py
Python
scripts/npc/wizard4th_warp.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
9
2021-04-26T11:59:29.000Z
2021-12-20T13:15:27.000Z
scripts/npc/wizard4th_warp.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
null
null
null
scripts/npc/wizard4th_warp.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
6
2021-07-14T06:32:05.000Z
2022-02-06T02:32:56.000Z
# Gritto (2081200) | Forest of the Priest (240010501) MANON_PREV_MAP = 240020400 GRIFFEY_PREV_MAP = 240020100 selection = sm.sendNext("Where would you like to warp to?\r\n\r\n#L0##bManon\r\n#L1#Griffey#l#n") if selection == 0: sm.warp(MANON_PREV_MAP, 4) elif selection == 1: sm.warp(GRIFFEY_PREV_MAP, 6)
34.666667
97
0.724359
MANON_PREV_MAP = 240020400 GRIFFEY_PREV_MAP = 240020100 selection = sm.sendNext("Where would you like to warp to?\r\n\r\n#L0##bManon\r\n#L1#Griffey#l#n") if selection == 0: sm.warp(MANON_PREV_MAP, 4) elif selection == 1: sm.warp(GRIFFEY_PREV_MAP, 6)
true
true
f76a175a4e29149cb3ad59457fcf3c9193106665
28,400
py
Python
third_party/sqlalchemy_0_7_1/sqlalchemy/ext/sqlsoup.py
bopopescu/build
4e95fd33456e552bfaf7d94f7d04b19273d1c534
[ "BSD-3-Clause" ]
null
null
null
third_party/sqlalchemy_0_7_1/sqlalchemy/ext/sqlsoup.py
bopopescu/build
4e95fd33456e552bfaf7d94f7d04b19273d1c534
[ "BSD-3-Clause" ]
null
null
null
third_party/sqlalchemy_0_7_1/sqlalchemy/ext/sqlsoup.py
bopopescu/build
4e95fd33456e552bfaf7d94f7d04b19273d1c534
[ "BSD-3-Clause" ]
1
2020-07-23T11:05:06.000Z
2020-07-23T11:05:06.000Z
# ext/sqlsoup.py # Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Introduction ============ SqlSoup provides a convenient way to access existing dat...
35.588972
129
0.649683
""" Introduction ============ SqlSoup provides a convenient way to access existing database tables without having to declare table or mapper classes ahead of time. It is built on top of the SQLAlchemy ORM and provides a super-minimalistic interface to an existing database. SqlSoup effectively provides a coarse grain...
false
true
f76a1789889a0590d19963e6f7a1e32cffe978c7
4,452
py
Python
deafwave/wallet/wallet_user_store.py
SparXalt/deafwave-blockchain
579eac55d55285f750c622bf66a1aa30ed6d949d
[ "Apache-2.0" ]
null
null
null
deafwave/wallet/wallet_user_store.py
SparXalt/deafwave-blockchain
579eac55d55285f750c622bf66a1aa30ed6d949d
[ "Apache-2.0" ]
null
null
null
deafwave/wallet/wallet_user_store.py
SparXalt/deafwave-blockchain
579eac55d55285f750c622bf66a1aa30ed6d949d
[ "Apache-2.0" ]
null
null
null
from typing import List, Optional import aiosqlite from deafwave.util.db_wrapper import DBWrapper from deafwave.util.ints import uint32 from deafwave.wallet.util.wallet_types import WalletType from deafwave.wallet.wallet_info import WalletInfo class WalletUserStore: """ WalletUserStore keeps track of all us...
33.473684
105
0.612309
from typing import List, Optional import aiosqlite from deafwave.util.db_wrapper import DBWrapper from deafwave.util.ints import uint32 from deafwave.wallet.util.wallet_types import WalletType from deafwave.wallet.wallet_info import WalletInfo class WalletUserStore: db_connection: aiosqlite.Connection cach...
true
true
f76a17aacd1e612b5f083b16568c37683de745c0
1,690
py
Python
pixor/smooth_L1.py
Dieblitzen/SAMAR-Project
8b3655a3d3ef17c61eb5e0acf411c8b191bd917e
[ "MIT" ]
1
2020-02-01T20:56:16.000Z
2020-02-01T20:56:16.000Z
pixor/smooth_L1.py
Dieblitzen/AIR-Project
8b3655a3d3ef17c61eb5e0acf411c8b191bd917e
[ "MIT" ]
null
null
null
pixor/smooth_L1.py
Dieblitzen/AIR-Project
8b3655a3d3ef17c61eb5e0acf411c8b191bd917e
[ "MIT" ]
2
2019-09-28T23:04:48.000Z
2019-11-02T16:13:43.000Z
import tensorflow as tf import numpy as np TILE_SIZE = 224 """ Implements smooth L1 on each dimension. Erases loss for negative pixel locations. """ def smooth_L1(box_labels, box_preds, class_labels): difference = tf.subtract(box_preds, box_labels) result = tf.where(tf.abs(difference) < 1, tf.multiply(0.5, tf.square...
39.302326
109
0.757396
import tensorflow as tf import numpy as np TILE_SIZE = 224 def smooth_L1(box_labels, box_preds, class_labels): difference = tf.subtract(box_preds, box_labels) result = tf.where(tf.abs(difference) < 1, tf.multiply(0.5, tf.square(difference)), tf.abs(difference) - 0.5) class_labels = tf.cast(tf.clip_by_value(class_la...
true
true
f76a180050bda8cc3823f1794d19350d1f54fd3c
35,425
py
Python
sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py
aiven/azure-sdk-for-python
8764dc07423beca46ed0b51212d81289d9e52c60
[ "MIT" ]
1
2020-03-05T18:10:35.000Z
2020-03-05T18:10:35.000Z
sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py
aiven/azure-sdk-for-python
8764dc07423beca46ed0b51212d81289d9e52c60
[ "MIT" ]
2
2020-03-03T23:11:13.000Z
2020-03-30T18:50:55.000Z
sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py
aiven/azure-sdk-for-python
8764dc07423beca46ed0b51212d81289d9e52c60
[ "MIT" ]
1
2021-05-19T02:55:10.000Z
2021-05-19T02:55:10.000Z
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import os import pytest import platform import functools import itertools from azure.core.exceptions import HttpResponseError, ClientAuthenticationError...
48.131793
154
0.659986
import os import pytest import platform import functools import itertools from azure.core.exceptions import HttpResponseError, ClientAuthenticationError from azure.core.pipeline.transport import AioHttpTransport from azure.core.credentials import AzureKeyCredential from multidict import CIMultiDict, CIMultiDictProxy ...
true
true
f76a18e105125523de4c01b9c8e284e4b2fb1cbb
3,237
py
Python
test/Flask/04/author_book1.py
Kingworrior007/lchw001
e59e6f300123bd98d49e81be16e73a4440ffa85a
[ "MIT" ]
2
2018-03-09T02:13:54.000Z
2020-12-28T01:47:30.000Z
test/Flask/04/author_book1.py
X-Warrior007/lchw001
e59e6f300123bd98d49e81be16e73a4440ffa85a
[ "MIT" ]
null
null
null
test/Flask/04/author_book1.py
X-Warrior007/lchw001
e59e6f300123bd98d49e81be16e73a4440ffa85a
[ "MIT" ]
null
null
null
# coding=utf-8 from flask import Flask,render_template,redirect,url_for from flask_sqlalchemy import SQLAlchemy from flask_wtf import FlaskForm from wtforms import StringField,SubmitField from wtforms.validators import DataRequired app = Flask(__name__) # 配置数据库 app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://roo...
23.456522
80
0.655854
from flask import Flask,render_template,redirect,url_for from flask_sqlalchemy import SQLAlchemy from flask_wtf import FlaskForm from wtforms import StringField,SubmitField from wtforms.validators import DataRequired app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:mysql@localhost/temp1...
false
true
f76a1909a8fc1b3f7b47133da7f4566bc7fa5200
3,782
py
Python
zynq/tkinter_kws.py
Roxbili/kws-demo
7e0674f1407572fc8f148293b23fa20a5164bc5e
[ "Apache-2.0" ]
null
null
null
zynq/tkinter_kws.py
Roxbili/kws-demo
7e0674f1407572fc8f148293b23fa20a5164bc5e
[ "Apache-2.0" ]
null
null
null
zynq/tkinter_kws.py
Roxbili/kws-demo
7e0674f1407572fc8f148293b23fa20a5164bc5e
[ "Apache-2.0" ]
null
null
null
#-*- encoding: utf-8 -*- import time import argparse import numpy as np import tkinter as tk from tkinter.ttk import Label from kws_ps_pl import BRAM, PSPLTalk, InputDataToBram from multiprocessing import Process class timeRecorder(object): def __init__(self): self.total_time = 0. self.counter = 0 ...
30.015873
82
0.556584
import time import argparse import numpy as np import tkinter as tk from tkinter.ttk import Label from kws_ps_pl import BRAM, PSPLTalk, InputDataToBram from multiprocessing import Process class timeRecorder(object): def __init__(self): self.total_time = 0. self.counter = 0 def start(self): ...
true
true
f76a191f5d8c6eea661c7259428dc51f7c1c3f65
63
py
Python
setup.py
s4-2/scancode-toolkit
8931b42e2630b94d0cabc834dfb3c16f01f82321
[ "Apache-2.0", "CC-BY-4.0" ]
1,511
2015-07-01T15:29:03.000Z
2022-03-30T13:40:05.000Z
setup.py
s4-2/scancode-toolkit
8931b42e2630b94d0cabc834dfb3c16f01f82321
[ "Apache-2.0", "CC-BY-4.0" ]
2,695
2015-07-01T16:01:35.000Z
2022-03-31T19:17:44.000Z
setup.py
s4-2/scancode-toolkit
8931b42e2630b94d0cabc834dfb3c16f01f82321
[ "Apache-2.0", "CC-BY-4.0" ]
540
2015-07-01T15:08:19.000Z
2022-03-31T12:13:11.000Z
#!/usr/bin/env python from setuptools import setup setup()
9
28
0.714286
from setuptools import setup setup()
true
true
f76a19ac300c2518074ac616702ad6286ebc3b47
10,480
py
Python
src/storage-preview/azext_storage_preview/vendored_sdks/azure_mgmt_storage/v2021_08_01/aio/operations/_file_services_operations.py
calvin197/azure-cli-extensions
65fac44b8dd0e1523c3866be5ec92eeb9b3a54f5
[ "MIT" ]
1
2022-02-18T00:16:47.000Z
2022-02-18T00:16:47.000Z
src/storage-preview/azext_storage_preview/vendored_sdks/azure_mgmt_storage/v2021_08_01/aio/operations/_file_services_operations.py
calvin197/azure-cli-extensions
65fac44b8dd0e1523c3866be5ec92eeb9b3a54f5
[ "MIT" ]
null
null
null
src/storage-preview/azext_storage_preview/vendored_sdks/azure_mgmt_storage/v2021_08_01/aio/operations/_file_services_operations.py
calvin197/azure-cli-extensions
65fac44b8dd0e1523c3866be5ec92eeb9b3a54f5
[ "MIT" ]
null
null
null
# 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 ...
47.207207
221
0.704198
import functools from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport i...
true
true
f76a1b0de1b15646b1d2c2e4a039b8440bce6909
10,762
py
Python
pysnmp-with-texts/ACC-NC-ALARM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/ACC-NC-ALARM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/ACC-NC-ALARM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module ACC-NC-ALARM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ACC-NC-ALARM-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:11:26 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar ...
119.577778
804
0.757294
accNetController, = mibBuilder.importSymbols("ANDOVER-CONTROLS-MIB", "accNetController") OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueRangeConstrai...
true
true
f76a1b96f722865a8a491516eb0d7a5481a66c83
298,561
py
Python
base/database.py
IDAPluginProject/ida-minsc
09d1cca03320873b557a65680aad19788327fffa
[ "BSD-3-Clause" ]
null
null
null
base/database.py
IDAPluginProject/ida-minsc
09d1cca03320873b557a65680aad19788327fffa
[ "BSD-3-Clause" ]
null
null
null
base/database.py
IDAPluginProject/ida-minsc
09d1cca03320873b557a65680aad19788327fffa
[ "BSD-3-Clause" ]
null
null
null
""" Database module This module exposes a number of tools that can be used on a database and on addresses within the database. There are a number of namespaces that allow one to query information about the database as a whole, or to read/write to an address within the database. The base argument type for many of the ...
47.084214
395
0.640563
import six, builtins import functools, operator, itertools, types import sys, os, logging, string import math, array as _array, fnmatch, re, ctypes import function, segment import structure as _structure, instruction as _instruction import ui, internal from internal import utils, interface, exceptions as E import i...
true
true
f76a1cd9b23d43baececa2b2888f34fa9d1e37df
815
py
Python
tests/core/test_override_headers.py
rtshilston/flask-cors
9fae3e5cf69c634f6144556fb848b7af05cd7bfe
[ "MIT" ]
749
2015-02-13T09:30:52.000Z
2022-03-30T22:17:14.000Z
tests/core/test_override_headers.py
rtshilston/flask-cors
9fae3e5cf69c634f6144556fb848b7af05cd7bfe
[ "MIT" ]
161
2015-02-26T05:59:28.000Z
2022-03-31T10:40:13.000Z
tests/core/test_override_headers.py
rtshilston/flask-cors
9fae3e5cf69c634f6144556fb848b7af05cd7bfe
[ "MIT" ]
126
2015-02-24T23:26:38.000Z
2022-03-21T04:58:49.000Z
# -*- coding: utf-8 -*- """ test ~~~~ Flask-Cors tests module """ from ..base_test import FlaskCorsTestCase from flask import Flask, Response from flask_cors import * from flask_cors.core import * class ResponseHeadersOverrideTestCaseIntegration(FlaskCorsTestCase): def setUp(self): self.app ...
23.970588
95
0.626994
from ..base_test import FlaskCorsTestCase from flask import Flask, Response from flask_cors import * from flask_cors.core import * class ResponseHeadersOverrideTestCaseIntegration(FlaskCorsTestCase): def setUp(self): self.app = Flask(__name__) CORS(self.app) @self.app.route('/') ...
true
true
f76a1cf8fb0e6cf7d230e8b9ad5862b2b36b64af
462
py
Python
apps/ratings/serializers.py
FancyKat/django-portfolio
f261f8d3a37e5771f9f48a74a769b6e9b479d49d
[ "MIT" ]
null
null
null
apps/ratings/serializers.py
FancyKat/django-portfolio
f261f8d3a37e5771f9f48a74a769b6e9b479d49d
[ "MIT" ]
9
2022-03-22T04:30:50.000Z
2022-03-22T04:49:13.000Z
apps/ratings/serializers.py
FancyKat/django-portfolio
f261f8d3a37e5771f9f48a74a769b6e9b479d49d
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Rating class RatingSerializer(serializers.ModelSerializer): rater = serializers.SerializerMethodField(read_only=True) agent = serializers.SerializerMethodField(read_only=True) class Meta: model = Rating exclude = ["updated_at", "...
24.315789
61
0.71645
from rest_framework import serializers from .models import Rating class RatingSerializer(serializers.ModelSerializer): rater = serializers.SerializerMethodField(read_only=True) agent = serializers.SerializerMethodField(read_only=True) class Meta: model = Rating exclude = ["updated_at", "...
true
true
f76a1dabd6f927f82a998367ceb787bff752c9be
2,175
py
Python
tests/test_build.py
mishk/python-for-android
1b887bed09a7ec19bfa00c9fb69a54e3f60a2328
[ "MIT" ]
19
2019-11-22T06:07:37.000Z
2022-03-16T20:45:06.000Z
tests/test_build.py
mishk/python-for-android
1b887bed09a7ec19bfa00c9fb69a54e3f60a2328
[ "MIT" ]
null
null
null
tests/test_build.py
mishk/python-for-android
1b887bed09a7ec19bfa00c9fb69a54e3f60a2328
[ "MIT" ]
2
2021-01-02T14:45:16.000Z
2021-11-02T13:04:59.000Z
import unittest from unittest import mock from pythonforandroid.build import run_pymodules_install class TestBuildBasic(unittest.TestCase): def test_run_pymodules_install_optional_project_dir(self): """ Makes sure the `run_pymodules_install()` doesn't crash when the `project_dir` optiona...
43.5
102
0.662069
import unittest from unittest import mock from pythonforandroid.build import run_pymodules_install class TestBuildBasic(unittest.TestCase): def test_run_pymodules_install_optional_project_dir(self): ctx = mock.Mock() modules = [] project_dir = None with mock.patch('pythonforandro...
true
true
f76a1ea5e52d6ff200bd3c23d2fcc1856b24f846
676
py
Python
queue.py
Chongkai-Ma/Fundamentals-of-Python-Data-Structures
170e58d23d9ee73c53b2ab596d7fcfc3e63eccc9
[ "CNRI-Python" ]
null
null
null
queue.py
Chongkai-Ma/Fundamentals-of-Python-Data-Structures
170e58d23d9ee73c53b2ab596d7fcfc3e63eccc9
[ "CNRI-Python" ]
null
null
null
queue.py
Chongkai-Ma/Fundamentals-of-Python-Data-Structures
170e58d23d9ee73c53b2ab596d7fcfc3e63eccc9
[ "CNRI-Python" ]
null
null
null
#!/usr/bin/python3 def test_queue(): #using a list to create queue q = [] print ("Now is a empty queue", q) q.append("a") print ("Add a new item in the list", q) q.append("b") print ("Add a new item in the list", q) q.append("c") print ("Add a new item in the list", q) LEN = len...
26
56
0.581361
def test_queue(): q = [] print ("Now is a empty queue", q) q.append("a") print ("Add a new item in the list", q) q.append("b") print ("Add a new item in the list", q) q.append("c") print ("Add a new item in the list", q) LEN = len(q) print ("There are ", LEN, "items in the q...
true
true
f76a1ede169e5c2f3fa3090dd64d974024f7f4a4
2,102
py
Python
parser.py
spectralflash/kl_test
82b4e8e56192e98ec667819443f30701457ce20e
[ "MIT" ]
null
null
null
parser.py
spectralflash/kl_test
82b4e8e56192e98ec667819443f30701457ce20e
[ "MIT" ]
null
null
null
parser.py
spectralflash/kl_test
82b4e8e56192e98ec667819443f30701457ce20e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Test exercise, details: https://github.com/silversum/test""" import gzip from typing import TextIO from pprint import pprint def chunks(file_obj: TextIO): """ :param file_obj: text file or file-like object opened for reading :return: parsed data dictionaries as an iterator object...
30.028571
75
0.56137
import gzip from typing import TextIO from pprint import pprint def chunks(file_obj: TextIO): chunk = {} key = None for line in file_obj.readlines(): if line.startswith('#'): continue if not line.strip(): if chunk: yield strip_linebreaks(chunk) ...
true
true
f76a1fe4c75923a88bbedb8b8ee00d3b8e6266c6
2,796
py
Python
ros_nodes/serial_adapter.py
AmaljithCf/RacingRobot
6885ddb37407dff15845d29f641bc7c39279b216
[ "MIT" ]
218
2017-07-08T10:10:40.000Z
2022-03-26T18:03:16.000Z
ros_nodes/serial_adapter.py
AmaljithCf/RacingRobot
6885ddb37407dff15845d29f641bc7c39279b216
[ "MIT" ]
4
2018-06-10T18:52:17.000Z
2019-03-01T12:48:57.000Z
ros_nodes/serial_adapter.py
AmaljithCf/RacingRobot
6885ddb37407dff15845d29f641bc7c39279b216
[ "MIT" ]
94
2017-11-15T20:59:29.000Z
2022-03-30T13:10:30.000Z
import threading import time import numpy as np import rospy from std_msgs.msg import Int16, Int8 from robust_serial import write_order, Order from robust_serial.threads import CommandThread, ListenerThread from robust_serial.utils import open_serial_port, CustomQueue from constants import BAUDRATE, N_MESSAGES_ALLOWE...
29.744681
104
0.705651
import threading import time import numpy as np import rospy from std_msgs.msg import Int16, Int8 from robust_serial import write_order, Order from robust_serial.threads import CommandThread, ListenerThread from robust_serial.utils import open_serial_port, CustomQueue from constants import BAUDRATE, N_MESSAGES_ALLOWE...
true
true
f76a1fe8b4dcdf1398ba0557d7686ed316e6315f
3,516
py
Python
projects/data_generation/synthetic_multi_view_facial_image_generation/algorithm/Rotate_and_Render/train.py
ESOGU-SRLAB/opendr
f2eb5a6d7a070d3534d470987c3abc69eec53905
[ "Apache-2.0" ]
217
2020-04-10T16:39:36.000Z
2022-03-30T15:39:04.000Z
projects/data_generation/synthetic_multi_view_facial_image_generation/algorithm/Rotate_and_Render/train.py
ESOGU-SRLAB/opendr
f2eb5a6d7a070d3534d470987c3abc69eec53905
[ "Apache-2.0" ]
46
2021-12-16T13:23:04.000Z
2022-03-30T11:36:29.000Z
projects/data_generation/synthetic_multi_view_facial_image_generation/algorithm/Rotate_and_Render/train.py
ESOGU-SRLAB/opendr
f2eb5a6d7a070d3534d470987c3abc69eec53905
[ "Apache-2.0" ]
29
2021-12-16T09:26:13.000Z
2022-03-29T15:19:18.000Z
import torch.multiprocessing as multiprocessing import sys from options.train_options import TrainOptions import data from trainers import create_trainer from util.iter_counter import IterationCounter from util.visualizer import Visualizer from torch.multiprocessing import Queue from data.data_utils import init_paralle...
35.16
105
0.668089
import torch.multiprocessing as multiprocessing import sys from options.train_options import TrainOptions import data from trainers import create_trainer from util.iter_counter import IterationCounter from util.visualizer import Visualizer from torch.multiprocessing import Queue from data.data_utils import init_paralle...
true
true
f76a210cbffd179b35190cb3d5881d53e3a0dbe8
81
py
Python
ModularER_2D/gym_rem2D/envs/__init__.py
FrankVeenstra/gym_rem2D
ea295e6398054c023c88df88d9c70f5486061207
[ "MIT" ]
27
2020-07-15T10:43:02.000Z
2021-04-15T15:01:12.000Z
ModularER_2D/gym_rem2D/envs/__init__.py
FrankVeenstra/gym_rem2D
ea295e6398054c023c88df88d9c70f5486061207
[ "MIT" ]
3
2021-06-08T22:44:19.000Z
2021-09-15T08:50:44.000Z
ModularER_2D/gym_rem2D/envs/__init__.py
FrankVeenstra/gym_rem2D
ea295e6398054c023c88df88d9c70f5486061207
[ "MIT" ]
6
2020-07-22T01:25:49.000Z
2021-09-21T12:07:31.000Z
#!/usr/bin/env python from .Modular2DEnv import Modular2D __all__ = [Modular2D]
16.2
35
0.765432
from .Modular2DEnv import Modular2D __all__ = [Modular2D]
true
true
f76a223a710732c5774be927884468126f245918
859
py
Python
misc/social_forces/fieldofview.py
umautobots/osp
d055f1c846f907445186b9dea7da2d4dca4790a6
[ "MIT" ]
1
2021-11-08T07:27:39.000Z
2021-11-08T07:27:39.000Z
misc/social_forces/fieldofview.py
swb19/osp
d055f1c846f907445186b9dea7da2d4dca4790a6
[ "MIT" ]
null
null
null
misc/social_forces/fieldofview.py
swb19/osp
d055f1c846f907445186b9dea7da2d4dca4790a6
[ "MIT" ]
2
2021-07-24T21:27:56.000Z
2021-10-31T14:13:20.000Z
""" https://github.com/svenkreiss/socialforce Field of view computation. """ import numpy as np class FieldOfView(object): """Compute field of view prefactors. The field of view angle twophi is given in degrees. out_of_view_factor is C in the paper. """ def __init__(self, twophi=200.0, out_of_vie...
29.62069
91
0.634459
import numpy as np class FieldOfView(object): def __init__(self, twophi=200.0, out_of_view_factor=0.5): self.cosphi = np.cos(twophi / 2.0 / 180.0 * np.pi) self.out_of_view_factor = out_of_view_factor def __call__(self, e, f): in_sight = np.einsum('aj,abj->ab', e, f) > np.linalg.norm(f...
true
true
f76a23378a4280d3a5b9d0d4abe161b1f9559e22
2,702
py
Python
yuemiao/views.py
yuemiao-web/yuemiao_backend
611d210d8b0396f83e2ad7a2d21ca2d217f38f3d
[ "MIT" ]
30
2021-11-12T08:21:03.000Z
2022-01-31T01:49:15.000Z
yuemiao/views.py
yuemiao-web/yuemiao_backend
611d210d8b0396f83e2ad7a2d21ca2d217f38f3d
[ "MIT" ]
6
2021-09-30T10:55:26.000Z
2022-01-19T02:21:09.000Z
yuemiao/views.py
yuemiao-web/yuemiao_backend
611d210d8b0396f83e2ad7a2d21ca2d217f38f3d
[ "MIT" ]
12
2021-10-01T15:33:50.000Z
2022-03-15T11:53:18.000Z
from miao_backend.exceptions import BusinessException from urllib import parse from apscheduler.triggers.cron import CronTrigger from pytz import timezone from yuemiao.models import SubInfoModel from yuemiao.sub_vac.sub_vac import SubscribeVaccine, requestOrderList from .miao_api.request import requestZMYY from yuemia...
33.358025
98
0.709474
from miao_backend.exceptions import BusinessException from urllib import parse from apscheduler.triggers.cron import CronTrigger from pytz import timezone from yuemiao.models import SubInfoModel from yuemiao.sub_vac.sub_vac import SubscribeVaccine, requestOrderList from .miao_api.request import requestZMYY from yuemia...
true
true
f76a24dcd74d9d7efddf0c8ed3a2fd8c837dca78
1,020
py
Python
orders/migrations/0003_alter_customerorder_city_alter_customerorder_country_and_more.py
Zadigo/mycommerce
145031ebb359389e680a820577a4b6b2d382646d
[ "MIT" ]
null
null
null
orders/migrations/0003_alter_customerorder_city_alter_customerorder_country_and_more.py
Zadigo/mycommerce
145031ebb359389e680a820577a4b6b2d382646d
[ "MIT" ]
null
null
null
orders/migrations/0003_alter_customerorder_city_alter_customerorder_country_and_more.py
Zadigo/mycommerce
145031ebb359389e680a820577a4b6b2d382646d
[ "MIT" ]
null
null
null
# Generated by Django 4.0.1 on 2022-04-20 21:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orders', '0002_alter_customerorder_city_alter_customerorder_country_and_more'), ] operations = [ migrations.AlterField( model_na...
35.172414
207
0.608824
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orders', '0002_alter_customerorder_city_alter_customerorder_country_and_more'), ] operations = [ migrations.AlterField( model_name='customerorder', name='city', ...
true
true
f76a25fd0fcc44fe77a376fc8d580d0647d9da8d
8,594
py
Python
main.py
yanchunyu71/relational-networks-paddle
40fcd55c00d890136f52504d8b73f76ddef6e159
[ "BSD-3-Clause" ]
null
null
null
main.py
yanchunyu71/relational-networks-paddle
40fcd55c00d890136f52504d8b73f76ddef6e159
[ "BSD-3-Clause" ]
null
null
null
main.py
yanchunyu71/relational-networks-paddle
40fcd55c00d890136f52504d8b73f76ddef6e159
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function import argparse import os import pickle import random import numpy as np import csv import paddle from model import RN, CNN_MLP # Training settings parser = argparse.ArgumentParser(description='Paddle Relational-Network sort-of-CLVR Example') parser.add_argument('--model', type...
35.077551
117
0.640912
from __future__ import print_function import argparse import os import pickle import random import numpy as np import csv import paddle from model import RN, CNN_MLP parser = argparse.ArgumentParser(description='Paddle Relational-Network sort-of-CLVR Example') parser.add_argument('--model', type=str, choices=['RN',...
true
true
f76a26facb987a28b48664c94b31f326eafd1d5c
547
py
Python
app/backend/src/couchers/migrations/versions/723394ace6b5_add_filled_contributor_form_to_user.py
thdk/couchers
a4fd514f050c1e75f8a54adbe031506058b5f8fd
[ "MIT" ]
null
null
null
app/backend/src/couchers/migrations/versions/723394ace6b5_add_filled_contributor_form_to_user.py
thdk/couchers
a4fd514f050c1e75f8a54adbe031506058b5f8fd
[ "MIT" ]
null
null
null
app/backend/src/couchers/migrations/versions/723394ace6b5_add_filled_contributor_form_to_user.py
thdk/couchers
a4fd514f050c1e75f8a54adbe031506058b5f8fd
[ "MIT" ]
null
null
null
"""Add filled_contributor_form to user Revision ID: 723394ace6b5 Revises: 27a2782784d0 Create Date: 2021-04-11 11:48:11.170484 """ import geoalchemy2 import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "723394ace6b5" down_revision = "27a2782784d0" branch_labels = None d...
21.88
118
0.765996
import geoalchemy2 import sqlalchemy as sa from alembic import op revision = "723394ace6b5" down_revision = "27a2782784d0" branch_labels = None depends_on = None def upgrade(): op.add_column("users", sa.Column("filled_contributor_form", sa.Boolean(), server_default="false", nullable=False)) def downgrade(): ...
true
true
f76a286ffb94f96c3d66ff107610fcac2bc61bcf
23,288
py
Python
mocalum/persistance.py
niva83/mocalum
5c387197127a81ecc5cda2e4d79b5a33e9f8e31f
[ "BSD-3-Clause" ]
3
2020-05-12T13:48:16.000Z
2020-11-26T14:39:59.000Z
mocalum/persistance.py
niva83/mocalum
5c387197127a81ecc5cda2e4d79b5a33e9f8e31f
[ "BSD-3-Clause" ]
1
2021-08-06T18:39:37.000Z
2021-08-06T18:40:55.000Z
mocalum/persistance.py
niva83/mocalum
5c387197127a81ecc5cda2e4d79b5a33e9f8e31f
[ "BSD-3-Clause" ]
3
2021-01-25T14:54:30.000Z
2021-12-29T11:18:27.000Z
"""This module contains a class which stores data created in the interaction with mocalum. """ import time from . import metadata import numpy as np from numpy.linalg import inv as inv import xarray as xr from tqdm import tqdm from .utils import sliding_window_slicing, bbox_pts_from_array, bbox_pts_from_cfg class Data...
37.621971
88
0.477113
import time from . import metadata import numpy as np from numpy.linalg import inv as inv import xarray as xr from tqdm import tqdm from .utils import sliding_window_slicing, bbox_pts_from_array, bbox_pts_from_cfg class Data: def __init__(self): self.probing = {} self.los = {} self.ffield =...
true
true
f76a28b4a15d7aa203f27993a126767321047bc0
6,421
py
Python
delemmatize_word_list.py
samwhitehall/delemmatize
528b75bc56d3aa30d98ec826bdb090166384a2f2
[ "MIT" ]
null
null
null
delemmatize_word_list.py
samwhitehall/delemmatize
528b75bc56d3aa30d98ec826bdb090166384a2f2
[ "MIT" ]
null
null
null
delemmatize_word_list.py
samwhitehall/delemmatize
528b75bc56d3aa30d98ec826bdb090166384a2f2
[ "MIT" ]
null
null
null
''' De-Lemmatise Word List Given JSON files nouns.json and verbs.json with simple, flat lists of words, create appropriate variants. The relevant PoS transformations are: - NNS: noun (plural) - VBD: verb (past tense) - VBG: verb (present participle) - VBN: verb (past participle) - VBZ: verb (3rd p...
25.279528
77
0.63853
''' De-Lemmatise Word List Given JSON files nouns.json and verbs.json with simple, flat lists of words, create appropriate variants. The relevant PoS transformations are: - NNS: noun (plural) - VBD: verb (past tense) - VBG: verb (present participle) - VBN: verb (past participle) - VBZ: verb (3rd p...
false
true
f76a2940a237332be87ac4dd3ff7e9550de7dd8e
1,280
py
Python
src/poliastro/twobody/mean_elements.py
epassaro/poliastro
19880062af49dbf92147528f1b98de378a3d4e89
[ "MIT" ]
null
null
null
src/poliastro/twobody/mean_elements.py
epassaro/poliastro
19880062af49dbf92147528f1b98de378a3d4e89
[ "MIT" ]
null
null
null
src/poliastro/twobody/mean_elements.py
epassaro/poliastro
19880062af49dbf92147528f1b98de378a3d4e89
[ "MIT" ]
null
null
null
import erfa from astropy import units as u from astropy.coordinates.solar_system import PLAN94_BODY_NAME_TO_PLANET_INDEX from ..constants import J2000 from ..frames import Planes from .states import RVState def get_mean_elements(body, epoch=J2000): """Get ecliptic mean elements of body. Parameters -----...
29.767442
116
0.670313
import erfa from astropy import units as u from astropy.coordinates.solar_system import PLAN94_BODY_NAME_TO_PLANET_INDEX from ..constants import J2000 from ..frames import Planes from .states import RVState def get_mean_elements(body, epoch=J2000): try: name = body.name.lower() i...
true
true
f76a2d2f351f15ddc2c364976c6bc76c19b2067d
3,939
py
Python
shared-data/python/opentrons_shared_data/pipette/dev_types.py
knownmed/opentrons
d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c
[ "Apache-2.0" ]
235
2017-10-27T20:37:27.000Z
2022-03-30T14:09:49.000Z
shared-data/python/opentrons_shared_data/pipette/dev_types.py
knownmed/opentrons
d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c
[ "Apache-2.0" ]
8,425
2017-10-26T15:25:43.000Z
2022-03-31T23:54:26.000Z
shared-data/python/opentrons_shared_data/pipette/dev_types.py
knownmed/opentrons
d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c
[ "Apache-2.0" ]
130
2017-11-09T21:02:37.000Z
2022-03-15T18:01:24.000Z
""" opentrons_shared_data.pipette.dev_types: types for pipette config that require typing_extensions. This module should only be imported if typing.TYPE_CHECKING is True. """ from typing import Dict, List, NewType, Union from typing_extensions import Literal, TypedDict LabwareUri = NewType('LabwareUri', str) # Expl...
30.773438
79
0.75806
from typing import Dict, List, NewType, Union from typing_extensions import Literal, TypedDict LabwareUri = NewType('LabwareUri', str) PipetteName = Union[Literal['p10_single'], Literal['p10_multi'], Literal['p20_single_gen2'], Literal['p20_multi_gen2'], Literal['p50_single'],...
true
true
f76a2d677b033ecb6ce6ebd8a05c48eac74c1ffb
26,758
py
Python
tests/unit/test_response_future.py
datastax/python-driver
5fdb0061f56f53b9d8d8ad67b99110899653ad77
[ "Apache-2.0" ]
1,163
2015-01-01T03:02:05.000Z
2022-03-22T13:04:00.000Z
tests/unit/test_response_future.py
datastax/python-driver
5fdb0061f56f53b9d8d8ad67b99110899653ad77
[ "Apache-2.0" ]
556
2015-01-05T16:39:29.000Z
2022-03-26T20:51:36.000Z
tests/unit/test_response_future.py
datastax/python-driver
5fdb0061f56f53b9d8d8ad67b99110899653ad77
[ "Apache-2.0" ]
449
2015-01-05T10:28:59.000Z
2022-03-14T23:15:32.000Z
# Copyright DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
42.138583
174
0.679834
try: import unittest2 as unittest except ImportError: import unittest from collections import deque from threading import RLock from mock import Mock, MagicMock, ANY from cassandra import ConsistencyLevel, Unavailable, SchemaTargetType, SchemaChangeType, OperationTimedOut from cassandra.cluster import Sessio...
true
true
f76a2d692ff2bc3d8334f3fb4e54a27a15288f55
746
py
Python
vxmessenger/webapp/tests/test_webapp.py
praekeltfoundation/vumi-messenger
69dd7d00fc573b241f3fdb8b5333a735c40ca498
[ "BSD-3-Clause" ]
1
2016-11-16T06:38:29.000Z
2016-11-16T06:38:29.000Z
vxmessenger/webapp/tests/test_webapp.py
praekeltfoundation/vumi-messenger
69dd7d00fc573b241f3fdb8b5333a735c40ca498
[ "BSD-3-Clause" ]
10
2016-04-16T07:29:57.000Z
2017-06-21T09:01:29.000Z
vxmessenger/webapp/tests/test_webapp.py
praekeltfoundation/vumi-messenger
69dd7d00fc573b241f3fdb8b5333a735c40ca498
[ "BSD-3-Clause" ]
2
2016-04-20T19:15:45.000Z
2017-01-09T07:37:42.000Z
from urllib import urlencode from django.test import TestCase from django.core.urlresolvers import reverse class DefaultTestCase(TestCase): def test_challenge(self): response = self.client.get( '%s?%s' % (reverse('challenge'), urlencode({ 'hub.challenge': 'challenge', ...
31.083333
57
0.624665
from urllib import urlencode from django.test import TestCase from django.core.urlresolvers import reverse class DefaultTestCase(TestCase): def test_challenge(self): response = self.client.get( '%s?%s' % (reverse('challenge'), urlencode({ 'hub.challenge': 'challenge', ...
true
true
f76a2d8ea4205867f581323473ee4e9ff9d30fa6
3,957
py
Python
pipelines/training_pipeline.py
PolSl-PBL-7/DragonEye
13ba314809e62ec1118756a00453a7e175df4329
[ "MIT" ]
2
2021-11-17T17:08:24.000Z
2021-12-15T10:00:40.000Z
pipelines/training_pipeline.py
PolSl-PBL-7/DragonEye
13ba314809e62ec1118756a00453a7e175df4329
[ "MIT" ]
16
2021-11-06T19:24:06.000Z
2022-02-06T20:31:48.000Z
pipelines/training_pipeline.py
PolSl-PBL-7/DragonEye
13ba314809e62ec1118756a00453a7e175df4329
[ "MIT" ]
null
null
null
NAME = "training_pipeline" def training_pipeline( pipeline_params: dict, compile_params: dict, model_params: dict, source_params: dict, training_params: dict, data_processing_pipeline_params: dict = None, versioner_params: dict = None, processor_params: dict = None, sink_params...
36.981308
159
0.681324
NAME = "training_pipeline" def training_pipeline( pipeline_params: dict, compile_params: dict, model_params: dict, source_params: dict, training_params: dict, data_processing_pipeline_params: dict = None, versioner_params: dict = None, processor_params: dict = None, sink_params...
true
true
f76a2d907a0ee7666b3c008ee83737a79bf4443e
20,454
py
Python
mvsnet/cnn_wrapper/network.py
ubiquity6/MVSNet
7dc026acb019d270e79de7be4a5cfcb33863127f
[ "MIT" ]
7
2019-07-15T08:49:38.000Z
2019-11-30T01:09:12.000Z
mvsnet/cnn_wrapper/network.py
ubiquity6/MVSNet
7dc026acb019d270e79de7be4a5cfcb33863127f
[ "MIT" ]
10
2019-07-17T00:00:29.000Z
2022-03-11T23:50:36.000Z
mvsnet/cnn_wrapper/network.py
ubiquity6/MVSNet
7dc026acb019d270e79de7be4a5cfcb33863127f
[ "MIT" ]
3
2019-08-02T09:06:32.000Z
2021-07-06T11:49:55.000Z
#!/usr/bin/env python """ Copyright 2019, Zixin Luo & Yao Yao, HKUST. CNN layer wrapper. Please be noted that the center and scale paramter are disabled by default for all BN / GN layers """ from __future__ import print_function import os import sys import numpy as np import tensorflow as tf from mvsnet.cnn_wrapper...
38.018587
110
0.516965
from __future__ import print_function import os import sys import numpy as np import tensorflow as tf from mvsnet.cnn_wrapper.common import Notify DEFAULT_PADDING = 'SAME' def layer(op): def layer_decorated(self, *args, **kwargs): if self.inputs is None or (len(args) > 0 and isinstance(args[0...
true
true
f76a2d976c59231ae51e77da0f98b5fed07af115
5,262
py
Python
zerver/webhooks/basecamp/view.py
DD2480-group7-2020/zulip
9a1e18bcf383c38c35da168563a7345768c6d784
[ "Apache-2.0" ]
1
2020-03-17T14:58:50.000Z
2020-03-17T14:58:50.000Z
zerver/webhooks/basecamp/view.py
DD2480-group7-2020/zulip
9a1e18bcf383c38c35da168563a7345768c6d784
[ "Apache-2.0" ]
2
2020-09-07T22:32:24.000Z
2021-05-08T18:17:53.000Z
zerver/webhooks/basecamp/view.py
DD2480-group7-2020/zulip
9a1e18bcf383c38c35da168563a7345768c6d784
[ "Apache-2.0" ]
1
2020-07-16T06:00:10.000Z
2020-07-16T06:00:10.000Z
import re import string from typing import Any, Dict from django.http import HttpRequest, HttpResponse from zerver.decorator import api_key_only_webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.lib.webhooks.common import UnexpectedWebhookE...
37.856115
93
0.699734
import re import string from typing import Any, Dict from django.http import HttpRequest, HttpResponse from zerver.decorator import api_key_only_webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.lib.webhooks.common import UnexpectedWebhookE...
true
true
f76a3019eac159dd9b8a33dd86d9031b9a021aa7
719
py
Python
Exp_Main/migrations/0012_auto_20210529_1223.py
ag-gipp/Electronic-Laboratory-Notebook
db0ab92bf81473484e84775f73a92a03b6e61c57
[ "Apache-2.0" ]
null
null
null
Exp_Main/migrations/0012_auto_20210529_1223.py
ag-gipp/Electronic-Laboratory-Notebook
db0ab92bf81473484e84775f73a92a03b6e61c57
[ "Apache-2.0" ]
null
null
null
Exp_Main/migrations/0012_auto_20210529_1223.py
ag-gipp/Electronic-Laboratory-Notebook
db0ab92bf81473484e84775f73a92a03b6e61c57
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.3 on 2021-05-29 10:23 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Exp_Main', '0011_auto_20210517_1944'), ] operations = [ migrations.AlterField( model_name='liquid'...
28.76
122
0.585535
import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Exp_Main', '0011_auto_20210517_1944'), ] operations = [ migrations.AlterField( model_name='liquid', name='Born', field=mo...
true
true
f76a30608f2d1dbacfd1a6ab4d9a9bb6c9c97b66
18,144
py
Python
test/functional/test_framework/comptool.py
PIVXLITE/PivxLite
838000d7284190b17ad58742d321769ef8d7e0e8
[ "MIT" ]
null
null
null
test/functional/test_framework/comptool.py
PIVXLITE/PivxLite
838000d7284190b17ad58742d321769ef8d7e0e8
[ "MIT" ]
null
null
null
test/functional/test_framework/comptool.py
PIVXLITE/PivxLite
838000d7284190b17ad58742d321769ef8d7e0e8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Compare two or more pivxlds to each other. To use, create a class that implements get_tests(), and pas...
45.58794
146
0.60356
from .mininode import * from .blockstore import BlockStore, TxStore from .util import p2p_port, wait_until import logging logger=logging.getLogger("TestFramework.comptool") global mininode_lock class RejectResult(): def __init__(self, code, reason=b''): self.code = code self.reason = reason ...
true
true
f76a306b81d73c83e3c9a9d9f05bdf9a24bebea3
1,265
py
Python
venv/Lib/site-packages/openpyxl/chartsheet/protection.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
26
2021-01-22T08:40:45.000Z
2022-03-19T12:09:39.000Z
venv/Lib/site-packages/openpyxl/chartsheet/protection.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
11
2020-06-06T01:28:35.000Z
2022-03-12T00:16:34.000Z
venv/Lib/site-packages/openpyxl/chartsheet/protection.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
12
2021-04-06T02:32:20.000Z
2022-03-21T16:30:29.000Z
import hashlib from openpyxl.descriptors import (Bool, Integer, String) from openpyxl.descriptors.excel import Base64Binary from openpyxl.descriptors.serialisable import Serialisable from openpyxl.worksheet.protection import ( hash_password, _Protected ) class ChartsheetProtection(Serialisable, _Protected):...
30.119048
106
0.64585
import hashlib from openpyxl.descriptors import (Bool, Integer, String) from openpyxl.descriptors.excel import Base64Binary from openpyxl.descriptors.serialisable import Serialisable from openpyxl.worksheet.protection import ( hash_password, _Protected ) class ChartsheetProtection(Serialisable, _Protected):...
true
true
f76a306be80053090818c50467429b25e18d037b
7,593
py
Python
mmdet/models/utils/vertex_util.py
abcxs/polyrnn
92eee689fe62585529deb1c44fbf1c889f414fa2
[ "Apache-2.0" ]
4
2021-06-01T08:33:56.000Z
2022-02-12T14:54:09.000Z
mmdet/models/utils/vertex_util.py
abcxs/polyrnn
92eee689fe62585529deb1c44fbf1c889f414fa2
[ "Apache-2.0" ]
null
null
null
mmdet/models/utils/vertex_util.py
abcxs/polyrnn
92eee689fe62585529deb1c44fbf1c889f414fa2
[ "Apache-2.0" ]
1
2021-06-01T08:34:00.000Z
2021-06-01T08:34:00.000Z
import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule, xavier_init from mmcv.cnn.bricks import NonLocal2d from .builder import MODULE_UTIL class Bottleneck(nn.Module): def __init__(self, in_channels, mid_channels, dila...
35.816038
155
0.569867
import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule, xavier_init from mmcv.cnn.bricks import NonLocal2d from .builder import MODULE_UTIL class Bottleneck(nn.Module): def __init__(self, in_channels, mid_channels, dila...
true
true
f76a30dabd039d8d362d16fbfb8460cb1df2b9c2
4,628
py
Python
plugins/modules/env_proxy_info.py
nmarian85/cloudera.cloud
817fc1a5400c1f43614c886bce1770076c1e91d1
[ "Apache-2.0" ]
11
2021-05-05T19:44:14.000Z
2021-08-23T20:22:55.000Z
plugins/modules/env_proxy_info.py
nmarian85/cloudera.cloud
817fc1a5400c1f43614c886bce1770076c1e91d1
[ "Apache-2.0" ]
19
2021-05-18T11:02:05.000Z
2022-03-19T17:25:56.000Z
plugins/modules/env_proxy_info.py
nmarian85/cloudera.cloud
817fc1a5400c1f43614c886bce1770076c1e91d1
[ "Apache-2.0" ]
18
2021-05-05T17:29:49.000Z
2022-02-10T10:46:54.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2021 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LIC...
28.745342
135
0.651469
from ansible.module_utils.basic import AnsibleModule from ansible_collections.cloudera.cloud.plugins.module_utils.cdp_common import CdpModule ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: en...
true
true
f76a3186b134b816305d888c652927ce0ee0e34a
15,765
py
Python
baadalinstallation/baadal/modules/container_create.py
iitd-plos/baadal2.0
0496a8ddb5c0620f3448f018ba48b080b96cbe61
[ "Apache-2.0" ]
8
2017-01-30T17:40:18.000Z
2022-02-07T19:37:32.000Z
baadalinstallation/baadal/modules/container_create.py
iitd-plos/baadal2.0
0496a8ddb5c0620f3448f018ba48b080b96cbe61
[ "Apache-2.0" ]
null
null
null
baadalinstallation/baadal/modules/container_create.py
iitd-plos/baadal2.0
0496a8ddb5c0620f3448f018ba48b080b96cbe61
[ "Apache-2.0" ]
7
2016-11-08T13:38:10.000Z
2019-11-26T04:33:17.000Z
from cont_handler import Container ,addip from gluon import current from helper import get_context_path, get_docker_daemon_address, \ get_nginx_server_address, log_exception , config from images import getImageProfile from log_handler import logger import docker import os import random import remote_vm_task as remo...
38.830049
299
0.606216
from cont_handler import Container ,addip from gluon import current from helper import get_context_path, get_docker_daemon_address, \ get_nginx_server_address, log_exception , config from images import getImageProfile from log_handler import logger import docker import os import random import remote_vm_task as remo...
true
true
f76a31b992c49fdb95b5c42a39b282e59c162d91
12,720
py
Python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_table_services_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_table_services_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_table_services_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.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 ...
51.497976
222
0.684984
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.cor...
true
true
f76a31c0812bdcb07880cd8e3bb931ebd1e25950
258
py
Python
graph.py
WEB-PT3-Team-8/Graph
50ed026d07bb46588c6db10f6e88ab16382a72f2
[ "MIT" ]
null
null
null
graph.py
WEB-PT3-Team-8/Graph
50ed026d07bb46588c6db10f6e88ab16382a72f2
[ "MIT" ]
null
null
null
graph.py
WEB-PT3-Team-8/Graph
50ed026d07bb46588c6db10f6e88ab16382a72f2
[ "MIT" ]
null
null
null
import json with open('graph.json') as json_file: data = json.load(json_file) print(f"data length: {len(data)}") for room in data: if data[room]['title'] != 'A misty room': print(f"room: {room}, title: {data[room]['title']}")
32.25
64
0.589147
import json with open('graph.json') as json_file: data = json.load(json_file) print(f"data length: {len(data)}") for room in data: if data[room]['title'] != 'A misty room': print(f"room: {room}, title: {data[room]['title']}")
true
true
f76a3283f2f81880fce5cd8b8fa4fc46434fd165
7,067
py
Python
python/paddle/fluid/contrib/layers/metric_op.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
17,085
2016-11-18T06:40:52.000Z
2022-03-31T22:52:32.000Z
python/paddle/fluid/contrib/layers/metric_op.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
29,769
2016-11-18T06:35:22.000Z
2022-03-31T16:46:15.000Z
python/paddle/fluid/contrib/layers/metric_op.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
4,641
2016-11-18T07:43:33.000Z
2022-03-31T15:15:02.000Z
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
37.391534
95
0.636904
from __future__ import print_function import warnings from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.initializer import Normal, Constant from paddle.fluid.framework import Variable from paddle.fluid.param_attr import ParamAttr from paddle.fluid.layers import nn __all__ = ['ctr_metric_bundle'] ...
true
true
f76a34a91fc136288f1ec469976bb1d15734d7a8
2,941
py
Python
rllib/examples/serving/cartpole_server.py
Crissman/ray
2092b097eab41b118a117fdfadd0fe664db41f63
[ "Apache-2.0" ]
1
2021-11-30T15:06:24.000Z
2021-11-30T15:06:24.000Z
rllib/examples/serving/cartpole_server.py
h453693821/ray
9eb79727aa6ad94b01f8b660b83e1182555a89f6
[ "Apache-2.0" ]
84
2021-03-06T08:02:56.000Z
2022-03-05T08:07:19.000Z
rllib/examples/serving/cartpole_server.py
h453693821/ray
9eb79727aa6ad94b01f8b660b83e1182555a89f6
[ "Apache-2.0" ]
1
2020-01-16T20:52:25.000Z
2020-01-16T20:52:25.000Z
#!/usr/bin/env python """Example of running a policy server. Copy this file for your use case. To try this out, in two separate shells run: $ python cartpole_server.py $ python cartpole_client.py --inference-mode=local|remote """ import argparse import os import ray from ray.rllib.agents.dqn import DQNTraine...
33.420455
79
0.635498
import argparse import os import ray from ray.rllib.agents.dqn import DQNTrainer from ray.rllib.agents.ppo import PPOTrainer from ray.rllib.env.policy_server_input import PolicyServerInput from ray.rllib.examples.custom_metrics_and_callbacks import MyCallbacks from ray.tune.logger import pretty_print SERVER_ADDRESS ...
true
true
f76a34f983a02d1d879bbc45103dce17db455b70
2,355
py
Python
commands/shooter/aimshootertotarget.py
1757WestwoodRobotics/2022-RapidReact
b6d9cf203fd35e93dc5d26ba2d6889e2a9edb137
[ "MIT" ]
1
2022-01-21T22:00:24.000Z
2022-01-21T22:00:24.000Z
commands/shooter/aimshootertotarget.py
1757WestwoodRobotics/2022-RapidReact
b6d9cf203fd35e93dc5d26ba2d6889e2a9edb137
[ "MIT" ]
40
2022-01-18T21:20:54.000Z
2022-03-31T20:56:44.000Z
commands/shooter/aimshootertotarget.py
1757WestwoodRobotics/2022-RapidReact
b6d9cf203fd35e93dc5d26ba2d6889e2a9edb137
[ "MIT" ]
1
2022-01-28T02:46:38.000Z
2022-01-28T02:46:38.000Z
from commands2 import CommandBase from wpilib import SmartDashboard from wpimath.geometry import Rotation2d, Pose2d, Transform2d from subsystems.shootersubsystem import ShooterSubsystem import constants from util.angleoptimize import optimizeAngle from util.convenientmath import rotationFromTranslation class AimShoo...
42.818182
96
0.654777
from commands2 import CommandBase from wpilib import SmartDashboard from wpimath.geometry import Rotation2d, Pose2d, Transform2d from subsystems.shootersubsystem import ShooterSubsystem import constants from util.angleoptimize import optimizeAngle from util.convenientmath import rotationFromTranslation class AimShoo...
true
true
f76a357ed18ce8ede9f0d91989a3f8271ef14a72
4,301
py
Python
modules/meme.py
jvicu2001/alexis-bot
6b10377e3ec61aaa6051220ae9684b2f8f73b36e
[ "MIT" ]
7
2017-05-01T01:06:02.000Z
2017-09-07T18:58:37.000Z
modules/meme.py
jvicu2001/alexis-bot
6b10377e3ec61aaa6051220ae9684b2f8f73b36e
[ "MIT" ]
67
2017-12-03T21:38:00.000Z
2022-03-11T23:14:11.000Z
modules/meme.py
jvicu2001/alexis-bot
6b10377e3ec61aaa6051220ae9684b2f8f73b36e
[ "MIT" ]
8
2017-05-01T01:06:07.000Z
2017-09-16T10:34:19.000Z
from io import BytesIO from PIL import Image, ImageFont, ImageDraw from discord import File from bot import Command, categories from bot.regex import pat_usertag from bot.utils import download furl = 'https://github.com/sophilabs/macgifer/raw/master/static/font/impact.ttf' class Meme(Command): __author__ = 'mak...
35.254098
104
0.574285
from io import BytesIO from PIL import Image, ImageFont, ImageDraw from discord import File from bot import Command, categories from bot.regex import pat_usertag from bot.utils import download furl = 'https://github.com/sophilabs/macgifer/raw/master/static/font/impact.ttf' class Meme(Command): __author__ = 'mak...
true
true
f76a3583cb21bfd281665963b3e29c760706923e
1,232
py
Python
iptvtools/parsers.py
haleez/iptvtools
9d6478fb88e92dd32b2e0831c8f43f4916c3f036
[ "MIT" ]
2
2020-02-15T05:55:43.000Z
2020-02-15T05:55:45.000Z
iptvtools/parsers.py
haleez/iptvtools
9d6478fb88e92dd32b2e0831c8f43f4916c3f036
[ "MIT" ]
null
null
null
iptvtools/parsers.py
haleez/iptvtools
9d6478fb88e92dd32b2e0831c8f43f4916c3f036
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: parser.py Author: huxuan Email: i(at)huxuan.org Description: Simplified parser for m3u8 file. """ from urllib.request import urlopen import os.path from .constants import patterns def parse_content_to_lines(content): """Universal interface to split content ...
25.142857
68
0.68263
from urllib.request import urlopen import os.path from .constants import patterns def parse_content_to_lines(content): if os.path.isfile(content): return _parse_from_file(content) return _parse_from_url(content) def parse_tag_inf(line): match = patterns.EXTINF.fullmatch(line) res = match.gr...
true
true
f76a359db527f7ed27cecf858854f9b2c78fd1d7
2,579
py
Python
versions/v0.40s/client.py
4stropotato/pwned-by
51603991ec14d7e722e2eff915e1d24cadda986a
[ "MIT" ]
5
2021-09-23T07:02:53.000Z
2022-02-20T23:44:08.000Z
versions/v0.40s/client.py
4stropotato/pwned-by
51603991ec14d7e722e2eff915e1d24cadda986a
[ "MIT" ]
null
null
null
versions/v0.40s/client.py
4stropotato/pwned-by
51603991ec14d7e722e2eff915e1d24cadda986a
[ "MIT" ]
null
null
null
# Day 8 - The Json Module import socket import json import time # 12 def ip_address(): global server_ip serv_ip = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) serv_ip.connect(("8.8.8.8", 80)) server_ip = serv_ip.getsockname()[0] serv_ip.close() return server_ip ######################## s...
26.587629
142
0.59558
import socket import json import time def ip_address(): global server_ip serv_ip = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) serv_ip.connect(("8.8.8.8", 80)) server_ip = serv_ip.getsockname()[0] serv_ip.close() return server_ip server_ip = ip_address() server_port = 5555 def json...
true
true
f76a36c9dfb336af82e08a0d096259017ff6e488
2,507
py
Python
pythonRestServer.py
daltonos/SimpleServerWrike
f82d277f153e79e0afbcf97943c89eecaed7836c
[ "MIT" ]
1
2018-06-14T13:35:07.000Z
2018-06-14T13:35:07.000Z
pythonRestServer.py
daltonos/SimpleServerWrike
f82d277f153e79e0afbcf97943c89eecaed7836c
[ "MIT" ]
null
null
null
pythonRestServer.py
daltonos/SimpleServerWrike
f82d277f153e79e0afbcf97943c89eecaed7836c
[ "MIT" ]
null
null
null
from http.server import BaseHTTPRequestHandler, HTTPServer import socketserver import simplejson import random # YOU'll NEED TO KEEP THIS SERVER UP AND RUNNING AT ALL TIMES ON YOUR SERVER COMPUTER IN YOUR COMPANY # you can test this script with postman, chrome, curl, and a terminal # but in order to make it work for r...
36.333333
139
0.682888
from http.server import BaseHTTPRequestHandler, HTTPServer import socketserver import simplejson import random # you can test this script with postman, chrome, curl, and a terminal # but in order to make it work for real you will have to register a url of your own on wrike later # 1. REGISTER your endpoint URL by doi...
true
true
f76a36ec0b1830bcfe6367075758e4b822f7f1ba
8,228
py
Python
ubteacher/data/datasets/builtin.py
WdBlink/Teacher-Student-Faster-Rcnn
df8085c61e334abb04bab5e8192de8cb4ce2b2af
[ "MIT" ]
null
null
null
ubteacher/data/datasets/builtin.py
WdBlink/Teacher-Student-Faster-Rcnn
df8085c61e334abb04bab5e8192de8cb4ce2b2af
[ "MIT" ]
null
null
null
ubteacher/data/datasets/builtin.py
WdBlink/Teacher-Student-Faster-Rcnn
df8085c61e334abb04bab5e8192de8cb4ce2b2af
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import os import contextlib from detectron2.data import DatasetCatalog, MetadataCatalog from fvcore.common.timer import Timer from fvcore.common.file_io import PathManager import io import logging from detectron2.data.datasets.cityscapes import load...
38.629108
110
0.658119
import os import contextlib from detectron2.data import DatasetCatalog, MetadataCatalog from fvcore.common.timer import Timer from fvcore.common.file_io import PathManager import io import logging from detectron2.data.datasets.cityscapes import load_cityscapes_instances, load_cityscapes_semantic from detectron2.data.da...
true
true
f76a37d0398a3a72d75729aba79c968b0211d503
1,545
py
Python
voc_annotation.py
xwgfree/pytorch_yolov3_car_type
9cf9c41f89cc3ee1701a1085af061548836a9d69
[ "MIT" ]
null
null
null
voc_annotation.py
xwgfree/pytorch_yolov3_car_type
9cf9c41f89cc3ee1701a1085af061548836a9d69
[ "MIT" ]
null
null
null
voc_annotation.py
xwgfree/pytorch_yolov3_car_type
9cf9c41f89cc3ee1701a1085af061548836a9d69
[ "MIT" ]
1
2022-03-15T06:49:44.000Z
2022-03-15T06:49:44.000Z
import xml.etree.ElementTree as ET from os import getcwd sets=[('2007', 'train'), ('2007', 'val'), ('2007', 'test')] wd = getcwd() # classes = ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "...
45.441176
207
0.620065
import xml.etree.ElementTree as ET from os import getcwd sets=[('2007', 'train'), ('2007', 'val'), ('2007', 'test')] wd = getcwd() classes = ["jeep", "bus", "familysedan", "taxi", "racingcar", "fireengine", "heavytruck"] def convert_annotation(year, image_id, list_file): in_file = open('VOCdevkit/VOC%s/Annotation...
true
true
f76a38911b27824792ccfcf5f5894d30dea92993
2,763
py
Python
src/vocab_learn.py
Eno-Gerguri/Active-Learn-Bot
d83b8bc9df821608d31974ea831713144a96ca3b
[ "MIT" ]
null
null
null
src/vocab_learn.py
Eno-Gerguri/Active-Learn-Bot
d83b8bc9df821608d31974ea831713144a96ca3b
[ "MIT" ]
null
null
null
src/vocab_learn.py
Eno-Gerguri/Active-Learn-Bot
d83b8bc9df821608d31974ea831713144a96ca3b
[ "MIT" ]
null
null
null
from selenium import webdriver from selenium.common.exceptions import StaleElementReferenceException, ElementNotInteractableException, \ ElementClickInterceptedException, NoSuchElementException, NoSuchWindowException from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait...
47.637931
115
0.666667
from selenium import webdriver from selenium.common.exceptions import StaleElementReferenceException, ElementNotInteractableException, \ ElementClickInterceptedException, NoSuchElementException, NoSuchWindowException from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait...
true
true
f76a38d0192b886a351dd008a5fc8e24d2c9dbaa
484
py
Python
todoList/migrations/0001_initial.py
deep4788/todoListApp
525c505ca6c78368e98e1fb44c1f65b78f08da91
[ "MIT" ]
2
2016-10-17T16:26:50.000Z
2016-10-17T16:27:59.000Z
todoList/migrations/0001_initial.py
deep4788/todoListApp
525c505ca6c78368e98e1fb44c1f65b78f08da91
[ "MIT" ]
null
null
null
todoList/migrations/0001_initial.py
deep4788/todoListApp
525c505ca6c78368e98e1fb44c1f65b78f08da91
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Task', fields=[ ('id', models.AutoField(verbose...
23.047619
114
0.582645
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Task', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=Fa...
true
true
f76a3928e315a59961e2a7bb0a3d65a171719223
277
py
Python
tests/artificial/transf_RelativeDifference/trend_MovingMedian/cycle_5/ar_/test_artificial_1024_RelativeDifference_MovingMedian_5__20.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/artificial/transf_RelativeDifference/trend_MovingMedian/cycle_5/ar_/test_artificial_1024_RelativeDifference_MovingMedian_5__20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/artificial/transf_RelativeDifference/trend_MovingMedian/cycle_5/ar_/test_artificial_1024_RelativeDifference_MovingMedian_5__20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 5, transform = "RelativeDifference", sigma = 0.0, exog_count = 20, ar_order = 0);
39.571429
177
0.743682
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 5, transform = "RelativeDifference", sigma = 0.0, exog_count = 20, ar_order = 0);
true
true
f76a3a76c24cabfa43b7552187725945a1982498
6,002
py
Python
src/roslaunch2/utils.py
CodeFinder2/roslaunch2
5c2aa58129671647aa8e5cbc0541caf280accffb
[ "BSD-3-Clause" ]
10
2019-11-19T12:35:30.000Z
2022-01-16T15:59:44.000Z
src/roslaunch2/utils.py
CodeFinder2/roslaunch2
5c2aa58129671647aa8e5cbc0541caf280accffb
[ "BSD-3-Clause" ]
1
2022-01-11T09:30:36.000Z
2022-02-07T22:03:36.000Z
src/roslaunch2/utils.py
CodeFinder2/roslaunch2
5c2aa58129671647aa8e5cbc0541caf280accffb
[ "BSD-3-Clause" ]
3
2019-08-01T08:50:00.000Z
2021-05-02T01:27:47.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Adrian Böckenkamp # License: BSD (https://opensource.org/licenses/BSD-3-Clause) # Date: 13/03/2018 import string import random import os import itertools import errno #: Separator for communication (topic, services) and tf (frame) names ROS_NAME_SEP = '/' ...
36.156627
118
0.671776
import string import random import os import itertools import errno ROS_NAME_SEP = '/' def anon(length=6): def id_gen(size, chars=string.ascii_uppercase + string.ascii_lowercase + string.digits): return ''.join(random.choice(chars) for _ in range(size)) return "{0}{1}".format(id_gen(1, char...
true
true
f76a3b1df5dbd06afed346be442a840b389ed632
8,092
py
Python
notebooks/samples/tensorflow/sentiment_analysis/dataflow/PubSubToBigQueryWithAIPlatform.py
lezh/ai-platform-samples
38abc9c4737b464922ea837fe19c395278476da3
[ "Apache-2.0" ]
418
2019-06-26T05:55:42.000Z
2022-03-31T10:46:57.000Z
notebooks/samples/tensorflow/sentiment_analysis/dataflow/PubSubToBigQueryWithAIPlatform.py
lezh/ai-platform-samples
38abc9c4737b464922ea837fe19c395278476da3
[ "Apache-2.0" ]
362
2019-06-26T20:41:17.000Z
2022-02-10T16:02:16.000Z
notebooks/samples/tensorflow/sentiment_analysis/dataflow/PubSubToBigQueryWithAIPlatform.py
lezh/ai-platform-samples
38abc9c4737b464922ea837fe19c395278476da3
[ "Apache-2.0" ]
229
2019-06-29T17:55:33.000Z
2022-03-14T15:52:58.000Z
# 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 agreed to in writing...
32.239044
89
0.628646
import argparse import datetime import json import logging import numpy as np import os import socket import subprocess import apache_beam as beam import apache_beam.transforms.window as window from apache_beam.io.gcp.bigquery_tools import parse_table_schema_from_json from apache_beam.options.pipeline_options import...
true
true
f76a3bf1b294256e0e46b5250fdd278b0773cccd
1,620
py
Python
cohesity_management_sdk/models/environment_list_protection_sources_enum.py
cohesity/management-sdk-python
867d8c0c40dd317cdb017902c895527da7ae31c0
[ "Apache-2.0" ]
18
2019-09-24T17:35:53.000Z
2022-03-25T08:08:47.000Z
cohesity_management_sdk/models/environment_list_protection_sources_enum.py
cohesity/management-sdk-python
867d8c0c40dd317cdb017902c895527da7ae31c0
[ "Apache-2.0" ]
18
2019-03-29T19:32:29.000Z
2022-01-03T23:16:45.000Z
cohesity_management_sdk/models/environment_list_protection_sources_enum.py
cohesity/management-sdk-python
867d8c0c40dd317cdb017902c895527da7ae31c0
[ "Apache-2.0" ]
16
2019-02-27T06:54:12.000Z
2021-11-16T18:10:24.000Z
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc. class EnvironmentListProtectionSourcesEnum(object): """Implementation of the 'environment_ListProtectionSources' enum. TODO: type enum description here. Attributes: K_VMWARE: TODO: type description here. KSQL: TODO: type description ...
22.816901
70
0.638889
class EnvironmentListProtectionSourcesEnum(object): K_VMWARE = 'kVMware' KSQL = 'kSQL' KVIEW = 'kView' KPUPPETEER = 'kPuppeteer' KPHYSICAL = 'kPhysical' KPURE = 'kPure' KNETAPP = 'kNetapp' KGENERICNAS = 'kGenericNas' K_HYPERV = 'kHyperV' KACROPOLIS = 'kAcropolis' ...
true
true
f76a3c9b9c4b3fb26e9973c854f5ddf8507f3541
13,424
py
Python
MuJoCo/run.py
mosesnah-shared/adaptive-control
dc9504f1f2531a3ed2d16358f28024c4647a09e4
[ "MIT" ]
1
2020-12-05T20:46:39.000Z
2020-12-05T20:46:39.000Z
MuJoCo/run.py
mosesnah-shared/adaptive-control
dc9504f1f2531a3ed2d16358f28024c4647a09e4
[ "MIT" ]
null
null
null
MuJoCo/run.py
mosesnah-shared/adaptive-control
dc9504f1f2531a3ed2d16358f28024c4647a09e4
[ "MIT" ]
null
null
null
""" # ============================================================================= # | Project: Adaptive Controller Example | Title: Python Controller File for Running the adaptive controller simulation | Author: Moses C. Nah | Email: [Moses] mosesnah@mit.edu | Creation Date: Saturda...
49.352941
193
0.500149
import sys import os import re import argparse import datetime import shutil import pickle import numpy as np import cv2 try: import mujoco_py as mjPy except ImportError as e: raise error.DependencyNotInstalled( "{}. (HINT: you need to install mujoco_py, \ ...
true
true
f76a3cd8bf4b29241004a3e917de72d20f84237f
4,673
py
Python
classification/cifar10/cifar_models.py
GranScudetto/TensorflowExamples
25e0f0f973febc8997b75eb512c22d2e85b0788a
[ "MIT" ]
null
null
null
classification/cifar10/cifar_models.py
GranScudetto/TensorflowExamples
25e0f0f973febc8997b75eb512c22d2e85b0788a
[ "MIT" ]
2
2020-04-29T22:24:43.000Z
2020-05-31T21:15:54.000Z
classification/cifar10/cifar_models.py
GranScudetto/TensorflowExamples
25e0f0f973febc8997b75eb512c22d2e85b0788a
[ "MIT" ]
1
2020-04-21T20:59:00.000Z
2020-04-21T20:59:00.000Z
""" Separated File containing all different models implemented Creation Date: May 2020 Creator: GranScudetto """ from tensorflow.keras.layers import Input, Conv2D, BatchNormalization, Activation, Dense from tensorflow.keras.layers import MaxPool2D, Concatenate, Flatten from tensorflow.keras import Model def model_1(...
46.267327
96
0.711106
from tensorflow.keras.layers import Input, Conv2D, BatchNormalization, Activation, Dense from tensorflow.keras.layers import MaxPool2D, Concatenate, Flatten from tensorflow.keras import Model def model_1(input_shape, nb_classes): inp = Input(shape=input_shape) conv_1 = Conv2D(filters=16, kernel_size=(3, 3...
true
true
f76a3d6b0389bf748a0966d3044ee74d7d25e3f7
1,003
py
Python
rlpyt/experiments/scripts/mujoco/qpg/launch/launch_mujoco_sac_serial.py
nirbhayjm/rlpyt
a2741201bbf33f5408306198d220d90f8f7b7250
[ "MIT" ]
null
null
null
rlpyt/experiments/scripts/mujoco/qpg/launch/launch_mujoco_sac_serial.py
nirbhayjm/rlpyt
a2741201bbf33f5408306198d220d90f8f7b7250
[ "MIT" ]
null
null
null
rlpyt/experiments/scripts/mujoco/qpg/launch/launch_mujoco_sac_serial.py
nirbhayjm/rlpyt
a2741201bbf33f5408306198d220d90f8f7b7250
[ "MIT" ]
null
null
null
from rlpyt.utils.launching.affinity import encode_affinity from rlpyt.utils.launching.exp_launcher import run_experiments from rlpyt.utils.launching.variant import VariantLevel, make_variants script = "rlpyt/experiments/scripts/mujoco/qpg/train/mujoco_sac_serial.py" affinity_code = encode_affinity( n_cpu_core=2, ...
28.657143
74
0.762712
from rlpyt.utils.launching.affinity import encode_affinity from rlpyt.utils.launching.exp_launcher import run_experiments from rlpyt.utils.launching.variant import VariantLevel, make_variants script = "rlpyt/experiments/scripts/mujoco/qpg/train/mujoco_sac_serial.py" affinity_code = encode_affinity( n_cpu_core=2, ...
true
true
f76a3db4356c81ffef39b86aa60166f6748fc1ec
1,546
py
Python
tests/parsers/test_cif_filter.py
aiidateam/aiida-codtools
548843c3e4dd74d8e10b56fda742a5837f499b99
[ "MIT" ]
null
null
null
tests/parsers/test_cif_filter.py
aiidateam/aiida-codtools
548843c3e4dd74d8e10b56fda742a5837f499b99
[ "MIT" ]
51
2017-09-13T12:22:03.000Z
2020-04-23T15:10:38.000Z
tests/parsers/test_cif_filter.py
aiidateam/aiida-codtools
548843c3e4dd74d8e10b56fda742a5837f499b99
[ "MIT" ]
7
2018-02-17T11:33:39.000Z
2021-11-24T10:42:35.000Z
# -*- coding: utf-8 -*- # pylint: disable=unused-argument """Tests for the `CifBaseParser`.""" from aiida_codtools.calculations.cif_filter import CifFilterCalculation def test_cif_filter(aiida_profile_clean, fixture_localhost, fixture_calc_job_node, generate_parser): """Test a default `cif_filter` calculation."""...
46.848485
131
0.791721
from aiida_codtools.calculations.cif_filter import CifFilterCalculation def test_cif_filter(aiida_profile_clean, fixture_localhost, fixture_calc_job_node, generate_parser): entry_point_calc_job = 'codtools.cif_filter' entry_point_parser = 'codtools.cif_base' node = fixture_calc_job_node(entry_point_calc_...
true
true
f76a3e8677bd55420270053d0d3135bca7d8542e
2,368
py
Python
generated-libraries/python/netapp/storage_disk/fw_update_status_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
2
2017-03-28T15:31:26.000Z
2018-08-16T22:15:18.000Z
generated-libraries/python/netapp/storage_disk/fw_update_status_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
generated-libraries/python/netapp/storage_disk/fw_update_status_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
from netapp.netapp_object import NetAppObject class FwUpdateStatusInfo(NetAppObject): """ List of disks that are pending updates, but not able to be updated. """ _update_completion = None @property def update_completion(self): """ Estimate for background firmware downlo...
28.53012
95
0.581926
from netapp.netapp_object import NetAppObject class FwUpdateStatusInfo(NetAppObject): _update_completion = None @property def update_completion(self): return self._update_completion @update_completion.setter def update_completion(self, val): if val != None: self.val...
true
true
f76a3f5268d6b8f8422849b006b7d44b6260d462
2,212
py
Python
terra_sdk/key/mnemonic.py
terra-money/terra.py
d66de6bb4d9d78f08ad8ffe05ae72d847fc5099d
[ "MIT" ]
66
2021-10-21T23:29:38.000Z
2022-03-30T15:58:13.000Z
terra_sdk/key/mnemonic.py
terra-money/terra.py
d66de6bb4d9d78f08ad8ffe05ae72d847fc5099d
[ "MIT" ]
50
2021-10-19T06:11:56.000Z
2022-03-31T17:06:57.000Z
terra_sdk/key/mnemonic.py
terra-money/terra.py
d66de6bb4d9d78f08ad8ffe05ae72d847fc5099d
[ "MIT" ]
39
2021-11-07T17:28:31.000Z
2022-03-31T15:03:57.000Z
from __future__ import annotations from bip32utils import BIP32_HARDEN, BIP32Key from mnemonic import Mnemonic from .raw import RawKey __all__ = ["MnemonicKey", "LUNA_COIN_TYPE"] LUNA_COIN_TYPE = 330 class MnemonicKey(RawKey): """A MnemonicKey derives a private key using a BIP39 mnemonic seed phrase, and prov...
29.493333
151
0.618445
from __future__ import annotations from bip32utils import BIP32_HARDEN, BIP32Key from mnemonic import Mnemonic from .raw import RawKey __all__ = ["MnemonicKey", "LUNA_COIN_TYPE"] LUNA_COIN_TYPE = 330 class MnemonicKey(RawKey): mnemonic: str account: int index: int coin_type: int @property...
true
true
f76a405ef506970ad697d039e8c42a2941a38bf3
1,377
py
Python
config/Config.py
mfigueras11/expertsystem
8c4fb50737fd189caa3a5baf56f768ff159480a6
[ "MIT" ]
null
null
null
config/Config.py
mfigueras11/expertsystem
8c4fb50737fd189caa3a5baf56f768ff159480a6
[ "MIT" ]
null
null
null
config/Config.py
mfigueras11/expertsystem
8c4fb50737fd189caa3a5baf56f768ff159480a6
[ "MIT" ]
null
null
null
# **************************************************************************** # # # # ::: :::::::: # # Config.py :+: :+: :+: ...
31.295455
80
0.251997
class Config(): literals = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" l_bracket = '(' r_bracket = ')' query = '?' fact = '=' implication = '=>' subst_impl = '>' iff = '<=>' subst_iff = '%' subst_symbols = subst_impl + subst_iff op_xor = '^' op_or = '|' op_and ...
true
true
f76a4077f73c693c1180f49671612b754498fcf1
6,186
py
Python
tests/unit/states/test_environ.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
1
2020-04-09T03:25:10.000Z
2020-04-09T03:25:10.000Z
tests/unit/states/test_environ.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
null
null
null
tests/unit/states/test_environ.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Import python libs from __future__ import absolute_import, print_function, unicode_literals import os import salt.modules.environ as envmodule import salt.modules.reg # Import salt libs import salt.states.environ as envstate import salt.utils.platform # Import Salt Testing libs from tests...
37.719512
87
0.587132
from __future__ import absolute_import, print_function, unicode_literals import os import salt.modules.environ as envmodule import salt.modules.reg import salt.states.environ as envstate import salt.utils.platform from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import MagicMock, patc...
true
true
f76a4183ab7dc469c34f4a6de0d5ac2f35803e12
2,205
bzl
Python
repositories.maven.bzl
parampavar/copybara
604c015146b7c18b55177b859cd538f81b775d51
[ "Apache-2.0" ]
null
null
null
repositories.maven.bzl
parampavar/copybara
604c015146b7c18b55177b859cd538f81b775d51
[ "Apache-2.0" ]
null
null
null
repositories.maven.bzl
parampavar/copybara
604c015146b7c18b55177b859cd538f81b775d51
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
42.403846
82
0.622676
load("@rules_jvm_external//:defs.bzl", "DEFAULT_REPOSITORY_NAME", "maven_install") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") def copybara_maven_repositories(): maybe( maven_install, name = DEFAULT_REPOSITORY_NAME, artifacts = [ "com.google.auto.value:auto-v...
true
true
f76a4222899407dd787dc8fb86a4b8edbbf193b4
6,600
py
Python
nssrc/com/citrix/netscaler/nitro/resource/config/network/ipset_nsip_binding.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
nssrc/com/citrix/netscaler/nitro/resource/config/network/ipset_nsip_binding.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
nssrc/com/citrix/netscaler/nitro/resource/config/network/ipset_nsip_binding.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2021 Citrix Systems, 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...
30.136986
120
0.717727
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro...
true
true
f76a42263efefee09bcaac052ca3d12ee384ecb9
100
py
Python
core/template.py
ssakone/Flaty
cbfeba323c8c15bb276082eaa6cd823f32f3b7fb
[ "MIT" ]
null
null
null
core/template.py
ssakone/Flaty
cbfeba323c8c15bb276082eaa6cd823f32f3b7fb
[ "MIT" ]
null
null
null
core/template.py
ssakone/Flaty
cbfeba323c8c15bb276082eaa6cd823f32f3b7fb
[ "MIT" ]
null
null
null
CLASS_TEMPLATE = """\ class {}(Model): {} \tclass Meta: \t\tdatabase = db modelList['{}'] = {} """
12.5
21
0.55
CLASS_TEMPLATE = """\ class {}(Model): {} \tclass Meta: \t\tdatabase = db modelList['{}'] = {} """
true
true
f76a422980b5ade6125f2610119eeb8bf1e4e292
243
py
Python
desktop/core/ext-py/requests-kerberos-0.6.1/requests_kerberos/exceptions.py
kokosing/hue
2307f5379a35aae9be871e836432e6f45138b3d9
[ "Apache-2.0" ]
11
2019-03-20T07:38:35.000Z
2021-06-18T09:42:46.000Z
desktop/core/ext-py/requests-kerberos-0.6.1/requests_kerberos/exceptions.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
4
2021-03-11T04:02:00.000Z
2022-03-27T08:31:56.000Z
desktop/core/ext-py/requests-kerberos-0.6.1/requests_kerberos/exceptions.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
5
2019-06-29T03:13:02.000Z
2020-04-23T04:47:11.000Z
""" requests_kerberos.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of exceptions. """ from requests.exceptions import RequestException class MutualAuthenticationError(RequestException): """Mutual Authentication Error"""
18.692308
50
0.73251
from requests.exceptions import RequestException class MutualAuthenticationError(RequestException):
true
true
f76a42d6b6dd5cc38b5dbf502c3d5ec7f3af3bff
454
py
Python
.github/workflows/eo-language-tests/python/retrieve-runtime-tests-matrix.py
jizzel/eo_hse
b8dcdb762aaa94843af54e7068f8beb13ad5cbdb
[ "MIT" ]
1
2021-07-02T12:55:51.000Z
2021-07-02T12:55:51.000Z
.github/workflows/eo-language-tests/python/retrieve-runtime-tests-matrix.py
jizzel/eo_hse
b8dcdb762aaa94843af54e7068f8beb13ad5cbdb
[ "MIT" ]
null
null
null
.github/workflows/eo-language-tests/python/retrieve-runtime-tests-matrix.py
jizzel/eo_hse
b8dcdb762aaa94843af54e7068f8beb13ad5cbdb
[ "MIT" ]
4
2021-07-02T12:55:55.000Z
2021-08-19T03:46:34.000Z
import os, json path = ".github/workflows/eo-language-tests/tests/" tests = [] for dir in next(os.walk(path + "."))[1]: with open(path + dir + "/test.json", 'r') as test_data_file: test_data = json.load(test_data_file) test_data["directory"] = str(dir) if (test_data["type"] == "runtime" and test_data["a...
25.222222
62
0.654185
import os, json path = ".github/workflows/eo-language-tests/tests/" tests = [] for dir in next(os.walk(path + "."))[1]: with open(path + dir + "/test.json", 'r') as test_data_file: test_data = json.load(test_data_file) test_data["directory"] = str(dir) if (test_data["type"] == "runtime" and test_data["a...
true
true
f76a445cb2f7d202316b8be2b7c225df4f70b756
1,731
py
Python
WebPortal/gbol_portal/viewsMitmachen.py
ZFMK/GermanBarcodeofLife
f9e9af699ba3f5b3d0d537819a8463c4162d7e82
[ "Apache-2.0" ]
null
null
null
WebPortal/gbol_portal/viewsMitmachen.py
ZFMK/GermanBarcodeofLife
f9e9af699ba3f5b3d0d537819a8463c4162d7e82
[ "Apache-2.0" ]
null
null
null
WebPortal/gbol_portal/viewsMitmachen.py
ZFMK/GermanBarcodeofLife
f9e9af699ba3f5b3d0d537819a8463c4162d7e82
[ "Apache-2.0" ]
null
null
null
from pyramid.response import Response from pyramid.view import view_config from pyramid.renderers import render @view_config(route_name='wer-kann-mitmachen') def wer_kann_mitmachen_view(request): set_language(request) lan = get_language(request) result = render('templates/' + str(lan) + '/mitmachen/wer-ka...
29.844828
109
0.694974
from pyramid.response import Response from pyramid.view import view_config from pyramid.renderers import render @view_config(route_name='wer-kann-mitmachen') def wer_kann_mitmachen_view(request): set_language(request) lan = get_language(request) result = render('templates/' + str(lan) + '/mitmachen/wer-ka...
true
true
f76a4477b0c2b472c8e840887f1bd30035ac84ff
328
py
Python
problems/n-th_tribonacci_number/solution.py
jimit105/leetcode-submissions
ff20c54acf8ad71ed0851c81a0463520fca6a69f
[ "MIT" ]
null
null
null
problems/n-th_tribonacci_number/solution.py
jimit105/leetcode-submissions
ff20c54acf8ad71ed0851c81a0463520fca6a69f
[ "MIT" ]
null
null
null
problems/n-th_tribonacci_number/solution.py
jimit105/leetcode-submissions
ff20c54acf8ad71ed0851c81a0463520fca6a69f
[ "MIT" ]
null
null
null
# Time: O(N) # Space: O(N) class Solution: cache = {0: 0, 1: 1, 2: 1} def tribonacci(self, n: int) -> int: if n in self.cache: return self.cache[n] self.cache[n] = self.tribonacci(n-1) + self.tribonacci(n-2) + self.tribonacci(n-3) return self.cache[n] ...
23.428571
90
0.503049
class Solution: cache = {0: 0, 1: 1, 2: 1} def tribonacci(self, n: int) -> int: if n in self.cache: return self.cache[n] self.cache[n] = self.tribonacci(n-1) + self.tribonacci(n-2) + self.tribonacci(n-3) return self.cache[n]
true
true
f76a44d85e16fd9cd3c9688403680ad45fc72a0a
22,057
py
Python
library/juniper_junos_command.py
armando7santana/Juniper_Ansible_Junos
bf3700886df932fe43559ca7d7fd8807bbf3a50f
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
library/juniper_junos_command.py
armando7santana/Juniper_Ansible_Junos
bf3700886df932fe43559ca7d7fd8807bbf3a50f
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
library/juniper_junos_command.py
armando7santana/Juniper_Ansible_Junos
bf3700886df932fe43559ca7d7fd8807bbf3a50f
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 1999-2017, Juniper Networks Inc. # 2014, Jeremy Schulman # # All rights reserved. # # License: Apache 2.0 # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
39.528674
80
0.621209
from __future__ import absolute_import, division, print_function ANSIBLE_METADATA = {'metadata_version': '1.1', 'supported_by': 'community', 'status': ['stableinterface']} DOCUMENTATION = ''' --- module: juniper_junos_command version_added: "2.0.0" # of Juniper.junos role aut...
true
true
f76a455aae2a323abb812de087cdfc7b24b04119
422
py
Python
atlas/location/admin.py
briansok/Atlas
01320e6c1f2d41e41a93890de6ef6c92bfbbb7e6
[ "MIT" ]
5
2018-06-04T08:12:50.000Z
2020-11-30T20:57:48.000Z
atlas/location/admin.py
briansok/Atlas
01320e6c1f2d41e41a93890de6ef6c92bfbbb7e6
[ "MIT" ]
null
null
null
atlas/location/admin.py
briansok/Atlas
01320e6c1f2d41e41a93890de6ef6c92bfbbb7e6
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Location, Section class EntryLocation(admin.ModelAdmin): list_display = ( 'title', 'city', 'country', ) class EntrySection(admin.ModelAdmin): list_display = ( 'title', 'user', 'section_type', 'loca...
20.095238
44
0.632701
from django.contrib import admin from .models import Location, Section class EntryLocation(admin.ModelAdmin): list_display = ( 'title', 'city', 'country', ) class EntrySection(admin.ModelAdmin): list_display = ( 'title', 'user', 'section_type', 'loca...
true
true
f76a45a6c9a71f2d9552c9a7c5215958b2c0da4e
388
py
Python
src/template/func.py
MadRussian/flask-template
9e8e5d65542dd4e1d7a8effa3a62d31eb3795142
[ "Apache-2.0" ]
null
null
null
src/template/func.py
MadRussian/flask-template
9e8e5d65542dd4e1d7a8effa3a62d31eb3795142
[ "Apache-2.0" ]
null
null
null
src/template/func.py
MadRussian/flask-template
9e8e5d65542dd4e1d7a8effa3a62d31eb3795142
[ "Apache-2.0" ]
null
null
null
import flask import hashlib import logging logger = logging.getLogger("app.func") def redirect_login(): return flask.redirect(flask.url_for('login')) def get_gravatar_url(email): base_url = "https://www.gravatar.com/avatar/" email_hash = hashlib.md5(email.lower()).hexdigest() style = 'retro' full_url = "{}{...
24.25
53
0.713918
import flask import hashlib import logging logger = logging.getLogger("app.func") def redirect_login(): return flask.redirect(flask.url_for('login')) def get_gravatar_url(email): base_url = "https://www.gravatar.com/avatar/" email_hash = hashlib.md5(email.lower()).hexdigest() style = 'retro' full_url = "{}{...
true
true
f76a45fc91d8c605af39046fa3c54abda6b656f6
5,460
py
Python
localization/src/calibrate_rssi.py
DougMHu/roomba-obstacle-mapping
019b6108c1967c7daabe7b4795cfac7ef0e79cf7
[ "MIT" ]
3
2018-05-26T20:41:27.000Z
2020-10-19T12:40:42.000Z
localization/src/calibrate_rssi.py
DougMHu/roomba-obstacle-mapping
019b6108c1967c7daabe7b4795cfac7ef0e79cf7
[ "MIT" ]
null
null
null
localization/src/calibrate_rssi.py
DougMHu/roomba-obstacle-mapping
019b6108c1967c7daabe7b4795cfac7ef0e79cf7
[ "MIT" ]
1
2017-01-31T09:47:21.000Z
2017-01-31T09:47:21.000Z
# MIT License # Copyright (c) 2016 Aashiq Ahmed, Shuai Chen, Meha Deora, Douglas Hu # 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 rig...
26.634146
85
0.705311
# The locations dictionary is our map! # Breakdown of data structures: # Locations: (x, y) coordinate # Tmote_ID: (part1, part2) # RSSI: average RSSI received over timeout sec. # Tmotes: Tmote_IDs # RSSI: average value # RSSI_counter: # of rssi packets received # NEXT STEPS: # Ask user for new locations e...
false
true
f76a46b54b3508b3708d4e7932c2add20740e901
91
py
Python
src/pdCIFplotter/__init__.py
rowlesmr/pdCIFplotter
ff5ec34470d34f3d30bc1c3dc7c9dbc74456459c
[ "Apache-2.0" ]
null
null
null
src/pdCIFplotter/__init__.py
rowlesmr/pdCIFplotter
ff5ec34470d34f3d30bc1c3dc7c9dbc74456459c
[ "Apache-2.0" ]
2
2021-11-10T13:54:17.000Z
2021-12-18T01:05:25.000Z
src/pdCIFplotter/__init__.py
rowlesmr/pdCIFplotter
ff5ec34470d34f3d30bc1c3dc7c9dbc74456459c
[ "Apache-2.0" ]
null
null
null
__version__ = '0.1.0' from .gui import * from .parse_cif import * from .plot_cif import *
15.166667
24
0.703297
__version__ = '0.1.0' from .gui import * from .parse_cif import * from .plot_cif import *
true
true
f76a46c599959d8c9e2b5ca428dd92223b921920
290
py
Python
api/urls.py
AlpsRunner/money_tranfer_page
f9c25b8907967a7b391a1758528bdcd441e19fe4
[ "MIT" ]
null
null
null
api/urls.py
AlpsRunner/money_tranfer_page
f9c25b8907967a7b391a1758528bdcd441e19fe4
[ "MIT" ]
null
null
null
api/urls.py
AlpsRunner/money_tranfer_page
f9c25b8907967a7b391a1758528bdcd441e19fe4
[ "MIT" ]
1
2021-02-18T00:22:28.000Z
2021-02-18T00:22:28.000Z
from django.urls import path, include from rest_framework.routers import DefaultRouter from api.views import CustomUserViewSet app_name = 'api' router = DefaultRouter() router.register('users', CustomUserViewSet, base_name='users') urlpatterns = [ path('', include(router.urls)), ]
20.714286
62
0.765517
from django.urls import path, include from rest_framework.routers import DefaultRouter from api.views import CustomUserViewSet app_name = 'api' router = DefaultRouter() router.register('users', CustomUserViewSet, base_name='users') urlpatterns = [ path('', include(router.urls)), ]
true
true
f76a47b241d519fcb396afff4b75629e16d15883
1,267
py
Python
setup.py
numbersprotocol/py-threads-client
96063fc48879fabbc365c7bf29400ec9be5c5cdb
[ "MIT" ]
2
2020-03-05T04:26:44.000Z
2020-03-05T05:19:47.000Z
setup.py
numbersprotocol/py-threads-client
96063fc48879fabbc365c7bf29400ec9be5c5cdb
[ "MIT" ]
1
2020-03-05T04:56:26.000Z
2020-03-05T06:02:59.000Z
setup.py
numbersprotocol/py-threads-client
96063fc48879fabbc365c7bf29400ec9be5c5cdb
[ "MIT" ]
1
2021-05-09T02:27:22.000Z
2021-05-09T02:27:22.000Z
from setuptools import setup, find_packages from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='py-threads-client', version='0.0.3', des...
27.543478
63
0.589582
from setuptools import setup, find_packages from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='py-threads-client', version='0.0.3', description='Python binding of Threads V2 client', ...
true
true
f76a4805f449bda8ebcffa5fb55cba811dcaf1e7
1,988
py
Python
src/models/amplifier/simplified_fet/common_drain_polarization/drawing.py
luanws/amplifier-circuits
cd19acae11eb1dc5f11efd3bee785caedbbc81b4
[ "Apache-2.0" ]
null
null
null
src/models/amplifier/simplified_fet/common_drain_polarization/drawing.py
luanws/amplifier-circuits
cd19acae11eb1dc5f11efd3bee785caedbbc81b4
[ "Apache-2.0" ]
null
null
null
src/models/amplifier/simplified_fet/common_drain_polarization/drawing.py
luanws/amplifier-circuits
cd19acae11eb1dc5f11efd3bee785caedbbc81b4
[ "Apache-2.0" ]
null
null
null
from schemdraw import Drawing from schemdraw import elements as elm from src.utils import numerize from .input import Input def draw_void(): drawing = Drawing() drawing += (transistor := elm.transistors.JFetP().right().reverse()) drawing += elm.SourceV().at(transistor.drain).up().label('Vdd').reverse()...
26.864865
77
0.6333
from schemdraw import Drawing from schemdraw import elements as elm from src.utils import numerize from .input import Input def draw_void(): drawing = Drawing() drawing += (transistor := elm.transistors.JFetP().right().reverse()) drawing += elm.SourceV().at(transistor.drain).up().label('Vdd').reverse()...
true
true
f76a4902cbb3f116347e2a0406c31a705a0492b6
3,169
py
Python
old-sanic/calculations.py
x10an14/overtime-calculator
4e7b171086f3ffc94964e929c9c47dbe1e5b0ad0
[ "MIT" ]
1
2018-03-11T14:02:30.000Z
2018-03-11T14:02:30.000Z
old-sanic/calculations.py
x10an14/overtime-calculator
4e7b171086f3ffc94964e929c9c47dbe1e5b0ad0
[ "MIT" ]
13
2018-03-16T20:06:50.000Z
2020-03-17T10:17:50.000Z
old-sanic/calculations.py
x10an14/overtime-calculator
4e7b171086f3ffc94964e929c9c47dbe1e5b0ad0
[ "MIT" ]
null
null
null
"""Module containing majory of calulation functions and their helpers.""" from datetime import datetime from datetime import timedelta from collections import defaultdict from . import default_parse_fmt from . import log_function_entry_and_exit @log_function_entry_and_exit def parse_row(row, field_names, datetime_pa...
34.445652
89
0.693594
from datetime import datetime from datetime import timedelta from collections import defaultdict from . import default_parse_fmt from . import log_function_entry_and_exit @log_function_entry_and_exit def parse_row(row, field_names, datetime_parse_fmt=default_parse_fmt, has_duration=True): ...
true
true
f76a498f429537f325ddf29eac20e97473849b2c
95
py
Python
exercices-pin-raspberry/Flasher LED/bouton.py
Elitross/Ecole-raspberrypi
5897217550194516014562e76df8a28b2aa83480
[ "MIT" ]
null
null
null
exercices-pin-raspberry/Flasher LED/bouton.py
Elitross/Ecole-raspberrypi
5897217550194516014562e76df8a28b2aa83480
[ "MIT" ]
null
null
null
exercices-pin-raspberry/Flasher LED/bouton.py
Elitross/Ecole-raspberrypi
5897217550194516014562e76df8a28b2aa83480
[ "MIT" ]
null
null
null
from gpiozero import Button button = Button(2) button.wait_for_press() print('ayoye calisse')
15.833333
27
0.778947
from gpiozero import Button button = Button(2) button.wait_for_press() print('ayoye calisse')
true
true