hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
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
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
ace935425089f4cbe7a578bf25ba6b4f1cea8c8d
3,161
py
Python
neural_admixture/model/modules.py
AlbertDominguez/neural-admixture
2f277a4e7bcdf920117bec85a381d2147d64c0be
[ "AFL-1.1" ]
13
2021-06-24T16:12:27.000Z
2022-03-05T14:23:14.000Z
neural_admixture/model/modules.py
AlbertDominguez/neural-admixture
2f277a4e7bcdf920117bec85a381d2147d64c0be
[ "AFL-1.1" ]
6
2021-12-24T14:44:21.000Z
2022-03-24T09:42:10.000Z
neural_admixture/model/modules.py
AlbertDominguez/neural-admixture
2f277a4e7bcdf920117bec85a381d2147d64c0be
[ "AFL-1.1" ]
7
2021-06-28T20:52:58.000Z
2022-03-23T18:05:37.000Z
import logging import sys import torch.nn as nn logging.basicConfig(stream=sys.stdout, level=logging.INFO) log = logging.getLogger(__name__) # class NonLinearMultiHeadDecoder(nn.Module): # def __init__(self, ks, output_size, bias=False, # hidden_size=512, hidden_activation=nn.ReLU(), # ...
36.755814
120
0.585891
import logging import sys import torch import torch.nn as nn logging.basicConfig(stream=sys.stdout, level=logging.INFO) log = logging.getLogger(__name__) class ZeroOneClipper(object): def __call__(self, module): if hasattr(module, 'weight'): with torch.no_grad(): w = module.wei...
0
0
0
2,024
0
0
0
-9
91
c041348795cfe6bcb3227a84618f61e776ba0ea7
1,121
py
Python
haiku/Haiku_bot.py
jonasschui/projects
ce6f8e274db6194d13e150cabb370c3fc6fd7135
[ "MIT" ]
null
null
null
haiku/Haiku_bot.py
jonasschui/projects
ce6f8e274db6194d13e150cabb370c3fc6fd7135
[ "MIT" ]
null
null
null
haiku/Haiku_bot.py
jonasschui/projects
ce6f8e274db6194d13e150cabb370c3fc6fd7135
[ "MIT" ]
null
null
null
def tweet_haiku(): """A function to tweet haikus""" haiku = HaikuModel() haiku_tweet = haiku.get_haiku() return haiku_tweet if __name__ == "__main__": main()
27.341463
77
0.693131
import tweepy import time from haiku_model import * class TwitterAPI: """An object class for to create our Haiku bot using Twitter API""" def __init__(self): c_key = 'Y0Vs0vpELAZSXHAuETmsMuZRK' c_secret = '9iTWM7xnkfFRMlQpyLyRI8gR6gffyDaWd5i4rGLQbTGeRnvt7p' auth = tweepy.OAuthHandler(c...
0
0
0
631
0
208
0
-14
112
55e521e4514b7f77132d69e218dbc9e22d039e55
969
py
Python
TrianguloPascal.py
brown9804/Python_DiversosAlgortimos
e9ff0fbe761f24a49a30a513d50824ca56cafaa3
[ "Apache-2.0" ]
3
2018-06-28T21:06:53.000Z
2018-07-01T20:39:30.000Z
TrianguloPascal.py
brown9804/Python_DiversosAlgortimos
e9ff0fbe761f24a49a30a513d50824ca56cafaa3
[ "Apache-2.0" ]
null
null
null
TrianguloPascal.py
brown9804/Python_DiversosAlgortimos
e9ff0fbe761f24a49a30a513d50824ca56cafaa3
[ "Apache-2.0" ]
null
null
null
#Python3 #Algoritmo utilizando la definicin de pascal para crear un tringulo ##### DEFINICIONES ##### #Definicin para colocar numeros en triangulo de pascal #Definicion para contablilizar el numero de filas para el triangulo #Se crea la definicin para crear el tringulo de pascal el cual contempla #un triangu...
31.258065
74
0.714138
#Python3 #Algoritmo utilizando la definición de pascal para crear un triángulo ##### DEFINICIONES ##### #Definición para colocar numeros en triangulo de pascal def pascal(n, i): if (n==i) or (i==1): return 1 else: return pascal(n-1, i-1) + pascal(n-1, i) #Definicion para contablilizar el numero de filas...
18
0
0
0
0
248
0
0
67
79b21a0015c8723f617697c903cffc080cb28968
1,120
py
Python
converter.py
MartorSkull/NTRDB
409bcb9b0c1fad1b3d539afec52ebf17c172c4e6
[ "MIT" ]
1
2019-03-09T21:21:32.000Z
2019-03-09T21:21:32.000Z
converter.py
MartorSkull/NTRDB
409bcb9b0c1fad1b3d539afec52ebf17c172c4e6
[ "MIT" ]
null
null
null
converter.py
MartorSkull/NTRDB
409bcb9b0c1fad1b3d539afec52ebf17c172c4e6
[ "MIT" ]
null
null
null
import dataset import pickle from uuid import uuid4 import json with open('plugins.pickle', 'rb') as f: plugins = pickle.load(f) with open('users.pickle', 'rb') as f: users = pickle.load(f) db=dataset.connect("sqlite:///plugs.db") usersdb=db.get_table("Users", primary_id="uuid", primary_type="String(36)") pl...
27.317073
117
0.653571
import dataset import pickle from uuid import uuid4 import json with open('plugins.pickle', 'rb') as f: plugins = pickle.load(f) with open('users.pickle', 'rb') as f: users = pickle.load(f) db=dataset.connect("sqlite:///plugs.db") usersdb=db.get_table("Users", primary_id="uuid", primary_type="String(36)") pl...
0
0
0
0
0
124
0
0
23
560afc5ca80113dc137f606fc93ed6b3da7c132c
6,044
py
Python
function.py
TheLine1/Project1---Finding-Lane-Line
eb62909bd468ecbe29971431a5a537965706897e
[ "MIT" ]
null
null
null
function.py
TheLine1/Project1---Finding-Lane-Line
eb62909bd468ecbe29971431a5a537965706897e
[ "MIT" ]
null
null
null
function.py
TheLine1/Project1---Finding-Lane-Line
eb62909bd468ecbe29971431a5a537965706897e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 4 14:46:29 2019 @author: linux """ # Functions #importing some useful packages # for list of images #%matplotlib inline #!clear #read Image # n Image Plot -> lt.imshow(image, 'gray_r') INVERT THE GRAY REPRESENTATION # ===================...
29.920792
108
0.521178
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 4 14:46:29 2019 @author: linux """ # Functions #importing some useful packages import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np import cv2 # for list of images #%matplotlib inline #!clear #read Image def readI...
0
0
0
0
0
4,181
0
7
269
d20f766f6bd9ca25ae8a0024b77110328fde72cc
3,436
py
Python
tests/unit/network/CubicDualTest.py
edgargmartinez/OpenPNM
c68745993b3e9895f53938164a9cf6305500748e
[ "MIT" ]
3
2019-07-17T01:35:09.000Z
2021-05-08T02:03:35.000Z
tests/unit/network/CubicDualTest.py
Jimmy-INL/OpenPNM
1546fa1ac2204443bde916f2037fac383c5069ae
[ "MIT" ]
null
null
null
tests/unit/network/CubicDualTest.py
Jimmy-INL/OpenPNM
1546fa1ac2204443bde916f2037fac383c5069ae
[ "MIT" ]
null
null
null
if __name__ == '__main__': t = CubicDualTest() t.setup_class() self = t for item in t.__dir__(): if item.startswith('test'): print('running test: '+item) t.__getattribute__(item)()
36.553191
70
0.5617
import openpnm as op class CubicDualTest: def setup_class(self): pass def teardown_class(self): pass def test_generation_3D(self): net = op.network.CubicDual(shape=[5, 5, 5], label_1='primary', label_2='secondary') assert net.Np == 285 ...
0
0
0
3,159
0
0
0
-1
45
ef70e76b8a622fa69847bb2a474326ce2f8775c7
494
py
Python
src/extract.py
anr-delices/subword-vectors
3bdf749fa785d16266281b11d81c51d37025652b
[ "Apache-2.0" ]
null
null
null
src/extract.py
anr-delices/subword-vectors
3bdf749fa785d16266281b11d81c51d37025652b
[ "Apache-2.0" ]
null
null
null
src/extract.py
anr-delices/subword-vectors
3bdf749fa785d16266281b11d81c51d37025652b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import re import sys import json from nltk.tokenize import sent_tokenize sentences = [] with open(sys.argv[1], 'r') as f: for line in f: record = json.loads(line) title = re.sub('\s+', ' ', record['title'].strip()) abstract = re.sub('\s+', ' ', record['abstract'].s...
24.7
65
0.605263
# -*- coding: utf-8 -*- import re import sys import json from nltk.tokenize import sent_tokenize sentences = [] with open(sys.argv[1], 'r') as f: for line in f: record = json.loads(line) title = re.sub('\s+', ' ', record['title'].strip()) abstract = re.sub('\s+', ' ', record['abstract'].s...
0
0
0
0
0
0
0
0
0
0cf4d11cdcd9be04751d65013102b7a0b448c7ef
2,914
py
Python
UBCF_explicit.py
pitteryue/Recommender-Systems
ca71ed6cc227a31688e49bb98e45a6e607776426
[ "MIT" ]
1
2022-03-18T15:26:44.000Z
2022-03-18T15:26:44.000Z
UBCF_explicit.py
pitteryue/Recommender-Systems
ca71ed6cc227a31688e49bb98e45a6e607776426
[ "MIT" ]
null
null
null
UBCF_explicit.py
pitteryue/Recommender-Systems
ca71ed6cc227a31688e49bb98e45a6e607776426
[ "MIT" ]
null
null
null
import scipy.spatial
50.241379
169
0.532258
import scipy.spatial import scipy.stats import copy import math import pandas as pd import numpy as np class UBCF_explicit(): def __init__(self, similarity_metric_name, train_rating_matrix, K): self.similarity_metric_name = similarity_metric_name self.K = K self.train_rating_ma...
351
0
0
2,665
0
0
0
-28
139
12890b1479ce22a499222a0a3e3c195045ed0667
4,360
py
Python
giadog/src/kinematics/FTG_handler.py
eduardo98m/GiaDog
ecafdaaddd1b3ac5cf09cdfc97fba8087385497c
[ "MIT" ]
3
2022-03-12T08:30:34.000Z
2022-03-14T16:16:51.000Z
giadog/src/kinematics/FTG_handler.py
eduardo98m/GiaDog
ecafdaaddd1b3ac5cf09cdfc97fba8087385497c
[ "MIT" ]
null
null
null
giadog/src/kinematics/FTG_handler.py
eduardo98m/GiaDog
ecafdaaddd1b3ac5cf09cdfc97fba8087385497c
[ "MIT" ]
null
null
null
""" Authors: Amin Arriaga, Eduardo Lopez Project: Graduation Thesis: GIAdog This file contains the code . Reference: ---------- """
34.330709
78
0.499312
""" Authors: Amin Arriaga, Eduardo Lopez Project: Graduation Thesis: GIAdog This file contains the code . Reference: ---------- """ from bezier_FTG import Bezier_curves_FTG from base_FTG import Base_FTG from gamma_FTG import Gamma_FTG import numpy as np from math import remainder from __...
0
0
0
3,821
0
0
0
198
179
35f61bf9c1c01f6a007107650f1b9e46c92bb36e
6,075
py
Python
tests/test_master.py
NLeSC/vantage6-algorithms
977cb645a2340ec8d5114f622e75a62486989914
[ "Apache-2.0" ]
null
null
null
tests/test_master.py
NLeSC/vantage6-algorithms
977cb645a2340ec8d5114f622e75a62486989914
[ "Apache-2.0" ]
5
2020-06-22T10:28:18.000Z
2020-10-28T06:58:09.000Z
tests/test_master.py
NLeSC/vantage6-algorithms
977cb645a2340ec8d5114f622e75a62486989914
[ "Apache-2.0" ]
1
2021-01-07T18:03:06.000Z
2021-01-07T18:03:06.000Z
ID = 1 TRIES = 1 MOCK_TASK = {'id': ID} IDENTIFIER_KEYS = ['GBAGeboorteJaar', 'GBAGeboorteMaand', 'GBAGeboorteDag', 'GBAGeslacht', 'GBAPostcode', 'GBAHuisnummer', 'GBAToev'] KEY_VALUES = [1987, 10, 30, 1, '1098ln', 11, 'b'] COLUMN1 = 'column1' COLUMN2 = 'column2' DATASET = 'tests/resources/joined_d...
36.377246
111
0.715885
from unittest.mock import MagicMock, patch import pandas as pd import pytest from sklearn import pipeline from sklearn.naive_bayes import GaussianNB from sklearn.preprocessing import StandardScaler from v6_carrier_py import master ID = 1 TRIES = 1 MOCK_TASK = {'id': ID} IDENTIFIER_KEYS = ['GBAGeboorteJaar', 'GBAGebo...
0
0
0
0
0
4,754
0
77
432
165210f5ea2ddb48711f108a7d325f283d03750e
1,129
py
Python
5/PC.GAME.4K.RHOVONIDIN/Z3/RHOVONIDIN_Z3_PROOF.py
AbdulShabazz/UnrealEngine
cf6fd686e0eab83b49eae1c346e2998af2022ff7
[ "MIT" ]
null
null
null
5/PC.GAME.4K.RHOVONIDIN/Z3/RHOVONIDIN_Z3_PROOF.py
AbdulShabazz/UnrealEngine
cf6fd686e0eab83b49eae1c346e2998af2022ff7
[ "MIT" ]
null
null
null
5/PC.GAME.4K.RHOVONIDIN/Z3/RHOVONIDIN_Z3_PROOF.py
AbdulShabazz/UnrealEngine
cf6fd686e0eab83b49eae1c346e2998af2022ff7
[ "MIT" ]
null
null
null
#---------------------------------------------------------------------------------------- # AUTHOR : AbdulShabazz # # DESCRIPTION : Z3Prover is a propositional logic theorem prover which tests a sentences SATISFIABILITY # This library will be used to validate the stability of the PC game # # Proof : GAME_OVER => Rhovi...
29.710526
134
0.608503
#---------------------------------------------------------------------------------------- # AUTHOR : AbdulShabazz # # DESCRIPTION : Z3Prover is a propositional logic theorem prover which tests a sentences SATISFIABILITY # This library will be used to validate the stability of the PC game # # Proof : GAME_OVER => Rhovi...
0
0
0
0
0
0
0
0
0
5caef568f418a20c8f2a2d5c18d168f4b89fe848
5,387
py
Python
src/simple_graph.py
reaperr/data-structures
a397fe9002f6a655b7f06f44069ee3e25502e99d
[ "MIT" ]
null
null
null
src/simple_graph.py
reaperr/data-structures
a397fe9002f6a655b7f06f44069ee3e25502e99d
[ "MIT" ]
null
null
null
src/simple_graph.py
reaperr/data-structures
a397fe9002f6a655b7f06f44069ee3e25502e99d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 *-* import time if __name__ == '__main__': basic_graph = SimpleGraph() basic_graph._graph_content = { 3: ['7', 5], '7': ['11', 5], '11': [], 5: [10], 10: ['7'], } print(u"Made Graph:{}".format(basic_graph.edges())) start1 = time.time() ...
33.253086
77
0.594951
# -*- coding: utf-8 *-* from stack import Stack from queue import Queue import time class SimpleGraph(object): """Python implementation of the simple graph structure.""" def __init__(self): """SimpleGraph constructor.""" self._graph_content = {} def nodes(self): """Return a list ...
0
0
0
3,844
0
0
0
4
67
2fa8ece878c30d99a474d7c64ef3ffa23eb42188
5,561
py
Python
tree/code/patent_cluster.py
tmdilab/IITP
981ac497dee1b4ea1cd53e2a72fc299b437a5f8e
[ "MIT" ]
16
2021-11-22T07:10:18.000Z
2022-02-08T07:54:20.000Z
tree/code/patent_cluster.py
SNUtilab/IITP
981ac497dee1b4ea1cd53e2a72fc299b437a5f8e
[ "MIT" ]
null
null
null
tree/code/patent_cluster.py
SNUtilab/IITP
981ac497dee1b4ea1cd53e2a72fc299b437a5f8e
[ "MIT" ]
10
2021-11-22T07:10:20.000Z
2021-12-27T05:03:01.000Z
# -*- coding: utf-8 -*- import pandas as pd import numpy as np import re import pickle with open('data/patent_df.pkl','rb') as f: df = pickle.load(f) #%% Doc2Vec import pandas, nltk from gensim.models.doc2vec import Doc2Vec, TaggedDocument from nltk.stem import WordNetLemmatizer im...
25.985981
109
0.619853
# -*- coding: utf-8 -*- import pandas as pd import numpy as np import re import pickle import os with open('data/patent_df.pkl','rb') as f: df = pickle.load(f) #%% Doc2Vec 기반 문서 유사도 import pandas , nltk from gensim.models.doc2vec import Doc2Vec, TaggedDocument from nltk.tokenize import ...
141
0
0
0
0
59
0
80
140
9d4c24f942ef4c6b46f0212c9f6df9531c351658
168
py
Python
inbm/dispatcher-agent/dispatcher/aota/__init__.py
ahameedx/intel-inb-manageability
aca445fa4cef0b608e6e88e74476547e10c06073
[ "Apache-2.0" ]
5
2021-12-13T21:19:31.000Z
2022-01-18T18:29:43.000Z
inbm/dispatcher-agent/dispatcher/aota/__init__.py
ahameedx/intel-inb-manageability
aca445fa4cef0b608e6e88e74476547e10c06073
[ "Apache-2.0" ]
45
2021-12-30T17:21:09.000Z
2022-03-29T22:47:32.000Z
inbm/dispatcher-agent/dispatcher/aota/__init__.py
ahameedx/intel-inb-manageability
aca445fa4cef0b608e6e88e74476547e10c06073
[ "Apache-2.0" ]
4
2022-01-26T17:42:54.000Z
2022-03-30T04:48:04.000Z
""" Constants and other config variables used throughout the AOTA module Copyright (C) 2017-2022 Intel Corporation SPDX-License-Identifier: Apache-2.0 """
24
72
0.72619
""" Constants and other config variables used throughout the AOTA module Copyright (C) 2017-2022 Intel Corporation SPDX-License-Identifier: Apache-2.0 """
0
0
0
0
0
0
0
0
0
f5b2cfdb1008de26ed1f9933034f963c3ae3a1f9
221
py
Python
LA Data Clean/categories_la.py
minxstm/Bootcamp_Project_1
1f5d15faab605f7e5b678b6eca802eca04351189
[ "MIT" ]
null
null
null
LA Data Clean/categories_la.py
minxstm/Bootcamp_Project_1
1f5d15faab605f7e5b678b6eca802eca04351189
[ "MIT" ]
null
null
null
LA Data Clean/categories_la.py
minxstm/Bootcamp_Project_1
1f5d15faab605f7e5b678b6eca802eca04351189
[ "MIT" ]
null
null
null
import pandas as pd la_df=pd.read_csv("LA_Crime_Data_from_2010_to_Present.csv") #print(la_df.head()) la_vc = la_df["Crime Code Description"].value_counts() #print(la_vc) pd.DataFrame(la_vc).to_csv("crime_types_la_1.csv")
31.571429
59
0.791855
import pandas as pd la_df=pd.read_csv("LA_Crime_Data_from_2010_to_Present.csv") #print(la_df.head()) la_vc = la_df["Crime Code Description"].value_counts() #print(la_vc) pd.DataFrame(la_vc).to_csv("crime_types_la_1.csv")
0
0
0
0
0
0
0
0
0
498ce23aa1081a5b2e4f781abe62318603ebc05d
1,742
py
Python
packstack/plugins/postscript_948.py
melroyr/havana-packstack
72cdb0e5e29df4cccb81844ec8b365dfededf4f7
[ "Apache-2.0" ]
null
null
null
packstack/plugins/postscript_948.py
melroyr/havana-packstack
72cdb0e5e29df4cccb81844ec8b365dfededf4f7
[ "Apache-2.0" ]
null
null
null
packstack/plugins/postscript_948.py
melroyr/havana-packstack
72cdb0e5e29df4cccb81844ec8b365dfededf4f7
[ "Apache-2.0" ]
null
null
null
""" Installs and configures an OpenStack Client """ import logging # Controller object will be initialized from main flow controller = None # Plugin name PLUGIN_NAME = "OS-POSTSCRIPT" logging.debug("plugin %s loaded", __name__)
34.156863
94
0.656142
""" Installs and configures an OpenStack Client """ import logging from packstack.modules.common import filtered_hosts from packstack.modules.ospluginutils import (getManifestTemplate, appendManifestFile) # Controller object will be initialized from main flow controller =...
0
0
0
0
0
1,255
0
139
114
4861165b4956b64e0f0ac74706d072956ac21def
43,871
py
Python
src/api/alembic/versions/fe12dc8feb82_baseline.py
PythonDataIntegrator/pythondataintegrator
6167778c36c2295e36199ac0d4d256a4a0c28d7a
[ "MIT" ]
14
2020-12-19T15:06:13.000Z
2022-01-12T19:52:17.000Z
src/api/alembic/versions/fe12dc8feb82_baseline.py
PythonDataIntegrator/pythondataintegrator
6167778c36c2295e36199ac0d4d256a4a0c28d7a
[ "MIT" ]
43
2021-01-06T22:05:22.000Z
2022-03-10T10:30:30.000Z
src/api/alembic/versions/fe12dc8feb82_baseline.py
PythonDataIntegrator/pythondataintegrator
6167778c36c2295e36199ac0d4d256a4a0c28d7a
[ "MIT" ]
4
2020-12-18T23:10:09.000Z
2021-04-02T13:03:12.000Z
"""baseline Revision ID: fe12dc8feb82 Revises: Create Date: 2021-01-19 23:42:00.695822 """ revision = 'fe12dc8feb82' down_revision = None branch_labels = None depends_on = None
54.97619
181
0.565704
"""baseline Revision ID: fe12dc8feb82 Revises: Create Date: 2021-01-19 23:42:00.695822 """ from alembic import op import sqlalchemy as sa revision = 'fe12dc8feb82' down_revision = None branch_labels = None depends_on = None def insert_connection_types(): from models.dao.connection.ConnectionType import Connec...
3
0
0
0
0
43,498
0
3
182
fa68abe49980042365f81af4e60ebc573a486501
8,923
py
Python
libs/people.py
IdeaBot/explorer
2cd02cacb2a37f3da3308e79e88f8c26f4401b8e
[ "MIT" ]
null
null
null
libs/people.py
IdeaBot/explorer
2cd02cacb2a37f3da3308e79e88f8c26f4401b8e
[ "MIT" ]
null
null
null
libs/people.py
IdeaBot/explorer
2cd02cacb2a37f3da3308e79e88f8c26f4401b8e
[ "MIT" ]
null
null
null
''' Object classes for characters in explorer created 2019-03-19 by NGnius''' NEXT_INT = 0 MAX_LEVEL = 42 ''' Non-abstract classes ''' # enemies # friendlies
33.799242
93
0.55822
''' Object classes for characters in explorer created 2019-03-19 by NGnius''' import random NEXT_INT = 0 MAX_LEVEL = 42 class Person(): def __init__(self, name, dungeon, spawn=True): self.basespeed = 1 self.basedamage = 1 self.basehealth = 1 self.speed = 1 self.damage = 1...
0
0
0
8,561
0
0
0
-8
207
380f5a4a4171a30781cba886e17326427753edbf
234
py
Python
languages/python/design_object_size.py
RohitAthithya/learntosolveit
fe1df98534d3af2fb3ba87c6540d9d8fa883c244
[ "BSD-3-Clause" ]
136
2015-03-06T18:11:21.000Z
2022-03-10T22:31:40.000Z
languages/python/design_object_size.py
RohitAthithya/learntosolveit
fe1df98534d3af2fb3ba87c6540d9d8fa883c244
[ "BSD-3-Clause" ]
27
2015-01-07T01:38:03.000Z
2021-12-22T19:20:15.000Z
languages/python/design_object_size.py
RohitAthithya/learntosolveit
fe1df98534d3af2fb3ba87c6540d9d8fa883c244
[ "BSD-3-Clause" ]
1,582
2015-01-01T20:37:06.000Z
2022-03-30T12:29:24.000Z
obj = list(range(10000)) print(GetMemoryUsage(obj))
18
42
0.700855
import pickle import sys obj = list(range(10000)) def GetMemoryUsage(ob): s = pickle.dumps(ob) memUsed = sys.getpymemalloced() ob2 = pickle.loads(s) return sys.getpymemalloced() - memUsed print(GetMemoryUsage(obj))
0
0
0
0
0
132
0
-19
67
46ca12ba0ff33033ef1bcda3887ed07ac09eb21f
1,214
py
Python
opendc/api/v1/users/userId/authorizations/endpoint.py
kl1de/kl1de
5dc37467b48b4f7dc74292b79fc93a41a93112d0
[ "MIT" ]
2
2017-01-24T12:28:51.000Z
2017-01-25T15:12:26.000Z
opendc/api/v1/users/userId/authorizations/endpoint.py
kl1de/kl1de
5dc37467b48b4f7dc74292b79fc93a41a93112d0
[ "MIT" ]
7
2017-03-15T08:47:21.000Z
2018-11-28T10:36:41.000Z
opendc/api/v1/users/userId/authorizations/endpoint.py
atlarge-research/opendc-web-server
71aa937a9b7db7289d69ac85587387070d2af851
[ "MIT" ]
1
2017-01-25T15:12:44.000Z
2017-01-25T15:12:44.000Z
from opendc.models.authorization import Authorization from opendc.models.user import User from opendc.util import exceptions from opendc.util.rest import Response def GET(request): """Get this User's Authorizations.""" # Make sure required parameters are there try: request.check_required_paramet...
28.232558
93
0.673806
from opendc.models.authorization import Authorization from opendc.models.user import User from opendc.util import exceptions from opendc.util.rest import Response def GET(request): """Get this User's Authorizations.""" # Make sure required parameters are there try: request.check_required_paramet...
0
0
0
0
0
0
0
0
0
2fe5b5dbb3cb8f1c0b1fbea8afda79f441d3e54a
170
wsgi
Python
start.wsgi
isikacek/www
c42fe347c09a4133ce5d94b7c3a61fd88f466cd4
[ "MIT" ]
null
null
null
start.wsgi
isikacek/www
c42fe347c09a4133ce5d94b7c3a61fd88f466cd4
[ "MIT" ]
null
null
null
start.wsgi
isikacek/www
c42fe347c09a4133ce5d94b7c3a61fd88f466cd4
[ "MIT" ]
null
null
null
#from flask import Flask # #app = Flask(__name__, static_folder = 'static') #application = app # #if __name__ == '__main__': # app.run()
14.166667
48
0.682353
#from flask import Flask # #app = Flask(__name__, static_folder = 'static') #application = app # #if __name__ == '__main__': # app.run() from isikacek import views
0
0
0
0
0
0
0
5
23
edfd42c2264de2b9474f0c902505a02c407b2e12
1,622
py
Python
src/common/kinetic_law.py
mastevb/kinetics_validator
53ed309f1565d1abc30587c69ca4943c923b56bf
[ "MIT" ]
null
null
null
src/common/kinetic_law.py
mastevb/kinetics_validator
53ed309f1565d1abc30587c69ca4943c923b56bf
[ "MIT" ]
null
null
null
src/common/kinetic_law.py
mastevb/kinetics_validator
53ed309f1565d1abc30587c69ca4943c923b56bf
[ "MIT" ]
null
null
null
'''Provides Information on SBML Kinetics Laws'''
26.590164
58
0.691122
'''Provides Information on SBML Kinetics Laws''' from src.common import constants as cn from src.common import util from src.common import exceptions import collections import numpy as np import libsbml import zipfile class KineticLaw(object): def __init__(self, libsbml_kinetics, reaction): """ :param l...
0
0
0
1,377
0
0
0
15
179
15628dfdbeec278f42fc1d012f26fee973258183
2,969
py
Python
mjlib/util.py
mgroth0/matt_py_tools
aff2866ea29155abad393d8d92bf1c5369ae5dab
[ "MIT" ]
null
null
null
mjlib/util.py
mgroth0/matt_py_tools
aff2866ea29155abad393d8d92bf1c5369ae5dab
[ "MIT" ]
null
null
null
mjlib/util.py
mgroth0/matt_py_tools
aff2866ea29155abad393d8d92bf1c5369ae5dab
[ "MIT" ]
null
null
null
import os import time if os.name == 'nt': # from gtts import gTTS # from tempfile import TemporaryFile, NamedTemporaryFile # utility functions is_profiling = False last_profile_point = False profile = [] # set a profile point. If profiling is on, this point will be included with the message s # similar to ...
20.475862
104
0.575278
import os import sys import time import threading import time from os import system if os.name == 'nt': import win32com.client as wincl import pythoncom def pythonpath(): return os.environ['PYTHONPATH'] def println(s): print(s) def write(s): sys.stdout.write(s) sys.stdout.flush() # from ...
0
0
0
0
0
1,916
0
-21
529
64168e862541a555daf2f3f8d2d00608e6e0c3dd
6,013
py
Python
src/sage/monoids/free_abelian_monoid_element.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
3
2016-06-19T14:48:31.000Z
2022-01-28T08:46:01.000Z
src/sage/monoids/free_abelian_monoid_element.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
2
2018-10-30T13:40:20.000Z
2020-07-23T12:13:30.000Z
src/sage/monoids/free_abelian_monoid_element.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
7
2021-11-08T10:01:59.000Z
2022-03-03T11:25:52.000Z
""" Abelian Monoid Elements AUTHORS: - David Kohel (2005-09) EXAMPLES: Recall the example from abelian monoids:: sage: F = FreeAbelianMonoid(5,names = list("abcde")) sage: (a,b,c,d,e) = F.gens() sage: a*b^2*e*d a*b^2*d*e sage: x = b^2*e*d*a^7 sage: x a^7*b^2*d*e sage: x.list() [...
27.085586
81
0.471977
""" Abelian Monoid Elements AUTHORS: - David Kohel (2005-09) EXAMPLES: Recall the example from abelian monoids:: sage: F = FreeAbelianMonoid(5,names = list("abcde")) sage: (a,b,c,d,e) = F.gens() sage: a*b^2*e*d a*b^2*d*e sage: x = b^2*e*d*a^7 sage: x a^7*b^2*d*e sage: x.list() [...
0
0
0
4,631
0
0
0
73
112
19127349ffb53e3a826e7a4d169bb6b49a9eaee3
3,386
py
Python
missionaries.py
jmnel/combinatorial-optimization
c921dee6cb0febc47a8a791f8220b02b35caf0cf
[ "MIT" ]
null
null
null
missionaries.py
jmnel/combinatorial-optimization
c921dee6cb0febc47a8a791f8220b02b35caf0cf
[ "MIT" ]
null
null
null
missionaries.py
jmnel/combinatorial-optimization
c921dee6cb0febc47a8a791f8220b02b35caf0cf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import astar def solve_missionaries_cannibals_prob(): """ Solves the Missionaries and Canibals problem. The state is encoded by counting the number of missionaries and canibals on the left (final) bank. The location of the boat is also tracked by a 1 or 0. """ def h(s...
35.642105
89
0.519197
#!/usr/bin/env python3 import astar from enum import Enum def solve_missionaries_cannibals_prob(): """ Solves the Missionaries and Canibals problem. The state is encoded by counting the number of missionaries and canibals on the left (final) bank. The location of the boat is also tracked by a 1 or 0...
0
0
0
0
0
420
0
0
82
47c54f4c7022c2b77af0920f21108de53ef8c5ad
12,739
py
Python
modin/experimental/xgboost/xgboost_ray.py
btseytlin/modin
db784d55b17092c33794c3849cfe698f0cb9a7f7
[ "ECL-2.0", "Apache-2.0" ]
1
2021-05-19T04:01:17.000Z
2021-05-19T04:01:17.000Z
modin/experimental/xgboost/xgboost_ray.py
btseytlin/modin
db784d55b17092c33794c3849cfe698f0cb9a7f7
[ "ECL-2.0", "Apache-2.0" ]
57
2021-01-22T15:52:03.000Z
2021-06-12T18:22:04.000Z
modin/experimental/xgboost/xgboost_ray.py
btseytlin/modin
db784d55b17092c33794c3849cfe698f0cb9a7f7
[ "ECL-2.0", "Apache-2.0" ]
1
2022-01-29T12:12:42.000Z
2022-01-29T12:12:42.000Z
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
31.376847
131
0.613549
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
0
2,357
0
0
0
4,054
0
122
249
f49854f500fac5b76e832d6dc1520f21fc7df836
247
py
Python
run1-rdx/conds/cond-mc-2012-md-sim08h.py
umd-lhcb/lhcb-ntuples-gen
d306895a0dc6bad2def19ca3d7d1304a5a9be239
[ "BSD-2-Clause" ]
null
null
null
run1-rdx/conds/cond-mc-2012-md-sim08h.py
umd-lhcb/lhcb-ntuples-gen
d306895a0dc6bad2def19ca3d7d1304a5a9be239
[ "BSD-2-Clause" ]
105
2018-12-20T19:09:19.000Z
2022-03-19T09:53:06.000Z
run1-rdx/conds/cond-mc-2012-md-sim08h.py
umd-lhcb/lhcb-ntuples-gen
d306895a0dc6bad2def19ca3d7d1304a5a9be239
[ "BSD-2-Clause" ]
null
null
null
from Configurables import DaVinci DaVinci().DataType = '2012' DaVinci().Simulation = True DaVinci().TupleFile = 'mc.root' from Configurables import LHCbApp LHCbApp().CondDBtag = "sim-20130522-1-vc-md100" LHCbApp().DDDBtag = "dddb-20130829-1"
19
47
0.744939
from Configurables import DaVinci DaVinci().DataType = '2012' DaVinci().Simulation = True DaVinci().TupleFile = 'mc.root' from Configurables import LHCbApp LHCbApp().CondDBtag = "sim-20130522-1-vc-md100" LHCbApp().DDDBtag = "dddb-20130829-1"
0
0
0
0
0
0
0
0
0
719bd8fe079d4db4f5a9a8e1f0628fa7c4eeda61
1,847
py
Python
wakadump/cli.py
honsa/wakadump
6ec12237a85c6d760f1702f238b6fe2f0bfbcc1f
[ "BSD-3-Clause" ]
113
2015-06-09T01:22:26.000Z
2021-12-15T03:23:54.000Z
wakadump/cli.py
honsa/wakadump
6ec12237a85c6d760f1702f238b6fe2f0bfbcc1f
[ "BSD-3-Clause" ]
10
2015-09-08T18:58:20.000Z
2019-02-24T19:43:54.000Z
wakadump/cli.py
honsa/wakadump
6ec12237a85c6d760f1702f238b6fe2f0bfbcc1f
[ "BSD-3-Clause" ]
24
2015-09-08T18:46:37.000Z
2021-07-02T12:01:41.000Z
# -*- coding: utf-8 -*- """ wakadump.cli ~~~~~~~~~~~~ Command-line entry point. :copyright: (c) 2015 Alan Hamlett. :license: BSD, see LICENSE for more details. """
31.844828
114
0.591229
# -*- coding: utf-8 -*- """ wakadump.cli ~~~~~~~~~~~~ Command-line entry point. :copyright: (c) 2015 Alan Hamlett. :license: BSD, see LICENSE for more details. """ import click import simplejson as json import traceback from .__about__ import __version__ from .compat import import_module def ...
0
829
0
0
0
632
0
15
181
6a6b37ecf1f3cce113eb03beaaca30db2388446d
2,279
py
Python
dicom_wsi/extract_image_patches.py
Steven-N-Hart/dicom_wsi
254fc404193594e9b321fdefa2aeefb56a42e99a
[ "MIT" ]
6
2020-12-23T01:20:38.000Z
2022-01-13T09:06:20.000Z
dicom_wsi/extract_image_patches.py
Steven-N-Hart/dicom_wsi
254fc404193594e9b321fdefa2aeefb56a42e99a
[ "MIT" ]
5
2020-01-10T21:24:52.000Z
2020-08-18T20:04:39.000Z
dicom_wsi/extract_image_patches.py
Steven-N-Hart/dicom_wsi
254fc404193594e9b321fdefa2aeefb56a42e99a
[ "MIT" ]
6
2019-11-25T16:03:58.000Z
2021-09-25T11:42:16.000Z
"""Console script for dicom_wsi.""" import argparse import sys import logging import pydicom import os from PIL import Image def extract_imagepatches_dicom(dicom_file, image_dir): '''Pydicom help:https://pydicom.github.io/pydicom/stable/old/getting_started.html''' '''Pydicom object from input DICOM file''' ...
35.609375
125
0.698991
"""Console script for dicom_wsi.""" import argparse import sys import logging import pydicom import os from PIL import Image def extract_imagepatches_dicom(dicom_file, image_dir): '''Pydicom help:https://pydicom.github.io/pydicom/stable/old/getting_started.html''' '''Pydicom object from input DICOM file''' ...
0
0
0
0
0
0
0
0
0
739b5520214ac906323168dae6fa1a4d38ea43cc
792
py
Python
Foundation/seleniumpractice/day8_code/read_data.py
youaresherlock/PythonPractice
2e22d3fdcb26353cb0d8215c150e84d11bc9a022
[ "Apache-2.0" ]
null
null
null
Foundation/seleniumpractice/day8_code/read_data.py
youaresherlock/PythonPractice
2e22d3fdcb26353cb0d8215c150e84d11bc9a022
[ "Apache-2.0" ]
null
null
null
Foundation/seleniumpractice/day8_code/read_data.py
youaresherlock/PythonPractice
2e22d3fdcb26353cb0d8215c150e84d11bc9a022
[ "Apache-2.0" ]
1
2019-11-05T01:10:15.000Z
2019-11-05T01:10:15.000Z
#!usr/bin/python # -*- coding:utf8 -*- import yaml with open('data.yaml', 'r', encoding='utf8') as f: # results = f.read() # print('results={}'.format(results)) # load # Loader=yaml.FullLoader # results = yaml.load(f) results = yaml.load(f, Loader=yaml.FullLoader) print('results={}'.format...
16.5
67
0.593434
#!usr/bin/python # -*- coding:utf8 -*- import yaml with open('data.yaml', 'r', encoding='utf8') as f: # results = f.read() # print('results={}'.format(results)) # 直接使用load方法,会有方法弃用警告信息,不影响读取数据操作 # 如果要关闭,可以使用Loader=yaml.FullLoader关闭警告 # results = yaml.load(f) results = yaml.load(f, Loader=yaml....
219
0
0
0
0
0
0
0
0
07bcd65517d3903e9bcd9884f6956ca65aa68be1
257
py
Python
shub/__init__.py
ttilberg/shub
c99943230eefaccabf78a28d443a63dbda067931
[ "BSD-3-Clause" ]
null
null
null
shub/__init__.py
ttilberg/shub
c99943230eefaccabf78a28d443a63dbda067931
[ "BSD-3-Clause" ]
null
null
null
shub/__init__.py
ttilberg/shub
c99943230eefaccabf78a28d443a63dbda067931
[ "BSD-3-Clause" ]
null
null
null
__version__ = '2.8.1' # Links to documentation to use over the project sources DOCS_LINK = "https://shub.readthedocs.io/en/stable/" DEPLOY_DOCS_LINK = DOCS_LINK + "deploying.html#deploying-dependencies" CONFIG_DOCS_LINK = DOCS_LINK + "configuration.html"
32.125
70
0.77821
__version__ = '2.8.1' # Links to documentation to use over the project sources DOCS_LINK = "https://shub.readthedocs.io/en/stable/" DEPLOY_DOCS_LINK = DOCS_LINK + "deploying.html#deploying-dependencies" CONFIG_DOCS_LINK = DOCS_LINK + "configuration.html"
0
0
0
0
0
0
0
0
0
73968a0d6e1e389d126ef54efbbf5e6e3445302b
5,534
py
Python
scripts/addons/animation_nodes/execution/script_execution_unit.py
Tilapiatsu/blender-custom_conf
05592fedf74e4b7075a6228b8448a5cda10f7753
[ "MIT" ]
2
2020-04-16T22:12:40.000Z
2022-01-22T17:18:45.000Z
scripts/addons/animation_nodes/execution/script_execution_unit.py
Tilapiatsu/blender-custom_conf
05592fedf74e4b7075a6228b8448a5cda10f7753
[ "MIT" ]
null
null
null
scripts/addons/animation_nodes/execution/script_execution_unit.py
Tilapiatsu/blender-custom_conf
05592fedf74e4b7075a6228b8448a5cda10f7753
[ "MIT" ]
2
2019-05-16T04:01:09.000Z
2020-08-25T11:42:26.000Z
from .. utils.code import isCodeValid, getSyntaxError, containsStarImport from . compile_scripts import compileScript from .. problems import ExecutionUnitNotSetup from . code_generator import getSocketValueExpression, iterSetupCodeLines, getInitialVariables userCodeStartComment = "# User Code"
39.81295
140
0.645826
from .. utils.code import isCodeValid, getSyntaxError, containsStarImport from . compile_scripts import compileScript from .. problems import ExecutionUnitNotSetup from . code_generator import getSocketValueExpression, iterSetupCodeLines, getInitialVariables userCodeStartComment = "# User Code" class ScriptExecutionU...
0
0
0
4,953
0
215
0
0
69
0081093a44d4b8c7f560cdcd36e4b8de30db2c8b
507
py
Python
gaphor/UML/states/tests/test_pseudostates.py
MartinIIOT/gaphor
b08bf6ddb8c92ec87fccabc2ddee697609f73e67
[ "Apache-2.0" ]
null
null
null
gaphor/UML/states/tests/test_pseudostates.py
MartinIIOT/gaphor
b08bf6ddb8c92ec87fccabc2ddee697609f73e67
[ "Apache-2.0" ]
null
null
null
gaphor/UML/states/tests/test_pseudostates.py
MartinIIOT/gaphor
b08bf6ddb8c92ec87fccabc2ddee697609f73e67
[ "Apache-2.0" ]
null
null
null
from gaphor import UML from gaphor.UML.states.pseudostates import PseudostateItem def test_history_pseudostate(create): """Test creation of initial pseudostate.""" item = create(PseudostateItem, UML.Pseudostate) # history setting is done in the DiagramToolbox factory: item.subject.kind = "shallowHist...
31.6875
60
0.759369
from gaphor import UML from gaphor.UML.states.pseudostates import PseudostateItem def test_initial_pseudostate(create): item = create(PseudostateItem, UML.Pseudostate) assert "initial" == item.subject.kind def test_history_pseudostate(create): """Test creation of initial pseudostate.""" item = creat...
0
0
0
0
0
110
0
0
23
b63deb7967e639444bdad8b378f8b98f7a805409
1,143
py
Python
integration/aiohttp_cbv_server.py
baverman/covador
8c98b2ca6b382af4150ae8b4875faa3bdbd15473
[ "MIT" ]
7
2016-12-28T08:46:21.000Z
2020-09-14T10:28:33.000Z
integration/aiohttp_cbv_server.py
baverman/covador
8c98b2ca6b382af4150ae8b4875faa3bdbd15473
[ "MIT" ]
3
2016-11-03T11:13:50.000Z
2018-08-22T16:40:34.000Z
integration/aiohttp_cbv_server.py
baverman/covador
8c98b2ca6b382af4150ae8b4875faa3bdbd15473
[ "MIT" ]
6
2016-11-03T10:57:33.000Z
2018-08-20T19:59:03.000Z
import sys; sys.path.insert(0, '.') if __name__ == '__main__': main()
21.566038
71
0.622047
import sys; sys.path.insert(0, '.') from aiohttp import web from covador.aiohttp import query_string, json_body, form, params, args class QS(web.View): @query_string(boo=str) async def get(self, boo): return web.Response(text=boo) class Form(web.View): @form(p1=str, p2=int) async def post(s...
0
385
0
0
0
311
0
52
313
71121ed673592df6573e576f9c4f9c91f515fd8e
13,684
py
Python
src/gui/facilegraphicsview.py
facade-technologies-inc/facile
4c9134dced71734641fed605e152880cd9ddefe3
[ "MIT" ]
2
2020-09-17T20:51:18.000Z
2020-11-03T15:58:10.000Z
src/gui/facilegraphicsview.py
facade-technologies-inc/facile
4c9134dced71734641fed605e152880cd9ddefe3
[ "MIT" ]
97
2020-08-26T05:07:08.000Z
2022-03-28T16:01:49.000Z
src/gui/facilegraphicsview.py
facade-technologies-inc/facile
4c9134dced71734641fed605e152880cd9ddefe3
[ "MIT" ]
null
null
null
""" .. /------------------------------------------------------------------------------\ | -- FACADE TECHNOLOGIES INC. CONFIDENTIAL -- | |------------------------------------------------------------------------------| | ...
31.602771
112
0.682695
""" .. /------------------------------------------------------------------------------\ | -- FACADE TECHNOLOGIES INC. CONFIDENTIAL -- | |------------------------------------------------------------------------------| | ...
0
598
0
11,113
0
0
0
275
178
497ca6e81572745d1945ac6027f3c46e17a2de23
739
py
Python
cfeblog/dbs/mysql.py
codingforentrepreneurs/cfe-django-blog
23d5e8ca6ff46764338b96ddf6d93fe68e3b66c7
[ "MIT" ]
15
2022-03-17T20:10:59.000Z
2022-03-26T18:24:14.000Z
cfeblog/dbs/mysql.py
codingforentrepreneurs/cfe-django-blog
23d5e8ca6ff46764338b96ddf6d93fe68e3b66c7
[ "MIT" ]
null
null
null
cfeblog/dbs/mysql.py
codingforentrepreneurs/cfe-django-blog
23d5e8ca6ff46764338b96ddf6d93fe68e3b66c7
[ "MIT" ]
3
2022-03-17T20:11:05.000Z
2022-03-22T06:41:12.000Z
import os MYSQL_USER = os.environ.get("MYSQL_USER") MYSQL_PASSWORD = os.environ.get( "MYSQL_ROOT_PASSWORD" ) # using the ROOT User Password for Local Tests MYSQL_DATABASE = os.environ.get("MYSQL_DATABASE") MYSQL_HOST = os.environ.get("MYSQL_HOST") MYSQL_TCP_PORT = os.environ.get("MYSQL_TCP_PORT") MYSQL_DB_IS_AVAI...
28.423077
76
0.648173
import os MYSQL_USER = os.environ.get("MYSQL_USER") MYSQL_PASSWORD = os.environ.get( "MYSQL_ROOT_PASSWORD" ) # using the ROOT User Password for Local Tests MYSQL_DATABASE = os.environ.get("MYSQL_DATABASE") MYSQL_HOST = os.environ.get("MYSQL_HOST") MYSQL_TCP_PORT = os.environ.get("MYSQL_TCP_PORT") MYSQL_DB_IS_AVAI...
0
0
0
0
0
0
0
0
0
b8143be0a1389c796a6867b275a80644e5f63071
706
py
Python
examples/example1d.py
John-Hennig/KDE-diffusion
f0daee3294533808786ad6287fc1d70211bcc6dd
[ "MIT" ]
5
2020-05-13T00:57:08.000Z
2021-08-29T12:39:03.000Z
examples/example1d.py
john-hen/KDE-diffusion
5a540fe863fb022e6cc68b5737f732e8bee99f96
[ "MIT" ]
1
2021-05-16T09:41:13.000Z
2021-05-16T09:41:13.000Z
examples/example1d.py
john-hen/KDE-diffusion
5a540fe863fb022e6cc68b5737f732e8bee99f96
[ "MIT" ]
2
2022-01-03T15:03:57.000Z
2022-02-07T08:43:46.000Z
"""Code example for one-dimensional input data.""" # Sample data points from normal distribution. from numpy.random import normal x = normal(size=1000) # Estimate density within 5 standard deviations. from kde_diffusion import kde1d (density, grid, bandwidth) = kde1d(x, n=256, limits=5) # Calculate actual ...
30.695652
76
0.728045
"""Code example for one-dimensional input data.""" # Sample data points from normal distribution. from numpy.random import normal x = normal(size=1000) # Estimate density within ±5 standard deviations. from kde_diffusion import kde1d (density, grid, bandwidth) = kde1d(x, n=256, limits=5) # Calculate actua...
5
0
0
0
0
0
0
0
0
bde01dddde886fce59b5623fb69893588ccab3ee
2,992
py
Python
var/spack/repos/builtin/packages/tesseract/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/tesseract/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
8
2021-11-09T20:28:40.000Z
2022-03-15T03:26:33.000Z
var/spack/repos/builtin/packages/tesseract/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-08T20:37:20.000Z
2019-03-31T15:19:26.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT)
35.2
126
0.658757
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class Tesseract(AutotoolsPackage): """Tesseract Open Source OCR Engine.""" homepage...
0
411
0
2,331
0
0
0
6
46
f7758f64253c800e4c6ee339ecf3a2d15ef17809
1,083
py
Python
PythonNetCode/chapter9/9_2_save_packets_in_pcap_format.py
AirChen/PythonPractic
676708237dc502ea9a60218a3ca134874bd18456
[ "MIT" ]
null
null
null
PythonNetCode/chapter9/9_2_save_packets_in_pcap_format.py
AirChen/PythonPractic
676708237dc502ea9a60218a3ca134874bd18456
[ "MIT" ]
null
null
null
PythonNetCode/chapter9/9_2_save_packets_in_pcap_format.py
AirChen/PythonPractic
676708237dc502ea9a60218a3ca134874bd18456
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Python Network Programming Cookbook -- Chapter - 9 # This program is optimized for Python 2.7. # It may run on any other version with/without modifications. import os pkts = [] count = 0 pcapnum = 0 if __name__ == '__main__': print "Started packet capturing and dumping... Press CTRL+C to ...
23.543478
72
0.591874
#!/usr/bin/env python # Python Network Programming Cookbook -- Chapter - 9 # This program is optimized for Python 2.7. # It may run on any other version with/without modifications. import os from scapy.all import * pkts = [] count = 0 pcapnum = 0 def write_cap(x): global pkts global count global pcapnum ...
0
0
0
0
0
640
0
2
68
a479f0436af9af3fc45c3edbb96f7b488f02ddb2
2,313
py
Python
netsuite/util.py
thosieucoi/netsuite
0480c76a2745b2085fa1332d1f36b20a81ee27a4
[ "MIT" ]
6
2019-05-18T04:39:55.000Z
2022-03-03T22:29:50.000Z
netsuite/util.py
thosieucoi/netsuite
0480c76a2745b2085fa1332d1f36b20a81ee27a4
[ "MIT" ]
3
2020-01-30T21:23:18.000Z
2020-03-11T08:51:09.000Z
netsuite/util.py
thosieucoi/netsuite
0480c76a2745b2085fa1332d1f36b20a81ee27a4
[ "MIT" ]
11
2019-08-26T16:05:22.000Z
2020-08-15T13:03:50.000Z
import requests __all__ = ('cached_property', 'raise_for_status_with_body') def raise_for_status_with_body( response, on_bad_status=None ): """Raise exception on bad HTTP status and capture response body Also: * If an exception occurs the response body will be added to the excepti...
26.586207
116
0.618677
import sys import requests from io import StringIO __all__ = ('cached_property', 'raise_for_status_with_body') class cached_property: """ Decorator that turns an instance method into a cached property From https://speakerdeck.com/u/mitsuhiko/p/didntknow, slide #69 """ __NOT_SET = object() def _...
0
0
0
1,485
0
0
0
-9
91
86a4a75c313d2311055e0c9b2098cb21fbd3f4f4
1,783
py
Python
server/analysis/gpr/gprc.py
yangdsh/ottertune
9dbb30bcb1c9ae27feb24662630b4768ccb9009c
[ "Apache-2.0" ]
3
2019-09-27T07:57:08.000Z
2019-09-27T09:06:04.000Z
server/analysis/gpr/gprc.py
yangdsh/ottertune
9dbb30bcb1c9ae27feb24662630b4768ccb9009c
[ "Apache-2.0" ]
null
null
null
server/analysis/gpr/gprc.py
yangdsh/ottertune
9dbb30bcb1c9ae27feb24662630b4768ccb9009c
[ "Apache-2.0" ]
null
null
null
# # OtterTune - analysis/gprc.py # # Copyright (c) 2017-18, Carnegie Mellon University Database Group # # Author: Dana Van Aken from __future__ import absolute_import
36.387755
115
0.649467
# # OtterTune - analysis/gprc.py # # Copyright (c) 2017-18, Carnegie Mellon University Database Group # # Author: Dana Van Aken from __future__ import absolute_import import tensorflow as tf from gpflow import settings from gpflow.decors import autoflow, name_scope, params_as_tensors from gpflow.models import GPR c...
0
1,112
0
330
0
0
0
60
112
24873ad7bd61fd9f03cf9200b1275d556836c208
598
py
Python
hknweb/exams/migrations/0005_auto_20180423_0544.py
yuji3w/hknweb
0df5369da28f46dc9016da97652cb6b8e2b7f3e6
[ "MIT" ]
20
2018-01-07T02:15:43.000Z
2021-09-15T04:25:50.000Z
hknweb/exams/migrations/0005_auto_20180423_0544.py
yuji3w/hknweb
0df5369da28f46dc9016da97652cb6b8e2b7f3e6
[ "MIT" ]
292
2018-02-01T18:31:18.000Z
2022-03-30T22:15:08.000Z
hknweb/exams/migrations/0005_auto_20180423_0544.py
yuji3w/hknweb
0df5369da28f46dc9016da97652cb6b8e2b7f3e6
[ "MIT" ]
85
2017-11-13T06:33:13.000Z
2022-03-30T20:32:55.000Z
# Generated by Django 2.0.3 on 2018-04-23 05:44
24.916667
111
0.617057
# Generated by Django 2.0.3 on 2018-04-23 05:44 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('exams', '0004_auto_20180423_0536'), ] operations = [ migrations.RemoveField( model_name='course...
0
0
0
451
0
0
0
30
68
468a1a4de754ac9eeed69141b31735f34caa87e4
5,563
py
Python
Src/Models/BuildNetwork/BuildModelGather.py
DukeA/DAT02X-19-03-MachineLearning-Starcraft2
ade31deb4cf6cacd0c411c39310aeb1300561936
[ "MIT" ]
null
null
null
Src/Models/BuildNetwork/BuildModelGather.py
DukeA/DAT02X-19-03-MachineLearning-Starcraft2
ade31deb4cf6cacd0c411c39310aeb1300561936
[ "MIT" ]
null
null
null
Src/Models/BuildNetwork/BuildModelGather.py
DukeA/DAT02X-19-03-MachineLearning-Starcraft2
ade31deb4cf6cacd0c411c39310aeb1300561936
[ "MIT" ]
null
null
null
import pysc2.lib.features as features """ The class is a wrapper class for the State of the building location which checks the environment and places them in a grid structure. """
39.453901
114
0.624843
import numpy as np import pysc2.lib.features as features from Models.BuildNetwork.BuildingTerranQueue import BuildingTerranQueue from Models.BuildNetwork.BuildingNeutral import BuildingsNeutral """ The class is a wrapper class for the State of the building location which checks the environment and places...
0
0
0
5,183
0
0
0
90
89
06b45566b7d9d4d69d6d2b0a08bb27c97e5892a6
6,883
py
Python
RetinaFace/utils/loss.py
nypzxy/face_mask_lmks_detection
6d0374c7dc3d50aa57406f33c6e0ad342a6703c7
[ "MIT" ]
3
2020-05-08T10:22:12.000Z
2020-06-19T04:01:45.000Z
RetinaFace/utils/loss.py
nypzxy/face_mask_lmks_detection
6d0374c7dc3d50aa57406f33c6e0ad342a6703c7
[ "MIT" ]
1
2021-08-28T15:02:37.000Z
2021-08-28T15:02:37.000Z
RetinaFace/utils/loss.py
nypzxy/face_mask_lmks_detection
6d0374c7dc3d50aa57406f33c6e0ad342a6703c7
[ "MIT" ]
1
2020-06-01T09:42:28.000Z
2020-06-01T09:42:28.000Z
import torch.nn as nn
44.986928
172
0.596978
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from utils.box_utils import match, log_sum_exp class MultiBoxLoss(nn.Module): """SSD Weighted Loss Function Compute Targets: 1) Produce Confidence Target Indices by matching ground truth boxes ...
6
0
0
6,707
0
0
0
40
111
d117eb33a8ce33201cba474f137746201fd52eec
723
py
Python
two-strings.py
FTraian/hackerank-interviewprep
f4f861d2959136918a038218853da1df970be594
[ "CC0-1.0" ]
1
2021-06-19T08:30:22.000Z
2021-06-19T08:30:22.000Z
two-strings.py
FTraian/hackerank-interviewprep
f4f861d2959136918a038218853da1df970be594
[ "CC0-1.0" ]
null
null
null
two-strings.py
FTraian/hackerank-interviewprep
f4f861d2959136918a038218853da1df970be594
[ "CC0-1.0" ]
null
null
null
#!/bin/python3 # Complete the twoStrings function below. if __name__ == '__main__': # fptr = open(os.environ['OUTPUT_PATH'], 'w') q = int(input()) for q_itr in range(q): s1 = input() s2 = input() result = twoStrings(s1, s2) # fptr.write(result + '\n') # # fp...
17.214286
49
0.529737
#!/bin/python3 import math import os import random import re import sys # Complete the twoStrings function below. def twoStrings(s1, s2): m1 = set(s1) m2 = set(s2) if set.intersection(m1, m2): return "YES" return "NO" # This one is slower than required # for i in range(len(s1)): #...
0
0
0
0
0
312
0
-53
133
12c8bcae3d0ac88ae87fc6a00c7abcd7afaaa984
3,545
py
Python
wmt21-multi-low-res/combine_data.py
ufal/bergamot
6179daa51432e9cd7f4914364dbf2e45183951cf
[ "BSD-3-Clause" ]
null
null
null
wmt21-multi-low-res/combine_data.py
ufal/bergamot
6179daa51432e9cd7f4914364dbf2e45183951cf
[ "BSD-3-Clause" ]
null
null
null
wmt21-multi-low-res/combine_data.py
ufal/bergamot
6179daa51432e9cd7f4914364dbf2e45183951cf
[ "BSD-3-Clause" ]
1
2021-09-14T17:37:57.000Z
2021-09-14T17:37:57.000Z
import os import sys """ Convert all data to a single file. """ all_pairs= ['ca-it', 'ca-oc', 'ca-ro', 'ca-en', 'ca-fr', 'ca-pt', 'ca-es', 'en-it' 'en-oc' 'en-ro' 'es-it' 'es-oc' 'es-ro' 'fr-it' 'fr-oc' 'fr-ro'] if __name__ == '__main__': root_path = sys.argv[1] lang_pair = sys.argv[2]...
27.061069
85
0.581382
import os import sys """ Convert all data to a single file. """ all_pairs= ['ca-it', 'ca-oc', 'ca-ro', 'ca-en', 'ca-fr', 'ca-pt', 'ca-es', 'en-it' 'en-oc' 'en-ro' 'es-it' 'es-oc' 'es-ro' 'fr-it' 'fr-oc' 'fr-ro'] def check_files(folder_path, files, s, t): source = '' target = '' for f ...
0
0
0
0
0
2,036
0
0
92
0aa07a8bdb7134497194e14b0890bc534c94043b
2,941
py
Python
get_robot_states.py
Shihao-Feng-98/RRP_Hopper_simulation
444dbcce90d5ffb6bf577ed03adc9717183e21ae
[ "MIT" ]
4
2021-11-12T06:11:13.000Z
2022-03-30T12:10:47.000Z
get_robot_states.py
Shihao-Feng-98/RRP_Hopper_simulation
444dbcce90d5ffb6bf577ed03adc9717183e21ae
[ "MIT" ]
null
null
null
get_robot_states.py
Shihao-Feng-98/RRP_Hopper_simulation
444dbcce90d5ffb6bf577ed03adc9717183e21ae
[ "MIT" ]
3
2021-12-09T02:27:38.000Z
2022-03-29T06:48:08.000Z
''' only for RRP Hopper Shihao Feng 2021.10.28 '''
32.318681
94
0.590615
''' only for RRP Hopper Shihao Feng 2021.10.28 ''' import pybullet as p import numpy as np from leg_kinematics import LegKinematicsRRP class GetRobotStates(object): def __init__(self, planeId, robotId, jointIds, toeIds): self.planeId = planeId self.robotId = robotId self.jointIds = jointId...
9
0
0
2,771
0
0
0
18
90
54e1c7b417869b7853caec42dd713b2c556cf9c4
3,837
py
Python
pretraining/fairseq/criterions/masked_permutation_criterion.py
patrick-g-zhang/MPNet
dde76b7c833345a625dc4f21a1526080a084b9ed
[ "MIT" ]
null
null
null
pretraining/fairseq/criterions/masked_permutation_criterion.py
patrick-g-zhang/MPNet
dde76b7c833345a625dc4f21a1526080a084b9ed
[ "MIT" ]
null
null
null
pretraining/fairseq/criterions/masked_permutation_criterion.py
patrick-g-zhang/MPNet
dde76b7c833345a625dc4f21a1526080a084b9ed
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. #
34.881818
130
0.604639
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # import math import numpy as np import torch import torch.nn.functional as F from fairseq import utils from . import FairseqCriterion, register_criterion import pdb def accuracy(output, target): with torch.no_grad():...
0
3,378
0
0
0
148
0
10
203
31ca052671c37ac3028175c152480760df7e51df
265
py
Python
testsuite/struct-init-copy/run.py
3delight/OpenShadingLanguage
74616c3707b2e1c3bd76341ab88c66326d87de13
[ "BSD-2-Clause", "BSD-3-Clause" ]
2
2019-06-19T17:52:37.000Z
2021-08-03T19:40:23.000Z
testsuite/struct-init-copy/run.py
3delight/OpenShadingLanguage
74616c3707b2e1c3bd76341ab88c66326d87de13
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
testsuite/struct-init-copy/run.py
3delight/OpenShadingLanguage
74616c3707b2e1c3bd76341ab88c66326d87de13
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright Contributors to the Open Shading Language project. # SPDX-License-Identifier: BSD-3-Clause # https://github.com/imageworks/OpenShadingLanguage command = testshade("--layer a a --layer b b --connect a Aout b Ain -o Cout out.exr")
33.125
85
0.74717
#!/usr/bin/env python # Copyright Contributors to the Open Shading Language project. # SPDX-License-Identifier: BSD-3-Clause # https://github.com/imageworks/OpenShadingLanguage command = testshade("--layer a a --layer b b --connect a Aout b Ain -o Cout out.exr")
0
0
0
0
0
0
0
0
0
2d8c70e4b5db7946332c5f0954be94b1bbefe9c2
1,010
py
Python
gallery/views.py
iyerikuzwe/The-moringa-tribune
a234f4db9b0eb74deb278ab98b068b8392e18735
[ "Unlicense" ]
null
null
null
gallery/views.py
iyerikuzwe/The-moringa-tribune
a234f4db9b0eb74deb278ab98b068b8392e18735
[ "Unlicense" ]
null
null
null
gallery/views.py
iyerikuzwe/The-moringa-tribune
a234f4db9b0eb74deb278ab98b068b8392e18735
[ "Unlicense" ]
null
null
null
from django.shortcuts import render from .models import Image def home(request): """ Function that renders the landing page """ images = Image.get_images() return render(request, 'home.html', {"images":images}) def search_image(request): """ Function that searches images by category ""...
28.857143
92
0.666337
from django.http import HttpResponse from django.shortcuts import render from .models import Image def home(request): """ Function that renders the landing page """ images = Image.get_images() return render(request, 'home.html', {"images":images}) def search_image(request): """ Function t...
0
0
0
0
0
0
0
16
22
ae5af6a4706cccc13289a886c6f19c74619699c8
5,778
py
Python
predict_baseline.py
yukezhu/visual7w-toolkit
2ba129b58b3553a4dfc5defc619e3090770a9b70
[ "MIT" ]
67
2015-11-13T10:06:21.000Z
2022-03-10T02:41:18.000Z
predict_baseline.py
tianfeng80/visual7w-toolkit
59815be4ba619e4139ca5cf5b8af9394cb90a89a
[ "MIT" ]
1
2019-08-28T20:59:55.000Z
2019-08-28T20:59:55.000Z
predict_baseline.py
tianfeng80/visual7w-toolkit
59815be4ba619e4139ca5cf5b8af9394cb90a89a
[ "MIT" ]
20
2015-12-01T03:43:00.000Z
2022-03-10T02:41:05.000Z
import argparse import operator import json import random import os from common.data_provider import getDataProvider def main_freefrom_most_frequent_answers(params): """ Open-ended QA baseline: take the top five most frequent answers in the trianing set as the predicted answers to all the question...
33.593023
171
0.679474
import argparse import operator import json import random import os from common.data_provider import getDataProvider def main_freefrom_most_frequent_answers(params): """ Open-ended QA baseline: take the top five most frequent answers in the trianing set as the predicted answers to all the question...
0
0
0
0
0
0
0
0
0
d3c5a1141597b85596d483d57137739487f33e8c
1,244
py
Python
files/pluginlib_helper/pluginlib_helper.py
iteratec/Loomo-Ros-Crosscompile-Files
b8fb5adc4aeca19a297e5f4a02ce1947d1b5c92a
[ "Apache-2.0" ]
1
2020-07-19T06:54:27.000Z
2020-07-19T06:54:27.000Z
files/pluginlib_helper/pluginlib_helper.py
iteratec/Loomo-Ros-Crosscompile-Files
b8fb5adc4aeca19a297e5f4a02ce1947d1b5c92a
[ "Apache-2.0" ]
null
null
null
files/pluginlib_helper/pluginlib_helper.py
iteratec/Loomo-Ros-Crosscompile-Files
b8fb5adc4aeca19a297e5f4a02ce1947d1b5c92a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os, sys, inspect # get the real path to the script in case it is a symlink cmd_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile( inspect.currentframe() ))[0])) if cmd_folder not in sys.path: sys.path.insert(0, cmd_folder) if (__name__ == "__main__"): main()
31.897436
140
0.713826
#!/usr/bin/env python import os, sys, inspect import argparse import plugin_collect import pluginlib_helper_gen # get the real path to the script in case it is a symlink cmd_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile( inspect.currentframe() ))[0])) if cmd_folder not in sys.path: sys.pa...
0
0
0
0
0
837
0
0
89
b323138d837eca074fd9ccd4a1edc5a9fcc11dc9
830
py
Python
src/main.py
marisgg/pca_bats
8189034bad1769bae8938fd8a8f868692e09240d
[ "MIT" ]
null
null
null
src/main.py
marisgg/pca_bats
8189034bad1769bae8938fd8a8f868692e09240d
[ "MIT" ]
null
null
null
src/main.py
marisgg/pca_bats
8189034bad1769bae8938fd8a8f868692e09240d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 if __name__ == "__main__": main()
18.444444
81
0.515663
#!/usr/bin/env python3 import numpy as np from bat import Bat import functions import plot def run(pca, function, lb, ub, generations): alpha_gamma = 0.95 algorithm = Bat( # Dimension 100, # Population 100, # Generations generations, # Loudness 0...
0
0
0
0
0
653
0
-20
134
df0365171692170bef8feaf0f67e86977d22a19f
1,725
py
Python
tests/test_logic/test_harmony/test_Note.py
aParthemer/MidiCompose
1bed3d47b7b9b484b0ea02ba5e15bf8b51aaf11b
[ "MIT" ]
null
null
null
tests/test_logic/test_harmony/test_Note.py
aParthemer/MidiCompose
1bed3d47b7b9b484b0ea02ba5e15bf8b51aaf11b
[ "MIT" ]
7
2022-02-01T23:48:46.000Z
2022-03-17T02:36:34.000Z
tests/test_logic/test_harmony/test_Note.py
aParthemer/MidiCompose
1bed3d47b7b9b484b0ea02ba5e15bf8b51aaf11b
[ "MIT" ]
null
null
null
#### INITIALIZATION #### #### UTILITY METHODS #### #### SPECIAL METHODS ####
20.535714
67
0.549565
import pytest from MidiCompose.logic.harmony.note import Note #### INITIALIZATION #### @pytest.mark.parametrize( ["item", "expected_value"], [ (60, 60), ("C3", 60), ("D#6", 99), ("Db-1",13), ("C",0) ]) def test_constructor(item, expected_value): ...
0
1,430
0
0
0
0
0
18
171
0f37f066d1e89f7329d481bd8572a1951ccd5d35
1,306
py
Python
tbc_adapter/p12_converter.py
generikjano/tbc-adapter
38496070d65e0c60bd725f2a1068052cc50171cc
[ "MIT" ]
null
null
null
tbc_adapter/p12_converter.py
generikjano/tbc-adapter
38496070d65e0c60bd725f2a1068052cc50171cc
[ "MIT" ]
null
null
null
tbc_adapter/p12_converter.py
generikjano/tbc-adapter
38496070d65e0c60bd725f2a1068052cc50171cc
[ "MIT" ]
null
null
null
from OpenSSL.crypto import (FILETYPE_PEM, dump_certificate, dump_privatekey, load_pkcs12) import os def generate_pems(cert, password, out_dir, **kw): """ function generates (converts) .pem certificate and .pem private key from .p12 certificate and password params: cert [...
36.277778
81
0.643951
from OpenSSL.crypto import (FILETYPE_PEM, dump_certificate, dump_privatekey, load_pkcs12) import os def generate_pems(cert, password, out_dir, **kw): """ function generates (converts) .pem certificate and .pem private key from .p12 certificate and password p...
0
0
0
0
0
0
0
28
0
478341653e639193d9949b8a9a2f468c770e6f73
14,026
py
Python
rocket_launch_simulation.py
luccavn/rocket_launch_simulation
4efc4de259ed4ed2e16f1e4b8a9ee0d4c8066980
[ "MIT" ]
null
null
null
rocket_launch_simulation.py
luccavn/rocket_launch_simulation
4efc4de259ed4ed2e16f1e4b8a9ee0d4c8066980
[ "MIT" ]
null
null
null
rocket_launch_simulation.py
luccavn/rocket_launch_simulation
4efc4de259ed4ed2e16f1e4b8a9ee0d4c8066980
[ "MIT" ]
null
null
null
import pygame # Constantes de altura e velocidade, obrigatrias para o funcionamento do simulador: STAGE_HEIGHTS = [21, 38, 107, 122, 230, 240, 320, 350] STAGE_VELOCITIES = [1405.0, 1705.0, 2710.0, 2890.0, 5110.0, 5080.0, 4240.0, 3480.0, 7800.0] SCREEN_X, SCREEN_Y = (800, 600) # Co...
43.156923
176
0.643519
import pygame from pygame.locals import * from math import log as ln from math import tan from math import cos from math import fabs import matplotlib.pyplot as plt # Constantes de altura e velocidade, obrigatórias para o funcionamento do simulador: STAGE_HEIGHTS = [21, 38, 107, 122, 230, 240, 3...
90
0
0
2,656
0
1,253
0
19
328
c88b57b30aade2983460171cd7cc858410665686
100
py
Python
en/033/python/main.py
franciscogomes2020/exercises
8b33c4b9349a9331e4002a8225adc2a482c70024
[ "MIT" ]
null
null
null
en/033/python/main.py
franciscogomes2020/exercises
8b33c4b9349a9331e4002a8225adc2a482c70024
[ "MIT" ]
null
null
null
en/033/python/main.py
franciscogomes2020/exercises
8b33c4b9349a9331e4002a8225adc2a482c70024
[ "MIT" ]
null
null
null
# Make a program that reads three numbers and shows which is the largest and which is the smallest.
50
99
0.79
# Make a program that reads three numbers and shows which is the largest and which is the smallest.
0
0
0
0
0
0
0
0
0
7bfa535731bdd6755cf01437cc05f89f23ffb7bf
992
py
Python
ratings/models.py
SkimaniKings/Awards
2b92b73b07dfbee37b101aa724998ebfc2fa5313
[ "Unlicense" ]
null
null
null
ratings/models.py
SkimaniKings/Awards
2b92b73b07dfbee37b101aa724998ebfc2fa5313
[ "Unlicense" ]
4
2020-02-20T13:50:12.000Z
2021-09-08T01:41:28.000Z
ratings/models.py
SkimaniKings/Awards
2b92b73b07dfbee37b101aa724998ebfc2fa5313
[ "Unlicense" ]
null
null
null
# Create your models here.
21.565217
63
0.66129
from django.db import models from django.contrib.auth.models import User import datetime as dt # Create your models here. class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) image = models.ImageField(default="roman_reigns.jpg") contact = models.CharField(max_l...
0
0
0
809
0
0
0
29
116
3d0e20195223c22d2c4e6af4d26c039db40c5383
799
py
Python
scripts/quest/q6509e.py
pantskun/swordiemen
fc33ffec168e6611587fdc75de8270f6827a4176
[ "MIT" ]
null
null
null
scripts/quest/q6509e.py
pantskun/swordiemen
fc33ffec168e6611587fdc75de8270f6827a4176
[ "MIT" ]
null
null
null
scripts/quest/q6509e.py
pantskun/swordiemen
fc33ffec168e6611587fdc75de8270f6827a4176
[ "MIT" ]
null
null
null
# Spicy Expression (6509) alfonse = 2012020 fruit = 4032934 breath = 5160032 sm.setSpeakerID(alfonse) sm.sendNext("Hm. That bread was so yummy, but I need something more... " "Oh, is that fruit? It looks so very sweet! May I have some?") sm.giveItem(breath) sm.completeQuest(parentID) sm.consumeItem(fruit) sm.sendN...
31.96
72
0.68836
# Spicy Expression (6509) alfonse = 2012020 fruit = 4032934 breath = 5160032 sm.setSpeakerID(alfonse) sm.sendNext("Hm. That bread was so yummy, but I need something more... " "Oh, is that fruit? It looks so very sweet! May I have some?") sm.giveItem(breath) sm.completeQuest(parentID) sm.consumeItem(fruit) sm.sendN...
0
0
0
0
0
0
0
0
0
8ab38a2205bb19ff005d7e12754a28752ac719e0
19,288
py
Python
experiments/cifar_exps/subspace_ess.py
Yif-Yang/drbayes
da04196981adf04f472512a905a727bf712784c2
[ "BSD-2-Clause" ]
1
2020-11-25T03:54:15.000Z
2020-11-25T03:54:15.000Z
experiments/cifar_exps/subspace_ess.py
Yif-Yang/drbayes
da04196981adf04f472512a905a727bf712784c2
[ "BSD-2-Clause" ]
null
null
null
experiments/cifar_exps/subspace_ess.py
Yif-Yang/drbayes
da04196981adf04f472512a905a727bf712784c2
[ "BSD-2-Clause" ]
1
2021-01-07T16:08:48.000Z
2021-01-07T16:08:48.000Z
import argparse import os, sys import math import time import tabulate import torch import numpy as np from subspace_inference import models, utils from subspace_inference.posteriors import SWAG from subspace_inference.posteriors.proj_model import SubspaceModel from subspace_inference.posteriors.elliptical_slice imp...
43.149888
154
0.64439
import argparse import os, sys import math import time import tabulate import torch import numpy as np from subspace_inference import data, models, utils, losses from subspace_inference.posteriors import SWAG from subspace_inference.posteriors.proj_model import SubspaceModel from subspace_inference.posteriors.ellipt...
0
0
0
0
0
968
0
14
69
1757c25022cf921ff95e079df08eb1128230a4ca
1,683
py
Python
test/test_client_json_parsing.py
RiRomain/python-xiaomi-router
36867d077349a70678db75cf261428cdd80a0c51
[ "MIT" ]
null
null
null
test/test_client_json_parsing.py
RiRomain/python-xiaomi-router
36867d077349a70678db75cf261428cdd80a0c51
[ "MIT" ]
null
null
null
test/test_client_json_parsing.py
RiRomain/python-xiaomi-router
36867d077349a70678db75cf261428cdd80a0c51
[ "MIT" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
41.04878
78
0.591206
import json import unittest from xiaomirouter import create_client_from_json class JsonParsingTest(unittest.TestCase): def test_client_json_parsing(self): json_string = \ '{ "mac":"AA:BB:CC:DD:EE:FF", "oname":"oname1", "isap":0, ' \ '"parent":"", "authority":{ "wan":1, "pridisk":0...
0
0
0
1,532
0
0
0
17
68
4c4a1e391a147145aa335542d1035075f0f3aa89
16,674
py
Python
code/python/DocumentsDistributorDocuments/v1/fds/sdk/DocumentsDistributorDocuments/api/global_filings_api_api.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/DocumentsDistributorDocuments/v1/fds/sdk/DocumentsDistributorDocuments/api/global_filings_api_api.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/DocumentsDistributorDocuments/v1/fds/sdk/DocumentsDistributorDocuments/api/global_filings_api_api.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
""" Documents Distributor - Documents API Documents APIs that provide filings such as Global Filings and XML files such as StreetAccount Global Filings API provides the capability to search and download filings documents from various exchanges around the world. This API will provide access to the full histo...
47.913793
1,634
0.608072
""" Documents Distributor - Documents API Documents APIs that provide filings such as Global Filings and XML files such as StreetAccount Global Filings API provides the capability to search and download filings documents from various exchanges around the world. This API will provide access to the full histo...
0
677
0
13,534
0
0
0
423
251
9435e86b885ef55316d7bc9e159a3bed4f03d240
2,523
py
Python
signal_ocean/distances/_distances_json.py
lkattis-signal/SignalSDK
f085b9cae0495f4e016b9982df271efc6fd0a8f5
[ "Apache-2.0" ]
10
2020-09-29T06:36:45.000Z
2022-03-14T18:15:50.000Z
signal_ocean/distances/_distances_json.py
lkattis-signal/SignalSDK
f085b9cae0495f4e016b9982df271efc6fd0a8f5
[ "Apache-2.0" ]
53
2020-10-08T10:05:00.000Z
2022-03-29T14:21:18.000Z
signal_ocean/distances/_distances_json.py
lkattis-signal/SignalSDK
f085b9cae0495f4e016b9982df271efc6fd0a8f5
[ "Apache-2.0" ]
5
2020-09-25T07:48:04.000Z
2021-11-23T07:08:56.000Z
from typing import Mapping, Any JsonObject = Mapping[str, Any]
34.561644
72
0.608006
from typing import Mapping, cast, Any from decimal import Decimal from .models import RouteResponse, AlternativePath, PointsOnRoute, Point from .._internals import as_decimal JsonObject = Mapping[str, Any] def parse_route_response(json: JsonObject) -> RouteResponse: return RouteResponse( cast(int, json.g...
0
0
0
0
0
2,220
0
77
158
e873945d28d3b6b392de815f70800ea8e8f62eb4
16,667
py
Python
django_proj/main/views.py
pedron1tor/olearn
ed63c248d2fbf3e84fa493d44727e433d78fa442
[ "MIT" ]
null
null
null
django_proj/main/views.py
pedron1tor/olearn
ed63c248d2fbf3e84fa493d44727e433d78fa442
[ "MIT" ]
null
null
null
django_proj/main/views.py
pedron1tor/olearn
ed63c248d2fbf3e84fa493d44727e433d78fa442
[ "MIT" ]
null
null
null
# function for processing the "lessons" dataframe # Create your views here.
46.168975
201
0.590448
from django.shortcuts import render, redirect from django.contrib import messages from sqlalchemy import inspect import sqlalchemy import pandas as pd import ast import numpy as np from sqlalchemy.sql import exists import xgboost as xgb import plotly.express as px import plotly.io as pio import plotly.graph_objs as po ...
2
0
0
0
0
15,934
0
110
535
1b73d9f13c103ee1037e532265d275899df6ee7a
627
py
Python
bouncy-bullfrogs/bouncy/search/migrations/0002_auto_20200807_2343.py
nopeless/summer-code-jam-2020
d78f3b7dce304aa1302fa10e237dfa71957648dd
[ "MIT" ]
40
2020-08-02T07:38:22.000Z
2021-07-26T01:46:50.000Z
bouncy-bullfrogs/bouncy/search/migrations/0002_auto_20200807_2343.py
nopeless/summer-code-jam-2020
d78f3b7dce304aa1302fa10e237dfa71957648dd
[ "MIT" ]
134
2020-07-31T12:15:45.000Z
2020-12-13T04:42:19.000Z
bouncy-bullfrogs/bouncy/search/migrations/0002_auto_20200807_2343.py
nopeless/summer-code-jam-2020
d78f3b7dce304aa1302fa10e237dfa71957648dd
[ "MIT" ]
101
2020-07-31T12:00:47.000Z
2021-11-01T09:06:58.000Z
# Generated by Django 3.0.8 on 2020-08-07 18:13
29.857143
131
0.674641
# Generated by Django 3.0.8 on 2020-08-07 18:13 from django.db import migrations, models import pandas as pd def load_data(apps, schema_editor): data = pd.read_csv('search/search_data/recipes_serp_data.csv') Result = apps.get_model("search", "Result") for i in range(0, data.shape[0]): new_result = ...
0
0
0
147
0
325
0
17
90
a9304b3a9f175b4874d9454e76eec31f9e5e9c53
206
py
Python
solution/practice/algorithms/warmup/simple-array-sum/test.py
benevolentPreta/HackerRank_Py3
03c4bd9e2db2d91645b72b62b060d73f5ec7e437
[ "BSD-2-Clause" ]
null
null
null
solution/practice/algorithms/warmup/simple-array-sum/test.py
benevolentPreta/HackerRank_Py3
03c4bd9e2db2d91645b72b62b060d73f5ec7e437
[ "BSD-2-Clause" ]
1
2020-06-06T19:56:54.000Z
2020-06-06T19:56:54.000Z
solution/practice/algorithms/warmup/simple-array-sum/test.py
benevolentPreta/HackerRank_Py3
03c4bd9e2db2d91645b72b62b060d73f5ec7e437
[ "BSD-2-Clause" ]
null
null
null
test = map(int, input().strip().split()) print(f"{test}") #map object cannot be printed, must be list or tuple first print(list(test)) #print the sum of a map without list? #nope invalid print(sum(test))
20.6
58
0.703883
test = map(int, input().strip().split()) print(f"{test}") #map object cannot be printed, must be list or tuple first print(list(test)) #print the sum of a map without list? #nope invalid print(sum(test))
0
0
0
0
0
0
0
0
0
b16f5166afcc313d49e581d0c6faeeac73a6c7b3
10,160
py
Python
bartender.py
nickmy9729/Smart-Bartender
b6e55a04cd3d2dc545d830da4c069e9805d8b2db
[ "MIT" ]
null
null
null
bartender.py
nickmy9729/Smart-Bartender
b6e55a04cd3d2dc545d830da4c069e9805d8b2db
[ "MIT" ]
null
null
null
bartender.py
nickmy9729/Smart-Bartender
b6e55a04cd3d2dc545d830da4c069e9805d8b2db
[ "MIT" ]
null
null
null
#import RPi.GPIO as GPIO #import Adafruit_GPIO.SPI as SPI #import Adafruit_SSD1306 #from dotstar import Adafruit_DotStar #GPIO.setmode(GPIO.BCM) SCREEN_WIDTH = 128 SCREEN_HEIGHT = 64 LEFT_BTN_PIN = 13 LEFT_PIN_BOUNCE = 300 RIGHT_BTN_PIN = 5 RIGHT_PIN_BOUNCE = 300 OLED_RESET_PIN = 15 OLED_DC_PIN = 16 NUMBER_NEOP...
29.707602
194
0.657972
import pprint import time import sys #import RPi.GPIO as GPIO import json import traceback import threading #import Adafruit_GPIO.SPI as SPI #import Adafruit_SSD1306 from PIL import Image from PIL import ImageFont from PIL import ImageDraw #from dotstar import Adafruit_DotStar from drinks import drink_list, drink_op...
0
191
0
9,089
0
0
0
-12
289
dae8e479d785e3986844a76c82aa83680d253b3f
4,785
py
Python
deuNet/layers/core.py
shenxudeu/deuNN
81fcddd4da2be5f46d8e96e1a760a33a7e2579d2
[ "MIT" ]
1
2016-03-27T20:14:19.000Z
2016-03-27T20:14:19.000Z
deuNet/layers/core.py
shenxudeu/deuNet
81fcddd4da2be5f46d8e96e1a760a33a7e2579d2
[ "MIT" ]
null
null
null
deuNet/layers/core.py
shenxudeu/deuNet
81fcddd4da2be5f46d8e96e1a760a33a7e2579d2
[ "MIT" ]
null
null
null
from .. import activations, initializations from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams #srng = RandomStreams(seed=np.random.randint(10e6)) srng = RandomStreams() """ # Core Layer Modual: The key component - get_output(): call get_input(), then compute forward pass and return layer ...
32.114094
116
0.629049
import theano import theano.tensor as T import numpy as np from ..utils.theano_utils import shared_zeros, floatX, shared_scalar from .. import activations, initializations from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams #srng = RandomStreams(seed=np.random.randint(10e6)) srng = RandomStreams() i...
0
0
0
3,789
0
0
0
29
180
00bede9f2897391ad2f507b3e4d603a0b2243f37
5,403
py
Python
Scrapers/ScrapeJam.py
ss23/Lyrics-Database
dd38a4f8aa694edb278836e0b51e7270ae37342d
[ "MIT" ]
2
2017-03-26T06:34:43.000Z
2022-03-05T22:18:06.000Z
Scrapers/ScrapeJam.py
thinkbox/Lyrics-Database
b65d2c42c99fd399e9490f29512b15f4ce80a81d
[ "MIT" ]
null
null
null
Scrapers/ScrapeJam.py
thinkbox/Lyrics-Database
b65d2c42c99fd399e9490f29512b15f4ce80a81d
[ "MIT" ]
2
2016-07-04T16:53:58.000Z
2019-10-07T17:17:08.000Z
SJ_ARTIST = 0 SJ_ALBUM = 1 SJ_SONG = 2 # Fetch HTML with caching htmlCache = {}
31.782353
122
0.647233
from progressbar import ProgressBar, Bar, ETA, FormatLabel, Percentage import curses, time, traceback import htmlentitydefs, re, urllib2, json, sys SJ_ARTIST = 0 SJ_ALBUM = 1 SJ_SONG = 2 def unescape(text): # When sites try to get sneaky: LOL def fixup(m): text = m.group(0) if text[:2] == "&#": # ht...
0
0
0
4,116
0
964
0
82
157
356afbbf16bb44c8c36e543c3986db0e42688ac8
25,770
py
Python
experiment/core/utmLib/ml/BN.py
LeonDong1993/TractableDE-ContCNet
30e050eeef802308f4124bf56a161bae7f2e11c4
[ "MIT" ]
null
null
null
experiment/core/utmLib/ml/BN.py
LeonDong1993/TractableDE-ContCNet
30e050eeef802308f4124bf56a161bae7f2e11c4
[ "MIT" ]
null
null
null
experiment/core/utmLib/ml/BN.py
LeonDong1993/TractableDE-ContCNet
30e050eeef802308f4124bf56a161bae7f2e11c4
[ "MIT" ]
null
null
null
# coding: utf-8
26.677019
113
0.60326
# coding: utf-8 import numpy as np from copy import deepcopy from functools import partial from utmLib import utils from utmLib.ml.graph import Node, Graph from pdb import set_trace class BayesianNetwork: def __init__(self,g,ev): assert(g.digraph), "Only directed graph allowed" for i in range(g.N): ...
0
1,557
0
21,216
0
2,608
0
34
338
c7ae11e449df249e999820bcce656ef9b1cc3286
449
py
Python
carbon/client/metrics/simple.py
mosquito/carbonate
5eca69602b9fc03dc0b982f9104c7ebb04159059
[ "MIT" ]
2
2017-12-21T15:40:12.000Z
2018-02-07T10:00:14.000Z
carbon/client/metrics/simple.py
mosquito/carbonate
5eca69602b9fc03dc0b982f9104c7ebb04159059
[ "MIT" ]
2
2016-12-02T08:53:48.000Z
2016-12-05T21:46:04.000Z
carbon/client/metrics/simple.py
mosquito/carbonate
5eca69602b9fc03dc0b982f9104c7ebb04159059
[ "MIT" ]
5
2015-07-22T14:31:28.000Z
2020-09-30T08:20:29.000Z
# encoding: utf-8
22.45
66
0.639198
# encoding: utf-8 from carbon.client.metrics.base import Metric, MetricTypeBase class Counter(MetricTypeBase): def __init__(self, cleanup=None): MetricTypeBase.__init__(self, cleanup) self.value = 0 def add(self, value): self.value += value self._values.add(Metric(name=self.n...
0
0
0
345
0
0
0
40
45
55ce94d3e7535a6eca0cec833bd62a01c6f1915f
6,962
py
Python
desktop/core/src/desktop/lib/conf_test.py
civascu/hue
82f2de44789ff5a981ed725175bae7944832d1e9
[ "Apache-2.0" ]
2
2021-04-27T03:57:00.000Z
2021-06-18T09:39:58.000Z
desktop/core/src/desktop/lib/conf_test.py
civascu/hue
82f2de44789ff5a981ed725175bae7944832d1e9
[ "Apache-2.0" ]
null
null
null
desktop/core/src/desktop/lib/conf_test.py
civascu/hue
82f2de44789ff5a981ed725175bae7944832d1e9
[ "Apache-2.0" ]
2
2021-09-06T18:44:45.000Z
2022-02-24T04:10:10.000Z
#!/usr/bin/python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may no...
33.311005
85
0.637604
#!/usr/bin/python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may no...
0
0
0
5,956
0
0
0
-12
157
78b30b11cda72fbbe90c8009f4f13968484f8691
9,431
py
Python
src/tensorflow_node/nodes/autoencoder.py
elggem/tensorflow_node
8669fcfa058e54673c1348abf197dd1cfc373f68
[ "Unlicense" ]
9
2017-02-14T14:51:40.000Z
2020-02-13T19:31:56.000Z
src/tensorflow_node/nodes/autoencoder.py
elggem/ae-destin
8669fcfa058e54673c1348abf197dd1cfc373f68
[ "Unlicense" ]
1
2017-05-13T13:10:58.000Z
2018-02-23T05:52:19.000Z
src/tensorflow_node/nodes/autoencoder.py
elggem/ae-destin
8669fcfa058e54673c1348abf197dd1cfc373f68
[ "Unlicense" ]
4
2017-06-14T12:13:04.000Z
2020-11-01T12:38:07.000Z
# -*- coding: utf-8 -*- """ AE Node """
39.295833
158
0.607571
# -*- coding: utf-8 -*- """ AE Node """ import abc import random import tensorflow as tf import numpy as np import rospy from tensorflow_node import SummaryWriter class AutoEncoderNode(object): __metaclass__ = abc.ABCMeta # Initialization def __init__(self, session, ...
0
0
0
9,239
0
0
0
-9
157
7eb7c833f23f09e5157ebc43436f7bd739da8fd4
9,517
py
Python
doc/sphinxext/altair_ext/altairgallery.py
hydrosquall/altair
ded897b0967a88a467828b1e2c133bd92862de23
[ "BSD-3-Clause" ]
null
null
null
doc/sphinxext/altair_ext/altairgallery.py
hydrosquall/altair
ded897b0967a88a467828b1e2c133bd92862de23
[ "BSD-3-Clause" ]
null
null
null
doc/sphinxext/altair_ext/altairgallery.py
hydrosquall/altair
ded897b0967a88a467828b1e2c133bd92862de23
[ "BSD-3-Clause" ]
null
null
null
import os import shutil import warnings import json import random from operator import itemgetter import jinja2 from subprocess import CalledProcessError from .utils import create_thumbnail, prev_this_next, dict_hash from altair import Chart from altair.examples import iter_examples_with_metadata GALLERY_TEMPLATE ...
32.152027
91
0.59378
import os import shutil import warnings import json import random from operator import itemgetter import jinja2 from subprocess import CalledProcessError from docutils import nodes from docutils.statemachine import ViewList from docutils.parsers.rst.directives import flag from sphinx.util.compat import Directive fr...
0
0
0
1,831
0
1,579
0
125
181
4bd1591b4b8f20b6ce89cb2d1520394b823e4b38
1,857
py
Python
db/main_db.py
oyvindbusk/fullFres
2f835d64d87b1e31a3524d303f8c475ac57c9a20
[ "MIT" ]
1
2022-03-22T11:47:32.000Z
2022-03-22T11:47:32.000Z
db/main_db.py
oyvindbusk/fullFres
2f835d64d87b1e31a3524d303f8c475ac57c9a20
[ "MIT" ]
null
null
null
db/main_db.py
oyvindbusk/fullFres
2f835d64d87b1e31a3524d303f8c475ac57c9a20
[ "MIT" ]
null
null
null
import sys sys.path.insert(0, '/illumina/analysis/dev/2022/mfahls/fullFres/fullFres/backend') sys.path.insert(0, '/illumina/analysis/dev/2022/mfahls/fullFres/fullFres/db') from vcfutils import parse_thermo_vcf from vcfutils import explode_format_gt from vcfutils import explode_info from vcfutils import explode_fu...
35.711538
83
0.810447
import pandas as pd import sys sys.path.insert(0, '/illumina/analysis/dev/2022/mfahls/fullFres/fullFres/backend') sys.path.insert(0, '/illumina/analysis/dev/2022/mfahls/fullFres/fullFres/db') from vcfutils import parse_thermo_vcf from vcfutils import filter_nocalls from vcfutils import explode_format_gt from vcf...
0
0
0
0
0
0
0
12
46
eb4358b19d6cf82546b9551c415809a40beeba55
3,951
py
Python
ambari-agent/src/main/python/ambari_agent/ComponentVersionReporter.py
likenamehaojie/Apache-Ambari-ZH
5973025bd694cdbb4b49fb4c4e0d774782811ff6
[ "Apache-2.0" ]
1,664
2015-01-03T09:35:21.000Z
2022-03-31T04:55:24.000Z
ambari-agent/src/main/python/ambari_agent/ComponentVersionReporter.py
likenamehaojie/Apache-Ambari-ZH
5973025bd694cdbb4b49fb4c4e0d774782811ff6
[ "Apache-2.0" ]
3,018
2015-02-19T20:16:10.000Z
2021-11-13T20:47:48.000Z
ambari-agent/src/main/python/ambari_agent/ComponentVersionReporter.py
likenamehaojie/Apache-Ambari-ZH
5973025bd694cdbb4b49fb4c4e0d774782811ff6
[ "Apache-2.0" ]
1,673
2015-01-06T14:14:42.000Z
2022-03-31T07:22:30.000Z
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
35.918182
179
0.749431
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
0
0
0
2,966
0
0
0
54
113
d8356547bfcdc1160b7b20fdba7f9bc82e6b549d
434,487
py
Python
pyboto3/rds.py
thecraftman/pyboto3
653a0db2b00b06708334431da8f169d1f7c7734f
[ "MIT" ]
null
null
null
pyboto3/rds.py
thecraftman/pyboto3
653a0db2b00b06708334431da8f169d1f7c7734f
[ "MIT" ]
null
null
null
pyboto3/rds.py
thecraftman/pyboto3
653a0db2b00b06708334431da8f169d1f7c7734f
[ "MIT" ]
null
null
null
''' The MIT License (MIT) Copyright (c) 2016 WavyCloud Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p...
45.071266
949
0.616018
''' The MIT License (MIT) Copyright (c) 2016 WavyCloud Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p...
0
0
0
0
0
0
0
0
0
7fffc033667077b8b02ca4bbb4af8f94c27fd54d
6,981
py
Python
scapy_http_get.py
cjwaian/scapy-http-get
4ee34fd03ef8a26c9077dc0d58f63f4ac0c3c36b
[ "MIT" ]
2
2019-07-02T07:04:35.000Z
2021-11-15T10:43:20.000Z
scapy_http_get.py
cjwaian/scapy-http-get
4ee34fd03ef8a26c9077dc0d58f63f4ac0c3c36b
[ "MIT" ]
null
null
null
scapy_http_get.py
cjwaian/scapy-http-get
4ee34fd03ef8a26c9077dc0d58f63f4ac0c3c36b
[ "MIT" ]
1
2020-06-25T12:05:24.000Z
2020-06-25T12:05:24.000Z
import argparse default_target_domain = 'icanhazip.com' default_dns_server = '8.8.8.8' parser = argparse.ArgumentParser(description='Perform HTTP GET request with Scapy.') parser.add_argument('--target','-t', action="store", default=default_target_domain, help='Specify HTTP Target domain: default=%s'%default_target_d...
42.054217
190
0.698181
from scapy.all import * import sys import random import subprocess import argparse default_target_domain = 'icanhazip.com' default_dns_server = '8.8.8.8' parser = argparse.ArgumentParser(description='Perform HTTP GET request with Scapy.') parser.add_argument('--target','-t', action="store", default=default_target_dom...
0
0
0
0
0
6,206
0
-21
226
73b764ab0ca5f9f71b06a858c381c86d356e7057
877
py
Python
Leet Code/Merge Two Sorted Lists.py
nileshdas/Competitive-Programming-Solutions
6a992f3240f2369236829524f2f3798f80bd3219
[ "MIT" ]
28
2017-11-08T11:52:11.000Z
2021-07-16T06:30:02.000Z
Leet Code/Merge Two Sorted Lists.py
nileshdas/Competitive-Programming-Solutions
6a992f3240f2369236829524f2f3798f80bd3219
[ "MIT" ]
null
null
null
Leet Code/Merge Two Sorted Lists.py
nileshdas/Competitive-Programming-Solutions
6a992f3240f2369236829524f2f3798f80bd3219
[ "MIT" ]
30
2017-09-01T09:14:27.000Z
2021-04-12T12:08:56.000Z
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next
25.794118
56
0.428734
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def mergeTwoLists(self, a, b): if a is None: return b if b is None: return a if a.val > b.va...
0
0
0
692
0
0
0
0
22
45417008d8a6eb3cecf1e72b17cca1b5f839f009
1,841
py
Python
fragdenstaat_de/theme/management/commands/attach_topics.py
Algram/fragdenstaat_de
25bc2829f932d49cf19f457d0e3ef6df5536886a
[ "MIT" ]
null
null
null
fragdenstaat_de/theme/management/commands/attach_topics.py
Algram/fragdenstaat_de
25bc2829f932d49cf19f457d0e3ef6df5536886a
[ "MIT" ]
null
null
null
fragdenstaat_de/theme/management/commands/attach_topics.py
Algram/fragdenstaat_de
25bc2829f932d49cf19f457d0e3ef6df5536886a
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*-
29.222222
105
0.569256
# -*- encoding: utf-8 -*- from django.core.management.base import BaseCommand from django.utils import translation from django.conf import settings class Command(BaseCommand): help = "Attach topic to jurisdiction's public bodies" topic_cache = {} def add_arguments(self, parser): parser.add_argume...
0
0
0
1,669
0
0
0
56
89
5e462bbf6c465d164e3ade4539171d330b0919f3
3,200
py
Python
Multivariate Forecasting with LSTM (Multiple Input Series).py
deepeshdm/Time-Series-Forecasting
1d763dc24eb2ada9187a3a1460f040feba8db983
[ "MIT" ]
null
null
null
Multivariate Forecasting with LSTM (Multiple Input Series).py
deepeshdm/Time-Series-Forecasting
1d763dc24eb2ada9187a3a1460f040feba8db983
[ "MIT" ]
null
null
null
Multivariate Forecasting with LSTM (Multiple Input Series).py
deepeshdm/Time-Series-Forecasting
1d763dc24eb2ada9187a3a1460f040feba8db983
[ "MIT" ]
null
null
null
from numpy import array import matplotlib.pyplot as plt import pandas as pd from tensorflow.python.keras.layers import LSTM from tensorflow.python.keras.models import Sequential from tensorflow.keras.layers import Dense # ------------------------------------------------------------------ # CREATING 2 PARAL...
25
79
0.579375
from numpy import array import matplotlib.pyplot as plt import pandas as pd from tensorflow.python.keras.layers import LSTM from tensorflow.python.keras.models import Sequential from tensorflow.keras.layers import Dense # ------------------------------------------------------------------ # CREATING 2 PARAL...
0
0
0
0
0
468
0
0
23
0e260a1dd29fa16250c9e4e9d224c5d77cf9d2f0
42
py
Python
tests/__init__.py
adityaprakash-bobby/retry_module
638da71b8766fed2fa47ab643f3dfc6e97f9285b
[ "MIT" ]
null
null
null
tests/__init__.py
adityaprakash-bobby/retry_module
638da71b8766fed2fa47ab643f3dfc6e97f9285b
[ "MIT" ]
1
2020-12-19T13:01:05.000Z
2020-12-19T13:23:04.000Z
tests/__init__.py
adityaprakash-bobby/retry_module
638da71b8766fed2fa47ab643f3dfc6e97f9285b
[ "MIT" ]
null
null
null
"""Unit test package for retry_module."""
21
41
0.714286
"""Unit test package for retry_module."""
0
0
0
0
0
0
0
0
0
a5ae6fec3bd2f7e32eac1aa75f75dde73808e1c8
1,112
py
Python
app/wirecard/migrations/0001_initial.py
michel-rodrigues/viggio_backend
f419f0b939209722e1eb1e272f33de172cd5c1f1
[ "MIT" ]
null
null
null
app/wirecard/migrations/0001_initial.py
michel-rodrigues/viggio_backend
f419f0b939209722e1eb1e272f33de172cd5c1f1
[ "MIT" ]
null
null
null
app/wirecard/migrations/0001_initial.py
michel-rodrigues/viggio_backend
f419f0b939209722e1eb1e272f33de172cd5c1f1
[ "MIT" ]
null
null
null
# Generated by Django 2.2.7 on 2019-12-05 00:57
34.75
152
0.607014
# Generated by Django 2.2.7 on 2019-12-05 00:57 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('orders', '0001_initial'), ] operations = [ migrations.CreateModel( name='Wi...
0
0
0
965
0
0
0
30
68
aeb72e4c139071b185ed586029cca5ecd7e9d867
8,570
py
Python
conv_lstm.py
jaydurant/Coms6998Project
8ce608d6bc933d387b703760791e2f91a05eda13
[ "MIT" ]
null
null
null
conv_lstm.py
jaydurant/Coms6998Project
8ce608d6bc933d387b703760791e2f91a05eda13
[ "MIT" ]
null
null
null
conv_lstm.py
jaydurant/Coms6998Project
8ce608d6bc933d387b703760791e2f91a05eda13
[ "MIT" ]
null
null
null
""" ## Introduction The [Convolutional LSTM](https://papers.nips.cc/paper/2015/file/07563a3fe3bbe7e3ba84431ad9d055af-Paper.pdf) architectures bring together time series processing and computer vision by introducing a convolutional recurrent cell in a LSTM layer. In this example, we will explore the Convolutional LSTM...
32.218045
120
0.718086
""" ## Introduction The [Convolutional LSTM](https://papers.nips.cc/paper/2015/file/07563a3fe3bbe7e3ba84431ad9d055af-Paper.pdf) architectures bring together time series processing and computer vision by introducing a convolutional recurrent cell in a LSTM layer. In this example, we will explore the Convolutional LSTM...
0
0
0
0
0
564
0
62
177
3d8c0d11d38ab6fc017ad064138f57e4308c8ae1
1,071
py
Python
linguistica/ngram.py
inspiredideas/lxa5
156f825f5d56300779648e8b1ec6879acdaf47ad
[ "MIT" ]
29
2016-02-10T16:49:33.000Z
2022-03-24T05:54:08.000Z
linguistica/ngram.py
inspiredideas/lxa5
156f825f5d56300779648e8b1ec6879acdaf47ad
[ "MIT" ]
7
2017-09-17T19:19:59.000Z
2020-10-26T09:43:11.000Z
linguistica/ngram.py
inspiredideas/lxa5
156f825f5d56300779648e8b1ec6879acdaf47ad
[ "MIT" ]
18
2016-07-15T15:43:57.000Z
2021-09-02T05:57:32.000Z
# -*- encoding: utf8 -*-
26.121951
74
0.666667
# -*- encoding: utf8 -*- from collections import Counter from linguistica.util import fix_punctuations def run(corpus_file_object=None, keep_case=False, max_word_tokens=0): unigrams_counter = Counter() bigrams_counter = Counter() trigrams_counter = Counter() current_word_token_count = 0 for l...
0
0
0
0
0
942
0
34
69
124eb640860d6777689d203d7a6cee774cae006f
2,127
py
Python
tests/test_automechanic/test_parse/test_chemkin.py
avcopan/automechanic-history-save
3140694950150d49c06545905413d9eeb163ff2d
[ "Apache-2.0" ]
null
null
null
tests/test_automechanic/test_parse/test_chemkin.py
avcopan/automechanic-history-save
3140694950150d49c06545905413d9eeb163ff2d
[ "Apache-2.0" ]
null
null
null
tests/test_automechanic/test_parse/test_chemkin.py
avcopan/automechanic-history-save
3140694950150d49c06545905413d9eeb163ff2d
[ "Apache-2.0" ]
null
null
null
""" test the automechanic.parse.chemkin module """ from __future__ import unicode_literals from builtins import open import os from automechanic.parse import chemkin PATH = os.path.dirname(os.path.realpath(__file__)) NATGAS_PATH = os.path.join(PATH, '../../../examples/natgas') HEPTANE_PATH = os.path.join(PATH, '../../...
33.234375
70
0.70851
""" test the automechanic.parse.chemkin module """ from __future__ import unicode_literals from builtins import open import os from automechanic.parse import chemkin PATH = os.path.dirname(os.path.realpath(__file__)) NATGAS_PATH = os.path.join(PATH, '../../../examples/natgas') HEPTANE_PATH = os.path.join(PATH, '../../...
0
0
0
0
0
0
0
0
0
8629e87778ff59e51eb943f4cecc227e702a9f5d
22,484
py
Python
pyleecan/Classes/OutMag.py
ajpina/pyleecan
f8d1fce7d108cf443f5767e35d59ff15905fb49f
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/OutMag.py
ajpina/pyleecan
f8d1fce7d108cf443f5767e35d59ff15905fb49f
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/OutMag.py
ajpina/pyleecan
f8d1fce7d108cf443f5767e35d59ff15905fb49f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Output/OutMag.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Output/OutMag """ # Import all class method # Try/catch to remove unnecessary de...
32.823358
108
0.575209
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Output/OutMag.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Output/OutMag """ from os import linesep from sys import getsizeof from logging ...
0
0
0
21,189
0
0
0
194
311
1f4fe4c4889192aa26967c33b7be395d0034df59
850
py
Python
tests/browser/pages/profile/autocomplete_callbacks.py
mayank-sfdc/directory-tests
6e978bc1a27c19389e99e454143122aa27e47b85
[ "MIT" ]
4
2017-06-02T09:09:10.000Z
2018-01-25T19:06:12.000Z
tests/browser/pages/profile/autocomplete_callbacks.py
mayank-sfdc/directory-tests
6e978bc1a27c19389e99e454143122aa27e47b85
[ "MIT" ]
53
2016-10-27T22:31:03.000Z
2022-03-07T11:18:25.000Z
tests/browser/pages/profile/autocomplete_callbacks.py
mayank-sfdc/directory-tests
6e978bc1a27c19389e99e454143122aa27e47b85
[ "MIT" ]
3
2017-11-22T11:42:40.000Z
2022-02-21T01:20:04.000Z
# -*- coding: utf-8 -*- """Various form autocomplete callbacks""" import logging import random from selenium.webdriver.common.by import By from selenium.webdriver.remote.webdriver import WebDriver from pages.common_actions import Selector, find_element, find_elements def enrol_autocomplete_company_name(driver: WebD...
35.416667
85
0.738824
# -*- coding: utf-8 -*- """Various form autocomplete callbacks""" import logging import random from selenium.webdriver.common.by import By from selenium.webdriver.remote.webdriver import WebDriver from pages.common_actions import Selector, find_element, find_elements def enrol_autocomplete_company_name(driver: WebD...
0
0
0
0
0
0
0
0
0
dccf0a537b61528951bc83035b90e93a7dc21a55
9,381
py
Python
kamereon/sensor.py
dutchdevil83/kamereon-python
9bf149c9cb132e48ec34da1391a7a4b9c37ee50b
[ "Apache-2.0" ]
13
2020-02-23T23:15:40.000Z
2022-01-29T18:09:06.000Z
kamereon/sensor.py
dutchdevil83/kamereon-python
9bf149c9cb132e48ec34da1391a7a4b9c37ee50b
[ "Apache-2.0" ]
9
2020-04-06T17:52:22.000Z
2022-02-03T17:48:39.000Z
kamereon/sensor.py
dutchdevil83/kamereon-python
9bf149c9cb132e48ec34da1391a7a4b9c37ee50b
[ "Apache-2.0" ]
7
2020-03-28T21:00:41.000Z
2022-01-29T13:57:21.000Z
"""Support for Kamereon car sensors.""" import logging _LOGGER = logging.getLogger(__name__)
28.776074
106
0.659311
"""Support for Kamereon car sensors.""" import logging from homeassistant.const import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_POWER, DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_TIMESTAMP, LENGTH_KILOMETERS, POWER_WATT, STATE_UNKNOWN, TEMP_CELSIUS, TIME_MINUTES, UNIT_PERCENTAGE, VOLUME_LITERS) from . import DATA_...
0
4,920
1,233
2,526
0
0
0
253
344
d6c81b3cfe33222416348d1a45d3cfd524bdd697
3,083
py
Python
python/tvm/_ffi/module.py
Coderx7/incubator-tvm
88d0f5cceb7f7cc481b6b9724368e816aa71dffd
[ "Apache-2.0" ]
1
2020-04-17T07:11:59.000Z
2020-04-17T07:11:59.000Z
python/tvm/_ffi/module.py
Coderx7/incubator-tvm
88d0f5cceb7f7cc481b6b9724368e816aa71dffd
[ "Apache-2.0" ]
null
null
null
python/tvm/_ffi/module.py
Coderx7/incubator-tvm
88d0f5cceb7f7cc481b6b9724368e816aa71dffd
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
31.141414
72
0.637691
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
0
293
0
1,760
0
0
0
77
89
bd7ab392cc6bff31202287265d8e861a9ddafc8b
3,612
py
Python
tests/test_headers.py
sobolevn/kiss-headers
b26bce2653366c47b8b55b9a010fbaf724b58f33
[ "MIT" ]
103
2020-03-16T11:04:42.000Z
2022-01-11T12:37:22.000Z
tests/test_headers.py
sobolevn/kiss-headers
b26bce2653366c47b8b55b9a010fbaf724b58f33
[ "MIT" ]
31
2020-03-18T20:29:21.000Z
2021-09-28T13:54:11.000Z
tests/test_headers.py
sobolevn/kiss-headers
b26bce2653366c47b8b55b9a010fbaf724b58f33
[ "MIT" ]
8
2020-03-15T19:56:37.000Z
2021-07-01T05:07:25.000Z
import unittest if __name__ == "__main__": unittest.main()
29.606557
129
0.563953
import unittest from kiss_headers import Header class MyKissHeaderTest(unittest.TestCase): def test_invalid_eq(self): header = Header( "Message-ID", "<455DADE4FB733C4C8F62EB4CEB36D8DE05037EA94F@johndoe>" ) with self.assertRaises(NotImplementedError): k = header =...
0
0
0
3,490
0
0
0
10
46
2d73e5dadc93681cd7547e9e0392ea4945e42087
3,430
py
Python
src/get_calendar.py
ZaenChou/conky
ed34d70f97c0ad989f8d020679e828167800773b
[ "Apache-2.0" ]
3
2018-01-03T07:57:56.000Z
2018-04-04T16:32:12.000Z
src/get_calendar.py
zaen323/conky
ed34d70f97c0ad989f8d020679e828167800773b
[ "Apache-2.0" ]
null
null
null
src/get_calendar.py
zaen323/conky
ed34d70f97c0ad989f8d020679e828167800773b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from __future__ import print_function # If modifying these scopes, delete your previously saved credentials # at ~/.config/conky/.credential/ SCOPES = 'https://www.googleapis.com/auth/calendar.readonly' CLIENT_SECRET_FILE = 'client_secret.json' APPLICATION_NAME = 'conky-calendar' API_CLIENT_ID...
37.692308
118
0.630904
#!/usr/bin/env python3 from __future__ import print_function import httplib2 import os from apiclient import discovery from oauth2client.tools import run_flow from oauth2client.file import Storage from oauth2client.client import OAuth2WebServerFlow import datetime import dateutil.tz import array # If modifying the...
0
0
0
0
0
2,652
0
38
246
201e15fe4efe77284a340473ff84e0af46013898
333
py
Python
tap_bigquery/utils.py
tailsdotcom/tap-bigquery
225d517b7e0ae7c2c49d4645d69494102de1ba23
[ "Apache-2.0" ]
10
2020-10-05T15:21:57.000Z
2022-02-02T14:23:25.000Z
tap_bigquery/utils.py
tailsdotcom/tap-bigquery
225d517b7e0ae7c2c49d4645d69494102de1ba23
[ "Apache-2.0" ]
11
2020-08-23T20:56:40.000Z
2022-02-03T16:24:08.000Z
tap_bigquery/utils.py
tailsdotcom/tap-bigquery
225d517b7e0ae7c2c49d4645d69494102de1ba23
[ "Apache-2.0" ]
5
2020-11-18T11:58:40.000Z
2022-02-18T11:53:17.000Z
LOGGER = None
20.8125
74
0.591592
import logging, sys LOGGER = None def get_logger(name="handoff"): global LOGGER if not LOGGER: logging.basicConfig( stream=sys.stdout, format="%(levelname)s - %(asctime)s - %(name)s - %(message)s", level=logging.INFO) LOGGER = logging.getLogger(name) r...
0
0
0
0
0
273
0
-2
45
c7a18d5c4353ac67e08b30c75b5f0e0a1834a073
980
py
Python
pathSum.py
saai/LeetcodePythonSolutions
201f2054dda3f303ae6a376b40cbc7f98688322c
[ "MIT" ]
null
null
null
pathSum.py
saai/LeetcodePythonSolutions
201f2054dda3f303ae6a376b40cbc7f98688322c
[ "MIT" ]
null
null
null
pathSum.py
saai/LeetcodePythonSolutions
201f2054dda3f303ae6a376b40cbc7f98688322c
[ "MIT" ]
null
null
null
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None
27.222222
55
0.387755
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: # @param {TreeNode} root # @param {integer} sum # @return {integer[][]} def pathSum(self, root, sum): res = [] ...
0
0
0
790
0
0
0
0
29
58008166dcecc4b329c62809b322ec66946655e3
6,218
py
Python
BFG (Term 2)/ref_classicBFG.py
ianpan870102/FYP-mab-python-weekly-progress
c491be0c263865b1f129c72ec0bdb71b782b6516
[ "MIT" ]
null
null
null
BFG (Term 2)/ref_classicBFG.py
ianpan870102/FYP-mab-python-weekly-progress
c491be0c263865b1f129c72ec0bdb71b782b6516
[ "MIT" ]
null
null
null
BFG (Term 2)/ref_classicBFG.py
ianpan870102/FYP-mab-python-weekly-progress
c491be0c263865b1f129c72ec0bdb71b782b6516
[ "MIT" ]
null
null
null
import random import numpy as np from matplotlib import rcParams rcParams['font.family'] = ['Roboto'] for w in ["font.weight", "axes.labelweight", "axes.titleweight", "figure.titleweight"]: rcParams[w] = 'regular' '''Initialisation and Preprocess phase''' # C candidate prices, N competitors (demand functions) c...
39.858974
112
0.639434
import random import numpy as np import random import matplotlib.pyplot as plt from arms.bernoulli import BernoulliArm from arms.normal import NormalArm from matplotlib import rcParams rcParams['font.family'] = ['Roboto'] for w in ["font.weight", "axes.labelweight", "axes.titleweight", "figure.titleweight"]: rcPar...
0
0
0
0
0
4,889
0
32
180
8a06c42aa18b2c53856ff7d9450bda1dc7d8bce5
2,885
py
Python
docs/exts/redirects.py
gtossou/airflow
0314a3a218f864f78ec260cc66134e7acae34bc5
[ "Apache-2.0" ]
4
2020-02-16T18:13:54.000Z
2021-01-01T03:22:19.000Z
docs/exts/redirects.py
gtossou/airflow
0314a3a218f864f78ec260cc66134e7acae34bc5
[ "Apache-2.0" ]
10
2021-09-08T21:27:07.000Z
2022-03-30T17:54:45.000Z
docs/exts/redirects.py
gtossou/airflow
0314a3a218f864f78ec260cc66134e7acae34bc5
[ "Apache-2.0" ]
2
2020-10-23T18:55:05.000Z
2022-02-16T21:53:10.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.987179
108
0.675217
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
0
0
0
0
0
0
0
0
0
128a0fc6282182864bf4b1bf99e0de328b552773
2,892
py
Python
TextRecognition.py
vantuan5644/AWSTextRecognition
261a91f6dc952af9c11d2a874e22894227d40dda
[ "MIT" ]
null
null
null
TextRecognition.py
vantuan5644/AWSTextRecognition
261a91f6dc952af9c11d2a874e22894227d40dda
[ "MIT" ]
null
null
null
TextRecognition.py
vantuan5644/AWSTextRecognition
261a91f6dc952af9c11d2a874e22894227d40dda
[ "MIT" ]
null
null
null
import os import boto3 import easygui import cv2 as cv s3 = boto3.resource('s3') client = boto3.client('rekognition', 'ap-northeast-1') # Upload file to S3 file = easygui.fileopenbox(msg=None, title="Pick an image", filetypes=["*.jpg", "*.png"], multiple=False) fileName = os.path.basename(f...
44.492308
114
0.581604
import os import boto3 import easygui import json import cv2 as cv s3 = boto3.resource('s3') client = boto3.client('rekognition', 'ap-northeast-1') # Upload file to S3 file = easygui.fileopenbox(msg=None, title="Pick an image", filetypes=["*.jpg", "*.png"], multiple=False) fileName = os.pat...
0
0
0
0
0
0
0
-10
22
5f51bc526ebf6c631d1198c5fa05aafd9df67369
10,838
py
Python
python/api/src/zapv2/core.py
gunlee01/zaproxy
8daa6845af61f5662036af10e4abfad46de87b1d
[ "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
1
2017-07-26T18:03:44.000Z
2017-07-26T18:03:44.000Z
python/api/src/zapv2/core.py
nitram509/zaproxy-maven
19d021496122a224329d46076ba04454d5a18958
[ "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
2
2016-02-25T10:06:53.000Z
2016-03-29T07:49:34.000Z
python/api/src/zapv2/core.py
nitram509/zaproxy-maven
19d021496122a224329d46076ba04454d5a18958
[ "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
1
2021-09-03T07:02:26.000Z
2021-09-03T07:02:26.000Z
# Zed Attack Proxy (ZAP) and its related class files. # # ZAP is an HTTP/HTTPS proxy for assessing web application security. # # Copyright 2014 the ZAP development team # # 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...
46.917749
169
0.693394
# Zed Attack Proxy (ZAP) and its related class files. # # ZAP is an HTTP/HTTPS proxy for assessing web application security. # # Copyright 2014 the ZAP development team # # 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...
0
3,381
0
6,672
0
0
0
0
23
16c735089b5797504c5750965baca9fbf68c8e5f
14,007
py
Python
ckanext/lait/plugin.py
sciamlab/ckanext-lait
fcec5733202ee42b44851ceacc1f49c59b543420
[ "Apache-2.0" ]
null
null
null
ckanext/lait/plugin.py
sciamlab/ckanext-lait
fcec5733202ee42b44851ceacc1f49c59b543420
[ "Apache-2.0" ]
null
null
null
ckanext/lait/plugin.py
sciamlab/ckanext-lait
fcec5733202ee42b44851ceacc1f49c59b543420
[ "Apache-2.0" ]
null
null
null
import logging import routes.mapper import ckan.lib.base as base import ckan.lib.helpers as h import ckan.plugins as p import ckan.plugins.toolkit as tk import urllib2 import urllib from ckan.common import _, json import collections from pylons import config import pylons from ckan.common import request, c import ckan...
37.653226
212
0.610552
import logging import routes.mapper import ckan.lib.base as base import ckan.lib.helpers as h import ckan.plugins as p import ckan.plugins.toolkit as tk import urllib2 import urllib from ckan.common import _, json import collections from pylons import config import pylons from ckan.common import request, c import ckan...
0
739
0
6,804
0
2,333
0
0
184
317b82be121ed9dcb5ad83397416bfcfc51838a3
950
py
Python
roctnet/diagnosis/views.py
harshSoni082/roctnet
3d41393bfb643021be8586c38425f85ab656784c
[ "MIT" ]
null
null
null
roctnet/diagnosis/views.py
harshSoni082/roctnet
3d41393bfb643021be8586c38425f85ab656784c
[ "MIT" ]
1
2022-03-30T22:28:02.000Z
2022-03-30T22:28:02.000Z
roctnet/diagnosis/views.py
harshSoni082/roctnet
3d41393bfb643021be8586c38425f85ab656784c
[ "MIT" ]
null
null
null
# Create your views here.
32.758621
70
0.774737
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.generics import GenericAPIView from rest_framework.response import Response from rest_framework.permissions import AllowAny from .models import Diagnosis from .serializer import DiagnosisSerializer, DiagnosisCreateSeriali...
0
0
0
552
0
0
0
168
201