hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
125
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
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
f64b82838ee7021aed6a41f6268978be205f715f
973
py
Python
script.py
inforkgodara/python-network-scanner
24d064fba907bbc662bb362c61c1e46a1e803129
[ "MIT" ]
null
null
null
script.py
inforkgodara/python-network-scanner
24d064fba907bbc662bb362c61c1e46a1e803129
[ "MIT" ]
null
null
null
script.py
inforkgodara/python-network-scanner
24d064fba907bbc662bb362c61c1e46a1e803129
[ "MIT" ]
1
2022-01-21T07:09:42.000Z
2022-01-21T07:09:42.000Z
import socket from datetime import datetime # Author @inforkgodara ip_address = input("IP Address: ") splitted_ip_digits = ip_address.split('.') dot = '.' first_three_ip_digits = splitted_ip_digits[0] + dot + splitted_ip_digits[1] + dot + splitted_ip_digits[2] + dot starting_number = int(input("Starting IP Number: "...
27.8
111
0.701953
0
0
0
0
0
0
0
0
118
0.121274
f64c3361d7ec09fcaf7f6ec8576af34f801bb4dc
38
py
Python
modules/2.79/bpy/types/CyclesMeshSettings.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/CyclesMeshSettings.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/CyclesMeshSettings.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
class CyclesMeshSettings: pass
6.333333
25
0.710526
35
0.921053
0
0
0
0
0
0
0
0
f64d0d7507a0bf1361c152ed2a9e7c2c37431db2
1,528
py
Python
uibuilder/backend/__init__.py
stonewell/pyuibuilder
0ed21f7cc0eee9d808a90a6c072c099b27dfffad
[ "BSD-2-Clause" ]
1
2020-04-21T02:11:12.000Z
2020-04-21T02:11:12.000Z
uibuilder/backend/__init__.py
stonewell/pyuibuilder
0ed21f7cc0eee9d808a90a6c072c099b27dfffad
[ "BSD-2-Clause" ]
null
null
null
uibuilder/backend/__init__.py
stonewell/pyuibuilder
0ed21f7cc0eee9d808a90a6c072c099b27dfffad
[ "BSD-2-Clause" ]
null
null
null
#__init__.py backend import os import sys import logging from importlib import import_module L = logging.getLogger('backend') def create_widget(node): ''' create widget based on xml node ''' _widget = None if 'impl' in node.attrib: try: _widget = create_widget_from_impl(node.a...
23.151515
91
0.665576
0
0
0
0
0
0
0
0
376
0.246073
f64d58a53350e87f2961f9114eb18d59516ae402
638
py
Python
CondTools/Geometry/python/HGCalParametersWriter_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
CondTools/Geometry/python/HGCalParametersWriter_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
CondTools/Geometry/python/HGCalParametersWriter_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms from CondTools.Geometry.HGCalEEParametersWriter_cfi import * from Configuration.ProcessModifiers.dd4hep_cff import dd4hep dd4hep.toModify(HGCalEEParametersWriter, fromDD4Hep = cms.bool(True) ) HGCalHESiParametersWriter = HGCalEEParametersWriter.clone( nam...
29
60
0.757053
0
0
0
0
0
0
0
0
105
0.164577
f64d7ae0c5f676ffe1417197ce2cd8024ae8d693
1,895
py
Python
Transition_examples_NCL_to_PyNGL/streamlines/TRANS_streamline.py
1271756664/-xESMF
f2341fe5a949050dc9e350fdc8c7d3e3d3d48222
[ "MIT" ]
54
2015-11-09T13:39:00.000Z
2022-02-16T10:31:19.000Z
Transition_examples_NCL_to_PyNGL/streamlines/TRANS_streamline.py
wengensheng/PyEarthScience
0c5b116a80604c5a892369b975df8b15b9b34717
[ "MIT" ]
null
null
null
Transition_examples_NCL_to_PyNGL/streamlines/TRANS_streamline.py
wengensheng/PyEarthScience
0c5b116a80604c5a892369b975df8b15b9b34717
[ "MIT" ]
25
2016-04-11T20:40:40.000Z
2021-12-01T14:38:41.000Z
# # File: # TRANS_streamline.py # # Synopsis: # Illustrates how to create a streamline plot # # Categories: # streamline plot # # Author: # Karin Meier-Fleischer, based on NCL example # # Date of initial publication: # September 2018 # # Description: # This example shows how to create a stream...
22.559524
76
0.658047
0
0
0
0
0
0
0
0
1,035
0.546174
f64d7d189c96dd02a499180601f2f832ec95df53
889
py
Python
src/normalise.py
amystar101/fingerprint-image-enhancement
45110796f47781317516d053ce876853a2fb682c
[ "Unlicense" ]
1
2021-06-24T17:51:48.000Z
2021-06-24T17:51:48.000Z
src/normalise.py
amystar101/fingerprint-image-enhancement
45110796f47781317516d053ce876853a2fb682c
[ "Unlicense" ]
null
null
null
src/normalise.py
amystar101/fingerprint-image-enhancement
45110796f47781317516d053ce876853a2fb682c
[ "Unlicense" ]
null
null
null
#function to normalise image #setting new mean = 1, and new varriance = 1 import numpy as np import math def normalise(img,new_mean = 1.0,new_variance = 1.0): print("Normalising the image") print("setting new mean = "+str(new_mean)+" and new varriance = "+str(new_variance)) r,c = img.shape mean = np...
24.027027
96
0.600675
0
0
0
0
0
0
0
0
210
0.23622
f64de443ca7e5b34fb910ad26f914c99342b2c99
222
py
Python
tests/photos.py
DennyWeinberg/photoprism
39107489dec1fe1bbdbd86e2d57c2364c6d115a0
[ "MIT" ]
1
2022-02-26T15:43:53.000Z
2022-02-26T15:43:53.000Z
tests/photos.py
DennyWeinberg/photoprism
39107489dec1fe1bbdbd86e2d57c2364c6d115a0
[ "MIT" ]
null
null
null
tests/photos.py
DennyWeinberg/photoprism
39107489dec1fe1bbdbd86e2d57c2364c6d115a0
[ "MIT" ]
null
null
null
import unittest from photoprism import Client class TestClass(unittest.TestCase): def test_upload(): client = Client() client.upload_photo('20210104_223259.jpg', b'TODO', album_names=['Test Album'])
22.2
87
0.707207
172
0.774775
0
0
0
0
0
0
40
0.18018
f64e55e11d9a142eb48cd1c9e5fe0bd127f8241b
1,778
py
Python
simulate.py
mikedigriz/Brave-Trigger
4decb22b7f75ba4730d5c083af62c8e12386e0a3
[ "Apache-2.0" ]
1
2022-03-28T23:23:38.000Z
2022-03-28T23:23:38.000Z
simulate.py
mikedigriz/Brave-Trigger
4decb22b7f75ba4730d5c083af62c8e12386e0a3
[ "Apache-2.0" ]
null
null
null
simulate.py
mikedigriz/Brave-Trigger
4decb22b7f75ba4730d5c083af62c8e12386e0a3
[ "Apache-2.0" ]
1
2021-12-24T07:14:53.000Z
2021-12-24T07:14:53.000Z
# Simulate user activity for Windows # Can trigger Brave Ads import random from time import sleep import pydirectinput import os # clear log function def cls(): os.system('cls' if os.name == 'nt' else 'clear') # main simulate function def simulate(): while True: # u can change x,y with your screen ...
28.677419
59
0.571429
0
0
0
0
0
0
0
0
463
0.260405
f6518ee8615255e8e5a356ab1a00d2f48a8a58b4
1,688
py
Python
modules/module8/extra/manual_predict_demand.py
shourya01/power_data_analytics_tools
7621eaebb5b3bd107238016b07e5ae71c891c4b1
[ "MIT" ]
1
2021-09-26T17:29:46.000Z
2021-09-26T17:29:46.000Z
modules/module8/extra/manual_predict_demand.py
shourya01/power_data_analytics_tools
7621eaebb5b3bd107238016b07e5ae71c891c4b1
[ "MIT" ]
null
null
null
modules/module8/extra/manual_predict_demand.py
shourya01/power_data_analytics_tools
7621eaebb5b3bd107238016b07e5ae71c891c4b1
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import matplotlib.pyplot as plt counties_drop_list = ["Year", "Los Angeles County", "Merced County", "Riverside County", "San Diego County", "San Mateo County", "Santa Barbara County", "Santa Clara County", "Santa Cruz County"] df = pd.read_csv("population_all.csv") df = pd.con...
28.610169
195
0.640403
0
0
0
0
0
0
0
0
328
0.194313
f65224814a8fb77dc67c3f651cede815e9b8f99b
1,786
py
Python
config.py
vsmelov/neural-music
0cbe06080e2c257c323ffc93dc673bb1e0edf2c4
[ "MIT" ]
2
2020-03-06T19:36:17.000Z
2022-03-09T07:29:08.000Z
config.py
vsmelov/neural-music
0cbe06080e2c257c323ffc93dc673bb1e0edf2c4
[ "MIT" ]
null
null
null
config.py
vsmelov/neural-music
0cbe06080e2c257c323ffc93dc673bb1e0edf2c4
[ "MIT" ]
null
null
null
# coding: utf-8 import os base_dir = os.path.dirname(os.path.realpath(__file__)) music_dir = os.path.join(base_dir, 'music-3') data_dir = os.path.join(base_dir, 'data-3') weights_dir = os.path.join(data_dir, 'weights') weights_file = os.path.join(weights_dir, 'weights') if not os.path.exists(data_dir): os.maked...
25.15493
80
0.731243
0
0
0
0
0
0
0
0
984
0.477207
f653d187c14a15a2c7898dab067018d3da9f4ba1
1,184
py
Python
tests/conftest.py
BookOps-CAT/ChangeSubject
bff86ad58685db169a99f9ad3b2df1179cffb5a3
[ "MIT" ]
1
2022-01-13T20:28:12.000Z
2022-01-13T20:28:12.000Z
tests/conftest.py
BookOps-CAT/ChangeSubject
bff86ad58685db169a99f9ad3b2df1179cffb5a3
[ "MIT" ]
null
null
null
tests/conftest.py
BookOps-CAT/ChangeSubject
bff86ad58685db169a99f9ad3b2df1179cffb5a3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pytest from pymarc import Field, Record @pytest.fixture def fake_subfields(): return ["a", "subA", "x", "subX1", "x", "subX2", "z", "subZ."] @pytest.fixture def fake_subjects(fake_subfields): return [ Field(tag="600", indicators=["1", "0"], subfields=fake_subfields)...
24.666667
79
0.525338
0
0
0
0
1,101
0.929899
0
0
237
0.200169
f65532be9b4201eff4ea7369b593b54567404d32
8,132
py
Python
src/lexer_rules2.py
ezielramos/cool-compiler-2021
e5b2aa51e47296b21f8b1ea14d73b1c7e7ef0785
[ "MIT" ]
null
null
null
src/lexer_rules2.py
ezielramos/cool-compiler-2021
e5b2aa51e47296b21f8b1ea14d73b1c7e7ef0785
[ "MIT" ]
null
null
null
src/lexer_rules2.py
ezielramos/cool-compiler-2021
e5b2aa51e47296b21f8b1ea14d73b1c7e7ef0785
[ "MIT" ]
null
null
null
from TOKEN import LexToken class Lexer: def __init__(self,text): self.my_bool = False self.result = '' self.names = { "case" : "CASE", "class" : "CLASS", "else" : "ELSE", "esac" : "ESAC", "fi" : "FI", "if" : "IF", ...
33.327869
124
0.356739
8,102
0.996311
0
0
0
0
0
0
1,142
0.140433
f655f02af6c4b546b8ad4d6e4f667bc6a96d3c25
5,578
py
Python
UCI/abalone/abalone.py
tqtifnypmb/ML
dfcc6f849b1d5ee2efd0faa0f585091fc7263a6c
[ "MIT" ]
null
null
null
UCI/abalone/abalone.py
tqtifnypmb/ML
dfcc6f849b1d5ee2efd0faa0f585091fc7263a6c
[ "MIT" ]
null
null
null
UCI/abalone/abalone.py
tqtifnypmb/ML
dfcc6f849b1d5ee2efd0faa0f585091fc7263a6c
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import math import matplotlib.pyplot as plt from sklearn import feature_selection as fs from sklearn import naive_bayes from sklearn import model_selection from sklearn import metrics from sklearn import linear_model from sklearn import svm from imblearn.under_sampling import Ne...
34.220859
87
0.674256
0
0
0
0
0
0
0
0
1,075
0.192721
f6566e16378a091190a0b2c504267d971df5e5d3
3,204
py
Python
os_migrate/plugins/filter/stringfilter.py
jbadiapa/os-migrate
19b591a672bc9e4af72e62dbd96be94a238a6dc2
[ "Apache-2.0" ]
35
2020-01-22T18:38:27.000Z
2022-03-22T16:19:56.000Z
os_migrate/plugins/filter/stringfilter.py
jbadiapa/os-migrate
19b591a672bc9e4af72e62dbd96be94a238a6dc2
[ "Apache-2.0" ]
292
2019-12-09T11:15:26.000Z
2022-03-31T14:37:52.000Z
os_migrate/plugins/filter/stringfilter.py
jbadiapa/os-migrate
19b591a672bc9e4af72e62dbd96be94a238a6dc2
[ "Apache-2.0" ]
32
2019-12-09T11:09:44.000Z
2022-03-24T01:13:31.000Z
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from pprint import pformat import re from ansible import errors def stringfilter(items, queries, attribute=None): """Filter a `items` list according to a list of `queries`. Values from `items` are kept if they match at l...
32.363636
116
0.604869
120
0.037453
0
0
0
0
0
0
1,514
0.472534
f65864777f5cc28180536badeeb5028094ebe5da
1,082
py
Python
src/qgis_ros/core/translators/wireless_msgs.py
acfrmarine/qgis_ros
01dd107f963b87df063bf2f11b0a484f4323cae9
[ "MIT" ]
31
2018-09-11T17:50:17.000Z
2021-09-13T11:48:47.000Z
src/qgis_ros/core/translators/wireless_msgs.py
acfrmarine/qgis_ros
01dd107f963b87df063bf2f11b0a484f4323cae9
[ "MIT" ]
9
2018-09-11T00:45:23.000Z
2022-01-07T13:19:20.000Z
src/qgis_ros/core/translators/wireless_msgs.py
acfrmarine/qgis_ros
01dd107f963b87df063bf2f11b0a484f4323cae9
[ "MIT" ]
9
2018-10-12T12:31:38.000Z
2021-06-05T02:52:44.000Z
from wireless_msgs.msg import Connection from .translator import Translator, TableTranslatorMixin class ConnectionTranslator(Translator, TableTranslatorMixin): messageType = Connection geomType = Translator.GeomTypes.NoGeometry @staticmethod def translate(msg): # Some forks of wireless_msgs...
29.243243
63
0.543438
981
0.906654
0
0
837
0.773567
0
0
196
0.181146
f65898c28ffae1a8584de739a8a23ca7c104b359
671
py
Python
Lab11/BacktrackingRecursive.py
alexnaiman/Fundamentals-Of-Programming---Lab-assignments
ef066e6036e20b9c686799f507f10e15e50e3285
[ "MIT" ]
4
2018-02-19T13:57:38.000Z
2022-01-08T04:10:54.000Z
Lab11/BacktrackingRecursive.py
alexnaiman/Fundamentals-Of-Programming---Lab-assignments
ef066e6036e20b9c686799f507f10e15e50e3285
[ "MIT" ]
null
null
null
Lab11/BacktrackingRecursive.py
alexnaiman/Fundamentals-Of-Programming---Lab-assignments
ef066e6036e20b9c686799f507f10e15e50e3285
[ "MIT" ]
null
null
null
l = ["+", "-"] def backRec(x): for j in l: x.append(j) if consistent(x): if solution(x): solutionFound(x) backRec(x) x.pop() def consistent(s): return len(s) < n def solution(s): summ = list2[0] if not len(s) == n -...
16.775
43
0.4307
0
0
0
0
0
0
0
0
25
0.037258
f659ad3a0d5abc3c751802d36141241340ba30f7
8,098
py
Python
RBM.py
alibell/binary_rbm
f9f30005b7866c0b1e2714350c22b81e33dac72c
[ "MIT" ]
null
null
null
RBM.py
alibell/binary_rbm
f9f30005b7866c0b1e2714350c22b81e33dac72c
[ "MIT" ]
null
null
null
RBM.py
alibell/binary_rbm
f9f30005b7866c0b1e2714350c22b81e33dac72c
[ "MIT" ]
null
null
null
import numpy as np def sigmoid(X): """sigmoid Compute the sigmoid function Parameters ---------- X: numpy array Output: ------- Numpy array of the same size of X """ return 1/(1+np.exp(-X)) class binary_RBM (): def __init__ (self, q, max_iter=300, batch_size=64, stop_cr...
29.234657
108
0.554828
7,862
0.970857
0
0
0
0
0
0
3,746
0.462583
f65cdec3341b6d687da7bd47d8ce74b25665b578
745
py
Python
Day 07/Anagrams.py
sandeep-krishna/100DaysOfCode
af4594fb6933e4281d298fa921311ccc07295a7c
[ "MIT" ]
null
null
null
Day 07/Anagrams.py
sandeep-krishna/100DaysOfCode
af4594fb6933e4281d298fa921311ccc07295a7c
[ "MIT" ]
null
null
null
Day 07/Anagrams.py
sandeep-krishna/100DaysOfCode
af4594fb6933e4281d298fa921311ccc07295a7c
[ "MIT" ]
null
null
null
''' Anagrams Given two strings, a and b , that may or may not be of the same length, determine the minimum number of character deletions required to make a and b anagrams. Any characters can be deleted from either of the strings. Input : test cases,t two strings a and b, for each test case Output: Desired O/p Cons...
16.195652
216
0.703356
0
0
0
0
0
0
0
0
546
0.732886
f65e0aca86dc9604b4e7e6ec844b23ecb9545677
2,031
py
Python
bookstore/lib/green/__init__.py
Inveracity/python-grpc-betterproto-quartz
a94a0ea8429d93f3275389a66d0c41ca9b4b616c
[ "MIT" ]
null
null
null
bookstore/lib/green/__init__.py
Inveracity/python-grpc-betterproto-quartz
a94a0ea8429d93f3275389a66d0c41ca9b4b616c
[ "MIT" ]
null
null
null
bookstore/lib/green/__init__.py
Inveracity/python-grpc-betterproto-quartz
a94a0ea8429d93f3275389a66d0c41ca9b4b616c
[ "MIT" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # sources: green.proto # plugin: python-betterproto from dataclasses import dataclass from typing import Dict, List import betterproto from betterproto.grpc.grpclib_server import ServiceBase import grpclib class GreenColors(betterproto.Enum): MOLDY = 0 ...
25.074074
84
0.672575
1,648
0.811423
0
0
685
0.337272
511
0.2516
295
0.145249
f65e102078e64cef47d78af8c0bec25735c6165b
2,874
py
Python
install-git-config-upstream.py
omunroe-com/cobaltdepottools
a8c8b5948286ceaa647c8a3bd5f75ea6ffb263da
[ "BSD-3-Clause" ]
null
null
null
install-git-config-upstream.py
omunroe-com/cobaltdepottools
a8c8b5948286ceaa647c8a3bd5f75ea6ffb263da
[ "BSD-3-Clause" ]
null
null
null
install-git-config-upstream.py
omunroe-com/cobaltdepottools
a8c8b5948286ceaa647c8a3bd5f75ea6ffb263da
[ "BSD-3-Clause" ]
null
null
null
"""For each repo in DEPS, git config an appropriate depot-tools.upstream. This will allow git new-branch to set the correct tracking branch. """ import argparse import hashlib import json import os import sys import textwrap import gclient_utils import git_common def _GclientEntriesToString(entries): entries_str ...
29.9375
79
0.720251
0
0
0
0
0
0
0
0
853
0.296799
f65e76516161e35a56048949db48a5fb3cb8e36c
3,269
py
Python
examples/visualise_labels.py
meyerjo/simple-waymo-open-dataset-reader
11dc3ecca77b9c877d0c42c71da2f2c93eb0aca0
[ "Apache-2.0" ]
null
null
null
examples/visualise_labels.py
meyerjo/simple-waymo-open-dataset-reader
11dc3ecca77b9c877d0c42c71da2f2c93eb0aca0
[ "Apache-2.0" ]
null
null
null
examples/visualise_labels.py
meyerjo/simple-waymo-open-dataset-reader
11dc3ecca77b9c877d0c42c71da2f2c93eb0aca0
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019, Grégoire Payen de La Garanderie, Durham University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
34.052083
108
0.722239
0
0
0
0
0
0
0
0
1,657
0.506728
f65f255a9168cd924c215d076e0c41cb26abdeb2
1,833
py
Python
utils.py
ProRansum/site-scanner
39988350980c477996f6bb18b1db3cc097cc0893
[ "MIT" ]
null
null
null
utils.py
ProRansum/site-scanner
39988350980c477996f6bb18b1db3cc097cc0893
[ "MIT" ]
null
null
null
utils.py
ProRansum/site-scanner
39988350980c477996f6bb18b1db3cc097cc0893
[ "MIT" ]
null
null
null
import os import socket import codecs import urllib3 from urllib.parse import urlparse def __process__(command): try: process = os.popen(command) results = str(process.read()) return results except Exception as e: raise e def create_dir(directory): if not os.path.exists(directory): os.makedirs(direct...
19.09375
63
0.675396
0
0
0
0
0
0
0
0
486
0.265139
f6606f4ec40d7bf3ddd3d04cdb7161f2cd3e479b
8,504
py
Python
finnhub/models/filing.py
gavinjay/finnhub-python
b5c409dafeda390d14a2b0618ae6f25ab8d76c5b
[ "Apache-2.0" ]
null
null
null
finnhub/models/filing.py
gavinjay/finnhub-python
b5c409dafeda390d14a2b0618ae6f25ab8d76c5b
[ "Apache-2.0" ]
null
null
null
finnhub/models/filing.py
gavinjay/finnhub-python
b5c409dafeda390d14a2b0618ae6f25ab8d76c5b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Finnhub API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six fro...
26.658307
193
0.563617
8,136
0.956726
0
0
4,320
0.507996
0
0
4,249
0.499647
f661ad9fa986a012f353988d72881833e9a5c889
1,876
py
Python
year_2019/day_11_2019.py
TheTomcat/AdventOfCode
bb81a46f7064bd69e924a0b58e6c5e0cc450e102
[ "MIT" ]
null
null
null
year_2019/day_11_2019.py
TheTomcat/AdventOfCode
bb81a46f7064bd69e924a0b58e6c5e0cc450e102
[ "MIT" ]
null
null
null
year_2019/day_11_2019.py
TheTomcat/AdventOfCode
bb81a46f7064bd69e924a0b58e6c5e0cc450e102
[ "MIT" ]
null
null
null
from collections import defaultdict from typing import List, Any, Tuple from util.helpers import solution_timer from util.input_helper import read_entire_input from util.console import console from year_2019.intcode import IntCode, parse data = read_entire_input(2019,11) def run_robot(data:List[str], init=0): deb...
35.396226
131
0.650853
0
0
0
0
620
0.33049
0
0
214
0.114072
f6630d45727b60cf6121d275d6c726d45711227d
287
py
Python
Life.py
lianwt115/python_pygame
4d70846740e8905f63059de107a8d0831d9ffe0c
[ "MIT" ]
1
2018-08-14T02:54:14.000Z
2018-08-14T02:54:14.000Z
Life.py
lianwt115/python_pygame
4d70846740e8905f63059de107a8d0831d9ffe0c
[ "MIT" ]
null
null
null
Life.py
lianwt115/python_pygame
4d70846740e8905f63059de107a8d0831d9ffe0c
[ "MIT" ]
null
null
null
# 子弹 import pygame class Life(pygame.sprite.Sprite): def __init__(self, img, init_pos): pygame.sprite.Sprite.__init__(self) self.image = img self.rect = self.image.get_rect() self.rect.topleft = init_pos def update(self): self.kill()
17.9375
43
0.620209
265
0.910653
0
0
0
0
0
0
8
0.027491
f665d858f07e9b00c3c2dbdc919c6e8a395f2e99
6,588
py
Python
course_selection/scrape_parse.py
PrincetonUSG/ReCal
a65782602b1a6d8932ff4cca1526cb9a3addacf6
[ "MIT" ]
1
2017-01-01T22:17:52.000Z
2017-01-01T22:17:52.000Z
course_selection/scrape_parse.py
PrincetonUSG/recal
d748f6871e7f7bbbd7e9d66482de040c42c8c18b
[ "MIT" ]
1
2022-02-20T19:43:33.000Z
2022-02-20T19:43:33.000Z
course_selection/scrape_parse.py
PrincetonUSG/ReCal
a65782602b1a6d8932ff4cca1526cb9a3addacf6
[ "MIT" ]
null
null
null
""" Scrapes OIT's Web Feeds to add courses and sections to database. Procedure: - Get list of departments (3-letter department codes) - Run this: http://etcweb.princeton.edu/webfeeds/courseofferings/?term=current&subject=COS - Parse it for courses, sections, and lecture times (as recurring events) """ from mobileapp...
32.453202
99
0.548118
142
0.021554
0
0
0
0
0
0
1,922
0.291743
f66643e629de4e532f98ff43ed8508b807166f50
34,590
py
Python
wxRavenGUI/application/core/wxViewsManager.py
sLiinuX/wxRaven
a513a029fa1ff2059ee262c524b4b2b45111f1a6
[ "MIT" ]
11
2021-12-20T15:32:17.000Z
2022-03-16T03:54:02.000Z
wxRavenGUI/application/core/wxViewsManager.py
sLiinuX/wxRaven
a513a029fa1ff2059ee262c524b4b2b45111f1a6
[ "MIT" ]
156
2021-12-31T21:01:31.000Z
2022-03-20T21:57:31.000Z
wxRavenGUI/application/core/wxViewsManager.py
sLiinuX/wxRaven
a513a029fa1ff2059ee262c524b4b2b45111f1a6
[ "MIT" ]
3
2022-01-21T14:52:43.000Z
2022-02-12T05:32:19.000Z
''' Created on 13 déc. 2021 @author: slinux ''' import inspect from wxRavenGUI.view import wxRavenAddView from wxRavenGUI.application.wxcustom.CustomDialog import wxRavenCustomDialog import wx import wx.aui import logging from .jobs import * class ViewsManager(object): ''' classdocs ''' parentf...
31.733945
250
0.521798
34,194
0.988523
0
0
0
0
0
0
8,256
0.238675
f666df25a3a1f1644fff7b7708a3e6801a52f114
4,714
py
Python
python/image-tools/adjust-exif-timestamp.py
bmaupin/graveyard
71d52fe6589ce13dfe7433906d1aa50df48c9f94
[ "MIT" ]
1
2019-11-23T10:44:58.000Z
2019-11-23T10:44:58.000Z
python/image-tools/adjust-exif-timestamp.py
bmaupin/graveyard
71d52fe6589ce13dfe7433906d1aa50df48c9f94
[ "MIT" ]
8
2020-07-16T07:14:12.000Z
2020-10-14T17:25:33.000Z
python/image-tools/adjust-exif-timestamp.py
bmaupin/graveyard
71d52fe6589ce13dfe7433906d1aa50df48c9f94
[ "MIT" ]
1
2019-11-23T10:45:00.000Z
2019-11-23T10:45:00.000Z
#!/usr/bin/env python import datetime import optparse import os import os.path import struct import sys # sudo pip3 install piexif import piexif # Make this negative to subtract time, e.g.: # -datetime.timedelta(hours=5, minutes=9) #TIME_ADJUSTMENT = datetime.timedelta(hours=5, minutes=9) #TIME_ADJUSTMENT = datetim...
35.179104
136
0.663131
0
0
0
0
0
0
0
0
1,515
0.321383
f6686b5276ad867dc68aa933b114b3472854d95c
99
py
Python
change_funname.py
poojadhoble32/python-projects
4c094dd0072d4213344e26476e4e99a4a12246e7
[ "bzip2-1.0.6" ]
null
null
null
change_funname.py
poojadhoble32/python-projects
4c094dd0072d4213344e26476e4e99a4a12246e7
[ "bzip2-1.0.6" ]
null
null
null
change_funname.py
poojadhoble32/python-projects
4c094dd0072d4213344e26476e4e99a4a12246e7
[ "bzip2-1.0.6" ]
null
null
null
def old(name,age): print(f"my name is {name} and age is {age}") old as new new("pooja",23)
19.8
49
0.606061
0
0
0
0
0
0
0
0
44
0.444444
f66a07a388a781ad9ca3ffd91259ea2672b30eef
2,449
py
Python
idgo_admin/views/sld_preview.py
neogeo-technologies/idgo
23e028b0d7fb2daf54d7e2954e0cc4d7b9be4210
[ "Apache-2.0" ]
null
null
null
idgo_admin/views/sld_preview.py
neogeo-technologies/idgo
23e028b0d7fb2daf54d7e2954e0cc4d7b9be4210
[ "Apache-2.0" ]
2
2018-09-14T07:12:00.000Z
2019-11-13T09:32:24.000Z
idgo_admin/views/sld_preview.py
neogeo-technologies/idgo
23e028b0d7fb2daf54d7e2954e0cc4d7b9be4210
[ "Apache-2.0" ]
2
2019-03-25T08:27:43.000Z
2019-10-07T15:25:30.000Z
# Copyright (c) 2017-2021 Neogeo-Technologies. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
31.805195
88
0.721111
1,084
0.44263
0
0
1,221
0.498571
0
0
756
0.308697
f66a1e25a8296b28e107195d808f86bbb9fe4c11
14,785
py
Python
FM/deepFM.py
sameul-yuan/markdowns
fcb8b77bfe402ffabba42352f1ae686cf1a12ecd
[ "MIT" ]
null
null
null
FM/deepFM.py
sameul-yuan/markdowns
fcb8b77bfe402ffabba42352f1ae686cf1a12ecd
[ "MIT" ]
null
null
null
FM/deepFM.py
sameul-yuan/markdowns
fcb8b77bfe402ffabba42352f1ae686cf1a12ecd
[ "MIT" ]
null
null
null
import os import sys import numpy as np import pandas as pd import tensorflow as tf from losses import focal_loss,weighted_binary_crossentropy from utils import Dataset class DeepFM(object): def __init__(self, params): self.feature_size = params['feature_size'] self.field_size = params['field_size'...
52.429078
162
0.573216
11,218
0.746722
0
0
0
0
0
0
3,164
0.21061
f66b8ff9a4185c06c771d36dfd22c91e6cab609f
3,815
py
Python
pfa.py
JonathanSilver/pyKT
2bef7e926177725e3ddd79226895a67fa9b13cba
[ "MIT" ]
1
2021-03-06T08:48:10.000Z
2021-03-06T08:48:10.000Z
pfa.py
moduxiaohunhun/pyKT
2bef7e926177725e3ddd79226895a67fa9b13cba
[ "MIT" ]
null
null
null
pfa.py
moduxiaohunhun/pyKT
2bef7e926177725e3ddd79226895a67fa9b13cba
[ "MIT" ]
3
2021-03-15T12:19:06.000Z
2021-04-13T12:09:19.000Z
import numpy as np from math import log from sklearn.linear_model import LogisticRegression from sklearn.metrics import roc_auc_score, mean_squared_error, mean_absolute_error, classification_report from math import sqrt import json from pprint import pprint import argparse parser = argparse.ArgumentParser(f...
35.990566
106
0.527392
0
0
0
0
0
0
0
0
454
0.119004
f66f8d8c41fecc47a0097bf4d34448a0a8795388
207
py
Python
apps/web/api/urls.py
rubmu/QuestBot
34c42a25e8400060a80e1a234ca7bc7a265769ae
[ "MIT" ]
16
2017-12-01T04:45:50.000Z
2021-08-28T17:25:11.000Z
apps/web/api/urls.py
daniilzinevich/QuestBot
927b9f35aa4a4c88bf3825b965387d358c98f413
[ "MIT" ]
2
2018-08-18T16:42:49.000Z
2021-02-25T21:16:06.000Z
apps/web/api/urls.py
daniilzinevich/QuestBot
927b9f35aa4a4c88bf3825b965387d358c98f413
[ "MIT" ]
13
2018-01-26T14:35:51.000Z
2020-05-10T20:48:36.000Z
from django.urls import path from .views import ProcessWebHookAPIView urlpatterns = [ path( 'webhook/<hook_id>/', ProcessWebHookAPIView.as_view(), name='hooks-handler' ), ]
17.25
40
0.642512
0
0
0
0
0
0
0
0
35
0.169082
f67092cd8f576ff8a96e8e2a3849a3ba743001f8
3,534
py
Python
databand_airflow_monitor.py
databand-ai/databand_templates
e5cae45b3bb73fa7214f6f1d38d001f74752360c
[ "Apache-2.0" ]
4
2021-03-15T15:54:01.000Z
2022-02-21T20:35:25.000Z
databand_airflow_monitor.py
databand-ai/databand_templates
e5cae45b3bb73fa7214f6f1d38d001f74752360c
[ "Apache-2.0" ]
null
null
null
databand_airflow_monitor.py
databand-ai/databand_templates
e5cae45b3bb73fa7214f6f1d38d001f74752360c
[ "Apache-2.0" ]
3
2021-03-30T12:41:50.000Z
2022-01-03T07:44:35.000Z
import logging import os from datetime import timedelta from airflow import settings from airflow.hooks.base_hook import BaseHook from airflow.models import DAG from airflow.operators.bash_operator import BashOperator from airflow.utils.dates import days_ago CHECK_INTERVAL = 10 # Sleep time (in seconds) between sy...
29.697479
85
0.649123
1,520
0.430108
0
0
0
0
0
0
1,367
0.386814
f673429c5f822b682d2ef47c28ccc96363542050
1,092
py
Python
src/search/sort/prepare_data.py
lingeen/lingeen-Ying
b7d4771d556e2168bd3dfae15b39336046319a9c
[ "Apache-2.0" ]
null
null
null
src/search/sort/prepare_data.py
lingeen/lingeen-Ying
b7d4771d556e2168bd3dfae15b39336046319a9c
[ "Apache-2.0" ]
null
null
null
src/search/sort/prepare_data.py
lingeen/lingeen-Ying
b7d4771d556e2168bd3dfae15b39336046319a9c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2020/12/23 2:27 PM # @Author : Kevin import config from utils.sentence_process import cut_sentence_by_character from search.sort.word_to_sequence import Word2Sequence import pickle def prepare_dict_model(): lines=open(config.sort_all_file_path,"r").readlines() ws=Word2Se...
23.234043
62
0.667582
0
0
0
0
0
0
0
0
182
0.164855
f67473386f78c6d97077c35b82b59ca8dd569a05
681
py
Python
equipment_piece.py
cookyt/mhw_optimizer
05dc4483f9bb0b6f8c2d8e205239d58bbd4c274a
[ "MIT" ]
null
null
null
equipment_piece.py
cookyt/mhw_optimizer
05dc4483f9bb0b6f8c2d8e205239d58bbd4c274a
[ "MIT" ]
null
null
null
equipment_piece.py
cookyt/mhw_optimizer
05dc4483f9bb0b6f8c2d8e205239d58bbd4c274a
[ "MIT" ]
null
null
null
from enum import Enum class BodyPart(Enum): HEAD = 0 BODY = 1 ARMS = 2 WAIST = 3 LEGS = 4 CHARM = 5 class EquipmentPiece: def __init__(self, name, body_part, skills): self.name = name self.body_part = body_part self.skills = skills class ArmourPiece(EquipmentPie...
22.7
75
0.666667
647
0.950073
0
0
0
0
0
0
0
0
f674e20787b0a96114591ae162f4d1c5ca96e86b
11,984
py
Python
tests/message_handler_test.py
FelixSchwarz/mailqueue-runner
8e1a53ac4b363ced55636b1dda042c605386fc81
[ "0BSD" ]
3
2019-12-15T18:17:16.000Z
2022-03-18T23:00:49.000Z
tests/message_handler_test.py
FelixSchwarz/mailqueue-runner
8e1a53ac4b363ced55636b1dda042c605386fc81
[ "0BSD" ]
24
2018-10-12T21:13:00.000Z
2020-11-12T23:03:31.000Z
tests/message_handler_test.py
FelixSchwarz/mailqueue-runner
8e1a53ac4b363ced55636b1dda042c605386fc81
[ "0BSD" ]
null
null
null
# -*- coding: utf-8 -*- # SPDX-License-Identifier: MIT from __future__ import absolute_import, print_function, unicode_literals import os import shutil try: from unittest.mock import MagicMock except ImportError: from mock import MagicMock import uuid from ddt import ddt as DataDrivenTestCase, data as ddt_da...
41.467128
99
0.685831
10,778
0.899366
0
0
10,798
0.901035
0
0
1,285
0.107226
f674f2c2add88e217619ce81024522e2b7f8ad3d
1,632
py
Python
Python3/687.longest-univalue-path.py
610yilingliu/leetcode
30d071b3685c2131bd3462ba77c6c05114f3f227
[ "MIT" ]
null
null
null
Python3/687.longest-univalue-path.py
610yilingliu/leetcode
30d071b3685c2131bd3462ba77c6c05114f3f227
[ "MIT" ]
null
null
null
Python3/687.longest-univalue-path.py
610yilingliu/leetcode
30d071b3685c2131bd3462ba77c6c05114f3f227
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=687 lang=python3 # # [687] Longest Univalue Path # # @lc code=start from collections import deque def construct_tree(values): if not values: return None root = TreeNode(values[0]) queue = deque([root]) leng = len(values) nums = 1 while nums < leng: ...
24.358209
85
0.525123
708
0.433824
0
0
0
0
0
0
168
0.102941
f6768e992a307af16822d4dff6a0e361ad829926
6,803
py
Python
tests/reflinks_tests.py
xqt/pwb
9a4fe27138f32952e533256195849d05855df0b0
[ "MIT" ]
1
2022-02-10T00:20:42.000Z
2022-02-10T00:20:42.000Z
tests/reflinks_tests.py
euku/spbot
e6d505c8965b4e6730b3dc4505f92e35a3edb2e2
[ "MIT" ]
1
2021-12-08T16:29:41.000Z
2021-12-08T16:29:41.000Z
tests/reflinks_tests.py
euku/spbot
e6d505c8965b4e6730b3dc4505f92e35a3edb2e2
[ "MIT" ]
2
2022-01-04T04:10:38.000Z
2022-01-04T04:18:18.000Z
#!/usr/bin/python3 """Tests for reflinks script.""" # # (C) Pywikibot team, 2014-2022 # # Distributed under the terms of the MIT license. # import unittest from scripts.reflinks import ReferencesRobot, XmlDumpPageGenerator, main from tests import join_xml_data_path from tests.aspects import ScriptMainTestCase, TestCas...
38.435028
79
0.575922
6,149
0.903866
0
0
0
0
0
0
1,965
0.288843
f67b88939087fdc071c7e83e728a3ef5a850c797
319
py
Python
sunny/publisher/ioloop.py
AnkitAggarwalPEC/HFT-Analytics-Luigi
b01a48d7384accaca1869a7728912019b73f7e9c
[ "MIT" ]
null
null
null
sunny/publisher/ioloop.py
AnkitAggarwalPEC/HFT-Analytics-Luigi
b01a48d7384accaca1869a7728912019b73f7e9c
[ "MIT" ]
null
null
null
sunny/publisher/ioloop.py
AnkitAggarwalPEC/HFT-Analytics-Luigi
b01a48d7384accaca1869a7728912019b73f7e9c
[ "MIT" ]
null
null
null
import asyncio class IOLoop(object): self.event_loop = asyncio.get_event_loop() def __init__(self): pass def start(self): if self._running: raise RuntimeError("IOLoop is already running") if self._stopped: self._stopped = False return
13.291667
59
0.583072
295
0.924765
0
0
0
0
0
0
27
0.084639
f67c5cfd49d70bb094eaf858bc53e07e4d05c0a5
1,756
py
Python
Data Science and Machine Learning/Machine-Learning-In-Python-THOROUGH/EXAMPLES/EDABIT/EARLIER/49_triangle_challenge.py
okara83/Becoming-a-Data-Scientist
f09a15f7f239b96b77a2f080c403b2f3e95c9650
[ "MIT" ]
null
null
null
Data Science and Machine Learning/Machine-Learning-In-Python-THOROUGH/EXAMPLES/EDABIT/EARLIER/49_triangle_challenge.py
okara83/Becoming-a-Data-Scientist
f09a15f7f239b96b77a2f080c403b2f3e95c9650
[ "MIT" ]
null
null
null
Data Science and Machine Learning/Machine-Learning-In-Python-THOROUGH/EXAMPLES/EDABIT/EARLIER/49_triangle_challenge.py
okara83/Becoming-a-Data-Scientist
f09a15f7f239b96b77a2f080c403b2f3e95c9650
[ "MIT" ]
2
2022-02-09T15:41:33.000Z
2022-02-11T07:47:40.000Z
""" Triangle Challenge Given the perimeter and the area of a triangle, devise a function that returns the length of the sides of all triangles that fit those specifications. The length of the sides must be integers. Sort results in ascending order. triangle(perimeter, area) ➞ [[s1, s2, s3]] Examples triangle(12, 6) ➞ ...
35.12
225
0.490888
0
0
0
0
0
0
0
0
1,212
0.686297
f68047cd370902e0716ae55685d30c821200f866
4,232
py
Python
src/my_resnet.py
fahim19dipu/Seed-classifier
8acce2be9482cb8d8c11fa14433f9b4f8d4d92ba
[ "MIT" ]
null
null
null
src/my_resnet.py
fahim19dipu/Seed-classifier
8acce2be9482cb8d8c11fa14433f9b4f8d4d92ba
[ "MIT" ]
null
null
null
src/my_resnet.py
fahim19dipu/Seed-classifier
8acce2be9482cb8d8c11fa14433f9b4f8d4d92ba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Jul 4 17:01:28 2021 @author: fahim """ from keras.models import Model from keras.layers import Input, Add, Activation, ZeroPadding2D, BatchNormalization, Conv2D, AveragePooling2D, MaxPooling2D from keras.initializers import glorot_uniform def identity_block(X, f, filters, ...
42.747475
170
0.641777
0
0
0
0
0
0
0
0
377
0.089083
9c8515789c228e61ad777a8d32e3b11f40b6960c
808
py
Python
integration-test/630-bus-routes-z12.py
slachiewicz/vector-datasource
fb37603ba264be05839992f40eba1b5ae8a9c290
[ "MIT" ]
null
null
null
integration-test/630-bus-routes-z12.py
slachiewicz/vector-datasource
fb37603ba264be05839992f40eba1b5ae8a9c290
[ "MIT" ]
2
2021-03-26T00:41:17.000Z
2021-12-13T20:49:38.000Z
integration-test/630-bus-routes-z12.py
slachiewicz/vector-datasource
fb37603ba264be05839992f40eba1b5ae8a9c290
[ "MIT" ]
null
null
null
# block between mission & 6th and howard & 5th in SF. # appears to have lots of buses. # https://www.openstreetmap.org/way/88572932 -- Mission St # https://www.openstreetmap.org/relation/3406710 -- 14X to Daly City # https://www.openstreetmap.org/relation/3406709 -- 14X to Downtown # https://www.openstreetmap.org/relat...
35.130435
68
0.67698
0
0
0
0
0
0
0
0
599
0.741337
9c85502891b8c1bec06144b4cf625c033b9b3990
1,137
py
Python
bioinf/cli.py
szymanskir/bioinf
e55adf696d0116845f26901decb93a771ffa1489
[ "MIT" ]
1
2021-01-19T18:18:21.000Z
2021-01-19T18:18:21.000Z
bioinf/cli.py
szymanskir/bioinf
e55adf696d0116845f26901decb93a771ffa1489
[ "MIT" ]
null
null
null
bioinf/cli.py
szymanskir/bioinf
e55adf696d0116845f26901decb93a771ffa1489
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Console script for bioinf.""" import sys import click from .sequence import Sequence from .sequence_alignment import NeedlemanWunschSequenceAlignmentAlgorithm from .utils import read_config, read_sequence @click.group() def main(args=None): """Console script for bioinf.""" @main.comm...
29.153846
73
0.66139
0
0
0
0
828
0.728232
0
0
134
0.117854
9c85e485ac5021974344ec109d1e1572822b9624
703
py
Python
package_one/tests/test_integer_adder.py
afaquejam/AwesomeApp
d86cc29b4047d9341e6e368530e922f28daad309
[ "MIT" ]
4
2018-07-28T01:18:55.000Z
2019-04-04T09:32:19.000Z
package_one/tests/test_integer_adder.py
afaquejam/AwesomeApp
d86cc29b4047d9341e6e368530e922f28daad309
[ "MIT" ]
null
null
null
package_one/tests/test_integer_adder.py
afaquejam/AwesomeApp
d86cc29b4047d9341e6e368530e922f28daad309
[ "MIT" ]
null
null
null
import pytest from package_one.module_one import IntegerAdder @pytest.fixture def adder(): print("Test set-up!") yield IntegerAdder() print("Test tear-down") def test_integer_adder(adder): assert adder.add(1, 2) == 3 """ In case you'd like to declare a fixture that executes only once per module, then...
22.677419
109
0.671408
0
0
91
0.129445
422
0.600284
0
0
222
0.315789
9c8686e93160db726ab6ec2f606cf595263e00fa
1,179
py
Python
tests/local/test_json.py
abarisain/mopidy
4026e16996280016ceadfe98bd48f574306e2cef
[ "Apache-2.0" ]
2
2015-07-09T09:36:26.000Z
2019-10-05T04:13:19.000Z
tests/local/test_json.py
abarisain/mopidy
4026e16996280016ceadfe98bd48f574306e2cef
[ "Apache-2.0" ]
null
null
null
tests/local/test_json.py
abarisain/mopidy
4026e16996280016ceadfe98bd48f574306e2cef
[ "Apache-2.0" ]
1
2019-10-05T04:13:10.000Z
2019-10-05T04:13:10.000Z
from __future__ import unicode_literals import unittest from mopidy.local import json from mopidy.models import Ref class BrowseCacheTest(unittest.TestCase): def setUp(self): self.uris = [b'local:track:foo/bar/song1', b'local:track:foo/bar/song2', b'local:track:...
35.727273
77
0.641221
1,058
0.897371
0
0
0
0
0
0
245
0.207803
9c86a8fde028ad53edc3558eed458f5bce3f030f
2,214
py
Python
test/test_oximachine.py
ltalirz/oximachinerunner
ca8092a8b247216cb98b7d308862dba184e27f1e
[ "MIT" ]
null
null
null
test/test_oximachine.py
ltalirz/oximachinerunner
ca8092a8b247216cb98b7d308862dba184e27f1e
[ "MIT" ]
null
null
null
test/test_oximachine.py
ltalirz/oximachinerunner
ca8092a8b247216cb98b7d308862dba184e27f1e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # pylint:disable=missing-module-docstring, missing-function-docstring import os from oximachinerunner import OximachineRunner THIS_DIR = os.path.dirname(os.path.realpath(__file__)) def test_oximachine(): runner = OximachineRunner() output = runner.run_oximachine( os.path.join...
23.305263
87
0.531165
0
0
0
0
0
0
0
0
552
0.249322
9c875ae7c2afe703c37e9e06e4b3067ddcb1e099
11,643
py
Python
src/OTLMOW/OTLModel/Datatypes/KlVerlichtingstoestelModelnaam.py
davidvlaminck/OTLClassPython
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
2
2022-02-01T08:58:11.000Z
2022-02-08T13:35:17.000Z
src/OTLMOW/OTLModel/Datatypes/KlVerlichtingstoestelModelnaam.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
src/OTLMOW/OTLModel/Datatypes/KlVerlichtingstoestelModelnaam.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
# coding=utf-8 from OTLMOW.OTLModel.Datatypes.KeuzelijstField import KeuzelijstField from OTLMOW.OTLModel.Datatypes.KeuzelijstWaarde import KeuzelijstWaarde # Generated with OTLEnumerationCreator. To modify: extend, do not edit class KlVerlichtingstoestelModelnaam(KeuzelijstField): """De modelnaam van het verlich...
76.098039
149
0.562913
11,411
0.980074
0
0
0
0
0
0
5,370
0.461221
9c878638bf1045523352e1ded796f50059e55f03
4,007
py
Python
api/src/domain/object/user_interface/modal/Modal.py
SamuelJansen/Application
6ab3202fb7de12782510f477a3e74d8800ea2927
[ "MIT" ]
null
null
null
api/src/domain/object/user_interface/modal/Modal.py
SamuelJansen/Application
6ab3202fb7de12782510f477a3e74d8800ea2927
[ "MIT" ]
null
null
null
api/src/domain/object/user_interface/modal/Modal.py
SamuelJansen/Application
6ab3202fb7de12782510f477a3e74d8800ea2927
[ "MIT" ]
null
null
null
import UserInterface import surfaceFunction, eventFunction print('Modal library imported') class Modal(UserInterface.UserInterface): def __init__(self,name,size,father, type = None, position = None, text = None, textPosition = None, fontSize = None, scale = None, ...
48.865854
268
0.639132
3,913
0.976541
0
0
0
0
0
0
1,795
0.447966
9c879e5d1943efd11dd7e5215bb6e0131412a141
209
py
Python
ospath/ospath_expanduser.py
dineshkumar2509/learning-python
e8af11ff0b396da4c3f2cfe21d14131bae4b2adb
[ "MIT" ]
86
2015-06-13T16:53:55.000Z
2022-03-24T20:56:42.000Z
ospath/ospath_expanduser.py
pei-zheng-yi/learning-python
55e350dfe44cf04f7d4408e76e72d2f467bd42ce
[ "MIT" ]
9
2015-05-27T07:52:44.000Z
2022-03-29T21:52:40.000Z
ospath/ospath_expanduser.py
pei-zheng-yi/learning-python
55e350dfe44cf04f7d4408e76e72d2f467bd42ce
[ "MIT" ]
124
2015-12-10T01:17:18.000Z
2021-11-08T04:03:38.000Z
#!/usr/bin/env python # encoding: utf-8 """Expand tilde in filenames. """ import os.path for user in ['', 'dhellmann', 'postgres']: lookup = '~' + user print lookup, ':', os.path.expanduser(lookup)
17.416667
49
0.62201
0
0
0
0
0
0
0
0
100
0.478469
9c8a9179f77e608d06dcb7f9c2663a4c5550e626
5,103
py
Python
tests/test_repo.py
OmegaDroid/git-hooks
d890621e890796d0ab800267493444000c75214e
[ "MIT" ]
2
2016-01-08T17:57:59.000Z
2016-08-10T00:54:35.000Z
tests/test_repo.py
OmegaDroid/git-hooks
d890621e890796d0ab800267493444000c75214e
[ "MIT" ]
4
2016-01-09T13:50:37.000Z
2016-08-25T10:50:40.000Z
tests/test_repo.py
wildfish/git-hooks
d890621e890796d0ab800267493444000c75214e
[ "MIT" ]
null
null
null
import string from unittest2 import TestCase import os from hypothesis import given from hypothesis.strategies import text, lists from mock import patch, Mock from githooks import repo class FakeDiffObject(object): def __init__(self, a_path, b_path, new, deleted): self.a_path = a_path self.b_pat...
36.978261
112
0.676073
4,895
0.95924
0
0
4,474
0.876739
0
0
168
0.032922
9c8b2b5dd22e630bf72cf5ab5e527547533efeed
1,164
py
Python
Python/Zoo/zoo.py
bill-neely/ITSE1311-1302-Spring2018
db8cddb66d921a378bcbbd0423e9036ffc3b7a8a
[ "MIT" ]
null
null
null
Python/Zoo/zoo.py
bill-neely/ITSE1311-1302-Spring2018
db8cddb66d921a378bcbbd0423e9036ffc3b7a8a
[ "MIT" ]
null
null
null
Python/Zoo/zoo.py
bill-neely/ITSE1311-1302-Spring2018
db8cddb66d921a378bcbbd0423e9036ffc3b7a8a
[ "MIT" ]
null
null
null
class Zoo: def __init__(self, name, locations): self.name = name self.stillActive = True self.locations = locations self.currentLocation = self.locations[1] def changeLocation(self, direction): neighborID = self.currentLocation.neighbors[direction] self.currentLo...
29.846154
69
0.628007
1,159
0.995704
0
0
0
0
0
0
54
0.046392
9c8c0ef5b1b94d70574d07bd18de4607864827eb
1,056
py
Python
src/hashing_.py
pawelmhm/recenseo.es
026ac67cb6e146745aad1649c338ed89b83f0c63
[ "MIT" ]
null
null
null
src/hashing_.py
pawelmhm/recenseo.es
026ac67cb6e146745aad1649c338ed89b83f0c63
[ "MIT" ]
1
2021-03-19T22:06:54.000Z
2021-03-19T22:06:54.000Z
src/hashing_.py
pawelmhm/recenseo.es
026ac67cb6e146745aad1649c338ed89b83f0c63
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from hmac import HMAC from hashlib import sha256 import random import logging logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) def pbkd(password,salt): """ password must be a string in ascii, for some reasons string of type unicode provokes the follow...
31.058824
89
0.710227
0
0
0
0
0
0
0
0
327
0.309659
9c8f281197fddfa1af410d31983e1c6f137a5fe2
2,312
py
Python
neural-net/tensorflow/datasets.py
burntcustard/DeskBot-Zero
5efb6bcca21eb66f88499b3671c8fda5f6517b11
[ "MIT" ]
null
null
null
neural-net/tensorflow/datasets.py
burntcustard/DeskBot-Zero
5efb6bcca21eb66f88499b3671c8fda5f6517b11
[ "MIT" ]
null
null
null
neural-net/tensorflow/datasets.py
burntcustard/DeskBot-Zero
5efb6bcca21eb66f88499b3671c8fda5f6517b11
[ "MIT" ]
null
null
null
# Useful tutorial on tensorflow.contrib.data: # https://kratzert.github.io/2017/06/15/example-of-tensorflows-new-input-pipeline.html import glob # Used to generate image filename list import tensorflow as tf def input_parser(image_path, label): """ Convert label to one_hot, read image from file & perform ...
39.186441
86
0.719291
0
0
0
0
0
0
0
0
846
0.365917
9c90a31f9f59a4bbc673d9e0cd9b46fab6dc56ae
2,999
py
Python
uis/widget_formatter.py
AlberLC/qt-app
96fe79293de7f570a505845ed4ecd73f9f55572d
[ "MIT" ]
null
null
null
uis/widget_formatter.py
AlberLC/qt-app
96fe79293de7f570a505845ed4ecd73f9f55572d
[ "MIT" ]
null
null
null
uis/widget_formatter.py
AlberLC/qt-app
96fe79293de7f570a505845ed4ecd73f9f55572d
[ "MIT" ]
null
null
null
import os import subprocess import pathlib def reemplazar(string): return string.replace('self.', 'self.w.').replace('Form"', 'self.w.centralWidget"').replace('Form.', 'self.w.centralWidget.').replace('Form)', 'self.w.centralWidget)').replace('"', "'") try: url_archivo = input('Archivo: ').strip().strip('"'...
35.282353
189
0.64955
0
0
0
0
0
0
0
0
1,293
0.431144
9c90c9812ecdd62e381c8bf6cedd2186659f9529
2,450
py
Python
applications/HDF5Application/python_scripts/single_mesh_xdmf_output_process.py
AndreaVoltan/MyKratos7.0
e977752722e8ef1b606f25618c4bf8fd04c434cc
[ "BSD-4-Clause" ]
2
2020-04-30T19:13:08.000Z
2021-04-14T19:40:47.000Z
applications/HDF5Application/python_scripts/single_mesh_xdmf_output_process.py
AndreaVoltan/MyKratos7.0
e977752722e8ef1b606f25618c4bf8fd04c434cc
[ "BSD-4-Clause" ]
1
2020-04-30T19:19:09.000Z
2020-05-02T14:22:36.000Z
applications/HDF5Application/python_scripts/single_mesh_xdmf_output_process.py
AndreaVoltan/MyKratos7.0
e977752722e8ef1b606f25618c4bf8fd04c434cc
[ "BSD-4-Clause" ]
1
2020-06-12T08:51:24.000Z
2020-06-12T08:51:24.000Z
import KratosMultiphysics as KM import KratosMultiphysics.HDF5Application.temporal_output_process_factory as output_factory import KratosMultiphysics.HDF5Application.file_utilities as file_utils def Factory(settings, Model): """Return a process for writing simulation results for a single mesh to HDF5. It also ...
50
107
0.739592
0
0
0
0
0
0
0
0
993
0.405306
9c92c7ba102b28aaf3f497f452ff69ebb7754948
2,551
py
Python
docs/rename_function.py
samaid/sdc
bcc377f430d58c2f167e09754c65abfedde263f6
[ "BSD-2-Clause" ]
1
2019-11-06T18:10:07.000Z
2019-11-06T18:10:07.000Z
docs/rename_function.py
samaid/sdc
bcc377f430d58c2f167e09754c65abfedde263f6
[ "BSD-2-Clause" ]
null
null
null
docs/rename_function.py
samaid/sdc
bcc377f430d58c2f167e09754c65abfedde263f6
[ "BSD-2-Clause" ]
null
null
null
""" This script requires developers to add the following information: 1. add file and function name to srcfiles_srcfuncs 2. add file and directory name to srcdir_srcfiles 3. add expected display name for the function to display_names """ import os import itertools from shutil import copyfile...
34.013333
121
0.689142
0
0
0
0
0
0
0
0
1,642
0.643669
9c944fb70978ce339d17a2b5185083d51125ce9b
1,442
py
Python
src/entities/user.py
clayz/crazy-quiz-web
7601809ad521d95ae251a026f171b9ec6939c55f
[ "Apache-2.0" ]
null
null
null
src/entities/user.py
clayz/crazy-quiz-web
7601809ad521d95ae251a026f171b9ec6939c55f
[ "Apache-2.0" ]
null
null
null
src/entities/user.py
clayz/crazy-quiz-web
7601809ad521d95ae251a026f171b9ec6939c55f
[ "Apache-2.0" ]
null
null
null
from google.appengine.ext import ndb from google.appengine.ext.ndb import msgprop from entities import BaseEntity from constants import Gender, UserStatus, Device, APIStatus from errors import DataError class User(BaseEntity): name = ndb.StringProperty() mail = ndb.StringProperty() gender = msgprop.EnumPr...
36.05
89
0.73301
1,230
0.852982
0
0
215
0.149098
0
0
52
0.036061
9c983e06b9771f99c2823cbf81e31f60d912dcdd
3,327
py
Python
paytm/models.py
Faisal-Manzer/django-paytm-checkout
bc796fca160f2664d85d0a09acf558532cc74442
[ "MIT" ]
10
2019-11-08T12:10:19.000Z
2019-11-16T09:59:45.000Z
paytm/models.py
Faisal-Manzer/django-paytm-checkout
bc796fca160f2664d85d0a09acf558532cc74442
[ "MIT" ]
6
2019-11-09T09:16:46.000Z
2022-02-10T11:30:55.000Z
paytm/models.py
Faisal-Manzer/django-paytm-checkout
bc796fca160f2664d85d0a09acf558532cc74442
[ "MIT" ]
1
2020-06-02T15:56:56.000Z
2020-06-02T15:56:56.000Z
__all__ = ['Order', 'Item'] from django.db import models from django.contrib.auth import get_user_model from paytm import conf as paytm_conf from paytm.helpers import sha256 class Item(models.Model): price = models.FloatField() name = models.CharField(max_length=255) tag = models.CharField(max_length=255...
28.681034
98
0.612564
3,146
0.945597
0
0
0
0
0
0
674
0.202585
9c98805df16923bcad50b539375b76c4c6448e60
125
py
Python
tffm/__init__.py
FlorisHoogenboom/tffm
baf8086a8696a2b71bebdefe3a64d3b897599f72
[ "MIT" ]
null
null
null
tffm/__init__.py
FlorisHoogenboom/tffm
baf8086a8696a2b71bebdefe3a64d3b897599f72
[ "MIT" ]
null
null
null
tffm/__init__.py
FlorisHoogenboom/tffm
baf8086a8696a2b71bebdefe3a64d3b897599f72
[ "MIT" ]
null
null
null
from .models import TFFMClassifier, TFFMRegressor, TFFMRankNet __all__ = ['TFFMClassifier', 'TFFMRegressor', 'TFFMRankNet']
31.25
62
0.792
0
0
0
0
0
0
0
0
44
0.352
9c98b5419ef51d74e2d7e47ae36323002d369066
7,617
py
Python
competitions/avito-demand-prediction/base_xgb_tune_mthread.py
gtesei/fast-furious
b974e6b71be92ad8892864794af57631291ebac1
[ "MIT" ]
19
2015-06-24T00:04:11.000Z
2021-02-28T16:55:44.000Z
competitions/avito-demand-prediction/base_xgb_tune_mthread.py
gtesei/fast-furious
b974e6b71be92ad8892864794af57631291ebac1
[ "MIT" ]
null
null
null
competitions/avito-demand-prediction/base_xgb_tune_mthread.py
gtesei/fast-furious
b974e6b71be92ad8892864794af57631291ebac1
[ "MIT" ]
4
2016-10-11T17:36:44.000Z
2019-08-16T10:03:04.000Z
import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import LabelEncoder import re from sklearn.feature_extraction import DictVectorizer from sklearn.model_selection import train_test_split import pandas as pd from pandas.tseries.holiday import USFederalHolidayCalendar a...
35.593458
112
0.495339
0
0
0
0
0
0
0
0
2,319
0.304451
9c98d51c1433c4a39642bc8ab3e23a7db335e475
1,456
py
Python
tests/program_test.py
stanfortonski/Perlin-Noise-3D-Voxel-Generator
f06b0329c948848b22b5e3c04978e95ce71f5ab0
[ "MIT" ]
27
2020-05-15T23:24:17.000Z
2021-11-22T01:23:27.000Z
tests/program_test.py
stanfortonski/Perlin-Noise-3D-Voxel-Generator
f06b0329c948848b22b5e3c04978e95ce71f5ab0
[ "MIT" ]
null
null
null
tests/program_test.py
stanfortonski/Perlin-Noise-3D-Voxel-Generator
f06b0329c948848b22b5e3c04978e95ce71f5ab0
[ "MIT" ]
null
null
null
import sys, unittest, glfw sys.path.insert(0, '..') from OpenGL.GL import * from engine.base.shader import Shader from engine.base.program import * import helper class ProgramTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.window = helper.initAndGetWindow() @classmethod def tear...
32.355556
106
0.644231
1,245
0.855082
0
0
149
0.102335
0
0
202
0.138736
9c9a7452e9e547327aec4a9da8b0f126d46152b2
1,253
py
Python
movie_night/genrecollector.py
MattDrouin/movie_night
4445b5fc66e7f7a5b2829142101d05dcf87a3227
[ "MIT" ]
null
null
null
movie_night/genrecollector.py
MattDrouin/movie_night
4445b5fc66e7f7a5b2829142101d05dcf87a3227
[ "MIT" ]
null
null
null
movie_night/genrecollector.py
MattDrouin/movie_night
4445b5fc66e7f7a5b2829142101d05dcf87a3227
[ "MIT" ]
null
null
null
import aiohttp import asyncio # Grab the movie genre in a slightly painful way async def get_genre(movie_title, session): search_string = "+".join(movie_title.split()) url = f'https://www.google.com/search?q={search_string}' async with session.get(url) as resp: html = await resp.text() ...
26.104167
67
0.497207
0
0
0
0
0
0
959
0.765363
330
0.263368
9c9b489e028cbf9b38f6936d0fc0e18d8c7399d9
2,623
py
Python
ML/WhatsApp/radar_chart.py
PepSalehi/algorithms
1c20f57185e6324aa840ccff98e69764b4213131
[ "MIT" ]
null
null
null
ML/WhatsApp/radar_chart.py
PepSalehi/algorithms
1c20f57185e6324aa840ccff98e69764b4213131
[ "MIT" ]
null
null
null
ML/WhatsApp/radar_chart.py
PepSalehi/algorithms
1c20f57185e6324aa840ccff98e69764b4213131
[ "MIT" ]
1
2019-12-09T21:40:46.000Z
2019-12-09T21:40:46.000Z
# core modules from math import pi # 3rd party modules import matplotlib.pyplot as plt import pandas as pd # internal modules import analysis def main(path): df = analysis.parse_file(path) df = prepare_df(df, grouping=(df['date'].dt.hour)) print(df.reset_index().to_dict(orient='list')) df = pd.DataF...
27.904255
157
0.559283
0
0
0
0
0
0
0
0
850
0.324056
9c9c644c1666b0d5fa37d62234243dadbc44f8cf
1,894
py
Python
LoggedSensor.py
majorpeter/puha-manager
fd51b560a7e1dad99204ae3c9c7369d17cbcfd32
[ "MIT" ]
null
null
null
LoggedSensor.py
majorpeter/puha-manager
fd51b560a7e1dad99204ae3c9c7369d17cbcfd32
[ "MIT" ]
5
2018-07-29T19:55:27.000Z
2018-09-08T17:39:48.000Z
LoggedSensor.py
majorpeter/puha-manager
fd51b560a7e1dad99204ae3c9c7369d17cbcfd32
[ "MIT" ]
null
null
null
from datetime import datetime from threading import Lock from Database import Database class LoggedSensor: """ This is a common base class for all sensors that have data to be stored/logged. """ registered_type_ids = [] def __init__(self, type_id, max_measurements=200, holdoff_time=None): ...
32.101695
104
0.586589
1,803
0.951954
0
0
0
0
0
0
195
0.102957
9c9dc2b48466cf77d6827d16eafaafb0b544703d
1,046
py
Python
tests/algorithms/sets/test_cartesian.py
maurobaraldi/python-algorithms
94fe5e46737d6ea2f7ff62b5b61b7b9cca3fbd14
[ "MIT" ]
2
2018-11-05T17:12:40.000Z
2019-09-05T17:10:01.000Z
tests/algorithms/sets/test_cartesian.py
maurobaraldi/python-algorithms
94fe5e46737d6ea2f7ff62b5b61b7b9cca3fbd14
[ "MIT" ]
null
null
null
tests/algorithms/sets/test_cartesian.py
maurobaraldi/python-algorithms
94fe5e46737d6ea2f7ff62b5b61b7b9cca3fbd14
[ "MIT" ]
1
2019-01-02T19:07:51.000Z
2019-01-02T19:07:51.000Z
#!/usr/bin/env python import unittest from algorithms.sets.cartesian_product import cartesian class TestFatorial(unittest.TestCase): def setUp(self): self.set_a = [1, 2] self.set_b = [4, 5] def test_cartesian_product(self): self.assertEqual(cartesian.product(self.set_a, self.set_b),...
34.866667
122
0.630975
899
0.859465
0
0
0
0
0
0
31
0.029637
9c9e72363186eee33893fff1aebbb6657c6b8082
14,501
py
Python
libs/sdc_etl_libs/aws_helpers/S3Data.py
darknegma/docker-airflow
44e3d02d7ac43c8876145ae47acfbbbde67230df
[ "Apache-2.0" ]
null
null
null
libs/sdc_etl_libs/aws_helpers/S3Data.py
darknegma/docker-airflow
44e3d02d7ac43c8876145ae47acfbbbde67230df
[ "Apache-2.0" ]
3
2021-03-31T19:26:57.000Z
2021-12-13T20:33:01.000Z
libs/sdc_etl_libs/aws_helpers/S3Data.py
darknegma/docker-airflow
44e3d02d7ac43c8876145ae47acfbbbde67230df
[ "Apache-2.0" ]
null
null
null
import boto3 from botocore.exceptions import ClientError import gzip import io import os import csv import re class S3Data(object): def __init__(self, bucket_name_, prefix_, file_, df_schema_, compression_type_, check_headers_, file_type_, access_key_=None, secret_key_=None, regi...
40.058011
122
0.579064
14,388
0.992207
0
0
5,251
0.362113
0
0
5,754
0.3968
9c9e9f62b13ea8939d24495e7e75ae788410b53b
5,520
py
Python
tests/test_models.py
thmslmr/timebomb-client
a57fdbb8bfc0157d2c3d713496ab4819fb33f1fd
[ "MIT" ]
1
2020-03-31T17:17:40.000Z
2020-03-31T17:17:40.000Z
tests/test_models.py
thmslmr/timebomb-client
a57fdbb8bfc0157d2c3d713496ab4819fb33f1fd
[ "MIT" ]
2
2020-03-31T17:18:38.000Z
2020-03-31T17:21:13.000Z
tests/test_models.py
thmslmr/timebomb-client
a57fdbb8bfc0157d2c3d713496ab4819fb33f1fd
[ "MIT" ]
null
null
null
from datetime import datetime import timebomb.models as models def test_Notification(): notif = models.Notification("message") assert notif.content == "message" assert notif.read is False assert str(notif) == "message" def test_Player(): player = models.Player("name", "id") assert player....
32.470588
87
0.661051
0
0
0
0
0
0
0
0
925
0.167572
9ca0a611b163641ccd9e67b37966344da7a5eac2
1,801
py
Python
words_in_sentences/admin.py
FatliTalk/learnenglish
f0393346f2e696b2af542c05e5005d2495f00e37
[ "MIT" ]
1
2021-10-06T12:40:28.000Z
2021-10-06T12:40:28.000Z
words_in_sentences/admin.py
FatliTalk/learnenglish
f0393346f2e696b2af542c05e5005d2495f00e37
[ "MIT" ]
null
null
null
words_in_sentences/admin.py
FatliTalk/learnenglish
f0393346f2e696b2af542c05e5005d2495f00e37
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Tag, Sentence, Review admin.site.register(Tag) class ReviewInline(admin.StackedInline): model = Review extra = 0 readonly_fields = ( 'modified_time', 'last_review_date', ) class SentenceAdmin(admin.ModelAdmin): # docs.djangop...
23.38961
97
0.541921
1,646
0.913937
0
0
0
0
0
0
670
0.372016
9ca288ba9259937c8aeaac578a1dd9eb50715c34
1,930
py
Python
scheduled_bots/scripts/add_ECO_evidence_code.py
turoger/scheduled-bots
23fd30ccc242391151af3a1727f9fbf9dc95d433
[ "MIT" ]
6
2017-05-04T01:04:26.000Z
2022-03-04T12:22:17.000Z
scheduled_bots/scripts/add_ECO_evidence_code.py
turoger/scheduled-bots
23fd30ccc242391151af3a1727f9fbf9dc95d433
[ "MIT" ]
55
2017-03-14T21:16:44.000Z
2022-03-02T12:39:14.000Z
scheduled_bots/scripts/add_ECO_evidence_code.py
turoger/scheduled-bots
23fd30ccc242391151af3a1727f9fbf9dc95d433
[ "MIT" ]
13
2017-02-10T21:40:06.000Z
2022-01-18T01:27:52.000Z
""" One off script to Map evidence codes between ECO and GO https://github.com/evidenceontology/evidenceontology/blob/master/gaf-eco-mapping.txt """ import datetime from wikidataintegrator import wdi_core, wdi_login from scheduled_bots.local import WDPASS, WDUSER login = wdi_login.WDLogin(WDUSER, WDPASS) go_evidenc...
58.484848
120
0.615544
0
0
0
0
0
0
0
0
1,025
0.531088
9ca3e6cc572151c426dc39e7c0ad47e0d772a12a
315
py
Python
emenu/conftest.py
Ryszyy/emenu
735e1e36580e26ba9b22609e461f06aab281aea7
[ "MIT" ]
null
null
null
emenu/conftest.py
Ryszyy/emenu
735e1e36580e26ba9b22609e461f06aab281aea7
[ "MIT" ]
null
null
null
emenu/conftest.py
Ryszyy/emenu
735e1e36580e26ba9b22609e461f06aab281aea7
[ "MIT" ]
null
null
null
import pytest from django.contrib.auth import get_user_model from emenu.users.tests.factories import UserFactory @pytest.fixture(autouse=True) def media_storage(settings, tmpdir): settings.MEDIA_ROOT = tmpdir.strpath @pytest.fixture def user() -> get_user_model(): # type: ignore return UserFactory()
21
51
0.774603
0
0
0
0
195
0.619048
0
0
14
0.044444
9ca412a5e4887117f87a070c4624fcb1569c592d
6,322
py
Python
pychemia/population/_population.py
quanshengwu/PyChemia
98e9f7a1118b694dbda3ee75411ff8f8d7b9688b
[ "MIT" ]
1
2021-03-26T12:34:45.000Z
2021-03-26T12:34:45.000Z
pychemia/population/_population.py
quanshengwu/PyChemia
98e9f7a1118b694dbda3ee75411ff8f8d7b9688b
[ "MIT" ]
null
null
null
pychemia/population/_population.py
quanshengwu/PyChemia
98e9f7a1118b694dbda3ee75411ff8f8d7b9688b
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import json import numpy as np from builtins import str from abc import ABCMeta, abstractmethod from pychemia import HAS_PYMONGO from pychemia.utils.computing import deep_unicode if HAS_PYMONGO: from pychemia.db import PyChemiaDB class Population: __metaclass__ = ABCMe...
27.72807
107
0.607403
6,044
0.956027
0
0
1,803
0.285195
0
0
811
0.128282
9ca437236746459609c5690cd68a04412ca8726f
2,034
py
Python
python/tests/test_nessie_cli.py
ryantse/nessie
c347d61ec7358fdc5759147cc6207143927246f3
[ "Apache-2.0" ]
null
null
null
python/tests/test_nessie_cli.py
ryantse/nessie
c347d61ec7358fdc5759147cc6207143927246f3
[ "Apache-2.0" ]
null
null
null
python/tests/test_nessie_cli.py
ryantse/nessie
c347d61ec7358fdc5759147cc6207143927246f3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `pynessie` package.""" import pytest import requests_mock import simplejson as json from click.testing import CliRunner from pynessie import __version__ from pynessie import cli from pynessie.model import ReferenceSchema def test_command_line_interface(reque...
35.684211
90
0.69174
0
0
0
0
736
0.361849
0
0
362
0.177974
9ca439ec225fe16010ea11790d66c7004a6e42da
129
py
Python
dongtai_agent_python/context/__init__.py
luzhongyang/DongTai-agent-python-1
f4e14afb136946809c5e84b7b163a8c32267a27a
[ "Apache-2.0" ]
17
2021-11-13T11:57:10.000Z
2022-03-26T12:45:30.000Z
dongtai_agent_python/context/__init__.py
luzhongyang/DongTai-agent-python-1
f4e14afb136946809c5e84b7b163a8c32267a27a
[ "Apache-2.0" ]
2
2021-11-08T07:43:38.000Z
2021-12-09T02:23:46.000Z
dongtai_agent_python/context/__init__.py
luzhongyang/DongTai-agent-python-1
f4e14afb136946809c5e84b7b163a8c32267a27a
[ "Apache-2.0" ]
17
2021-11-02T08:21:57.000Z
2022-02-19T13:24:36.000Z
from .request_context import RequestContext from .tracker import ContextTracker from .request import DjangoRequest, FlaskRequest
32.25
48
0.868217
0
0
0
0
0
0
0
0
0
0
9ca92489a95d5d6f10768832e66cdc6a00655f55
8,183
py
Python
iaso/api/org_unit_search.py
BLSQ/iaso-copy
85fb17f408c15e8c2d730416d1312f58f8db39b7
[ "MIT" ]
29
2020-12-26T07:22:19.000Z
2022-03-07T13:40:09.000Z
iaso/api/org_unit_search.py
BLSQ/iaso-copy
85fb17f408c15e8c2d730416d1312f58f8db39b7
[ "MIT" ]
150
2020-11-09T15:03:27.000Z
2022-03-07T15:36:07.000Z
iaso/api/org_unit_search.py
BLSQ/iaso
95c8087c0182bdd576598eb8cd39c440e58e15d7
[ "MIT" ]
4
2020-11-09T10:38:13.000Z
2021-10-04T09:42:47.000Z
import re from django.db.models import Q, Count, Sum, Case, When, IntegerField, Value from iaso.models import OrgUnit, Instance, DataSource def build_org_units_queryset(queryset, params, profile): validation_status = params.get("validation_status", OrgUnit.VALIDATION_VALID) has_instances = params.get("hasIn...
37.365297
117
0.633142
0
0
0
0
0
0
0
0
735
0.08982
9cab8a834e9e682c0ee397c003bc6bb100756a66
7,551
py
Python
deep_NLP.py
AI-tist/NlpDeeplearning
6d8b5b9d244fc49df00858023118318a2d4125d4
[ "MIT" ]
null
null
null
deep_NLP.py
AI-tist/NlpDeeplearning
6d8b5b9d244fc49df00858023118318a2d4125d4
[ "MIT" ]
null
null
null
deep_NLP.py
AI-tist/NlpDeeplearning
6d8b5b9d244fc49df00858023118318a2d4125d4
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import xgboost as xgb from tqdm import tqdm from sklearn.svm import SVC from keras.models import Sequential from keras.layers.recurrent import LSTM, GRU from keras.layers.core import Dense, Activation, Dropout from keras.layers.embeddings import Embedding from keras.layers.normali...
33.411504
107
0.713283
0
0
0
0
0
0
0
0
1,717
0.227387
9cac0ad4d3324c47506f3d542aa657ca67da7b25
81
py
Python
cbt/apps.py
belloshehu/multiple-choice-questions
abfb7ac8cc24bc3f9ee34e9505bc6c6944786ac0
[ "MIT" ]
null
null
null
cbt/apps.py
belloshehu/multiple-choice-questions
abfb7ac8cc24bc3f9ee34e9505bc6c6944786ac0
[ "MIT" ]
2
2020-09-03T21:48:33.000Z
2020-09-22T08:51:14.000Z
cbt/apps.py
belloshehu/multiple-choice-questions
abfb7ac8cc24bc3f9ee34e9505bc6c6944786ac0
[ "MIT" ]
null
null
null
from django.apps import AppConfig class CbtConfig(AppConfig): name = 'cbt'
13.5
33
0.728395
44
0.54321
0
0
0
0
0
0
5
0.061728
9cac9b27985bf5baf54eb0058ab26de0a6a723b5
176
py
Python
examples/python/src/authors/models.py
ShivamSarodia/sqlc
194065e223a53d19219efb290a53b45fcd036a6b
[ "MIT" ]
5,153
2019-08-19T19:24:06.000Z
2022-03-31T22:26:53.000Z
examples/python/src/authors/models.py
ShivamSarodia/sqlc
194065e223a53d19219efb290a53b45fcd036a6b
[ "MIT" ]
871
2019-08-19T02:20:57.000Z
2022-03-31T21:03:04.000Z
examples/python/src/authors/models.py
ShivamSarodia/sqlc
194065e223a53d19219efb290a53b45fcd036a6b
[ "MIT" ]
377
2019-09-04T07:27:09.000Z
2022-03-31T21:54:45.000Z
# Code generated by sqlc. DO NOT EDIT. import dataclasses from typing import Optional @dataclasses.dataclass() class Author: id: int name: str bio: Optional[str]
16
38
0.715909
62
0.352273
0
0
87
0.494318
0
0
38
0.215909
9cacd9c2da031e3221ef68c08b555dad87d95e00
108
py
Python
src/wagtail_site_inheritance/__init__.py
labd/wagtail-site-inheritance
2d13de198a5b6354c49073dacb3964eef8e71647
[ "MIT" ]
5
2020-03-09T18:53:08.000Z
2022-02-08T12:38:07.000Z
src/wagtail_site_inheritance/__init__.py
labd/wagtail-site-inheritance
2d13de198a5b6354c49073dacb3964eef8e71647
[ "MIT" ]
null
null
null
src/wagtail_site_inheritance/__init__.py
labd/wagtail-site-inheritance
2d13de198a5b6354c49073dacb3964eef8e71647
[ "MIT" ]
null
null
null
__version__ = "0.0.1" default_app_config = "wagtail_site_inheritance.apps.WagtailSiteInheritanceAppConfig"
27
84
0.842593
0
0
0
0
0
0
0
0
70
0.648148
9cadce2a65716efbbbaef6fb365b1a19a14d1464
779
py
Python
code/mod.py
aragilar/python-testing
312496a9016975d99230744e262799999740720b
[ "CC-BY-4.0" ]
null
null
null
code/mod.py
aragilar/python-testing
312496a9016975d99230744e262799999740720b
[ "CC-BY-4.0" ]
null
null
null
code/mod.py
aragilar/python-testing
312496a9016975d99230744e262799999740720b
[ "CC-BY-4.0" ]
null
null
null
import os.path import numpy as np def sinc2d(x, y): if x == 0.0 and y == 0.0: return 1.0 elif x == 0.0: return np.sin(y) / y elif y == 0.0: return np.sin(x) / x else: return (np.sin(x) / x) * (np.sin(y) / y) def a(x): return x + 1 def b(x): return 2 * x def c...
18.116279
62
0.499358
0
0
0
0
0
0
0
0
52
0.066752
9cade016723908e48e753e2ca24979b97411963e
1,970
py
Python
chooks/commands/add.py
thegedge/chooks
1a5115d16f67d716206da456ee405a562a6df042
[ "MIT" ]
null
null
null
chooks/commands/add.py
thegedge/chooks
1a5115d16f67d716206da456ee405a562a6df042
[ "MIT" ]
1
2015-05-11T18:25:49.000Z
2015-05-11T18:29:11.000Z
chooks/commands/add.py
thegedge/chooks
1a5115d16f67d716206da456ee405a562a6df042
[ "MIT" ]
null
null
null
"""Adds a chook to a git repository. Usage: chooks add [--stdin | --argument] [--once | --filter=FILTER...] [--global] [--fatal] [--hook=NAME...] [--name=NAME] [--disabled] [--] <command> [<args>...] Options: --stdin Supply input files to this chook via stdin. --filter=<filt...
38.627451
79
0.601015
0
0
0
0
0
0
0
0
1,330
0.675127
9cade33f66ce27c884971c2cb87a60d28b5e287f
1,095
py
Python
dwave/inspector/utils.py
hotmess47/dwave-inspector
b958ab0c2c943c8d55d610b5903cffd4b88a2dff
[ "Apache-2.0" ]
3
2020-02-27T18:55:39.000Z
2021-09-16T14:37:46.000Z
dwave/inspector/utils.py
hotmess47/dwave-inspector
b958ab0c2c943c8d55d610b5903cffd4b88a2dff
[ "Apache-2.0" ]
46
2020-02-25T10:12:45.000Z
2022-02-23T22:03:52.000Z
dwave/inspector/utils.py
hotmess47/dwave-inspector
b958ab0c2c943c8d55d610b5903cffd4b88a2dff
[ "Apache-2.0" ]
11
2020-02-27T17:14:26.000Z
2022-03-11T10:14:36.000Z
# Copyright 2020 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
27.375
79
0.702283
0
0
0
0
0
0
0
0
792
0.723288
9caf4f6433bdc8722933884a9170248eea827c22
3,432
py
Python
MakeConects.py
Gimba/AmberUtils
f10ccc474a4fa4ea3aa2d93f85b99e2bb8b5d3b0
[ "MIT" ]
null
null
null
MakeConects.py
Gimba/AmberUtils
f10ccc474a4fa4ea3aa2d93f85b99e2bb8b5d3b0
[ "MIT" ]
null
null
null
MakeConects.py
Gimba/AmberUtils
f10ccc474a4fa4ea3aa2d93f85b99e2bb8b5d3b0
[ "MIT" ]
null
null
null
#! /usr/bin/env python # Copyright (c) 2015 William Lees # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation the # rights to use, copy, modify, m...
41.349398
128
0.592657
0
0
0
0
0
0
0
0
1,759
0.512529
9cb06ce3367f1f618bf6ef97ee8c9a3b4e22a068
481
py
Python
supersalon/professionals/models.py
dogukantufekci/supersalon
6ce552712d9d91fb493043030a09386544ed8b81
[ "BSD-3-Clause" ]
null
null
null
supersalon/professionals/models.py
dogukantufekci/supersalon
6ce552712d9d91fb493043030a09386544ed8b81
[ "BSD-3-Clause" ]
null
null
null
supersalon/professionals/models.py
dogukantufekci/supersalon
6ce552712d9d91fb493043030a09386544ed8b81
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from django.utils.translation import ugettext_lazy as _ class Professional(models.Model): # User user = models.OneToOneField('users.User', primary_key=True, related_name='professional', verbose_name=_("User")) class Meta: ordering = ('user__first_name', 'user__last_na...
30.0625
116
0.704782
394
0.819127
0
0
0
0
0
0
102
0.212058
9cb27a0b9ec9facd3f25dae465a1a3f58269e3b3
1,882
py
Python
test.py
imjacksonchen/weightTracker
9dfdd9a943cfdc5148a5a15876df2f159b0623cf
[ "MIT" ]
null
null
null
test.py
imjacksonchen/weightTracker
9dfdd9a943cfdc5148a5a15876df2f159b0623cf
[ "MIT" ]
null
null
null
test.py
imjacksonchen/weightTracker
9dfdd9a943cfdc5148a5a15876df2f159b0623cf
[ "MIT" ]
null
null
null
import unittest import datetime from weightTrack import WeightNote class TestWeightNote(unittest.TestCase): ### Testing getter methods ### def test_shouldGetWeight(self): testWeight = WeightNote(100, "Ate breakfast") self.assertEqual(testWeight.getWeight(), 100, "Should be 100") # Note:...
32.448276
70
0.600956
1,755
0.932519
0
0
0
0
0
0
1,011
0.537194
9cb339f88a19712fdd5c854216d9d0e7bc780ed9
22
py
Python
networking_infoblox/neutron/cmd/eventlet/__init__.py
rav28/networking-infoblox
fce27ca1c2bafb9b0a90aa22388bbc2dbec68294
[ "Apache-2.0" ]
null
null
null
networking_infoblox/neutron/cmd/eventlet/__init__.py
rav28/networking-infoblox
fce27ca1c2bafb9b0a90aa22388bbc2dbec68294
[ "Apache-2.0" ]
1
2021-11-20T19:39:58.000Z
2021-11-20T19:39:58.000Z
networking_infoblox/neutron/cmd/eventlet/__init__.py
rav28/networking-infoblox
fce27ca1c2bafb9b0a90aa22388bbc2dbec68294
[ "Apache-2.0" ]
1
2021-11-20T19:37:55.000Z
2021-11-20T19:37:55.000Z
__author__ = 'hhwang'
11
21
0.727273
0
0
0
0
0
0
0
0
8
0.363636
9cb3f5cf51b8b20433b3b320d11d55ba5d9140d5
243
py
Python
debauto/utils.py
flaviomilan/python-debauto-br
c776c9094b0fc380797360231d9d1574813b2852
[ "MIT" ]
5
2019-05-02T01:05:28.000Z
2021-12-30T05:30:02.000Z
debauto/utils.py
flaviomilan/python-debauto-br
c776c9094b0fc380797360231d9d1574813b2852
[ "MIT" ]
null
null
null
debauto/utils.py
flaviomilan/python-debauto-br
c776c9094b0fc380797360231d9d1574813b2852
[ "MIT" ]
2
2021-01-01T22:28:32.000Z
2021-01-01T22:33:04.000Z
# -*- encoding: utf-8 -*- import datetime def formata_data(data): data = datetime.datetime.strptime(data, '%d/%m/%Y').date() return data.strftime("%Y%m%d") def formata_valor(valor): return str("%.2f" % valor).replace(".", "")
18.692308
62
0.613169
0
0
0
0
0
0
0
0
54
0.222222
9cb50604a1507becdac54fdbcfd2fefb61cc2c48
1,105
py
Python
docker-images/pysyft-worker/worker-server.py
linamnt/PySyft
4b60a86c003acbe1967d6c3d611df3d5f2d377ee
[ "Apache-2.0" ]
3
2020-11-24T05:15:57.000Z
2020-12-07T09:52:45.000Z
docker-images/pysyft-worker/worker-server.py
linamnt/PySyft
4b60a86c003acbe1967d6c3d611df3d5f2d377ee
[ "Apache-2.0" ]
2
2020-03-09T09:17:06.000Z
2020-04-09T13:33:12.000Z
docker-images/pysyft-worker/worker-server.py
linamnt/PySyft
4b60a86c003acbe1967d6c3d611df3d5f2d377ee
[ "Apache-2.0" ]
1
2022-03-06T06:22:21.000Z
2022-03-06T06:22:21.000Z
import argparse import torch import syft as sy from syft import WebsocketServerWorker def get_args(): parser = argparse.ArgumentParser(description="Run websocket server worker.") parser.add_argument( "--port", "-p", type=int, default=8777, help="port number of the webso...
25.113636
94
0.59819
0
0
0
0
0
0
0
0
344
0.311312
9cb7bc1d4808741ef60b11b2ef895ca36d1c2b75
7,687
py
Python
datageneration/dbmake_h264hits.py
utlive/VIDMAP
60656d532ac497c1070f1c94c06807b2d57e2af4
[ "Unlicense" ]
1
2022-02-21T02:45:25.000Z
2022-02-21T02:45:25.000Z
datageneration/dbmake_h264hits.py
utlive/VIDMAP
60656d532ac497c1070f1c94c06807b2d57e2af4
[ "Unlicense" ]
null
null
null
datageneration/dbmake_h264hits.py
utlive/VIDMAP
60656d532ac497c1070f1c94c06807b2d57e2af4
[ "Unlicense" ]
null
null
null
import skimage.io import skvideo.io import os import h5py from sklearn.externals import joblib from sklearn.linear_model import LinearRegression from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import f1_score import scipy.misc import scipy.signal import numpy as np from sporco import util import...
34.013274
162
0.655392
0
0
0
0
0
0
0
0
2,241
0.291531
9cb7df62cf935affe51b3c5e32536d465e8754d7
1,126
py
Python
mopidy_mqtt/utils.py
odiroot/mopidy-mq
7cefe3cbc3e3d8f741d887b8370e92ab47c0d493
[ "Apache-2.0" ]
null
null
null
mopidy_mqtt/utils.py
odiroot/mopidy-mq
7cefe3cbc3e3d8f741d887b8370e92ab47c0d493
[ "Apache-2.0" ]
null
null
null
mopidy_mqtt/utils.py
odiroot/mopidy-mq
7cefe3cbc3e3d8f741d887b8370e92ab47c0d493
[ "Apache-2.0" ]
null
null
null
UNKNOWN = u'' def describe_track(track): """ Prepare a short human-readable Track description. track (mopidy.models.Track): Track to source song data from. """ title = track.name or UNKNOWN # Simple/regular case: normal song (e.g. from Spotify). if track.artists: artist = next(it...
24.478261
72
0.617229
0
0
0
0
0
0
0
0
367
0.325933
9cb959cded414dc66d1ee592c294e6008ab6b58b
11,162
py
Python
SimModel_Python_API/simmodel_swig/Release/SimInternalLoad_Lights_Default.py
EnEff-BIM/EnEffBIM-Framework
6328d39b498dc4065a60b5cc9370b8c2a9a1cddf
[ "MIT" ]
3
2016-05-30T15:12:16.000Z
2022-03-22T08:11:13.000Z
SimModel_Python_API/simmodel_swig/Release/SimInternalLoad_Lights_Default.py
EnEff-BIM/EnEffBIM-Framework
6328d39b498dc4065a60b5cc9370b8c2a9a1cddf
[ "MIT" ]
21
2016-06-13T11:33:45.000Z
2017-05-23T09:46:52.000Z
SimModel_Python_API/simmodel_swig/Release/SimInternalLoad_Lights_Default.py
EnEff-BIM/EnEffBIM-Framework
6328d39b498dc4065a60b5cc9370b8c2a9a1cddf
[ "MIT" ]
null
null
null
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.7 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2, 6, 0): def swig_import_helper(): from os.path imp...
41.805243
139
0.760796
7,757
0.694947
0
0
0
0
0
0
592
0.053037
9cb99a5d200c09e89fd5f801960f8cb0d1f949ca
1,925
py
Python
ggpy/cruft/autocode/Test_CanonicalJSON.py
hobson/ggpy
4e6e6e876c3a4294cd711647051da2d9c1836b60
[ "MIT" ]
1
2015-01-26T19:07:45.000Z
2015-01-26T19:07:45.000Z
ggpy/cruft/autocode/Test_CanonicalJSON.py
hobson/ggpy
4e6e6e876c3a4294cd711647051da2d9c1836b60
[ "MIT" ]
null
null
null
ggpy/cruft/autocode/Test_CanonicalJSON.py
hobson/ggpy
4e6e6e876c3a4294cd711647051da2d9c1836b60
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ generated source for module Test_CanonicalJSON """ # package: org.ggp.base.util.crypto import junit.framework.TestCase import org.ggp.base.util.crypto.CanonicalJSON.CanonicalizationStrategy # # * Unit tests for the CanonicalJSON class, which provides a # * standard way for GGP systems t...
56.617647
105
0.656623
1,488
0.772987
0
0
0
0
0
0
856
0.444675
9cbb4a2a9efa65411f4aa36bd270da45be788b3e
3,217
py
Python
python_app/tenhou-bot/mahjong/tile.py
0xsuu/Project-Mahjong
e82edc67651ff93c8ec158b590cd728f28504be9
[ "Apache-2.0" ]
9
2018-06-08T00:09:08.000Z
2021-11-17T11:05:11.000Z
python_app/tenhou-bot/mahjong/tile.py
0xsuu/Project-Mahjong
e82edc67651ff93c8ec158b590cd728f28504be9
[ "Apache-2.0" ]
1
2020-04-25T12:43:26.000Z
2020-04-25T12:43:26.000Z
python_app/tenhou-bot/mahjong/tile.py
0xsuu/Project-Mahjong
e82edc67651ff93c8ec158b590cd728f28504be9
[ "Apache-2.0" ]
2
2019-05-30T07:18:45.000Z
2019-11-05T09:15:13.000Z
# -*- coding: utf-8 -*- class Tile(int): TILES = ''' 1s 2s 3s 4s 5s 6s 7s 8s 9s 1p 2p 3p 4p 5p 6p 7p 8p 9p 1m 2m 3m 4m 5m 6m 7m 8m 9m ew sw ww nw wd gd rd '''.split() def as_data(self): return self.TILES[self // 4] class TilesConverter(object): @stat...
27.973913
84
0.537146
3,187
0.990675
0
0
2,877
0.894311
0
0
940
0.292198
9cbdcc9bd41342ec729fa4605f8c43d39b4c42ad
461
py
Python
python/chrysophylax/buy_and_hold.py
dichodaemon/chrysophylax
834214e7d021643084be910d2b99bd7d18497faa
[ "MIT" ]
null
null
null
python/chrysophylax/buy_and_hold.py
dichodaemon/chrysophylax
834214e7d021643084be910d2b99bd7d18497faa
[ "MIT" ]
null
null
null
python/chrysophylax/buy_and_hold.py
dichodaemon/chrysophylax
834214e7d021643084be910d2b99bd7d18497faa
[ "MIT" ]
null
null
null
import garm.indicators as gari import ham.time_utils as hamt import ohlcv import luigi import strategies as chs from luigi.util import inherits @inherits(chs.Strategy) class BuyAndHold(chs.Strategy): FN = gari.buy_and_hold_signals def requires(self): for m in hamt.months(self.start_date, self.end_da...
24.263158
61
0.683297
289
0.626898
217
0.470716
313
0.678959
0
0
0
0
9cbe11d37a19426b463bd6c4dcaa771e00215206
4,866
py
Python
py2api/output_trans.py
andeaseme/py2api
6d7a051543e9a63dbc14c43d83de643a61022e9e
[ "Apache-2.0" ]
2
2019-08-29T01:35:09.000Z
2020-03-31T18:49:50.000Z
py2api/output_trans.py
andeaseme/py2api
6d7a051543e9a63dbc14c43d83de643a61022e9e
[ "Apache-2.0" ]
1
2019-11-14T00:05:54.000Z
2019-11-14T00:05:54.000Z
py2api/output_trans.py
andeaseme/py2api
6d7a051543e9a63dbc14c43d83de643a61022e9e
[ "Apache-2.0" ]
4
2018-07-19T16:50:11.000Z
2020-06-08T15:27:44.000Z
from py2api.constants import TRANS_NOT_FOUND, _OUTPUT_TRANS, _ATTR, _VALTYPE, _ELSE class OutputTrans(object): """ OutputTrans allows to flexibly define a callable object to convert the output of a function or method. For more information, see InputTrans """ def __init__(self, trans_spec=None): ...
41.589744
109
0.480682
4,779
0.982121
0
0
0
0
0
0
2,649
0.54439
9cbf34bd2e80e0ed154936e5a0e7dad3b9986416
1,778
py
Python
imageApi.py
draJiang/Figma-To-Eagle
f003f3fff664a6f3fe64c19462339d66d1129c29
[ "MIT" ]
null
null
null
imageApi.py
draJiang/Figma-To-Eagle
f003f3fff664a6f3fe64c19462339d66d1129c29
[ "MIT" ]
null
null
null
imageApi.py
draJiang/Figma-To-Eagle
f003f3fff664a6f3fe64c19462339d66d1129c29
[ "MIT" ]
null
null
null
import pytesseract import os import time import requests import json from PIL import Image,ImageFont,ImageDraw # 读取配置文件 with open('config.json') as json_file: config = json.load(json_file) # 默认的文件保存的目录 MAIN_PATH = './imageApi/image/' # FONT,用于将文字渲染成图片 FONT = config['font'] def strToImg(text,mainPath): ''' ...
23.090909
153
0.614736
0
0
0
0
0
0
0
0
709
0.357719
9cbf5a147625facf6148e000945ed5b866447e87
804
py
Python
level_11.py
ceafdc/PythonChallenge
fe4f64aabf1d6e672a06785538391dd16a03ad04
[ "MIT" ]
1
2018-01-20T17:58:10.000Z
2018-01-20T17:58:10.000Z
level_11.py
ceafdc/PythonChallenge
fe4f64aabf1d6e672a06785538391dd16a03ad04
[ "MIT" ]
null
null
null
level_11.py
ceafdc/PythonChallenge
fe4f64aabf1d6e672a06785538391dd16a03ad04
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # url: http://www.pythonchallenge.com/pc/return/5808.html import requests import io import PIL.Image url = 'http://www.pythonchallenge.com/pc/return/cave.jpg' un = 'huge' pw = 'file' auth = un, pw req = requests.get(url, auth=auth) img_io = io.BytesIO(req.content) img = PIL.Image.open(img_io) ...
21.157895
58
0.615672
0
0
0
0
0
0
0
0
224
0.278607
9cc0a99af59fe409930941e63a1459a695a01a4f
2,258
py
Python
scripts/spark.py
Sapphirine/Reducing_Manufacturing_Failures
ee6fd6dba345997431cae30380150e3513cab58e
[ "Apache-2.0" ]
4
2019-04-02T21:20:19.000Z
2021-09-01T06:08:47.000Z
scripts/spark.py
Sapphirine/Reducing_Manufacturing_Failures
ee6fd6dba345997431cae30380150e3513cab58e
[ "Apache-2.0" ]
null
null
null
scripts/spark.py
Sapphirine/Reducing_Manufacturing_Failures
ee6fd6dba345997431cae30380150e3513cab58e
[ "Apache-2.0" ]
3
2019-08-02T12:13:04.000Z
2020-03-24T12:16:33.000Z
# coding: utf-8 # ### Open using Databricks Platform/Py-spark. It holds the code for developing the RandomForest Classifier on the chosen subset of important features. # In[1]: import os, sys import pandas as pd import numpy as np from sklearn.metrics import matthews_corrcoef import pyspark from numpy import array...
27.876543
152
0.767493
0
0
0
0
0
0
0
0
613
0.271479
9cc2352b704dd6477ce3defdff442d1b06e25a8f
4,997
py
Python
scripts/merge_map_blocks.py
ptrebert/reference-data
7bca069b8995660252d4f601976f9f7abaaf063b
[ "MIT" ]
null
null
null
scripts/merge_map_blocks.py
ptrebert/reference-data
7bca069b8995660252d4f601976f9f7abaaf063b
[ "MIT" ]
null
null
null
scripts/merge_map_blocks.py
ptrebert/reference-data
7bca069b8995660252d4f601976f9f7abaaf063b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding=utf-8 import os as os import sys as sys import io as io import traceback as trb import argparse as argp import gzip as gz import operator as op import functools as fnt def parse_command_line(): """ :return: """ parser = argp.ArgumentParser() parser.add_argument('--...
41.641667
118
0.454673
0
0
0
0
0
0
0
0
1,215
0.243146
9cc4b83e0e4850879d9d17a7f64c101491943cb0
4,219
py
Python
stockMarket/getData/models.py
seba-1511/stockMarket
cd571a89bca71f7c821d2b57328123e58e07347e
[ "MIT" ]
10
2016-02-20T04:17:37.000Z
2021-06-26T12:14:01.000Z
stockMarket/getData/models.py
seba-1511/stockMarket
cd571a89bca71f7c821d2b57328123e58e07347e
[ "MIT" ]
null
null
null
stockMarket/getData/models.py
seba-1511/stockMarket
cd571a89bca71f7c821d2b57328123e58e07347e
[ "MIT" ]
4
2017-05-25T06:16:48.000Z
2021-12-03T07:45:44.000Z
#-*- coding: utf-8 -*- from django.db import models # Create your models here. class Feature(models.Model): day = models.SmallIntegerField() month = models.SmallIntegerField() year = models.SmallIntegerField() momentum = models.FloatField( null=True, blank=True) day5disparity = models.Flo...
26.534591
81
0.651813
4,100
0.971794
0
0
0
0
0
0
75
0.017777