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
b119cf35906cb1db557ebb29b4edb7055d3d994e
978
py
Python
projects/long-tail-detection/project_models/new_layers.py
Ribosome-rbx/long-tail-detection
4a3c9b19e4b9c87ace3453ce92e7ae171a827d98
[ "Apache-2.0" ]
15
2021-07-29T20:50:12.000Z
2022-03-03T23:53:06.000Z
projects/long-tail-detection/project_models/new_layers.py
Ribosome-rbx/long-tail-detection
4a3c9b19e4b9c87ace3453ce92e7ae171a827d98
[ "Apache-2.0" ]
2
2021-08-08T10:57:11.000Z
2022-02-12T09:46:18.000Z
projects/long-tail-detection/project_models/new_layers.py
Ribosome-rbx/long-tail-detection
4a3c9b19e4b9c87ace3453ce92e7ae171a827d98
[ "Apache-2.0" ]
4
2021-08-08T12:00:35.000Z
2022-02-02T11:00:20.000Z
# This code is modified from https://github.com/wyharveychen/CloserLookFewShot/ import torch.nn as nn
33.724138
79
0.625767
# This code is modified from https://github.com/wyharveychen/CloserLookFewShot/ import torch import torch.nn as nn from torch.nn.utils.weight_norm import WeightNorm class distLinear(nn.Module): def __init__(self, indim, outdim): super(distLinear, self).__init__() self.L = nn.Linear(indim, outdim,...
0
0
0
788
0
0
0
19
68
567d3e1e5d1ff7c625cebcd5613513acf91abe1e
3,391
py
Python
test/applications/ising/test_clique.py
tamiya-onodera/qiskit-optimization
4e6a22bb13a13e504de607a02f5afdfd33abfb7c
[ "Apache-2.0" ]
null
null
null
test/applications/ising/test_clique.py
tamiya-onodera/qiskit-optimization
4e6a22bb13a13e504de607a02f5afdfd33abfb7c
[ "Apache-2.0" ]
null
null
null
test/applications/ising/test_clique.py
tamiya-onodera/qiskit-optimization
4e6a22bb13a13e504de607a02f5afdfd33abfb7c
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
39.894118
93
0.675317
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
0
0
0
2,340
0
0
0
259
221
f069abdd662c23d2f9c32042a44c61d74e11da4a
1,297
py
Python
esteam/otp.py
luxrck/esteam
78d2939f311956d9326cba2d4c8d124f60f04476
[ "MIT" ]
1
2019-07-05T15:01:43.000Z
2019-07-05T15:01:43.000Z
esteam/otp.py
luxrck/esteam
78d2939f311956d9326cba2d4c8d124f60f04476
[ "MIT" ]
null
null
null
esteam/otp.py
luxrck/esteam
78d2939f311956d9326cba2d4c8d124f60f04476
[ "MIT" ]
null
null
null
import os import base64 generate_key = lambda : base64.b32encode(os.urandom(20)).decode("ascii")
25.431373
102
0.570547
import os import hashlib import time import base64 from hmac import HMAC import qrcode generate_key = lambda : base64.b32encode(os.urandom(20)).decode("ascii") class TOTP(object): def __init__(self, key, digest = "sha1", x = 30, t0 = 0): self.qr = qrcode.QRCode() self.qr.add_data(key) ...
0
0
0
1,109
0
0
0
-25
113
2b99896e0a1054d29937e99f519dcbf37da3b899
23,183
py
Python
subliminal/providers/subdivx.py
cristianlazarop/subs
413a833f9dad8fe66a71da97d7481bd5643f9a5b
[ "MIT" ]
null
null
null
subliminal/providers/subdivx.py
cristianlazarop/subs
413a833f9dad8fe66a71da97d7481bd5643f9a5b
[ "MIT" ]
null
null
null
subliminal/providers/subdivx.py
cristianlazarop/subs
413a833f9dad8fe66a71da97d7481bd5643f9a5b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import requests.packages.urllib3.util.ssl_ import logging import re from .. import __short_version__ logger = logging.getLogger(__name__) # language_converters.register('subdivx = subliminal.converters.subdivx:SubdivxConverter') MY_SUBTITLE_EXTENSIONS = ('.srt', '.sub', '.ssa', '.ass') MAIN_SU...
39.426871
502
0.550101
# -*- coding: utf-8 -*- import requests.packages.urllib3.util.ssl_ import base64 import logging import os import re import zlib import html import io import urllib.parse from babelfish import Language, language_converters from guessit import guessit from requests import Session from rarfile import RarFile, is_rarfile ...
34
2,716
0
17,347
0
0
0
197
400
33e3a977bc1d35789aceed1ee342e2c768e7a101
1,067
py
Python
yoapi/constants/sns.py
YoApp/yo-api
a162e51804ab91724cc7ad3e7608410329da6789
[ "MIT" ]
1
2021-12-17T03:25:34.000Z
2021-12-17T03:25:34.000Z
yoapi/constants/sns.py
YoApp/yo-api
a162e51804ab91724cc7ad3e7608410329da6789
[ "MIT" ]
null
null
null
yoapi/constants/sns.py
YoApp/yo-api
a162e51804ab91724cc7ad3e7608410329da6789
[ "MIT" ]
null
null
null
APP_ID_TO_ARN_IDS = { 'co.justyo.yoapp': [ 'ios', 'ios-beta', 'ios-development', 'android', 'winphone' ], 'co.justyo.yopolls': [ 'com.flashpolls.beta.dev', 'com.flashpolls.beta.prod', 'com.flashpolls.flashpolls.dev', 'com.flashpolls....
26.675
41
0.550141
APP_ID_TO_ARN_IDS = { 'co.justyo.yoapp': [ 'ios', 'ios-beta', 'ios-development', 'android', 'winphone' ], 'co.justyo.yopolls': [ 'com.flashpolls.beta.dev', 'com.flashpolls.beta.prod', 'com.flashpolls.flashpolls.dev', 'com.flashpolls....
0
0
0
0
0
0
0
0
0
cccfa75aa60a617f848780d356800836ebba00df
1,838
py
Python
day12/part02.py
Berteun/adventofcode2019
39fdd90073491cd698b1a310c789b577b305d314
[ "MIT" ]
null
null
null
day12/part02.py
Berteun/adventofcode2019
39fdd90073491cd698b1a310c789b577b305d314
[ "MIT" ]
null
null
null
day12/part02.py
Berteun/adventofcode2019
39fdd90073491cd698b1a310c789b577b305d314
[ "MIT" ]
null
null
null
if __name__ == '__main__': run()
26.257143
116
0.536453
import math class Moon: def __init__(self, coords): self.coords = coords self.velocity = [0, 0, 0] def adjust_from_other(self, other): for n in range(3): if (self.coords[n] < other.coords[n]): self.velocity[n] += 1 elif (self.coords[n] > other.co...
0
0
0
727
0
923
0
-10
160
377d40f7e6762b933738264518c23b9897728b14
3,949
py
Python
synology_dsm/exceptions.py
kuchel77/python-synology
0676d94127cb8814e1d32c38cb62539b5ead68c3
[ "MIT" ]
1
2021-12-19T17:24:34.000Z
2021-12-19T17:24:34.000Z
synology_dsm/exceptions.py
kuchel77/python-synology
0676d94127cb8814e1d32c38cb62539b5ead68c3
[ "MIT" ]
null
null
null
synology_dsm/exceptions.py
kuchel77/python-synology
0676d94127cb8814e1d32c38cb62539b5ead68c3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Library exceptions.""" # Request # API # Login
43.877778
152
0.678653
# -*- coding: utf-8 -*- """Library exceptions.""" from .const import API_AUTH, ERROR_AUTH, ERROR_COMMON, ERROR_DOWNLOAD_SEARCH, ERROR_DOWNLOAD_TASK, ERROR_FILE, ERROR_SURVEILLANCE, ERROR_VIRTUALIZATION class SynologyDSMException(Exception): """Generic Synology DSM exception.""" def __init__(self, api, co...
0
0
0
3,457
0
0
0
130
267
b23bbf63d53f81040636a4c2de62cea25b37bfd1
1,120
py
Python
tests/examples/handlers/test_save_tweet_handler.py
openjusticebaltimore/ResponseBot
e224fe5251190f2f4a8901afbd622c411601e86e
[ "Apache-2.0" ]
16
2016-05-11T00:04:18.000Z
2020-07-21T20:32:11.000Z
tests/examples/handlers/test_save_tweet_handler.py
openjusticebaltimore/ResponseBot
e224fe5251190f2f4a8901afbd622c411601e86e
[ "Apache-2.0" ]
6
2016-05-10T03:34:17.000Z
2016-06-14T02:42:45.000Z
tests/examples/handlers/test_save_tweet_handler.py
openjusticebaltimore/ResponseBot
e224fe5251190f2f4a8901afbd622c411601e86e
[ "Apache-2.0" ]
6
2016-05-09T20:17:43.000Z
2020-08-15T04:43:45.000Z
try: from mock import MagicMock, patch, call except ImportError:
35
106
0.683036
from unittest.case import TestCase from examples.handlers.save_tweet_handler import SaveTweetHandler from responsebot.models import Tweet try: from mock import MagicMock, patch, call except ImportError: from unittest.mock import MagicMock, patch, call from responsebot.responsebot_client import ResponseBotCli...
0
0
0
772
0
0
0
138
139
30e31b8610ec650d5cfc9a283588f37edd24da78
2,770
py
Python
nemo/collections/asr/losses/bce_loss.py
admariner/NeMo
e542d7f9063a40afa4119a3b94de4c2c636a37bb
[ "Apache-2.0" ]
null
null
null
nemo/collections/asr/losses/bce_loss.py
admariner/NeMo
e542d7f9063a40afa4119a3b94de4c2c636a37bb
[ "Apache-2.0" ]
1
2022-03-06T14:09:02.000Z
2022-03-06T14:09:02.000Z
nemo/collections/asr/losses/bce_loss.py
admariner/NeMo
e542d7f9063a40afa4119a3b94de4c2c636a37bb
[ "Apache-2.0" ]
null
null
null
# ! /usr/bin/python # Copyright (c) 2022, NVIDIA CORPORATION. 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 # # Unle...
37.432432
117
0.650903
# ! /usr/bin/python # Copyright (c) 2022, NVIDIA CORPORATION. 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 # # Unle...
0
1,454
0
478
0
0
0
93
91
5dd2ef53fe78bdcc59cd8cbada3e9389b29a4765
503
py
Python
src/app/configs/config.py
victorbrandaoa/simple-flask-login
8ea8fda9ec5f22a13d5c5958f576d6706b939a68
[ "MIT" ]
1
2022-03-09T22:27:02.000Z
2022-03-09T22:27:02.000Z
src/app/configs/config.py
victorbrandaoa/simple-flask-login
8ea8fda9ec5f22a13d5c5958f576d6706b939a68
[ "MIT" ]
null
null
null
src/app/configs/config.py
victorbrandaoa/simple-flask-login
8ea8fda9ec5f22a13d5c5958f576d6706b939a68
[ "MIT" ]
1
2022-03-19T01:57:54.000Z
2022-03-19T01:57:54.000Z
import os HOST = os.getenv('API_BASE_URL', default='0.0.0.0') PORT = os.getenv('API_PORT', default='80') DEBUG = bool(os.getenv('API_DEBUG', default='True')) MONGO_HOST = os.getenv('MONGO_HOST', default='0.0.0.0') MONGO_PORT = os.getenv('MONGO_PORT', default=27017) MONGO_DATABASE = os.getenv('MONGO_DATABASE', default...
35.928571
60
0.735586
import os HOST = os.getenv('API_BASE_URL', default='0.0.0.0') PORT = os.getenv('API_PORT', default='80') DEBUG = bool(os.getenv('API_DEBUG', default='True')) MONGO_HOST = os.getenv('MONGO_HOST', default='0.0.0.0') MONGO_PORT = os.getenv('MONGO_PORT', default=27017) MONGO_DATABASE = os.getenv('MONGO_DATABASE', default...
0
0
0
0
0
0
0
0
0
1d4615b2a663bff62e2b06b346fba047fef31023
1,024
py
Python
Coordinate Transformation/PyVersion/Geoc2Geod.py
EmanuelCastanho/Aerospace-Projects
25c1294f8217207ae19476702ebe290031d4f466
[ "MIT" ]
null
null
null
Coordinate Transformation/PyVersion/Geoc2Geod.py
EmanuelCastanho/Aerospace-Projects
25c1294f8217207ae19476702ebe290031d4f466
[ "MIT" ]
null
null
null
Coordinate Transformation/PyVersion/Geoc2Geod.py
EmanuelCastanho/Aerospace-Projects
25c1294f8217207ae19476702ebe290031d4f466
[ "MIT" ]
null
null
null
def Geoc2Geod(GeocVector, a, e): ''' Transformao de coordenadas do ref. geocntrico para o ref. geodtico INPUT: GeocVector - vetor geocntrico [x,y,z] [m] a - Raio equatorial [m] e - Excentricidade OUTPUT: GeodVector - vetor geodtico [longitude(rad),latitude(rad),altitude...
33.032258
99
0.55957
def Geoc2Geod(GeocVector, a, e): ''' Transformação de coordenadas do ref. geocêntrico para o ref. geodético INPUT: GeocVector - vetor geocêntrico [x,y,z] [m] a - Raio equatorial [m] e - Excentricidade OUTPUT: GeodVector - vetor geodético [longitude(rad),latitude(rad),al...
12
0
0
0
0
0
0
10
0
92d307a234645f8f03987d05e872e2cf8018dcee
13,825
py
Python
dev01_22_19/map_editor.py
ROTARTSI82/RoEngine
d739893e90b4f2e8a7f5a8b2e7b441929d4da7a3
[ "Apache-2.0" ]
1
2021-12-17T12:18:02.000Z
2021-12-17T12:18:02.000Z
dev01_22_19/map_editor.py
ROTARTSI82/RoEngine
d739893e90b4f2e8a7f5a8b2e7b441929d4da7a3
[ "Apache-2.0" ]
1
2018-12-19T17:11:02.000Z
2018-12-19T17:11:02.000Z
dev01_22_19/map_editor.py
ROTARTSI82/RoEngine
d739893e90b4f2e8a7f5a8b2e7b441929d4da7a3
[ "Apache-2.0" ]
null
null
null
# -*- coding: UTF-8 -*- # -*- coding: UTF-8 -*- import logging logger = logging.getLogger('map_editor') LOADFILE = './data/maps/untitled.json' if __name__ == "__main__": game = MapEditor() game.load() reactor.run()
44.028662
124
0.554141
# -*- coding: UTF-8 -*- # -*- coding: UTF-8 -*- import json import logging from pprint import pprint from pygame.locals import * from dev01_22_19.CONFIG import * from dev01_22_19.data.characters.base import * from roengine import * logger = logging.getLogger('map_editor') LOADFILE = './data/maps/untitled.json' ...
0
0
0
13,177
0
196
0
37
181
502df37378168e45f6a46d387cb4546f0bee28d3
17,079
py
Python
script_krautkoopf_Pranger_import.py
twothreenine/krautkoopf_lieferscraping
674a63fc26d977b7ce94e3865bacd84f1bda6519
[ "MIT" ]
1
2022-01-01T17:13:17.000Z
2022-01-01T17:13:17.000Z
script_krautkoopf_Pranger_import.py
twothreenine/krautkoopf_lieferscraping
674a63fc26d977b7ce94e3865bacd84f1bda6519
[ "MIT" ]
4
2021-09-16T15:37:10.000Z
2022-01-23T15:57:44.000Z
script_krautkoopf_Pranger_import.py
twothreenine/krautkoopf_lieferscraping
674a63fc26d977b7ce94e3865bacd84f1bda6519
[ "MIT" ]
3
2021-09-16T13:28:00.000Z
2022-01-29T12:22:42.000Z
import importlib import base # Inputs this script's methods take # none # Executable script methods read_webshop = base.ScriptMethod(name="read_webshop") generate_csv = base.ScriptMethod(name="generate_csv") mark_as_imported = base.ScriptMethod(name="mark_as_imported") if __name__ == "__main__": importlib.inval...
53.205607
394
0.624451
from bs4 import BeautifulSoup import requests import re import importlib import base import foodsoft_article import foodsoft_article_import # Inputs this script's methods take # none # Executable script methods read_webshop = base.ScriptMethod(name="read_webshop") generate_csv = base.ScriptMethod(name="generate_csv"...
45
0
0
3,724
0
12,110
0
1
317
a41059b9aa8236289a9dd21c904093367615d194
1,490
py
Python
scraper/searchYear.py
holub008/skiscraper
7d13bb70e503bbf2d384c880cc4595a0abb6204f
[ "MIT" ]
null
null
null
scraper/searchYear.py
holub008/skiscraper
7d13bb70e503bbf2d384c880cc4595a0abb6204f
[ "MIT" ]
null
null
null
scraper/searchYear.py
holub008/skiscraper
7d13bb70e503bbf2d384c880cc4595a0abb6204f
[ "MIT" ]
null
null
null
import os ## TODO yuck RESULT_PARENT = "%s/text"%os.path.dirname(os.path.realpath(__file__)) ## race db credentials DB_USER="scraper" DB_PASSWORD="Compellent04" RACE_DB="skiscraper.races" def getPathHits(key,year): """ a temporary solution until an inverted index is implemented / integrated simply ...
27.090909
99
0.691946
import mysql.connector import os ## TODO yuck RESULT_PARENT = "%s/text"%os.path.dirname(os.path.realpath(__file__)) ## race db credentials DB_USER="scraper" DB_PASSWORD="Compellent04" RACE_DB="skiscraper.races" def getPathHits(key,year): """ a temporary solution until an inverted index is implemented...
0
0
0
0
0
661
0
1
48
c30599b6dd399bb501a855913bb07e8b96eaf209
2,544
py
Python
Final-132/Final_NewPassword.py
dominicassia/Random-132
8a065d103e7ea25481ee9648cee8312512725054
[ "MIT" ]
null
null
null
Final-132/Final_NewPassword.py
dominicassia/Random-132
8a065d103e7ea25481ee9648cee8312512725054
[ "MIT" ]
null
null
null
Final-132/Final_NewPassword.py
dominicassia/Random-132
8a065d103e7ea25481ee9648cee8312512725054
[ "MIT" ]
null
null
null
# Dominic Assia & Omer Canca ''' Final New Password Module ~~~~~ Functions: createNewPassword() '''
28.58427
110
0.570755
# Dominic Assia & Omer Canca ''' Final New Password Module ~~~~~ Functions: createNewPassword() ''' import re def createNewPassword(): # Establish old password as constant in the beginning old_password = ('Basketball.') x = old_password # Confirm that password meets the desired...
0
0
0
0
0
2,392
0
-12
46
30567b88e2f49574fa8da2c12900b8a1f9d2d15c
973
py
Python
n0s3p4ss/config.py
vvalorous/N0s3p4ss
987e97b4536abc4e5fda171ce76450b51c7cfe04
[ "MIT" ]
null
null
null
n0s3p4ss/config.py
vvalorous/N0s3p4ss
987e97b4536abc4e5fda171ce76450b51c7cfe04
[ "MIT" ]
null
null
null
n0s3p4ss/config.py
vvalorous/N0s3p4ss
987e97b4536abc4e5fda171ce76450b51c7cfe04
[ "MIT" ]
1
2021-06-25T17:51:33.000Z
2021-06-25T17:51:33.000Z
PROD = 'production' DEV = 'development' TEST = 'test'
19.857143
72
0.56629
import os PROD = 'production' DEV = 'development' TEST = 'test' class Config(object): HTTP_SESSION_HEADERS = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) ' 'AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/50.0.2661.102 ' ...
0
0
0
635
0
153
0
-12
137
b759dbc94f449b309e63ba459b94142bec53c1ad
1,460
py
Python
taco/test/test_path_finder.py
tacorna/taco
eeaeb879b8622365123edbc61ebc100d84194b80
[ "MIT" ]
22
2016-04-03T16:30:54.000Z
2022-03-07T23:01:08.000Z
taco/test/test_path_finder.py
tacorna/taco
eeaeb879b8622365123edbc61ebc100d84194b80
[ "MIT" ]
18
2016-04-10T15:33:09.000Z
2022-02-06T15:53:25.000Z
taco/test/test_path_finder.py
tacorna/taco
eeaeb879b8622365123edbc61ebc100d84194b80
[ "MIT" ]
5
2016-11-23T22:26:00.000Z
2021-06-09T11:23:20.000Z
''' TACO: Multi-sample transcriptome assembly from RNA-Seq ''' # def test_path_ties(): # G = PathGraph() # G.add_path((G.SOURCE, 20, 30, 40, 50, 60, 70, 80, G.SINK), 10.0) # G.add_path((50, 70), 50.0) # paths = find_paths2(G) # assert len(paths) == 1 # p, e = paths[0] # p = tuple(G.node...
28.627451
70
0.676712
''' TACO: Multi-sample transcriptome assembly from RNA-Seq ''' from taco.lib.base import Strand from taco.lib.splice_graph import SpliceGraph from taco.lib.path_graph import PathGraphFactory, PathGraph from taco.lib.cpathfinder import find_paths from taco.test.base import read_single_locus def test_empty_graph_bug()...
0
0
0
0
0
751
0
118
180
ba643fa87792583550445f8f6c55b6ae03202ed7
438
py
Python
tpu_util/colab.py
Wabinab/TPU_utility
252ea4a124ef9d1613c617ceee10186b12ee948f
[ "Apache-2.0" ]
1
2021-10-02T13:59:22.000Z
2021-10-02T13:59:22.000Z
tpu_util/colab.py
Wabinab/TPU_utility
252ea4a124ef9d1613c617ceee10186b12ee948f
[ "Apache-2.0" ]
2
2021-09-08T08:27:58.000Z
2021-09-28T10:42:32.000Z
tpu_util/colab.py
Wabinab/TPU_utility
252ea4a124ef9d1613c617ceee10186b12ee948f
[ "Apache-2.0" ]
null
null
null
except Exception: setup_colab()
27.375
143
0.771689
def setup_colab(): os.system("pip install cloud-tpu-client==0.10 https://storage.googleapis.com/tpu-pytorch/wheels/torch_xla-1.9-cp37-cp37m-linux_x86_64.whl") print("Download complete.") clear_output() import os from IPython.display import clear_output try: import torch_xla except Exception: setup_colab(...
0
0
0
0
0
192
0
30
184
b600d12270d7e392bb0071680749402510646241
622
py
Python
scripts/build_scrab.py
dgulotta/solvertools
2bf6689f473d0b83529ccacfa66a55389920ee65
[ "MIT" ]
19
2015-01-16T17:58:56.000Z
2022-03-10T19:26:32.000Z
scripts/build_scrab.py
galacticpuzzlehunt/solvertools
1845b5b10df3e7009e33fbb3e2a6636f4ccad1e9
[ "MIT" ]
5
2019-01-18T22:37:20.000Z
2021-08-15T13:42:55.000Z
scripts/build_scrab.py
galacticpuzzlehunt/solvertools
1845b5b10df3e7009e33fbb3e2a6636f4ccad1e9
[ "MIT" ]
12
2015-01-13T02:29:57.000Z
2021-12-09T22:30:43.000Z
from solvertools.wordlist import combine_wordlists, build_extras def build_scrabblish_list(): """ Build a list of words that have the "Scrabble nature", which is to say that they'd be officially acceptable in a word game according to some tournament rules. This wordlist combines the wordlists who...
27.043478
79
0.672026
from solvertools.wordlist import combine_wordlists, build_extras def build_scrabblish_list(): """ Build a list of words that have the "Scrabble nature", which is to say that they'd be officially acceptable in a word game according to some tournament rules. This wordlist combines the wordlists who...
0
0
0
0
0
0
0
0
0
76d3f441d6963c9af78bfb09027a496b071dc775
1,939
py
Python
ghidra_bridge/install_server.py
novafacing/ghidra_bridge
682a0ff400438cb4b86f4154b5ac8650f910a872
[ "MIT" ]
1
2021-04-10T10:19:19.000Z
2021-04-10T10:19:19.000Z
ghidra_bridge/install_server.py
TorgoTorgo/ghidra_bridge
c7d53136e3f67d4ca09198e47d5f2fbb0cec90a9
[ "MIT" ]
null
null
null
ghidra_bridge/install_server.py
TorgoTorgo/ghidra_bridge
c7d53136e3f67d4ca09198e47d5f2fbb0cec90a9
[ "MIT" ]
null
null
null
""" Handle installing the ghidra_bridge server scripts (and supporting jfx_bridge) to a specified directory """ import argparse JFX_BRIDGE = "jfx_bridge" GHIDRA_BRIDGE = "ghidra_bridge" SERVER_DIR = "server" if __name__ == "__main__": parser = argparse.ArgumentParser(description="Install ghidra_bridge server sc...
36.584906
132
0.692625
""" Handle installing the ghidra_bridge server scripts (and supporting jfx_bridge) to a specified directory """ import argparse import os import pkg_resources JFX_BRIDGE = "jfx_bridge" GHIDRA_BRIDGE = "ghidra_bridge" SERVER_DIR = "server" def do_install(install_dir): # list the files from jfx_bridge jfx_brid...
0
0
0
0
0
1,375
0
-13
67
7e27a9a225e554c4f689312540311ead5f20af81
16,762
py
Python
services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/api/containers.py
sanderegg/osparc-simcore
13560a554c52b07e2aba67f77baaf4d5ba9edb90
[ "MIT" ]
null
null
null
services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/api/containers.py
sanderegg/osparc-simcore
13560a554c52b07e2aba67f77baaf4d5ba9edb90
[ "MIT" ]
55
2018-05-15T09:47:00.000Z
2022-03-31T06:56:50.000Z
services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/api/containers.py
odeimaiz/osparc-simcore
71c2fc58dcfe067487dcd75cb70298a4d6237e97
[ "MIT" ]
1
2020-04-22T15:06:58.000Z
2020-04-22T15:06:58.000Z
# pylint: disable=redefined-builtin import logging from fastapi import (APIRouter) logger = logging.getLogger(__name__) containers_router = APIRouter(tags=["containers"]) __all__ = ["containers_router"]
33.126482
91
0.700453
# pylint: disable=redefined-builtin import functools import json import logging import traceback from collections import deque from typing import Any, Awaitable, Deque, Dict, List, Optional, Union from fastapi import ( APIRouter, BackgroundTasks, Depends, FastAPI, HTTPException, Query, Req...
0
13,303
1,380
0
0
313
0
802
742
51084efd353020f682abeafded71fd3ff9a63594
3,832
py
Python
tests/test_feed_item.py
zanachka/scrapy_rss
6646cb9b046a6137be35bef5561ca190ecdedb25
[ "BSD-3-Clause" ]
null
null
null
tests/test_feed_item.py
zanachka/scrapy_rss
6646cb9b046a6137be35bef5561ca190ecdedb25
[ "BSD-3-Clause" ]
null
null
null
tests/test_feed_item.py
zanachka/scrapy_rss
6646cb9b046a6137be35bef5561ca190ecdedb25
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import unittest if __name__ == '__main__': unittest.main()
31.933333
109
0.580637
# -*- coding: utf-8 -*- import unittest from parameterized import parameterized import scrapy import six from scrapy_rss import FeedItem, RssItem, RssedItem from tests.utils import RssTestCase class TestFeedItem(RssTestCase): class MyItem1(FeedItem): def __init__(self, **kwargs): super(self._...
0
318
0
3,247
0
0
0
43
133
da8fe52b5384e5b7daea8ca8ea50cf3151e47112
3,644
py
Python
services/MPT_functions.py
chanyaoying/IS453-Project
809cd3b30d292a49c123ff9e8994998725f6b5d0
[ "MIT" ]
null
null
null
services/MPT_functions.py
chanyaoying/IS453-Project
809cd3b30d292a49c123ff9e8994998725f6b5d0
[ "MIT" ]
null
null
null
services/MPT_functions.py
chanyaoying/IS453-Project
809cd3b30d292a49c123ff9e8994998725f6b5d0
[ "MIT" ]
null
null
null
######################################################################################################## # Efficient Frontier ######################################################################################################## ###############################################################################...
39.182796
110
0.623216
import numpy as np import pandas as pd import scipy.optimize as sco def portfolio_annualised_performance(weights, mean_returns, cov_matrix): returns = np.sum(mean_returns*weights) * 252 std = np.sqrt(np.dot(weights.T, np.dot( cov_matrix, weights))) * np.sqrt(252) return std, returns def downside...
0
0
0
0
0
2,868
0
2
319
6a90b1c17999c87387197f1a6013f103efd31a8d
10,690
py
Python
sqlalchemy_utils/functions/foreign_keys.py
lnielsen/sqlalchemy-utils
eb5e17630a4e1077839a56e09d94e1928191cc1c
[ "BSD-3-Clause" ]
null
null
null
sqlalchemy_utils/functions/foreign_keys.py
lnielsen/sqlalchemy-utils
eb5e17630a4e1077839a56e09d94e1928191cc1c
[ "BSD-3-Clause" ]
null
null
null
sqlalchemy_utils/functions/foreign_keys.py
lnielsen/sqlalchemy-utils
eb5e17630a4e1077839a56e09d94e1928191cc1c
[ "BSD-3-Clause" ]
null
null
null
from collections import defaultdict from itertools import groupby import six import sqlalchemy as sa from sqlalchemy.exc import NoInspectionAvailable from sqlalchemy.orm import object_session from sqlalchemy.schema import MetaData, Table, ForeignKeyConstraint from .orm import get_mapper, get_tables from ..query_chain...
28.97019
79
0.614593
from collections import defaultdict from itertools import groupby import six import sqlalchemy as sa from sqlalchemy.exc import NoInspectionAvailable from sqlalchemy.orm import object_session from sqlalchemy.schema import MetaData, Table, ForeignKeyConstraint from .orm import get_mapper, get_tables from ..query_chain...
0
0
0
0
0
1,109
0
0
46
fe0ae0f460891e06063df9c1073aedf7f742d9ff
1,561
py
Python
convertmarks.py
xbnstudios/show-scripts
fb2eb5bb41eadc9757567fb6b1217d6c2bad0620
[ "Unlicense" ]
1
2018-03-08T16:00:31.000Z
2018-03-08T16:00:31.000Z
convertmarks.py
ManualManul/XBN
fb2eb5bb41eadc9757567fb6b1217d6c2bad0620
[ "Unlicense" ]
null
null
null
convertmarks.py
ManualManul/XBN
fb2eb5bb41eadc9757567fb6b1217d6c2bad0620
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 """ Convert markers between types. """ import sys if __name__ == "__main__": main(sys.argv)
27.875
86
0.647662
#!/usr/bin/env python3 """ Convert markers between types. """ from PostShowV2 import MCS, EpisodeMetadata import argparse import sys def determine_type(filename: str) -> int: if filename.endswith(".txt"): return MCS.AUDACITY elif filename.endswith(".cue"): return MCS.CUE elif filename.end...
0
0
0
0
0
1,331
0
16
91
ed963a355ed90f71f24dd329785bf9e61f70aa4e
6,780
py
Python
app.py
mnemonist/flask-hello-world
95ac77f42e7815e53d723e5c63746b4922b9530f
[ "MIT" ]
null
null
null
app.py
mnemonist/flask-hello-world
95ac77f42e7815e53d723e5c63746b4922b9530f
[ "MIT" ]
null
null
null
app.py
mnemonist/flask-hello-world
95ac77f42e7815e53d723e5c63746b4922b9530f
[ "MIT" ]
null
null
null
#from flask import Flask #from flask import jsonify from flask import Flask import os app = Flask(__name__) # This information is obtained upon registration of a new GitHub OAuth # application here: https://github.com/settings/applications/new client_id = os.getenv('GH_CLIENT_ID') client_secret = os.getenv('GH_CLIEN...
36.256684
1,179
0.648673
#from flask import Flask #from flask import jsonify from requests_oauthlib import OAuth2Session from flask import Flask, request, redirect, session, url_for from flask.json import jsonify import json import os app = Flask(__name__) # This information is obtained upon registration of a new GitHub OAuth # application...
0
5,959
0
0
0
0
0
58
205
0a5df95691aed79021e01822dca4f3e4c5e37374
3,566
py
Python
src/rpdk/core/contract/suite/resource/handler_update.py
mumblepins/cloudformation-cli
36cbf02f4a588445709b7b6fea32891d169e3246
[ "Apache-2.0" ]
25
2019-11-18T22:42:31.000Z
2019-11-25T16:21:56.000Z
src/rpdk/core/contract/suite/resource/handler_update.py
mumblepins/cloudformation-cli
36cbf02f4a588445709b7b6fea32891d169e3246
[ "Apache-2.0" ]
6
2019-11-19T19:55:16.000Z
2019-11-25T18:51:42.000Z
src/rpdk/core/contract/suite/resource/handler_update.py
mumblepins/cloudformation-cli
36cbf02f4a588445709b7b6fea32891d169e3246
[ "Apache-2.0" ]
3
2019-11-18T22:39:25.000Z
2019-11-20T23:22:34.000Z
# fixture and parameter have the same name # pylint: disable=redefined-outer-name # WARNING: contract tests should use fully qualified imports to avoid issues # when being loaded by pytest
34.621359
90
0.742288
# fixture and parameter have the same name # pylint: disable=redefined-outer-name import pytest # WARNING: contract tests should use fully qualified imports to avoid issues # when being loaded by pytest from rpdk.core.contract.interface import Action, OperationStatus from rpdk.core.contract.suite.resource.contract_as...
0
2,941
0
0
0
0
0
250
181
9bfdf1e4df4e3151e9a41782e83ecbc93d9e4c46
1,332
py
Python
PyTrinamic/examples/evalboards/TMC5161/TMC5161_rotateDemo.py
trinamic-AA/PyTrinamic
b054f4baae8eb6d3f5d2574cf69c232f66abb4ee
[ "MIT" ]
37
2019-01-13T11:08:45.000Z
2022-03-25T07:18:15.000Z
PyTrinamic/examples/evalboards/TMC5161/TMC5161_rotateDemo.py
AprDec/PyTrinamic
a9db10071f8fbeebafecb55c619e5893757dd0ce
[ "MIT" ]
56
2019-02-25T02:48:27.000Z
2022-03-31T08:45:34.000Z
PyTrinamic/examples/evalboards/TMC5161/TMC5161_rotateDemo.py
AprDec/PyTrinamic
a9db10071f8fbeebafecb55c619e5893757dd0ce
[ "MIT" ]
26
2019-01-14T05:20:16.000Z
2022-03-08T13:27:35.000Z
#!/usr/bin/env python3 ''' Move a motor back and forth using velocity and position mode of the TMC5161 Created on 30.01.2020 @author: JM ''' import time import PyTrinamic from PyTrinamic.connections.ConnectionManager import ConnectionManager from PyTrinamic.evalboards.TMC5161_eval import TMC5161_eval connectionMana...
24.218182
79
0.802553
#!/usr/bin/env python3 ''' Move a motor back and forth using velocity and position mode of the TMC5161 Created on 30.01.2020 @author: JM ''' import time import PyTrinamic from PyTrinamic.connections.ConnectionManager import ConnectionManager from PyTrinamic.evalboards.TMC5161_eval import TMC5161_eval connectionMana...
0
0
0
0
0
0
0
0
0
436e1b9db7acfc212bca74f16b34c4bc773010a2
4,669
py
Python
application/scripts/LoogalRank.py
abhi608/lucid-web-v2
875bea63cfad7a9cff14196d18a6922dddb91940
[ "MIT" ]
1
2021-03-11T21:16:33.000Z
2021-03-11T21:16:33.000Z
application/scripts/LoogalRank.py
abhi608/lucid-web-v2
875bea63cfad7a9cff14196d18a6922dddb91940
[ "MIT" ]
null
null
null
application/scripts/LoogalRank.py
abhi608/lucid-web-v2
875bea63cfad7a9cff14196d18a6922dddb91940
[ "MIT" ]
null
null
null
# Run generate_offline to get json file for pageranks
31.979452
75
0.609767
# Run generate_offline to get json file for pageranks import networkx as nx import json import random import numpy as np from app.scripts.utils import Mongo from os import listdir from networkx.readwrite import json_graph class PageRank: def __init__(self): self.graph = nx.DiGraph() self.ranks = ...
0
0
0
3,752
0
598
0
14
247
43e179342cd2ae5510c8625dda3f396c309b475e
1,174
py
Python
tests/unit/mocks/flambda_app_mocks/services/v1/healthcheck/resources_mock.py
madeiramadeirabr/template-serverless-service-python
17a57e19906f44978dad0c09cff3a16c299ff0c0
[ "MIT" ]
null
null
null
tests/unit/mocks/flambda_app_mocks/services/v1/healthcheck/resources_mock.py
madeiramadeirabr/template-serverless-service-python
17a57e19906f44978dad0c09cff3a16c299ff0c0
[ "MIT" ]
1
2022-03-31T17:55:16.000Z
2022-03-31T17:59:00.000Z
tests/unit/mocks/flambda_app_mocks/services/v1/healthcheck/resources_mock.py
madeiramadeirabr/template-serverless-service-python
17a57e19906f44978dad0c09cff3a16c299ff0c0
[ "MIT" ]
null
null
null
""" HealthCheck Resources Module Mock for Flambda APP Version: 1.0.0 """ from unittest.mock import Mock from flambda_app.services.v1.healthcheck import HealthCheckResult from flambda_app.services.v1.healthcheck.resources import SelfConnectionHealthCheck, MysqlConnectionHealthCheck, RedisConnectionHealthCheck, SQSConne...
45.153846
114
0.859455
""" HealthCheck Resources Module Mock for Flambda APP Version: 1.0.0 """ from unittest.mock import Mock from flambda_app.services.v1.healthcheck import HealthCheckResult from flambda_app.services.v1.healthcheck.resources import SelfConnectionHealthCheck, MysqlConnectionHealthCheck, \ RedisConnectionHealthCheck, SQ...
0
0
0
0
0
0
0
6
0
2917065d911f1600361f0ca234d6ff36bd5b88c8
2,773
py
Python
airflow/providers/airbyte/sensors/airbyte.py
Sonins/airflow
f008e9c98e95f56b98220639024e583e66f030cd
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
airflow/providers/airbyte/sensors/airbyte.py
Sonins/airflow
f008e9c98e95f56b98220639024e583e66f030cd
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2021-03-27T03:46:45.000Z
2021-04-03T09:12:48.000Z
airflow/providers/airbyte/sensors/airbyte.py
dungdm93/airflow
6d25d63679085279ca1672c2eee2c45d6704efaa
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
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...
36.973333
94
0.698882
# # 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...
0
0
0
1,650
0
0
0
118
116
c10777ff1b2cae48fe139b263bc96654581b58b3
11,703
py
Python
two_layer.py
markf94/NTK_Learning_Curves
48dbce626c62bbe49955c09c65f7638ee5593eee
[ "MIT" ]
3
2020-09-21T06:46:48.000Z
2021-03-05T02:47:04.000Z
two_layer.py
markf94/NTK_Learning_Curves
48dbce626c62bbe49955c09c65f7638ee5593eee
[ "MIT" ]
4
2021-06-19T19:36:10.000Z
2021-06-19T22:45:15.000Z
two_layer.py
markf94/NTK_Learning_Curves
48dbce626c62bbe49955c09c65f7638ee5593eee
[ "MIT" ]
2
2020-09-15T22:38:23.000Z
2021-06-19T20:28:13.000Z
import numpy as np import gegenbauer import compute_NTK_spectrum import matplotlib.pyplot as plt import approx_learning_curves import pandas as pd import argparse #@jit(nopython=True) #@jit(nopython=True, parallel=True) parser = argparse.ArgumentParser() parser.add_argument('--input_dim', type=int, default= 30, ...
33.437143
168
0.63112
import numpy as np import gegenbauer import compute_NTK_spectrum import matplotlib.pyplot as plt import approx_learning_curves import csv import numba from numba import jit from numba import prange import time import pandas as pd import argparse def SGD(X, Y, Theta, r, num_iter, readout_only=False): P = X.shape[0]...
0
401
0
0
0
7,369
0
-27
338
72a690301e29f2e96148ecf9b253b0927e1d4deb
268
py
Python
agensys/shoneez/doctype/media_plan_detail/media_plan_detail.py
sm2x/agensys
c398724c2363750e4eb7d6b1c716df29267b9385
[ "MIT" ]
null
null
null
agensys/shoneez/doctype/media_plan_detail/media_plan_detail.py
sm2x/agensys
c398724c2363750e4eb7d6b1c716df29267b9385
[ "MIT" ]
null
null
null
agensys/shoneez/doctype/media_plan_detail/media_plan_detail.py
sm2x/agensys
c398724c2363750e4eb7d6b1c716df29267b9385
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, Hanstel Projects and contributors # For license information, please see license.txt from __future__ import unicode_literals
24.363636
55
0.787313
# -*- coding: utf-8 -*- # Copyright (c) 2015, Hanstel Projects and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class MediaPlanDetail(Document): pass
0
0
0
17
0
0
0
13
67
1e12daafd9829ffb9fb5f69b4ef133ef97133bc0
4,233
py
Python
CustomApi.py
rickdynasty/BluecollarChatbot
f75252cc7a2e23e95beae6871caa7fe36b1ff41c
[ "Apache-2.0" ]
null
null
null
CustomApi.py
rickdynasty/BluecollarChatbot
f75252cc7a2e23e95beae6871caa7fe36b1ff41c
[ "Apache-2.0" ]
null
null
null
CustomApi.py
rickdynasty/BluecollarChatbot
f75252cc7a2e23e95beae6871caa7fe36b1ff41c
[ "Apache-2.0" ]
null
null
null
from sanic import Sanic, Blueprint, response
35.275
97
0.573825
from rasa.core.channels.channel import InputChannel,UserMessage,RestInput,CollectingOutputChannel from sanic import Sanic, Blueprint, response import asyncio import inspect import json import logging import uuid from asyncio import Queue, CancelledError from sanic import Sanic, Blueprint, response from sanic.request im...
48
2,598
0
913
0
0
0
240
420
6636a10d7602147dd03698577d2666b71af89fdc
632
py
Python
image_processing/PostRenamer.py
ashishcssom/Object-detection-model
1612a239b304227e49f59bcadc67f1826128fd50
[ "MIT" ]
1
2021-04-26T10:47:37.000Z
2021-04-26T10:47:37.000Z
image_processing/PostRenamer.py
ashishkrb7/Object-detection-model
1612a239b304227e49f59bcadc67f1826128fd50
[ "MIT" ]
null
null
null
image_processing/PostRenamer.py
ashishkrb7/Object-detection-model
1612a239b304227e49f59bcadc67f1826128fd50
[ "MIT" ]
null
null
null
import os from tqdm import tqdm def main(path,extension,alias): """ Function to rename multiple files """ i = 0 image=[j for j in os.listdir(path) if j.endswith(extension)] for filename in tqdm(image): my_dest =alias + str(i) + extension my_source =path + filename my_dest =path ...
28.727273
70
0.648734
import os from tqdm import tqdm def main(path,extension,alias): """ Function to rename multiple files """ i = 0 image=[j for j in os.listdir(path) if j.endswith(extension)] for filename in tqdm(image): my_dest =alias + str(i) + extension my_source =path + filename my_dest =path ...
0
0
0
0
0
0
0
0
0
c9f4caaa9adaf7c07157f62dcc66b5a988e3d4e5
8,096
py
Python
src/sentry/snuba/subscriptions.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
src/sentry/snuba/subscriptions.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
src/sentry/snuba/subscriptions.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import logging from django.db import transaction from sentry.snuba.models import (QueryAggregations, QuerySubscription, QuerySubscriptionEnvironment, SnubaQuery) from sentry.snuba.tasks import (create_subscription_in_snuba, delete_subscription_from_snuba, update_subscription_in...
37.481481
94
0.728631
from __future__ import absolute_import import logging from django.db import transaction from sentry.snuba.models import ( QueryAggregations, QuerySubscription, QuerySubscriptionEnvironment, SnubaQuery, ) from sentry.snuba.tasks import ( create_subscription_in_snuba, delete_subscription_from_s...
0
0
0
0
0
0
0
34
0
511461cb6339ce7c0c6317fca7cd0e7795b501f1
333
py
Python
Week_3 (Communications Systems)- 3b Robotic Operating System (ROS)/electronics/Scripts/Question 4/second.py
offjangir/Kratos-QSTP-Course
6c883f17867362305212171851b40db7b9f238f1
[ "MIT" ]
2
2021-09-10T06:24:33.000Z
2021-09-10T06:25:02.000Z
Week_3 (Communications Systems)- 3b Robotic Operating System (ROS)/electronics/Scripts/Question 4/second.py
offjangir/Kratos_QSTP-Work
6c883f17867362305212171851b40db7b9f238f1
[ "MIT" ]
null
null
null
Week_3 (Communications Systems)- 3b Robotic Operating System (ROS)/electronics/Scripts/Question 4/second.py
offjangir/Kratos_QSTP-Work
6c883f17867362305212171851b40db7b9f238f1
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 rospy.init_node('seconds') pub = rospy.Publisher('seconds', Int32, queue_size=10) rate = rospy.Rate(1) # 1hz s_count =0 while not rospy.is_shutdown(): s_count += 1 pub.publish(s_count) if s_count == 60: s_count =0 rate.sleep()
20.8125
54
0.72973
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 from std_msgs.msg import String rospy.init_node('seconds') pub = rospy.Publisher('seconds', Int32, queue_size=10) rate = rospy.Rate(1) # 1hz s_count =0 while not rospy.is_shutdown(): s_count += 1 pub.publish(s_count) if s_count == 60: s_count =0 r...
0
0
0
0
0
0
0
10
22
ad76edca5247bb44331d9f3d8b47b2d7fbcde7da
37
py
Python
CodeUP/Python basic 100/6022.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
CodeUP/Python basic 100/6022.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
CodeUP/Python basic 100/6022.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
s=input() print(s[:2],s[2:4],s[4:6])
12.333333
26
0.513514
s=input() print(s[:2],s[2:4],s[4:6])
0
0
0
0
0
0
0
0
0
23caa0e5ef5657bee77939a5de0e716dc6cdf411
5,214
py
Python
devourer/tests.py
Rycerzyk/devourer
8a8855cbf55298d9f9a6e36d7b4e9ae186e9fc86
[ "MIT" ]
50
2015-10-28T18:12:30.000Z
2020-12-31T05:50:20.000Z
devourer/tests.py
Rycerzyk/devourer
8a8855cbf55298d9f9a6e36d7b4e9ae186e9fc86
[ "MIT" ]
4
2016-10-21T20:51:09.000Z
2020-03-17T17:32:35.000Z
devourer/tests.py
Rycerzyk/devourer
8a8855cbf55298d9f9a6e36d7b4e9ae186e9fc86
[ "MIT" ]
7
2016-08-04T14:50:05.000Z
2018-12-18T09:17:30.000Z
""" This module contains tests for generic_api package. """ import unittest if __name__ == '__main__': unittest.main()
34.529801
107
0.600882
""" This module contains tests for generic_api package. """ import unittest from concurrent.futures import Future from concurrent.futures import ThreadPoolExecutor from . import GenericAPI, AsyncAPI, APIMethod, APIError, GenericAPICreator class GenericAPICreatorTest(unittest.TestCase): """ Test API metaclas...
0
1,878
0
2,950
0
0
0
97
160
65070f30a249a6b484d945e1454654dffa3f2fdb
7,070
py
Python
myutils.py
Multimodal-Group/Text2img_EKL
80879bb6790b99ebe634cb70df60e0b1137b7160
[ "MIT" ]
1
2019-12-11T14:22:43.000Z
2019-12-11T14:22:43.000Z
myutils.py
Multimodal-Group/Text2img_EKL
80879bb6790b99ebe634cb70df60e0b1137b7160
[ "MIT" ]
null
null
null
myutils.py
Multimodal-Group/Text2img_EKL
80879bb6790b99ebe634cb70df60e0b1137b7160
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from torch.autograd import Variable import numpy as np def dir_sampling(labels, alpha= (0.05,)*10): '''sampling from special dirichlet distribution for adding noise for one-hot ''' ls= [] for lb in labels: while True: s= np.random.dirichlet(alph...
38.423913
98
0.629986
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from torch.autograd import Variable import numpy as np import os import pickle from PIL import Image def imgs2ndarray(img_root, save=False): if save and os.path.exists(img_root+'.np.pkl'): imgs= pic...
0
795
0
3,001
0
513
0
9
248
31278215534d8420a4980653349a70ce876f68a2
217
py
Python
src/debugpy/_vendored/pydevd/tests_python/resources/_debugger_case_path_translation.py
r3m0t/debugpy
090e3c3ef5758e5b316514c9d6f44f9b9b488cf1
[ "MIT" ]
695
2020-01-30T14:34:51.000Z
2022-03-31T09:31:57.000Z
src/debugpy/_vendored/pydevd/tests_python/resources/_debugger_case_path_translation.py
r3m0t/debugpy
090e3c3ef5758e5b316514c9d6f44f9b9b488cf1
[ "MIT" ]
1,095
2018-03-01T00:50:11.000Z
2019-05-06T17:44:15.000Z
src/debugpy/_vendored/pydevd/tests_python/resources/_debugger_case_path_translation.py
r3m0t/debugpy
090e3c3ef5758e5b316514c9d6f44f9b9b488cf1
[ "MIT" ]
66
2020-01-30T13:10:38.000Z
2022-03-29T07:11:17.000Z
if __name__ == '__main__': main()
14.466667
56
0.695853
from tests_python.resource_path_translation import other def call_this(): print('break here') def main(): other.call_me_back1(call_this) print('TEST SUCEEDED!') if __name__ == '__main__': main()
0
0
0
0
0
72
0
35
68
00db5f4eccf2f2d4c4ff551946ba642fc7b6881e
2,934
py
Python
utils.py
simonepreite/QABERT
ed3e49f6619f3ff660068291231909693cb8f5d5
[ "MIT" ]
null
null
null
utils.py
simonepreite/QABERT
ed3e49f6619f3ff660068291231909693cb8f5d5
[ "MIT" ]
null
null
null
utils.py
simonepreite/QABERT
ed3e49f6619f3ff660068291231909693cb8f5d5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ### MOVED ### MOVED ### NOT USED
25.736842
148
0.686094
#!/usr/bin/env python3 from collections import OrderedDict from io import open from itertools import chain import os import unicodedata def loadVocab(vocabFilepath): vocab = OrderedDict() index = 0 with open(vocabFilepath, "r", encoding="utf-8") as reader: while True: token = reader.readline() if not token...
0
0
0
0
0
2,603
0
3
269
335fc44e270083c9764f3e1911d25ba893b19f08
3,541
py
Python
stock/quant/upper_shadow.py
shenzhongqiang/cnstock_py
2bb557657a646acb9d20d3ce78e15cf68390f8ea
[ "MIT" ]
2
2016-10-31T04:05:11.000Z
2017-04-17T08:46:53.000Z
stock/quant/upper_shadow.py
shenzhongqiang/cnstock_py
2bb557657a646acb9d20d3ce78e15cf68390f8ea
[ "MIT" ]
null
null
null
stock/quant/upper_shadow.py
shenzhongqiang/cnstock_py
2bb557657a646acb9d20d3ce78e15cf68390f8ea
[ "MIT" ]
null
null
null
import sys import datetime from stock.utils.symbol_util import get_realtime_by_date from stock.marketdata.storefactory import get_store from config import store_type import pandas as pd date = None if len(sys.argv) == 1: date = datetime.date.today().strftime("%Y-%m-%d") else: date = sys.argv[1] store = get_st...
45.397436
180
0.691895
import sys import datetime from stock.utils.symbol_util import get_stock_symbols, get_realtime_by_date from stock.marketdata.storefactory import get_store from config import store_type import pandas as pd date = None if len(sys.argv) == 1: date = datetime.date.today().strftime("%Y-%m-%d") else: date = sys.argv...
0
0
0
0
0
0
0
19
0
0ba49ddb953e2786dc3bbd09f228b8bb6a3efbc6
449
py
Python
iogt_users/migrations/0003_user_read_articles.py
Fourmeta/iogt
b21dd114ed1e708c9b25dcb17c57270d3c74b765
[ "BSD-2-Clause" ]
null
null
null
iogt_users/migrations/0003_user_read_articles.py
Fourmeta/iogt
b21dd114ed1e708c9b25dcb17c57270d3c74b765
[ "BSD-2-Clause" ]
null
null
null
iogt_users/migrations/0003_user_read_articles.py
Fourmeta/iogt
b21dd114ed1e708c9b25dcb17c57270d3c74b765
[ "BSD-2-Clause" ]
null
null
null
# Generated by Django 3.1.12 on 2021-06-29 08:23
22.45
60
0.608018
# Generated by Django 3.1.12 on 2021-06-29 08:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('home', '0022_merge_20210629_0821'), ('iogt_users', '0002_auto_20210624_0739'), ] operations = [ migrations.AddField( mo...
0
0
0
334
0
0
0
19
46
d903efd898a0dbe4ded0becea53ccf0cbd0d7491
41
py
Python
PyCharm/primer2.py
PervykhDarya/laba12
af753df5ed62aa8de05a8e168c6401f8df956083
[ "MIT" ]
null
null
null
PyCharm/primer2.py
PervykhDarya/laba12
af753df5ed62aa8de05a8e168c6401f8df956083
[ "MIT" ]
null
null
null
PyCharm/primer2.py
PervykhDarya/laba12
af753df5ed62aa8de05a8e168c6401f8df956083
[ "MIT" ]
null
null
null
n = 0 for i in range(1, n+1): n += i
10.25
23
0.439024
n = 0 for i in range(1, n+1): n += i
0
0
0
0
0
0
0
0
0
d4342d26abd2ea673efd450d0078f5089486b92d
1,099
py
Python
cookbook/tesslayers/makelayers.py
luofangood/tesseroids
05086f665ba336781e0a22355862d68b68085450
[ "BSD-3-Clause" ]
25
2015-07-07T13:03:34.000Z
2022-03-24T02:11:08.000Z
cookbook/tesslayers/makelayers.py
luofangood/tesseroids
05086f665ba336781e0a22355862d68b68085450
[ "BSD-3-Clause" ]
10
2015-02-28T17:52:46.000Z
2022-03-28T07:49:47.000Z
cookbook/tesslayers/makelayers.py
luofangood/tesseroids
05086f665ba336781e0a22355862d68b68085450
[ "BSD-3-Clause" ]
16
2015-06-23T07:36:40.000Z
2022-01-18T12:21:24.000Z
import numpy as np import fatiando as ft shape = (41, 41) x, y = ft.grd.regular((-10, 10, 30, 50), shape) height = 800 - 1000*ft.utils.gaussian2d(x, y, 3, 1, x0=0, y0=37) rel = -7000*ft.utils.gaussian2d(x, y, 3, 5, x0=0, y0=40) thick = height - rel dens = 1900*np.ones_like(thick) data = np.transpose([x, y, height, thi...
31.4
68
0.66333
import numpy as np import fatiando as ft shape = (41, 41) x, y = ft.grd.regular((-10, 10, 30, 50), shape) height = 800 - 1000*ft.utils.gaussian2d(x, y, 3, 1, x0=0, y0=37) rel = -7000*ft.utils.gaussian2d(x, y, 3, 5, x0=0, y0=40) thick = height - rel dens = 1900*np.ones_like(thick) data = np.transpose([x, y, height, thi...
0
0
0
0
0
0
0
0
0
573f1c7c1f1d4c15b9bb1e8760a7f8259d2ad425
10,599
py
Python
wegene/Models/AncestryArea.py
wegene-llc/wegene-python-sdk
7b3d23e62e2382ac8643be429e5dc3f8064f0452
[ "MIT" ]
17
2016-12-16T07:44:08.000Z
2021-08-20T09:50:37.000Z
wegene/Models/AncestryArea.py
xraywu/wegene-python-sdk
7b3d23e62e2382ac8643be429e5dc3f8064f0452
[ "MIT" ]
2
2018-12-24T16:59:02.000Z
2019-03-29T16:48:34.000Z
wegene/Models/AncestryArea.py
wegene-llc/wegene-python-sdk
7b3d23e62e2382ac8643be429e5dc3f8064f0452
[ "MIT" ]
2
2017-04-26T00:20:43.000Z
2017-12-03T02:31:35.000Z
# -*- coding: utf-8 -*- """ wegene.Models.AncestryArea This file was automatically generated by APIMATIC BETA v2.0 on 02/22/2016 """
37.989247
76
0.538824
# -*- coding: utf-8 -*- """ wegene.Models.AncestryArea This file was automatically generated by APIMATIC BETA v2.0 on 02/22/2016 """ from wegene.APIHelper import APIHelper class AncestryArea(object): """Implementation of the 'ancestry area' model. User ancestry composition areas information Att...
0
0
0
10,395
0
0
0
17
45
a97ce3f6e44d39049eb4b67bcaf278be27f9effc
3,750
py
Python
scripts/evaluate.py
kdexd/probnmn-clevr
9c1b2286cf30e9fb045370153c9242a39760e02e
[ "MIT" ]
69
2019-05-14T06:34:25.000Z
2022-03-07T17:19:40.000Z
scripts/evaluate.py
kdexd/probnmn-clevr
9c1b2286cf30e9fb045370153c9242a39760e02e
[ "MIT" ]
5
2019-07-21T23:00:55.000Z
2020-11-16T12:38:04.000Z
scripts/evaluate.py
kdexd/probnmn-clevr
9c1b2286cf30e9fb045370153c9242a39760e02e
[ "MIT" ]
11
2019-05-28T03:03:26.000Z
2021-01-30T12:04:58.000Z
import argparse import os from typing import Type from loguru import logger import numpy as np import torch from probnmn.config import Config from probnmn.evaluators import (ProgramPriorEvaluator, JointTrainingEvaluator, ModuleTrainingEvaluator, QuestionCodingEvaluator) from probnmn.trainers import (ProgramPriorTrain...
35.046729
97
0.715467
import argparse import os from typing import Type from loguru import logger import numpy as np import torch from probnmn.config import Config from probnmn.evaluators import ( ProgramPriorEvaluator, JointTrainingEvaluator, ModuleTrainingEvaluator, QuestionCodingEvaluator, ) from probnmn.trainers import...
0
0
0
0
0
0
0
38
0
faacf46b318d541f3f586f9b1d31b7b2f1e35d08
1,166
py
Python
stellarphot/conftest.py
lambchop0/stellarphot
0493a003bc36d3f6b92418956c7c618f1de36085
[ "BSD-3-Clause" ]
3
2016-04-22T22:45:00.000Z
2022-01-16T14:28:58.000Z
stellarphot/conftest.py
lambchop0/stellarphot
0493a003bc36d3f6b92418956c7c618f1de36085
[ "BSD-3-Clause" ]
38
2016-02-02T23:37:30.000Z
2020-01-02T20:09:56.000Z
stellarphot/conftest.py
lambchop0/stellarphot
0493a003bc36d3f6b92418956c7c618f1de36085
[ "BSD-3-Clause" ]
18
2016-01-29T16:55:53.000Z
2020-02-11T16:34:28.000Z
# This file is used to configure the behavior of pytest when using the Astropy # test infrastructure. # from astropy.tests.helper import enable_deprecations_as_exceptions ## Uncomment the following line to treat all DeprecationWarnings as ## exceptions. For Astropy v2.0 or later, there are 2 additional keywords, ##...
37.612903
80
0.770154
# This file is used to configure the behavior of pytest when using the Astropy # test infrastructure. import os from pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS def pytest_configure(config): config.option.astropy_header = True PYTEST_HEADER_MODULES.pop('h5py', None) from...
0
0
0
0
0
232
0
47
68
f459f3b2a9d5d7633488e2eeda581886efc55b6e
5,737
py
Python
hummingbot/wallet/ethereum/watcher/weth_watcher.py
fakecoinbase/4emslashhummingbot1
74b0ef943770ad141382a3a1851f55998facdac0
[ "Apache-2.0" ]
2
2020-08-02T17:56:53.000Z
2021-02-12T18:47:04.000Z
hummingbot/wallet/ethereum/watcher/weth_watcher.py
fakecoinbase/4emslashhummingbot1
74b0ef943770ad141382a3a1851f55998facdac0
[ "Apache-2.0" ]
1
2019-06-05T23:13:35.000Z
2019-06-05T23:13:35.000Z
hummingbot/wallet/ethereum/watcher/weth_watcher.py
fakecoinbase/4emslashhummingbot1
74b0ef943770ad141382a3a1851f55998facdac0
[ "Apache-2.0" ]
2
2020-08-02T17:59:03.000Z
2021-09-05T22:19:28.000Z
#!/usr/bin/env python DEPOSIT_EVENT_NAME = "Deposit" WITHDRAWAL_EVENT_NAME = "Withdrawal"
41.875912
118
0.67178
#!/usr/bin/env python import asyncio from hexbytes import HexBytes from decimal import Decimal import logging from typing import ( List, Dict, Iterable, Set, Optional ) from web3 import Web3 from web3.datastructures import AttributeDict from hummingbot.wallet.ethereum.erc20_token import ERC20Token...
0
160
2,393
2,309
0
0
0
428
355
a6abbc3943dc7177880fbe7cf210eb6aa2b13d85
2,126
py
Python
tests/fixtures/authorization.py
kenoseni/Flight-Booking
ce67113dbf303a155274e02aa520d4d116197b9d
[ "MIT" ]
null
null
null
tests/fixtures/authorization.py
kenoseni/Flight-Booking
ce67113dbf303a155274e02aa520d4d116197b9d
[ "MIT" ]
null
null
null
tests/fixtures/authorization.py
kenoseni/Flight-Booking
ce67113dbf303a155274e02aa520d4d116197b9d
[ "MIT" ]
null
null
null
"""Authorization fixtures module"""
28.72973
66
0.645343
"""Authorization fixtures module""" import pytest from src.middleware import generate_token from src.utilities.constants import MIMETYPE, MIMETYPE_TEXT from ..mocks.token import EXPIRED_TOKEN as expired_token @pytest.fixture(scope='module') def auth_header(new_user, generate_token=generate_token): """Fixture that...
0
1,821
0
0
0
0
0
85
180
d5c46cc695cdf3b7d02798af05a3076c70938d2e
7,761
py
Python
atomic_reactor/build.py
sosiouxme/atomic-reactor
91414bb8ffd988321cfa7120167636757e265a39
[ "BSD-3-Clause" ]
null
null
null
atomic_reactor/build.py
sosiouxme/atomic-reactor
91414bb8ffd988321cfa7120167636757e265a39
[ "BSD-3-Clause" ]
1
2018-04-25T12:42:14.000Z
2018-04-29T20:31:00.000Z
atomic_reactor/build.py
sosiouxme/atomic-reactor
91414bb8ffd988321cfa7120167636757e265a39
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. Classes which implement tasks which builder has to be capable of doing. Logic above these classes has to set the workflow itself. """ import lo...
32.746835
95
0.626208
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. Classes which implement tasks which builder has to be capable of doing. Logic above these classes has to set the workflow itself. """ import jso...
0
672
0
6,402
0
0
0
115
203
c9e78e85edea429a80831b798bbafbe924b73680
3,502
py
Python
name-roulette.py
joiellantero/random-chooser
8589f4e5b023908b659338c0d3d851a47fd00eb0
[ "MIT" ]
null
null
null
name-roulette.py
joiellantero/random-chooser
8589f4e5b023908b659338c0d3d851a47fd00eb0
[ "MIT" ]
null
null
null
name-roulette.py
joiellantero/random-chooser
8589f4e5b023908b659338c0d3d851a47fd00eb0
[ "MIT" ]
null
null
null
import argparse if __name__=="__main__": parser = argparse.ArgumentParser(description='Name Roulette v2.1.0. A random picker for names. A digital terminal script based on the game spin the bottle.') parser.add_argument( 'file', metavar='filename', type=str, help='Files accepted...
30.719298
246
0.58538
import cowsay import itertools import threading import time import sys import os import argparse import pandas as pd def loading_animation(): done = False def animate(): for c in itertools.cycle(['|', '/', '-', '\\']): if done: break sys.stdout.write('\rchoosing ...
0
0
0
0
0
1,861
0
-53
269
998631fa9c541cd967424aca617ad863007d126c
1,374
py
Python
Word 2 Vector/w2v.py
TanmayKumar-EngStud/Natural_Language_Processing
7545e7f9273fd2e2a623d1f8e027b7981cf6ed0b
[ "MIT" ]
1
2021-07-20T09:45:27.000Z
2021-07-20T09:45:27.000Z
Word 2 Vector/w2v.py
TanmayKumar-EngStud/Natural_Language_Processing
7545e7f9273fd2e2a623d1f8e027b7981cf6ed0b
[ "MIT" ]
null
null
null
Word 2 Vector/w2v.py
TanmayKumar-EngStud/Natural_Language_Processing
7545e7f9273fd2e2a623d1f8e027b7981cf6ed0b
[ "MIT" ]
null
null
null
from gensim.models import Word2Vec import os os.system('clear') # Creating a class to fetch loss after every epoch w2v = Word2Vec(vector_size=100, # size of the w2v is allocated to be 300 window = 5, # window size assigned is assumed to be 5 min_count =1, # words must c...
38.166667
103
0.644833
import gensim from gensim.models import Word2Vec, word2vec from gensim.models.callbacks import CallbackAny2Vec import os os.system('clear') # Creating a class to fetch loss after every epoch class callback(CallbackAny2Vec): def __init__(self) -> None: self.epoch= 0 def on_epoch_end(self, model): ...
0
0
0
148
0
0
0
32
66
a3ea8a64f9df9377887ddaa6c5544326511984d6
1,748
py
Python
server/openapi_server/controllers/text_person_name_annotation_controller.py
clemEssien/Bert-Phi-Annotator
5a748c89ca400cbbb681627820ed7148090e01bf
[ "Apache-2.0" ]
null
null
null
server/openapi_server/controllers/text_person_name_annotation_controller.py
clemEssien/Bert-Phi-Annotator
5a748c89ca400cbbb681627820ed7148090e01bf
[ "Apache-2.0" ]
20
2021-08-20T18:44:05.000Z
2022-03-01T18:03:04.000Z
server/openapi_server/controllers/text_person_name_annotation_controller.py
clemEssien/bert-phi-annotator
5a748c89ca400cbbb681627820ed7148090e01bf
[ "Apache-2.0" ]
1
2021-09-03T17:13:36.000Z
2021-09-03T17:13:36.000Z
import connexion from openapi_server.models.error import Error # noqa: E501 from openapi_server.models.text_person_name_annotation_request import TextPersonNameAnnotationRequest # noqa: E501 from openapi_server.models.text_person_name_annotation_response import TextPersonNameAnnotationResponse # noqa: E501 from open...
40.651163
118
0.672769
import connexion from openapi_server.models.error import Error # noqa: E501 from openapi_server.models.text_person_name_annotation import TextPersonNameAnnotation from openapi_server.models.text_person_name_annotation_request import TextPersonNameAnnotationRequest # noqa: E501 from openapi_server.models.text_person_n...
0
0
0
0
0
369
0
65
45
07189e0f8ae4905d86ce9add048f4249aa169fc7
943
py
Python
problems/trees/leftView.py
apollomat/TechInterview
c791df446b7cd78f0e271b536e823cb7d201e369
[ "MIT" ]
null
null
null
problems/trees/leftView.py
apollomat/TechInterview
c791df446b7cd78f0e271b536e823cb7d201e369
[ "MIT" ]
null
null
null
problems/trees/leftView.py
apollomat/TechInterview
c791df446b7cd78f0e271b536e823cb7d201e369
[ "MIT" ]
null
null
null
# Python program to print left view of Binary Tree # A binary tree node # Recursive function pritn left view of a binary tree # A wrapper over leftViewUtil() # Driver program to test above function root = Node(12) root.left = Node(10) root.right = Node(20) root.right.left = Node(25) root.right.right = Node(40) ...
21.431818
53
0.658537
# Python program to print left view of Binary Tree # A binary tree node class Node: # Constructor to create a new node def __init__(self, data): self.data = data self.left = None self.right = None # Recursive function pritn left view of a binary tree def leftViewUtil(root, level, max...
0
0
0
136
0
406
0
0
66
92cf15cf512bf2cdec3f2e8a3d941b54c5133f3e
187
py
Python
1064.py
heltonricardo/URI
160cca22d94aa667177c9ebf2a1c9864c5e55b41
[ "MIT" ]
6
2021-04-13T00:33:43.000Z
2022-02-10T10:23:59.000Z
1064.py
heltonricardo/URI
160cca22d94aa667177c9ebf2a1c9864c5e55b41
[ "MIT" ]
null
null
null
1064.py
heltonricardo/URI
160cca22d94aa667177c9ebf2a1c9864c5e55b41
[ "MIT" ]
3
2021-03-23T18:42:24.000Z
2022-02-10T10:24:07.000Z
s = 0 q = 0 for i in range(6): n = float(input()) if n > 0: q += 1 s += n if q != 0: m = s / q else: m = 0 print(q, 'valores positivos') print('{:.1f}'.format(m))
15.583333
29
0.449198
s = 0 q = 0 for i in range(6): n = float(input()) if n > 0: q += 1 s += n if q != 0: m = s / q else: m = 0 print(q, 'valores positivos') print('{:.1f}'.format(m))
0
0
0
0
0
0
0
0
0
5e5674a463cd462214399cb193226031b4591a01
623
py
Python
core/migrations/0017_auto_20190206_1558.py
mark-barrett/RESTBroker
d9b0a3574d2970443fdf40c70ab9ceb8d72614f4
[ "MIT" ]
null
null
null
core/migrations/0017_auto_20190206_1558.py
mark-barrett/RESTBroker
d9b0a3574d2970443fdf40c70ab9ceb8d72614f4
[ "MIT" ]
null
null
null
core/migrations/0017_auto_20190206_1558.py
mark-barrett/RESTBroker
d9b0a3574d2970443fdf40c70ab9ceb8d72614f4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2019-02-06 15:58 from __future__ import unicode_literals
23.961538
50
0.611557
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2019-02-06 15:58 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0016_auto_20190205_1727'), ] operations = [ migrations.RenameField( ...
0
0
0
452
0
0
0
11
46
89abb3b1f7c75b036ac6eb53ac9e5afd9625b313
1,684
py
Python
pbpstats/data_loader/stats_nba/summary/loader.py
bahalbach/pbpstats
6a9f602764edb7a3ee0e880fffbb5aa34990d6e9
[ "MIT" ]
54
2019-10-16T00:10:51.000Z
2022-03-19T21:21:05.000Z
pbpstats/data_loader/stats_nba/summary/loader.py
bahalbach/pbpstats
6a9f602764edb7a3ee0e880fffbb5aa34990d6e9
[ "MIT" ]
15
2019-11-19T01:20:52.000Z
2022-02-04T13:38:37.000Z
pbpstats/data_loader/stats_nba/summary/loader.py
bahalbach/pbpstats
6a9f602764edb7a3ee0e880fffbb5aa34990d6e9
[ "MIT" ]
15
2019-11-19T11:54:51.000Z
2022-03-21T05:08:53.000Z
""" ``StatsNbaSummaryLoader`` loads summary data for a game and creates :obj:`~pbpstats.resources.games.stats_nba_game_item.StatsNbaGameItem` objects for game The following code will load summary data for game id "0021900001" from a file located in a subdirectory of the /data directory .. code-block:: python fro...
39.162791
189
0.771971
""" ``StatsNbaSummaryLoader`` loads summary data for a game and creates :obj:`~pbpstats.resources.games.stats_nba_game_item.StatsNbaGameItem` objects for game The following code will load summary data for game id "0021900001" from a file located in a subdirectory of the /data directory .. code-block:: python fro...
0
0
0
828
0
0
0
97
67
f0ffc6e55e6d5dcf7b59d786f0a4a6016c31b138
6,713
py
Python
api/api/utils.py
erik-sn/mako
f64644dacb132b0063805ccafc3f485bdb62595b
[ "MIT" ]
null
null
null
api/api/utils.py
erik-sn/mako
f64644dacb132b0063805ccafc3f485bdb62595b
[ "MIT" ]
12
2020-02-11T23:12:23.000Z
2022-02-26T13:08:40.000Z
api/api/utils.py
erik-sn/mako
f64644dacb132b0063805ccafc3f485bdb62595b
[ "MIT" ]
2
2018-08-10T08:14:31.000Z
2018-10-01T16:46:37.000Z
from django.core.files.uploadedfile import InMemoryUploadedFile from django.conf import settings from mako.models import FileConfig from api.models import File import logging from typing import List, Tuple import uuid from uuid import UUID import os import pathlib import hashlib from shutil import copyfile, rmtree log...
31.369159
111
0.672427
from django.core.files.uploadedfile import InMemoryUploadedFile from django.conf import settings from mako.models import FileConfig from api.models import File import logging from typing import List, Tuple import uuid from uuid import UUID import os import pathlib import zipfile import tarfile import hashlib from shuti...
0
0
0
0
0
205
0
-14
66
bce1273dc0a6beac46448131ac5d1f1d1a5a3400
6,913
py
Python
src/Python/Meshes/ClipDataSetWithPolyData.py
sankhesh/vtk-examples
2d50e847ad62ce0eb71b66c029ad8abb302cd39f
[ "Apache-2.0" ]
null
null
null
src/Python/Meshes/ClipDataSetWithPolyData.py
sankhesh/vtk-examples
2d50e847ad62ce0eb71b66c029ad8abb302cd39f
[ "Apache-2.0" ]
null
null
null
src/Python/Meshes/ClipDataSetWithPolyData.py
sankhesh/vtk-examples
2d50e847ad62ce0eb71b66c029ad8abb302cd39f
[ "Apache-2.0" ]
1
2022-02-16T08:20:41.000Z
2022-02-16T08:20:41.000Z
if __name__ == '__main__': main()
36.005208
116
0.695212
import numpy as np import vtk def main(): colors = vtk.vtkNamedColors() # Create polydata to slice the grid with. In this case, use a cone. This # could # be any polydata including a stl file. cone = vtk.vtkConeSource() cone.SetResolution(50) cone.SetDirection(0, 0, -1) cone.SetHeight...
0
0
0
0
0
6,819
0
-14
67
4da4802f0ee5aa858aaa492dd08df2e69368285f
500
py
Python
polyaxon_schemas/ops/tensorboard/op.py
granularai/polyaxon-schemas
017ae74701f21f12f0b25e75379681ea5d8baa9e
[ "MIT" ]
null
null
null
polyaxon_schemas/ops/tensorboard/op.py
granularai/polyaxon-schemas
017ae74701f21f12f0b25e75379681ea5d8baa9e
[ "MIT" ]
null
null
null
polyaxon_schemas/ops/tensorboard/op.py
granularai/polyaxon-schemas
017ae74701f21f12f0b25e75379681ea5d8baa9e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function
25
78
0.768
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from marshmallow import fields, validate from polyaxon_schemas.ops.run import BaseRunConfig, BaseRunSchema class TensorboardSchema(BaseRunSchema): kind = fields.Str(allow_none=True, validate=validate.Equal('tensorboard')) ...
0
50
0
204
0
0
0
63
92
6d2ee9378af807a0e6b29402bb5597e14d59d395
5,949
py
Python
wc_kb_gen/random/observables.py
KarrLab/wc_kb_gen
05236c6cb2fcd2bd51817ef5ef4e6749629727f7
[ "MIT" ]
null
null
null
wc_kb_gen/random/observables.py
KarrLab/wc_kb_gen
05236c6cb2fcd2bd51817ef5ef4e6749629727f7
[ "MIT" ]
6
2018-08-08T18:05:08.000Z
2021-10-31T20:08:45.000Z
wc_kb_gen/random/observables.py
KarrLab/wc_kb_gen
05236c6cb2fcd2bd51817ef5ef4e6749629727f7
[ "MIT" ]
null
null
null
""" :Author: Bilal Shaikh <bilal.shaikh@columbia.edu> Ashwin Srinivasan <ashwins@mit.edu> ::Date: 2018-07-19 :Copyright: 2018, Karr Lab :License: MIT """
41.601399
154
0.576231
""" :Author: Bilal Shaikh <bilal.shaikh@columbia.edu> Ashwin Srinivasan <ashwins@mit.edu> ::Date: 2018-07-19 :Copyright: 2018, Karr Lab :License: MIT """ import wc_kb import wc_kb_gen import numpy from wc_onto import onto as wcOntology from wc_utils.util.ontology import are_terms_equivalent class ObservablesG...
0
0
0
5,625
0
0
0
28
133
f3e849d75247eaa8885dc976cbd2ecc5019a5fa2
9,240
py
Python
voice_controlled_KUKAyoubot_project/main_code.py
Nikhil619/Planning-and-controlling-the-motion-of-a-mobile-manipulator-simulated-in-V-REP-on-a-kuka-youbot-
811a1ac130eb17a49857b1363e34040771a557fa
[ "MIT" ]
3
2020-11-26T15:27:35.000Z
2021-04-26T13:45:15.000Z
voice_controlled_KUKAyoubot_project/main_code.py
Nikhil619/Planning-and-controlling-the-motion-of-a-mobile-manipulator-simulated-in-V-REP-on-a-kuka-youbot-
811a1ac130eb17a49857b1363e34040771a557fa
[ "MIT" ]
null
null
null
voice_controlled_KUKAyoubot_project/main_code.py
Nikhil619/Planning-and-controlling-the-motion-of-a-mobile-manipulator-simulated-in-V-REP-on-a-kuka-youbot-
811a1ac130eb17a49857b1363e34040771a557fa
[ "MIT" ]
1
2021-09-29T02:31:48.000Z
2021-09-29T02:31:48.000Z
# -*- coding: utf-8 -*- """ Created on Sun Jan 10 23:15:14 2021 @author: Nikhil """ import numpy as np import yaml import csv import pyttsx3 import os engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') engine.setProperty('voice', voices[0].id) if __name__ == '__m...
39.152542
209
0.579004
# -*- coding: utf-8 -*- """ Created on Sun Jan 10 23:15:14 2021 @author: Nikhil """ import numpy as np import modern_robotics as mr import yaml from trajectory import TrajectoryGenerator from simulate import Odometry from feedback_controller import FeedbackController from math import cos, sin import csv...
0
0
0
2,591
0
956
0
83
287
170f8c663b2eb3282fca74b49edddbd8079a49bf
1,622
py
Python
apps/erianet/erianet_predict.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
2
2017-11-30T21:12:11.000Z
2017-12-01T07:52:43.000Z
apps/erianet/erianet_predict.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
14
2017-11-14T18:12:53.000Z
2018-06-03T16:07:57.000Z
apps/erianet/erianet_predict.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
3
2018-02-05T10:40:03.000Z
2018-02-09T09:29:19.000Z
from robolib.datamanager.siamese_data_loader import load_one_image from apps.erianet.erianet_util import load_erianet_model, get_3bhif_names MODEL_FILENAME = "TestModel.model" CLASS = 6 IMAGE = 3 model = load_erianet_model(MODEL_FILENAME) name = input("Enter name: ") img = int(input("Which image: ")) image = l...
33.102041
91
0.7164
import numpy as np from robolib.datamanager.siamese_data_loader import load_one_image from apps.erianet.erianet_util import load_erianet_model, get_3bhif_names MODEL_FILENAME = "TestModel.model" CLASS = 6 IMAGE = 3 def match_faces(input_img, ref_class, ref_image_index=4): reference_img = load_one_image("3BHIF", ...
0
0
0
0
0
1,040
0
-3
91
72a1484a9f766ecfc893eef9c7fe14c67fcc4af3
2,208
py
Python
config/swagger.py
vaporyorg/pm-trading-db
097f94c630a41da2f9015fd29f05a433fb0dacb0
[ "MIT" ]
null
null
null
config/swagger.py
vaporyorg/pm-trading-db
097f94c630a41da2f9015fd29f05a433fb0dacb0
[ "MIT" ]
null
null
null
config/swagger.py
vaporyorg/pm-trading-db
097f94c630a41da2f9015fd29f05a433fb0dacb0
[ "MIT" ]
null
null
null
def get_swagger_view(title=None, url=None, patterns=None, urlconf=None): """ Returns schema view which renders Swagger/OpenAPI. """ return SwaggerSchemaView.as_view()
33.969231
80
0.665308
import os from rest_framework import exceptions, status from rest_framework.permissions import AllowAny from rest_framework.renderers import CoreJSONRenderer, JSONRenderer from rest_framework.response import Response from rest_framework.schemas import SchemaGenerator from rest_framework.views import APIView from rest_...
0
0
0
1,465
0
0
0
282
274
62c5adcd9c9b4d2bfeff05b3ce1ef206330f8847
681
py
Python
genDb.py
sn0wbits/Wifi-Mapper
f37869c8d394155e0dff5c6f48ddd1b4c3a14600
[ "MIT" ]
null
null
null
genDb.py
sn0wbits/Wifi-Mapper
f37869c8d394155e0dff5c6f48ddd1b4c3a14600
[ "MIT" ]
null
null
null
genDb.py
sn0wbits/Wifi-Mapper
f37869c8d394155e0dff5c6f48ddd1b4c3a14600
[ "MIT" ]
null
null
null
from sql_tools import wifiTest import random c = 0 ap = 'SSID' encr = True while(c < 100): ssid = ap + str(c) mac = randNumb() sign = random.randrange(0, 100, 1) chan = random.randrange(1, 12, 1) lat = 10.7546 lon = -52.1235 wifiTest(c, ssid, mac, sign, chan, str(encr), lat, lon) c +...
22.7
99
0.555066
from sql_tools import wifiTest import random c = 0 ap = 'SSID' encr = True def randNumb(): n1 = random.randrange(10, 99, 1) n2 = random.randrange(10, 99, 1) n3 = random.randrange(10, 99, 1) n4 = random.randrange(10, 99, 1) n5 = random.randrange(10, 99, 1) n6 = random.randrange(10, 99, 1) ...
0
0
0
0
0
334
0
0
23
5018c75842a00efe015f92727e8e3a3f2bf37418
1,301
py
Python
adder-hard/addition.py
49thSecurityDivision/CC-CTF-Online
5e16317f6f1784b57948e0011e0ed58c26f3a4bf
[ "MIT" ]
5
2021-04-25T16:00:25.000Z
2021-05-03T02:02:34.000Z
adder-hard/addition.py
49thSecurityDivision/CC-CTF-Online
5e16317f6f1784b57948e0011e0ed58c26f3a4bf
[ "MIT" ]
null
null
null
adder-hard/addition.py
49thSecurityDivision/CC-CTF-Online
5e16317f6f1784b57948e0011e0ed58c26f3a4bf
[ "MIT" ]
null
null
null
#!/usr/bin/python import random count = 0 while count < 1000: x=random.randint(1,100) j=random.randint(1,200) op = ["+", "-", "*"] op_num = random.randint(1,3) data = "" solve = 0 if count < 500: if op_num == 1: solve = x + j data = ("what is %d + %d\n" % (...
23.654545
71
0.438125
#!/usr/bin/python import random import sys count = 0 while count < 1000: x=random.randint(1,100) j=random.randint(1,200) op = ["+", "-", "*"] op_num = random.randint(1,3) data = "" solve = 0 if count < 500: if op_num == 1: solve = x + j data = ("what is %d ...
0
0
0
0
0
0
0
-11
22
802195cc761c12fee6eda91aa00bcc1664bf8d26
70
py
Python
pineapple/pineapple_nodes/__init__.py
societe-generale/Pineapple
2aad2fbd0d7e231608d1d02bce45a28cd22f82a8
[ "MIT" ]
null
null
null
pineapple/pineapple_nodes/__init__.py
societe-generale/Pineapple
2aad2fbd0d7e231608d1d02bce45a28cd22f82a8
[ "MIT" ]
null
null
null
pineapple/pineapple_nodes/__init__.py
societe-generale/Pineapple
2aad2fbd0d7e231608d1d02bce45a28cd22f82a8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Top-level package for pineapple nodes."""
17.5
44
0.6
# -*- coding: utf-8 -*- """Top-level package for pineapple nodes."""
0
0
0
0
0
0
0
0
0
dcb2e6cf860d4afd695730045bfd4e530242f680
259
py
Python
lib/dochemistry/__init__.py
criswell/dochemistry
b185bdecbbb433616f95242676f6312024ffa62d
[ "MIT" ]
null
null
null
lib/dochemistry/__init__.py
criswell/dochemistry
b185bdecbbb433616f95242676f6312024ffa62d
[ "MIT" ]
null
null
null
lib/dochemistry/__init__.py
criswell/dochemistry
b185bdecbbb433616f95242676f6312024ffa62d
[ "MIT" ]
null
null
null
""" @package dochemistry @mainpage Wrapper for various NoSQL, document-oriented databases @section Introduction Introduction doChemistry is intended to be an abstraction layer for various NoSQL and document-oriented databases. """ __version__ = '0.0.1'
19.923077
74
0.787645
""" @package dochemistry @mainpage Wrapper for various NoSQL, document-oriented databases @section Introduction Introduction doChemistry is intended to be an abstraction layer for various NoSQL and document-oriented databases. """ __version__ = '0.0.1'
0
0
0
0
0
0
0
0
0
4e07fdc9e573080b6247fecc38247ce548e1589f
3,472
py
Python
lib/axon/utils.py
intellimath/pyaxon
fcadf741bedd71fdb21d6e8b865da2a22f2bd1fb
[ "MIT" ]
19
2015-03-02T19:38:51.000Z
2021-11-16T13:48:04.000Z
lib/axon/utils.py
intellimath/pyaxon
fcadf741bedd71fdb21d6e8b865da2a22f2bd1fb
[ "MIT" ]
null
null
null
lib/axon/utils.py
intellimath/pyaxon
fcadf741bedd71fdb21d6e8b865da2a22f2bd1fb
[ "MIT" ]
4
2015-02-07T13:29:43.000Z
2020-01-01T19:20:53.000Z
# coding: utf-8 # The MIT License (MIT) # # Copyright (c) <2011-2014> <Shibzukhov Zaur, szport at gmail dot com> # # 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, incl...
32.754717
95
0.674251
# coding: utf-8 # The MIT License (MIT) # # Copyright (c) <2011-2014> <Shibzukhov Zaur, szport at gmail dot com> # # 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, incl...
0
389
0
0
0
0
0
164
112
72c5279e0f027fbf54702400f69341de3fd010de
3,050
py
Python
Projetos/tabuada.py
eduardobaltazarmarfim/Tkinter
7e3f246dd59d4ef030d2e896b9b9e31fa699a6ac
[ "MIT" ]
null
null
null
Projetos/tabuada.py
eduardobaltazarmarfim/Tkinter
7e3f246dd59d4ef030d2e896b9b9e31fa699a6ac
[ "MIT" ]
null
null
null
Projetos/tabuada.py
eduardobaltazarmarfim/Tkinter
7e3f246dd59d4ef030d2e896b9b9e31fa699a6ac
[ "MIT" ]
null
null
null
App09()
25.416667
115
0.533443
from tkinter import* from tkinter import messagebox from centralizando import Centralizar from componentes import Objetos from tkinter.scrolledtext import ScrolledText class App09: def __init__(self): super().__init__() self.root=Tk() Centralizar.posicionar(self,...
6
0
0
2,846
0
0
0
58
133
ab3dbd074e067100b1b92b2739d38287c7582aa1
32,249
py
Python
hata/ext/command_utils/user_menu.py
albertopoljak/hata
96d0b3182eb4f5291eaf36bd23d521787c6b01f1
[ "0BSD" ]
null
null
null
hata/ext/command_utils/user_menu.py
albertopoljak/hata
96d0b3182eb4f5291eaf36bd23d521787c6b01f1
[ "0BSD" ]
null
null
null
hata/ext/command_utils/user_menu.py
albertopoljak/hata
96d0b3182eb4f5291eaf36bd23d521787c6b01f1
[ "0BSD" ]
1
2020-09-17T20:10:15.000Z
2020-09-17T20:10:15.000Z
__all__ = ('UserMenuFactory', 'UserMenuRunner', 'UserPagination',) from scarletio import CallableAnalyzer def validate_check(check): """ Validates the given check. Parameters ---------- check : `None` of `callable` The check to validate. Raises ------ TypeError ...
37.325231
125
0.517877
__all__ = ('UserMenuFactory', 'UserMenuRunner', 'UserPagination',) from scarletio import CancelledError, copy_docs, CallableAnalyzer from ...discord.core import BUILTIN_EMOJIS from ...discord.emoji import Emoji from ...discord.interaction import InteractionEvent from ...discord.message import Message from ...discord i...
0
3,895
9,614
13,747
0
0
0
359
268
ae1d1bdda6f4322fb63cef2d3459601ea41b400a
26,774
py
Python
web_pages.py
shalommmitz/vue-bootstrap-site-template
c3a292406c48eeff9684f214e80478a8ed404aa5
[ "MIT" ]
null
null
null
web_pages.py
shalommmitz/vue-bootstrap-site-template
c3a292406c48eeff9684f214e80478a8ed404aa5
[ "MIT" ]
null
null
null
web_pages.py
shalommmitz/vue-bootstrap-site-template
c3a292406c48eeff9684f214e80478a8ed404aa5
[ "MIT" ]
null
null
null
############################ Genrate page parts ######################################### ############################ Genrate full pages #########################################
40.261654
190
0.571861
import yaml ############################ Genrate page parts ######################################### def gen_page_start(title): return ''' <!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta name=viewport content="width=device-width,initial-scale=1"> <meta http-equiv="expires" content="1" /> <m...
0
0
0
0
0
26,189
0
-10
407
7c64702cee4ef5453d239c2bc60cfed885a9494e
1,858
py
Python
src/functions/assignment_definition_handler/index.py
aws-samples/assignment-automation-4-aws-sso
cdaea26dd1a02e15c65ce39754a5bf42ab305488
[ "MIT-0" ]
4
2022-02-11T08:12:32.000Z
2022-03-09T08:38:36.000Z
src/functions/assignment_definition_handler/index.py
xntric78/assignment-automation-4-aws-sso
cdaea26dd1a02e15c65ce39754a5bf42ab305488
[ "MIT-0" ]
null
null
null
src/functions/assignment_definition_handler/index.py
xntric78/assignment-automation-4-aws-sso
cdaea26dd1a02e15c65ce39754a5bf42ab305488
[ "MIT-0" ]
2
2022-03-04T05:57:03.000Z
2022-03-18T08:32:16.000Z
################################################################################ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 ################################################################################ controller = None ## Event payload from Service Event...
30.459016
86
0.579656
################################################################################ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 ################################################################################ import json from account_operations import account_ope...
0
0
0
0
0
735
0
124
134
4a843f3aa5dac040ceda8c86c9fe918002ed4655
565
py
Python
stop_words.py
RITUait/NLP-Projects
0b22733d7368e28bd20d6fb9e1f27406eb0bf9d7
[ "MIT" ]
null
null
null
stop_words.py
RITUait/NLP-Projects
0b22733d7368e28bd20d6fb9e1f27406eb0bf9d7
[ "MIT" ]
null
null
null
stop_words.py
RITUait/NLP-Projects
0b22733d7368e28bd20d6fb9e1f27406eb0bf9d7
[ "MIT" ]
null
null
null
#Stop words from nltk.tokenize import word_tokenize from nltk.corpus import stopwords example_sentence = "This is an example sentence to show you, how it is working." stop_words = set(stopwords.words("English")) filtered_sentence = [] example_tokenize = word_tokenize(example_sentence) print(example_token...
23.541667
81
0.743363
#Stop words from nltk.tokenize import word_tokenize from nltk.corpus import stopwords example_sentence = "This is an example sentence to show you, how it is working." stop_words = set(stopwords.words("English")) filtered_sentence = [] example_tokenize = word_tokenize(example_sentence) print(example_token...
0
0
0
0
0
0
0
0
0
f0ba0766106d30faf9f14b4e863e80c425f6906e
1,355
py
Python
test/models/helpers.py
pcrama/rikiki
3948cc403112dd125390cfcc549ffb3a4400a9ce
[ "BSD-2-Clause" ]
null
null
null
test/models/helpers.py
pcrama/rikiki
3948cc403112dd125390cfcc549ffb3a4400a9ce
[ "BSD-2-Clause" ]
null
null
null
test/models/helpers.py
pcrama/rikiki
3948cc403112dd125390cfcc549ffb3a4400a9ce
[ "BSD-2-Clause" ]
null
null
null
"""Helper functions for model tests.""" import unittest.mock as mock from app.models import (Game, Player, Round) PROVISIONAL_NAME = "provisional name" CONFIRMED_NAME = "Abcdef" def mock_game(): """Return a mock of a Game.""" return mock.create_autospec(Game) def mock_player(): """Return a mock of a P...
25.092593
64
0.691513
"""Helper functions for model tests.""" import unittest.mock as mock import pytest # type: ignore from app.models import (Game, Player, Round) PROVISIONAL_NAME = "provisional name" CONFIRMED_NAME = "Abcdef" def mock_game(): """Return a mock of a Game.""" return mock.create_autospec(Game) ...
0
746
0
0
0
0
0
-8
148
d92f087b67d4d9e3844681e3c6d4cc2465f9d310
138
py
Python
output/models/ms_data/additional/member_type002_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/additional/member_type002_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/additional/member_type002_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.ms_data.additional.member_type002_xsd.member_type002 import (Ct, Root) __all__ = [ "Ct", "Root", ]
13.8
80
0.652174
from output.models.ms_data.additional.member_type002_xsd.member_type002 import ( Ct, Root, ) __all__ = [ "Ct", "Root", ]
0
0
0
0
0
0
0
11
0
b7d8af71880082cb0759608428cadd9bf3178b05
22,060
py
Python
bitcoinutils/transactions.py
hasanza/python-bitcoin-utils
28ea702e9ffb690f544e8bc082e650c8dddd6d53
[ "MIT" ]
null
null
null
bitcoinutils/transactions.py
hasanza/python-bitcoin-utils
28ea702e9ffb690f544e8bc082e650c8dddd6d53
[ "MIT" ]
null
null
null
bitcoinutils/transactions.py
hasanza/python-bitcoin-utils
28ea702e9ffb690f544e8bc082e650c8dddd6d53
[ "MIT" ]
2
2021-06-18T04:39:14.000Z
2021-07-04T13:39:54.000Z
# Copyright (C) 2018-2020 The python-bitcoin-utils developers # # This file is part of python-bitcoin-utils # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of python-bitcoin-utils, including this file, may be copied, modified, # propagated,...
34.631083
100
0.617362
# Copyright (C) 2018-2020 The python-bitcoin-utils developers # # This file is part of python-bitcoin-utils # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of python-bitcoin-utils, including this file, may be copied, modified, # propagated,...
0
578
0
20,302
0
-1
0
462
272
4e0b92eb92e84241411c4715285c9cc3b4853614
9,776
py
Python
main.py
eurecom-asp/RawGAT-ST-antispoofing
b9afd6e7a976f4996f0d95f64eaf6531a967f1e3
[ "MIT" ]
19
2021-11-02T06:44:29.000Z
2022-03-25T11:39:17.000Z
main.py
MansourGu/RawGAT-ST-antispoofing
ed2ca6b0c969f94713bb0601d6622e8c7bdcdc10
[ "MIT" ]
3
2021-11-12T01:16:44.000Z
2021-12-03T10:00:21.000Z
main.py
MansourGu/RawGAT-ST-antispoofing
ed2ca6b0c969f94713bb0601d6622e8c7bdcdc10
[ "MIT" ]
3
2021-10-13T12:21:50.000Z
2021-12-10T05:56:48.000Z
import argparse import sys import os import data_utils from torch import Tensor from torch.utils.data import DataLoader from torchvision import transforms import yaml import torch from model import RawGAT_ST # In main model script we used our best RawGAT-ST-mul model. To use other models you need to call revelant mode...
35.678832
358
0.628887
import argparse import sys import os import data_utils import numpy as np from torch import Tensor from torch.utils.data import DataLoader from torchvision import transforms import yaml import torch from torch import nn from model import RawGAT_ST # In main model script we used our best RawGAT-ST-mul model. To use oth...
0
0
0
0
0
3,088
0
-4
136
9bf807cf639f18c9cc5fba1be7efa8fee142a87c
2,202
py
Python
Visualize_Segment_Skeleton.py
psobolewskiPhD/SEM_fiber_analysis
a378e842d32b7cf2f5d7e69d28a423d928c2fafc
[ "MIT" ]
null
null
null
Visualize_Segment_Skeleton.py
psobolewskiPhD/SEM_fiber_analysis
a378e842d32b7cf2f5d7e69d28a423d928c2fafc
[ "MIT" ]
null
null
null
Visualize_Segment_Skeleton.py
psobolewskiPhD/SEM_fiber_analysis
a378e842d32b7cf2f5d7e69d28a423d928c2fafc
[ "MIT" ]
null
null
null
# %% # Import needed libraries and modules import napari import numpy as np from dask_image.imread import imread # %% # Use dask to read the image files, which permits for lazy loading. all_samples = imread("./fiber_data/*.jpg") # set the scale in micron per pixel of the images scale = [1 / 35.5, 1 / 35.5] # %% # Ens...
30.583333
83
0.710263
# %% # Import needed libraries and modules import napari import numpy as np from dask_image.imread import imread from skimage import filters, morphology # %% # Use dask to read the image files, which permits for lazy loading. all_samples = imread("./fiber_data/*.jpg") # set the scale in micron per pixel of the images...
0
0
0
0
0
738
0
18
88
a06da4100b4e22ca15e7c6dde9e74f213d71e420
2,940
py
Python
models/05_bilstm_crf.py
yanqiangmiffy/ner-english
250415a3fa1bad1c2b6342b2037b12ebe9f04746
[ "MIT" ]
42
2018-10-19T13:57:04.000Z
2021-12-19T13:42:16.000Z
models/05_bilstm_crf.py
liutianling/ner-english
250415a3fa1bad1c2b6342b2037b12ebe9f04746
[ "MIT" ]
2
2020-06-19T09:41:42.000Z
2021-06-06T02:48:09.000Z
models/05_bilstm_crf.py
liutianling/ner-english
250415a3fa1bad1c2b6342b2037b12ebe9f04746
[ "MIT" ]
14
2018-11-05T01:19:22.000Z
2021-12-21T11:16:54.000Z
import argparse import numpy as np from utils import bulid_dataset from keras.models import Model, Input from keras.layers import LSTM, Embedding, Dense, TimeDistributed, Bidirectional from keras_contrib.layers import CRF from keras_contrib.utils import save_load_utils import matplotlib.pyplot as plt plt.style.use("gg...
35
107
0.656463
import argparse import numpy as np import pandas as pd from utils import bulid_dataset from keras.models import Model,Input from keras.layers import LSTM,Embedding,Dense,TimeDistributed,Dropout,Bidirectional from keras_contrib.layers import CRF from keras_contrib.utils import save_load_utils import matplotlib.pyplot a...
177
0
0
0
0
994
0
1
45
debbae7c013bdb29825ddc0b869d487d1d74461f
1,404
py
Python
shadowListener/listener.py
levondov/temperature_skill
ef179e38c07b1cba6c85052d62218a67b3e6f9d1
[ "MIT" ]
1
2017-03-13T22:19:03.000Z
2017-03-13T22:19:03.000Z
shadowListener/listener.py
levondov/temperature_skill
ef179e38c07b1cba6c85052d62218a67b3e6f9d1
[ "MIT" ]
null
null
null
shadowListener/listener.py
levondov/temperature_skill
ef179e38c07b1cba6c85052d62218a67b3e6f9d1
[ "MIT" ]
null
null
null
import time from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTShadowClient #awshost you got from `aws iot describe-endpoint` awshost = "a134g88szk3vbi.iot.us-east-1.amazonaws.com" # Edit this to be your device name in the AWS IoT console thing = "raspberry_pi2" awsport = 8883 caPath = "/home/levon/iot_keys/root-CA.crt"...
31.2
133
0.792023
import time import json from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTShadowClient #awshost you got from `aws iot describe-endpoint` awshost = "a134g88szk3vbi.iot.us-east-1.amazonaws.com" # Edit this to be your device name in the AWS IoT console thing = "raspberry_pi2" awsport = 8883 caPath = "/home/levon/iot_keys/...
0
0
0
0
0
237
0
-10
45
de3eff5174f9568a9c1558f47fa6b79d7fab1e53
827
py
Python
hknweb/tutoring/migrations/0002_auto_20210122_0002.py
alvin-xu-5745/hknweb
00b4eb00225cecbefe9c6b5ca542e092a90cd8ef
[ "MIT" ]
20
2018-01-07T02:15:43.000Z
2021-09-15T04:25:50.000Z
hknweb/tutoring/migrations/0002_auto_20210122_0002.py
alvin-xu-5745/hknweb
00b4eb00225cecbefe9c6b5ca542e092a90cd8ef
[ "MIT" ]
292
2018-02-01T18:31:18.000Z
2022-03-30T22:15:08.000Z
hknweb/tutoring/migrations/0002_auto_20210122_0002.py
alvin-xu-5745/hknweb
00b4eb00225cecbefe9c6b5ca542e092a90cd8ef
[ "MIT" ]
85
2017-11-13T06:33:13.000Z
2022-03-30T20:32:55.000Z
# Generated by Django 2.2.8 on 2021-01-22 08:02
28.517241
140
0.534462
# Generated by Django 2.2.8 on 2021-01-22 08:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tutoring', '0001_initial'), ] operations = [ migrations.AlterField( model_name='timeslot', name='day', f...
0
0
0
713
0
0
0
19
46
7c5184529a6357437086f8beed638768f30c849f
2,330
py
Python
gsom/util/frames_to_video.py
odigous-labs/self-learning-algorithm
83fd7e3cbd0daab77ea94fc4bc21b28e2c510d19
[ "Apache-2.0" ]
null
null
null
gsom/util/frames_to_video.py
odigous-labs/self-learning-algorithm
83fd7e3cbd0daab77ea94fc4bc21b28e2c510d19
[ "Apache-2.0" ]
null
null
null
gsom/util/frames_to_video.py
odigous-labs/self-learning-algorithm
83fd7e3cbd0daab77ea94fc4bc21b28e2c510d19
[ "Apache-2.0" ]
null
null
null
''' Within this script, focus to convert given set of frames to a video. Requirements ---- You require OpenCV 3.2 to be installed. Run ---- If need to run this script seperately, then can edit the relevant input file path and output file path. If need to use this script within another code then can import the script...
31.917808
121
0.629614
''' Within this script, focus to convert given set of frames to a video. Requirements ---- You require OpenCV 3.2 to be installed. Run ---- If need to run this script seperately, then can edit the relevant input file path and output file path. If need to use this script within another code then can import the script...
0
0
0
0
0
1,815
0
-12
113
09b5d676c3ebc21d23da97db7142f777ece88ef8
107
py
Python
sindy_bvp/groupers/__init__.py
sheadan/SINDy-BVP
ac5b2bb4854bb311e4f6f26b180dde87cc10c13d
[ "MIT" ]
8
2020-05-19T23:56:39.000Z
2022-03-04T19:22:56.000Z
sindy_bvp/groupers/__init__.py
sheadan/SINDy-BVP
ac5b2bb4854bb311e4f6f26b180dde87cc10c13d
[ "MIT" ]
null
null
null
sindy_bvp/groupers/__init__.py
sheadan/SINDy-BVP
ac5b2bb4854bb311e4f6f26b180dde87cc10c13d
[ "MIT" ]
3
2020-08-07T17:57:02.000Z
2021-03-19T23:44:44.000Z
__all__ = ["pointwise_grouper"]
21.4
47
0.82243
from .base import Grouper from .pointwise_grouper import PointwiseGrouper __all__ = ["pointwise_grouper"]
0
0
0
0
0
0
0
30
44
ae369a78ee50fadd11accd0841c6935c5c212e00
981
py
Python
svg_utils_demo.py
Timothy-W-Hilton/COS_Spatial_Analyses
dfb6f99f8c7181739c2079936dce83a4d86f5c1f
[ "MIT" ]
null
null
null
svg_utils_demo.py
Timothy-W-Hilton/COS_Spatial_Analyses
dfb6f99f8c7181739c2079936dce83a4d86f5c1f
[ "MIT" ]
null
null
null
svg_utils_demo.py
Timothy-W-Hilton/COS_Spatial_Analyses
dfb6f99f8c7181739c2079936dce83a4d86f5c1f
[ "MIT" ]
null
null
null
import subprocess import matplotlib matplotlib.use('AGG') import svgutils.transform as sg from svgutils.templates import VerticalLayout import matplotlib.pyplot as plt import numpy as np import os import os.path try: figs = [] for i in range(2): figs.append(plt.figure()) plt.plot(np.random.ra...
26.513514
152
0.668705
import subprocess import matplotlib matplotlib.use('AGG') import svgutils.transform as sg from svgutils.templates import VerticalLayout import matplotlib.pyplot as plt import numpy as np import os import os.path try: figs = [] for i in range(2): figs.append(plt.figure()) plt.plot(np.random.ra...
0
0
0
0
0
0
0
0
0
65928cc60bdb3fd4c3821b8ba1184ef68cbce288
1,702
py
Python
lang/jquery_python/create/cdb_python_create.py
ekzemplaro/data_base_language
e77030367ffc595f1fac8583f03f9a3ce5eb1611
[ "MIT", "Unlicense" ]
3
2015-05-12T16:44:27.000Z
2021-02-09T00:39:24.000Z
lang/jquery_python/create/cdb_python_create.py
ekzemplaro/data_base_language
e77030367ffc595f1fac8583f03f9a3ce5eb1611
[ "MIT", "Unlicense" ]
null
null
null
lang/jquery_python/create/cdb_python_create.py
ekzemplaro/data_base_language
e77030367ffc595f1fac8583f03f9a3ce5eb1611
[ "MIT", "Unlicense" ]
null
null
null
#! /usr/bin/python # -*- coding: utf-8 -*- # ------------------------------------------------------------------------- # cdb_python_create.py # # Mar/26/2013 # ------------------------------------------------------------------------- import sys reload(sys) sys.setdefaultencoding('utf-8') import json sys.path.appen...
38.681818
87
0.542303
#! /usr/bin/python # -*- coding: utf-8 -*- # ------------------------------------------------------------------------- # cdb_python_create.py # # Mar/26/2013 # ------------------------------------------------------------------------- import sys reload(sys) sys.setdefaultencoding('utf-8') import json sys.path.appen...
57
0
0
0
0
803
0
0
22
0d09936106bf5b756aed5db0fb6884f9f6b195bb
285
py
Python
Util.py
CvvT/ElfParse
20f190a940ff2a48d80b05a282cfa0086c63ea75
[ "Apache-2.0" ]
8
2015-11-19T01:51:51.000Z
2019-10-12T09:57:37.000Z
Util.py
CvvT/ElfParse
20f190a940ff2a48d80b05a282cfa0086c63ea75
[ "Apache-2.0" ]
null
null
null
Util.py
CvvT/ElfParse
20f190a940ff2a48d80b05a282cfa0086c63ea75
[ "Apache-2.0" ]
15
2015-09-19T19:56:41.000Z
2019-10-12T09:57:38.000Z
__author__ = 'CwT'
21.923077
50
0.578947
__author__ = 'CwT' import struct def getStrbyfd(file, addr): file.seek(addr) # print hex(addr) str = [] byte = struct.unpack("B", file.read(1))[0] while byte: str.append(chr(byte)) byte = struct.unpack("B", file.read(1))[0] return ''.join(str)
0
0
0
0
0
229
0
-8
45
ff27c592271ceb4d084ae160456e4531d7904a7d
524
py
Python
Python_OOP_Softuni/Iterators_Generators_Exercises/venv/take_halves.py
borisboychev/SoftUni
22062312f08e29a1d85377a6d41ef74966d37e99
[ "MIT" ]
1
2020-12-14T23:25:19.000Z
2020-12-14T23:25:19.000Z
Python_OOP_Softuni/Iterators_Generators_Exercises/venv/take_halves.py
borisboychev/SoftUni
22062312f08e29a1d85377a6d41ef74966d37e99
[ "MIT" ]
null
null
null
Python_OOP_Softuni/Iterators_Generators_Exercises/venv/take_halves.py
borisboychev/SoftUni
22062312f08e29a1d85377a6d41ef74966d37e99
[ "MIT" ]
null
null
null
<<<<<<< HEAD """"Test Code""" take = solution()[0] halves = solution()[1] print(take(5, halves())) ======= >>>>>>> d79c1c8db2dfefe6e4c829e5cb5aa8db78b2579e
18.068966
48
0.467557
def solution(): def integer(): num = 1 while True: yield num num += 1 def halves(): for i in integer(): yield i / 2 def take(n, seq): ll = [] for num in seq: if len(ll) == n: return ll ll.ap...
0
0
0
0
344
0
0
0
22
fc6bc0613451858d8fc6f67d0581ab199dc78b90
1,374
py
Python
ext/URLCalendarLoader.py
bill18/QuantLibExt
a6a1a23a2812830d9f32cd43e6a720913da5cb16
[ "BSD-3-Clause" ]
1
2020-08-17T05:26:54.000Z
2020-08-17T05:26:54.000Z
ext/URLCalendarLoader.py
bill18/QuantLibExt
a6a1a23a2812830d9f32cd43e6a720913da5cb16
[ "BSD-3-Clause" ]
null
null
null
ext/URLCalendarLoader.py
bill18/QuantLibExt
a6a1a23a2812830d9f32cd43e6a720913da5cb16
[ "BSD-3-Clause" ]
1
2021-09-13T02:35:46.000Z
2021-09-13T02:35:46.000Z
# Copyright (C) 2019 Wenhua Wang # # This file is part of QuantLibExt, which is an extension to the # free-software/open-source quantitative library QuantLib - http://quantlib.org/ # # QuantLibExt is free software: you can redistribute it and/or modify it # under the terms of the BSD license. # # QuantLib's license is ...
32.714286
99
0.689956
# Copyright (C) 2019 Wenhua Wang # # This file is part of QuantLibExt, which is an extension to the # free-software/open-source quantitative library QuantLib - http://quantlib.org/ # # QuantLibExt is free software: you can redistribute it and/or modify it # under the terms of the BSD license. # # QuantLib's license is ...
0
0
0
618
0
0
0
36
135
f0b6915f1463a381895dede0b923fe21f2b38746
338
py
Python
building_post/migrations/0003_remove_buildingpost_slug.py
trowa88/commstr
39d3f34060db16c0cb1a90c6c3e79fbbc0cc15d1
[ "MIT" ]
null
null
null
building_post/migrations/0003_remove_buildingpost_slug.py
trowa88/commstr
39d3f34060db16c0cb1a90c6c3e79fbbc0cc15d1
[ "MIT" ]
null
null
null
building_post/migrations/0003_remove_buildingpost_slug.py
trowa88/commstr
39d3f34060db16c0cb1a90c6c3e79fbbc0cc15d1
[ "MIT" ]
null
null
null
# Generated by Django 2.0.4 on 2018-06-12 07:40
18.777778
53
0.60355
# Generated by Django 2.0.4 on 2018-06-12 07:40 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('building_post', '0002_auto_20180608_1743'), ] operations = [ migrations.RemoveField( model_name='buildingpost', name='slug',...
0
0
0
232
0
0
0
11
46
3fbc287c9129beb7adcd6f95198c83261ab57df9
2,490
py
Python
blog/models.py
zzhouly/django_diy_blog
2671243c59b99f44947ccd5033296492dea9d5da
[ "Apache-2.0" ]
null
null
null
blog/models.py
zzhouly/django_diy_blog
2671243c59b99f44947ccd5033296492dea9d5da
[ "Apache-2.0" ]
null
null
null
blog/models.py
zzhouly/django_diy_blog
2671243c59b99f44947ccd5033296492dea9d5da
[ "Apache-2.0" ]
null
null
null
# Create your models here.
27.362637
85
0.76747
from django.db import models # Create your models here. from datetime import date from django.urls import reverse from django.contrib.auth.models import User from ckeditor.fields import RichTextField from django_resized import ResizedImageField class Category(models.Model): name = models.CharField(max_length=200) ...
0
0
0
2,118
0
0
0
86
248
159fcdf5a9810a1db10351e037e11606430a636b
2,760
py
Python
symreg/symreg.py
fabiochiusano/SymbolicRegressionPy
ed2e4d6c56b6aa22ba9be02bc45a3ea7bedc7bfd
[ "MIT" ]
1
2017-09-01T19:02:25.000Z
2017-09-01T19:02:25.000Z
symreg/symreg.py
fabiochiusano/SymbolicRegressionPy
ed2e4d6c56b6aa22ba9be02bc45a3ea7bedc7bfd
[ "MIT" ]
1
2019-01-09T22:44:07.000Z
2019-01-09T22:44:07.000Z
symreg/symreg.py
fabiochiusano/SymbolicRegressionPy
ed2e4d6c56b6aa22ba9be02bc45a3ea7bedc7bfd
[ "MIT" ]
null
null
null
#xs = [-5,-3,-2,-1,2,6,7] #ys = [64,26,13,4,1,53,76] # 2x^2 - 3x - 1 xs = [-1, 1, 0, 3, -2, 0, -1, 3, 2, -2] ys = [1, 1, 0, 2, -2, 5, 3, -1, 5, -4] zs = [3, 3, 1, 12, 3, 6, 5, 9, 10, 1] # x^2 + y + 1 if __name__ == "__main__": main()
27.326733
101
0.630072
import generation as gn import tree as tr import generator as gtr import math import sys #xs = [-5,-3,-2,-1,2,6,7] #ys = [64,26,13,4,1,53,76] # 2x^2 - 3x - 1 xs = [-1, 1, 0, 3, -2, 0, -1, 3, 2, -2] ys = [1, 1, 0, 2, -2, 5, 3, -1, 5, -4] zs = [3, 3, 1, 12, 3, 6, 5, 9, 10, 1] # x^2 + y + 1 def main(): minHeight = 1 ...
0
0
0
0
0
2,408
0
-21
133
d1888f20ef9e903ee3ce29034da732e61da9fda1
599
py
Python
LeetCode/111. Minimum Depth of Binary Tree.py
QinganZhao/LXXtCode
9debb10f9d33dcdb3def9d141a638b8172d25ff3
[ "MIT" ]
3
2019-01-08T02:53:44.000Z
2021-07-26T07:03:27.000Z
LeetCode/111. Minimum Depth of Binary Tree.py
QinganZhao/LXXtCode
9debb10f9d33dcdb3def9d141a638b8172d25ff3
[ "MIT" ]
null
null
null
LeetCode/111. Minimum Depth of Binary Tree.py
QinganZhao/LXXtCode
9debb10f9d33dcdb3def9d141a638b8172d25ff3
[ "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
24.958333
53
0.497496
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def minDepth(self, root): """ :type root: TreeNode :rtype: int """ if not root: retur...
0
0
0
407
0
0
0
0
30
c78433f8e3b09ceb4bcc52c93734873d07b1a9f5
7,485
py
Python
great_expectations/core/usage_statistics/anonymizers/profiler_run_anonymizer.py
arunnthevapalan/great_expectations
97f1481bcd1c3f4d8878c6f383f4e6f008b20cd1
[ "Apache-2.0" ]
1
2022-03-16T22:09:49.000Z
2022-03-16T22:09:49.000Z
great_expectations/core/usage_statistics/anonymizers/profiler_run_anonymizer.py
draev/great_expectations
317e15ee7e50f6e0d537b62154177440f33b795d
[ "Apache-2.0" ]
null
null
null
great_expectations/core/usage_statistics/anonymizers/profiler_run_anonymizer.py
draev/great_expectations
317e15ee7e50f6e0d537b62154177440f33b795d
[ "Apache-2.0" ]
null
null
null
import logging logger = logging.getLogger(__name__)
38.782383
123
0.681363
import logging from typing import Dict, List, Optional from great_expectations.core.usage_statistics.anonymizers.anonymizer import Anonymizer from great_expectations.core.usage_statistics.util import ( aggregate_all_core_expectation_types, ) from great_expectations.rule_based_profiler.config.base import RuleBasedP...
0
0
0
7,021
0
0
0
276
134
c0ef61c07c5d7d9ca40b59c68b3db4b574c11bb8
1,861
py
Python
utils/generate_dataset.py
mustafa-sarshar/Deep-Learning-From-Scratch
d5e98f984291f41465d4b74abc16185e28678507
[ "MIT" ]
null
null
null
utils/generate_dataset.py
mustafa-sarshar/Deep-Learning-From-Scratch
d5e98f984291f41465d4b74abc16185e28678507
[ "MIT" ]
null
null
null
utils/generate_dataset.py
mustafa-sarshar/Deep-Learning-From-Scratch
d5e98f984291f41465d4b74abc16185e28678507
[ "MIT" ]
null
null
null
""" These code are inspired by: - https://cs231n.github.io/neural-networks-case-study/ """ if __name__ == "__main__": X, y = generate_spiral_data(n_points_per_class=100, n_classes=2, visualization=False)
41.355556
127
0.677055
""" These code are inspired by: - https://cs231n.github.io/neural-networks-case-study/ """ import numpy as np def generate_spiral_data(n_points_per_class=100, n_classes=2, visualization=False): N_DIMENSIONS = 2 X = np.zeros((n_points_per_class*n_classes, N_DIMENSIONS)) # data matrix (each row = single exam...
0
0
0
0
0
1,581
0
-3
68
413178d14e26157330517cdb2f61999adbdb2c1a
585
py
Python
cnab240/bancos/__init__.py
wpensar/cnab240
7a3d6e7cbe87f7a76461e50d277d4eca6dff7064
[ "MIT" ]
3
2016-11-30T10:42:58.000Z
2021-06-16T20:33:06.000Z
cnab240/bancos/__init__.py
wpensar/cnab240
7a3d6e7cbe87f7a76461e50d277d4eca6dff7064
[ "MIT" ]
2
2016-05-09T17:30:56.000Z
2018-05-15T17:44:09.000Z
cnab240/bancos/__init__.py
wpensar/cnab240
7a3d6e7cbe87f7a76461e50d277d4eca6dff7064
[ "MIT" ]
2
2016-05-09T17:29:52.000Z
2018-03-26T18:33:18.000Z
# -*- coding: utf-8 -*- import os import importlib from cnab240.registro import Registros cwd = os.path.abspath(os.path.dirname(__file__)) nome_bancos = (fname for fname in os.listdir(cwd) if os.path.isdir(os.path.join(cwd, fname)) and not fname.startswith('__')) for nome_banco in nome_bancos: ba...
34.411765
86
0.731624
# -*- coding: utf-8 -*- import os import importlib from cnab240.registro import Registros cwd = os.path.abspath(os.path.dirname(__file__)) nome_bancos = (fname for fname in os.listdir(cwd) if os.path.isdir(os.path.join(cwd, fname)) and not fname.startswith('__')) for nome_banco in nome_bancos: ba...
0
0
0
0
0
0
0
0
0
fdd822be944ca4b14fd46ab1ae94c1328feb247b
7,301
py
Python
fc.py
dhandy2013/dh-dev-scripts
ed6777a906b063b6cbb9ff3f254dd501b2439e38
[ "Apache-2.0" ]
1
2020-08-19T15:43:04.000Z
2020-08-19T15:43:04.000Z
fc.py
dhandy2013/dh-dev-scripts
ed6777a906b063b6cbb9ff3f254dd501b2439e38
[ "Apache-2.0" ]
null
null
null
fc.py
dhandy2013/dh-dev-scripts
ed6777a906b063b6cbb9ff3f254dd501b2439e38
[ "Apache-2.0" ]
1
2020-08-19T15:43:22.000Z
2020-08-19T15:43:22.000Z
#!/usr/bin/env python3 """ Find Code Usage: fc.py [options] <search-regex> Options: --debug Print debugging info while program is running -m --modules Search for the names of scripts or modules (minus filename extension) instead of for items in files....
38.62963
94
0.557869
#!/usr/bin/env python3 """ Find Code Usage: fc.py [options] <search-regex> Options: --debug Print debugging info while program is running -m --modules Search for the names of scripts or modules (minus filename extension) instead of for items in files....
0
0
0
0
1,407
2,404
0
-38
204
6c0d1606b2e1e44d6ba3d9838292bc90752c0d07
10,190
py
Python
tools/compare_acetz/zptdgenerator.py
bxparks/AceTimeValidation
42f44709b466ac8eab178bc00c62db5b23594188
[ "MIT" ]
null
null
null
tools/compare_acetz/zptdgenerator.py
bxparks/AceTimeValidation
42f44709b466ac8eab178bc00c62db5b23594188
[ "MIT" ]
null
null
null
tools/compare_acetz/zptdgenerator.py
bxparks/AceTimeValidation
42f44709b466ac8eab178bc00c62db5b23594188
[ "MIT" ]
null
null
null
# Copyright 2019 Brian T. Park # # MIT License """ Implements the TestDataGenerator to generate the validation test data using acetz, which uses Python ZoneProcessor class. Pulling in ZoneProcessor also means that it pulls in the data structures defined by zonedb. """
40.436508
80
0.614328
# Copyright 2019 Brian T. Park # # MIT License """ Implements the TestDataGenerator to generate the validation test data using acetz, which uses Python ZoneProcessor class. Pulling in ZoneProcessor also means that it pulls in the data structures defined by zonedb. """ from typing import Dict from typing import List f...
0
922
0
8,377
0
0
0
287
333