hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
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
125
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
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
โŒ€
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
โŒ€
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
โŒ€
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
843a7a0fcaaeddc92d334ae668dee6b9974e0a0d
92
py
Python
ASGama CTF/[RE] xor in reverse/solver.py
bemrdo/CTF-2019
424512f7c43278d72091aa737da78907c14f9fc1
[ "MIT" ]
null
null
null
ASGama CTF/[RE] xor in reverse/solver.py
bemrdo/CTF-2019
424512f7c43278d72091aa737da78907c14f9fc1
[ "MIT" ]
null
null
null
ASGama CTF/[RE] xor in reverse/solver.py
bemrdo/CTF-2019
424512f7c43278d72091aa737da78907c14f9fc1
[ "MIT" ]
1
2020-03-14T07:24:12.000Z
2020-03-14T07:24:12.000Z
s = "a)))KkFmQ*wFz)TixK*||" flag = '' for i in s: flag += chr(ord(i) ^ 25) print flag
11.5
28
0.51087
s = "a)))KkFmQ*wFz)TixK*||" flag = '' for i in s: flag += chr(ord(i) ^ 25) print flag
0
0
0
9a4954bf539c0495ed9582a2a437a584b81eafba
1,537
py
Python
ELDAmwl/tests/test_factory.py
actris-scc/ELDAmwl
c4d8426e6609a00837779a80d4acd39c580a0178
[ "MIT" ]
1
2021-12-06T09:48:07.000Z
2021-12-06T09:48:07.000Z
ELDAmwl/tests/test_factory.py
actris-scc/ELDAmwl
c4d8426e6609a00837779a80d4acd39c580a0178
[ "MIT" ]
null
null
null
ELDAmwl/tests/test_factory.py
actris-scc/ELDAmwl
c4d8426e6609a00837779a80d4acd39c580a0178
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Tests for Signals""" from ELDAmwl.bases.factory import BaseOperation from ELDAmwl.bases.factory import BaseOperationFactory from ELDAmwl.component.registry import Registry from unittest.mock import patch import unittest DB_DATA = [ ('TestA', OperationA), ('TestB', OperationB), ]...
26.964912
109
0.7365
# -*- coding: utf-8 -*- """Tests for Signals""" from ELDAmwl.bases.factory import BaseOperation from ELDAmwl.bases.factory import BaseOperationFactory from ELDAmwl.component.registry import Registry from unittest.mock import patch import unittest class Factory(BaseOperationFactory): pass class OperationA(BaseO...
940
159
115
bb519dce1d09797f72dd8f2de1841806604a851b
3,797
py
Python
pygtkweb/demos/012-label.py
allbuttonspressed/pyjs
c726fdead530eb63ee4763ae15daaa58d84cd58f
[ "ECL-2.0", "Apache-2.0" ]
1
2018-09-19T09:14:16.000Z
2018-09-19T09:14:16.000Z
pygtkweb/demos/012-label.py
andreyvit/pyjamas
1154abe3340a84dba7530b8174aaddecfc1a0944
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
pygtkweb/demos/012-label.py
andreyvit/pyjamas
1154abe3340a84dba7530b8174aaddecfc1a0944
[ "ECL-2.0", "Apache-2.0" ]
1
2019-08-13T20:32:25.000Z
2019-08-13T20:32:25.000Z
#!/usr/bin/env python # example label.py import pygtk pygtk.require('2.0') import gtk if __name__ == "__main__": Labels() main()
39.552083
82
0.520411
#!/usr/bin/env python # example label.py import pygtk pygtk.require('2.0') import gtk class Labels: def __init__(self): self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.connect("destroy", lambda w: gtk.main_quit()) self.window.set_title("Label") vbox = gtk.VBox(False, 5)...
3,593
-8
72
8f3cea5c3a663cdfa9d722dafbf2c0cf1621974b
188
py
Python
3day/for10.py
jsjang93/joony
62f7a325094c887212b894932263bf84500e0f03
[ "MIT" ]
null
null
null
3day/for10.py
jsjang93/joony
62f7a325094c887212b894932263bf84500e0f03
[ "MIT" ]
null
null
null
3day/for10.py
jsjang93/joony
62f7a325094c887212b894932263bf84500e0f03
[ "MIT" ]
null
null
null
# for10.py # [์ž…๋ ฅ๋ณ€์ˆ˜ for ์ถ”์ถœ๋ณ€์ˆ˜ in ๋Œ€์ƒ if ์กฐ๊ฑด ] # a ์— 1 ~ 10 ๊นŒ์ง€ ์ˆซ์ž a = [ i for i in range(1,11) ] print(a) # b ์— 1 ~ 10 ๊นŒ์ง€ ์ˆซ์ž b = [ i+1 for i in range(10) ] print(b) print(id(a) == id(b))
13.428571
31
0.526596
# for10.py # [์ž…๋ ฅ๋ณ€์ˆ˜ for ์ถ”์ถœ๋ณ€์ˆ˜ in ๋Œ€์ƒ if ์กฐ๊ฑด ] # a ์— 1 ~ 10 ๊นŒ์ง€ ์ˆซ์ž a = [ i for i in range(1,11) ] print(a) # b ์— 1 ~ 10 ๊นŒ์ง€ ์ˆซ์ž b = [ i+1 for i in range(10) ] print(b) print(id(a) == id(b))
0
0
0
1534a129dbfddf083511bb0726870718c439eedb
1,417
py
Python
plot.py
yy-zhou/SVM-Spam-SMS-classifier
e6ac70be8fa54f7e7ab4fead06489d4d70985dd3
[ "MIT" ]
1
2019-02-21T15:42:03.000Z
2019-02-21T15:42:03.000Z
plot.py
yy-zhou/SVM-Spam-SMS-classifier
e6ac70be8fa54f7e7ab4fead06489d4d70985dd3
[ "MIT" ]
null
null
null
plot.py
yy-zhou/SVM-Spam-SMS-classifier
e6ac70be8fa54f7e7ab4fead06489d4d70985dd3
[ "MIT" ]
null
null
null
__author__ = 'BorisMirage' # --- coding:utf-8 --- ''' Create by BorisMirage File Name: plot Create Time: 2018-12-02 14:45 ''' from time import time import numpy as np import matplotlib.pyplot as plt from sklearn.manifold import TSNE if __name__ == '__main__': pass
25.763636
75
0.542696
__author__ = 'BorisMirage' # --- coding:utf-8 --- ''' Create by BorisMirage File Name: plot Create Time: 2018-12-02 14:45 ''' from time import time import numpy as np import matplotlib.pyplot as plt from sklearn.manifold import TSNE def svm_plot(x, y): def get_data(x, y): # clf = svm.SVC(kernel='linear...
1,119
0
23
0ebace1dbbd279ebfafd87a38a3b7827f59351b3
283
py
Python
build_bridge.py
AaronC81/delta-pico
08a3dae3c8dbae3db45b8434351b4ac0abc5f1da
[ "MIT" ]
2
2021-12-22T23:37:30.000Z
2022-03-10T01:22:00.000Z
build_bridge.py
AaronC81/delta-pico
08a3dae3c8dbae3db45b8434351b4ac0abc5f1da
[ "MIT" ]
null
null
null
build_bridge.py
AaronC81/delta-pico
08a3dae3c8dbae3db45b8434351b4ac0abc5f1da
[ "MIT" ]
null
null
null
import subprocess, os print("Building Rust component...") # "cargo build" the bridge project root_dir = os.path.dirname(os.path.realpath(__file__)) bridge_dir = os.path.join(root_dir, "rust") subprocess.check_output(["cargo", "build", "--release"], cwd=bridge_dir) print("Done!")
25.727273
72
0.727915
import subprocess, os print("Building Rust component...") # "cargo build" the bridge project root_dir = os.path.dirname(os.path.realpath(__file__)) bridge_dir = os.path.join(root_dir, "rust") subprocess.check_output(["cargo", "build", "--release"], cwd=bridge_dir) print("Done!")
0
0
0
6f6bfd6faba641ab09d6d1307be60d49c893fb56
338
py
Python
stereo/preprocess/__init__.py
leying95/stereopy
1580a88a091a2ebc0f177ea73409e2c4b4dd4c7e
[ "MIT" ]
null
null
null
stereo/preprocess/__init__.py
leying95/stereopy
1580a88a091a2ebc0f177ea73409e2c4b4dd4c7e
[ "MIT" ]
null
null
null
stereo/preprocess/__init__.py
leying95/stereopy
1580a88a091a2ebc0f177ea73409e2c4b4dd4c7e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 """ @author: Ping Qiu qiuping1@genomics.cn @last modified by: Ping Qiu @file:__init__.py.py @time:2021/03/05 """ from .filter import filter_cells, filter_genes, filter_coordinates from .normalize import Normalizer, normalize_total, normalize_zscore_disksmooth, quantile_norm from ...
28.166667
94
0.786982
#!/usr/bin/env python3 # coding: utf-8 """ @author: Ping Qiu qiuping1@genomics.cn @last modified by: Ping Qiu @file:__init__.py.py @time:2021/03/05 """ from .filter import filter_cells, filter_genes, filter_coordinates from .normalize import Normalizer, normalize_total, normalize_zscore_disksmooth, quantile_norm from ...
0
0
0
ae639af7b2deedc5fc4c667db8000d51c3ec0348
12,355
py
Python
tests/ut/python/dataset/test_datasets_usps.py
httpsgithu/mindspore
c29d6bb764e233b427319cb89ba79e420f1e2c64
[ "Apache-2.0" ]
1
2022-03-30T03:43:29.000Z
2022-03-30T03:43:29.000Z
tests/ut/python/dataset/test_datasets_usps.py
949144093/mindspore
c29d6bb764e233b427319cb89ba79e420f1e2c64
[ "Apache-2.0" ]
null
null
null
tests/ut/python/dataset/test_datasets_usps.py
949144093/mindspore
c29d6bb764e233b427319cb89ba79e420f1e2c64
[ "Apache-2.0" ]
null
null
null
# Copyright 2021-2022 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
39.983819
117
0.630676
# Copyright 2021-2022 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
398
0
29
ec4aea568eff55f9b12d7d6ccea094cfc76818c4
919
py
Python
apps/plot.py
JongGuk/Raman_Mapping
e4b0fb44b8077a2a9c7965132794757a0079965e
[ "MIT" ]
null
null
null
apps/plot.py
JongGuk/Raman_Mapping
e4b0fb44b8077a2a9c7965132794757a0079965e
[ "MIT" ]
null
null
null
apps/plot.py
JongGuk/Raman_Mapping
e4b0fb44b8077a2a9c7965132794757a0079965e
[ "MIT" ]
null
null
null
import tkinter as tk from pandas import DataFrame import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg data = {'Raman Shift': [-464, -460, -455, -450, -445], 'Intensity1': [745, 752, 746, 740, 750], 'Intensity2': [734, 745, 768, 763, 755] } # ๋ฐ์ดํ„ฐ ์งค๋ผ์˜จ๊ฒƒ ๋ฐ›์•„์˜ค๊ธฐ ...
34.037037
89
0.687704
import tkinter as tk from pandas import DataFrame import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg data = {'Raman Shift': [-464, -460, -455, -450, -445], 'Intensity1': [745, 752, 746, 740, 750], 'Intensity2': [734, 745, 768, 763, 755] } # ๋ฐ์ดํ„ฐ ์งค๋ผ์˜จ๊ฒƒ ๋ฐ›์•„์˜ค๊ธฐ ...
0
0
0
59035eabd3ac8998d45ef40fc66c22001078419d
5,075
py
Python
openpose-app/MotionMeasure/OpenposeLogParser.py
B-C-WANG/AI-Apps
305d1960ec2b84081228543bf819deff694fddd2
[ "MIT" ]
7
2018-11-10T09:15:29.000Z
2021-06-05T01:54:45.000Z
openpose-app/MotionMeasure/OpenposeLogParser.py
B-C-WANG/AI-Apps
305d1960ec2b84081228543bf819deff694fddd2
[ "MIT" ]
null
null
null
openpose-app/MotionMeasure/OpenposeLogParser.py
B-C-WANG/AI-Apps
305d1960ec2b84081228543bf819deff694fddd2
[ "MIT" ]
4
2019-06-22T03:26:46.000Z
2020-05-17T11:40:22.000Z
# encoding: utf-8 import json import numpy as np import matplotlib.pyplot as plt import os import queue import _thread import traceback point_name = [ "Nose", "Neck", "RShoulder", "RElbow", "RWrist", "LShoulder", "LElbow", "LWrist", "MidHip", "RHip", "RKnee", "RAnkle", "LHip", "LKnee", "LAnkle", "...
25.248756
129
0.521576
# encoding: utf-8 import json import numpy as np import matplotlib.pyplot as plt import os import queue import _thread import traceback point_name = [ "Nose", "Neck", "RShoulder", "RElbow", "RWrist", "LShoulder", "LElbow", "LWrist", "MidHip", "RHip", "RKnee", "RAnkle", "LHip", "LKnee", "LAnkle", "...
1,901
2,527
23
0449817e405dd949fcb83eafc1beb5ae393f23f2
47,889
py
Python
experimental/eidelyur/variabledNLsimulation_v2.py
radiasoft/rsnibo
c2040f2ec21bbc2701a5968c6f2d3e3e0d31f81d
[ "Apache-2.0" ]
null
null
null
experimental/eidelyur/variabledNLsimulation_v2.py
radiasoft/rsnibo
c2040f2ec21bbc2701a5968c6f2d3e3e0d31f81d
[ "Apache-2.0" ]
null
null
null
experimental/eidelyur/variabledNLsimulation_v2.py
radiasoft/rsnibo
c2040f2ec21bbc2701a5968c6f2d3e3e0d31f81d
[ "Apache-2.0" ]
1
2019-04-26T22:58:22.000Z
2019-04-26T22:58:22.000Z
# # This script develops the script 'variabledNLsimulation_v1.py' (Yury Eidelman) # # Started at June 28, 2019 # # The three laws to change the strengths 't' of all nonlinear lens are implemented. # From initial value t_i to final value t_f during N stepsthese laws are follows. # 1) Linear: for step number n # ...
44.756075
145
0.628098
# # This script develops the script 'variabledNLsimulation_v1.py' (Yury Eidelman) # # Started at June 28, 2019 # # The three laws to change the strengths 't' of all nonlinear lens are implemented. # From initial value t_i to final value t_f during N stepsthese laws are follows. # 1) Linear: for step number n # ...
40,746
1,792
339
2e52a259e89d5bda865dcd429e1f812444177e48
311
py
Python
tools/ExperimentServerTester/src/script.py
zstars/weblabdeusto
09bd9d93d483671bca67ee5c70a9c412eb5d352f
[ "BSD-2-Clause" ]
15
2015-03-12T12:15:41.000Z
2021-12-20T17:53:24.000Z
tools/ExperimentServerTester/src/script.py
zstars/weblabdeusto
09bd9d93d483671bca67ee5c70a9c412eb5d352f
[ "BSD-2-Clause" ]
44
2015-01-07T09:22:05.000Z
2017-01-31T22:44:21.000Z
tools/ExperimentServerTester/src/script.py
zstars/weblabdeusto
09bd9d93d483671bca67ee5c70a9c412eb5d352f
[ "BSD-2-Clause" ]
22
2015-01-13T13:55:48.000Z
2021-12-16T17:07:00.000Z
import time connect("127.0.0.1", "10039", "weblab") #test_me("hello") start_experiment() send_file("script.py", "A script file") response = send_command("Test Command") print "The response is: %s" % response msg_box("Test Message", "test") time.sleep(2) dispose() disconnect()
13.521739
40
0.633441
import time connect("127.0.0.1", "10039", "weblab") #test_me("hello") start_experiment() send_file("script.py", "A script file") response = send_command("Test Command") print "The response is: %s" % response msg_box("Test Message", "test") time.sleep(2) dispose() disconnect()
0
0
0
48cabd08bfb5c7aca6c826bcc5b96062a846eb14
3,887
py
Python
source/vsm-dashboard/vsm_dashboard/dashboards/vsm/poolsmanagement/form.py
ramkrsna/virtual-storage-manager
78125bfb4dd4d78ff96bc3274c8919003769c545
[ "Apache-2.0" ]
172
2015-01-07T08:40:17.000Z
2019-02-18T07:01:11.000Z
source/vsm-dashboard/vsm_dashboard/dashboards/vsm/poolsmanagement/form.py
ramkrsna/virtual-storage-manager
78125bfb4dd4d78ff96bc3274c8919003769c545
[ "Apache-2.0" ]
83
2015-03-06T07:47:03.000Z
2018-07-05T15:10:19.000Z
source/vsm-dashboard/vsm_dashboard/dashboards/vsm/poolsmanagement/form.py
ramkrsna/virtual-storage-manager
78125bfb4dd4d78ff96bc3274c8919003769c545
[ "Apache-2.0" ]
125
2015-01-05T12:22:15.000Z
2019-02-18T07:01:39.000Z
# Copyright 2014 Intel 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 # Unless required by applicable law or ...
40.915789
137
0.654747
# Copyright 2014 Intel 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 # Unless required by applicable law or ...
1,477
1,279
46
f1c1a2b775dd8f42670af033d3b68469cf42d8f7
4,515
py
Python
icaldump/crawler.py
adrien-f/ical-dumper
0dc597c77017c59041ae78d3c69854e40019a863
[ "MIT" ]
null
null
null
icaldump/crawler.py
adrien-f/ical-dumper
0dc597c77017c59041ae78d3c69854e40019a863
[ "MIT" ]
null
null
null
icaldump/crawler.py
adrien-f/ical-dumper
0dc597c77017c59041ae78d3c69854e40019a863
[ "MIT" ]
null
null
null
import arrow import requests from arrow import Arrow from bs4 import BeautifulSoup from collections import defaultdict from icalendar import Calendar, Event, vText, vCalAddress from hashlib import md5 import json
48.031915
222
0.578295
import arrow import requests from arrow import Arrow from bs4 import BeautifulSoup from collections import defaultdict from icalendar import Calendar, Event, vText, vCalAddress from hashlib import md5 import json class Crawler(object): def __init__(self, username, password, root_path): self.username = use...
4,108
1
185
47a36abef43918b317e5caf6a9faf6952120ecad
178
py
Python
recipe/run_test.py
AnacondaRecipes/pyproj-feedstock
5000f3a702d692f508b8994ae84a7e8f7d55fe57
[ "BSD-3-Clause" ]
4
2019-04-15T22:42:28.000Z
2021-11-09T11:29:36.000Z
recipe/run_test.py
AnacondaRecipes/pyproj-feedstock
5000f3a702d692f508b8994ae84a7e8f7d55fe57
[ "BSD-3-Clause" ]
116
2016-03-05T08:22:09.000Z
2022-03-28T21:28:40.000Z
recipe/run_test.py
AnacondaRecipes/pyproj-feedstock
5000f3a702d692f508b8994ae84a7e8f7d55fe57
[ "BSD-3-Clause" ]
15
2016-03-03T06:34:09.000Z
2022-03-18T13:19:21.000Z
import os import sys import pyproj from pyproj import Proj Proj(init="epsg:4269") # Test pyproj_datadir. if not os.path.isdir(pyproj.datadir.get_data_dir()): sys.exit(1)
13.692308
52
0.741573
import os import sys import pyproj from pyproj import Proj Proj(init="epsg:4269") # Test pyproj_datadir. if not os.path.isdir(pyproj.datadir.get_data_dir()): sys.exit(1)
0
0
0
66127ade5069a08d2d95e3b0c7cbd430fd9d7d41
2,462
py
Python
xontrib_term_integrations/kitty_completions.py
jnoortheen/xontrib-term-integrations
3c0f29835fb79a521a5d603d862387dcda93c959
[ "MIT" ]
4
2022-01-14T08:03:13.000Z
2022-03-27T15:26:07.000Z
xontrib_term_integrations/kitty_completions.py
jnoortheen/xontrib-iterm2
3c0f29835fb79a521a5d603d862387dcda93c959
[ "MIT" ]
4
2022-01-08T08:01:03.000Z
2022-03-07T18:53:26.000Z
xontrib_term_integrations/kitty_completions.py
jnoortheen/xontrib-term-integrations
3c0f29835fb79a521a5d603d862387dcda93c959
[ "MIT" ]
null
null
null
"""Completers for pip.""" import contextlib import os import subprocess from xonsh.built_ins import XSH from xonsh.completers.tools import RichCompletion, contextual_command_completer from xonsh.parsers.completion_context import CommandContext def generate_completions_from_string(output: str): """Rich completio...
28.298851
86
0.655971
"""Completers for pip.""" import contextlib import os import subprocess from xonsh.built_ins import XSH from xonsh.completers.tools import RichCompletion, contextual_command_completer from xonsh.parsers.completion_context import CommandContext def create_rich_completion(line: str, append_space=False): line = lin...
1,022
0
69
4b0e96bdf51100d375dbba004ff29b2e3d770875
9,381
py
Python
enhterm/provider/parser/argparser/__init__.py
pyl1b/enhterm
b4eacc25ef1bdfecab9a662b5269d016070d4e6b
[ "MIT" ]
null
null
null
enhterm/provider/parser/argparser/__init__.py
pyl1b/enhterm
b4eacc25ef1bdfecab9a662b5269d016070d4e6b
[ "MIT" ]
null
null
null
enhterm/provider/parser/argparser/__init__.py
pyl1b/enhterm
b4eacc25ef1bdfecab9a662b5269d016070d4e6b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Contains the definition of the ArgParser class. """ import logging from argparse import ArgumentParser, ArgumentError, Namespace import shlex from enhterm.command import Command from enhterm.command.error import ErrorCommand from enhterm.command.noop import NoOpCommand from enhterm.command....
31.908163
92
0.606865
# -*- coding: utf-8 -*- """ Contains the definition of the ArgParser class. """ import logging from argparse import ArgumentParser, ArgumentError, Namespace import shlex from enhterm.command import Command from enhterm.command.error import ErrorCommand from enhterm.command.noop import NoOpCommand from enhterm.command....
667
0
165
3c90085df15908d2e744ebdb67e564f8b9b0393f
7,665
py
Python
farabio/models/segmentation/linknet.py
tuttelikz/farabi
5b65cdf39ceecbd69ae759d030b132ee74661b48
[ "Apache-2.0" ]
53
2021-04-06T17:57:12.000Z
2022-03-07T17:45:45.000Z
farabio/models/segmentation/linknet.py
tuttelikz/farabi
5b65cdf39ceecbd69ae759d030b132ee74661b48
[ "Apache-2.0" ]
1
2022-03-07T19:48:44.000Z
2022-03-07T19:49:47.000Z
farabio/models/segmentation/linknet.py
tuttelikz/farabi
5b65cdf39ceecbd69ae759d030b132ee74661b48
[ "Apache-2.0" ]
2
2021-12-06T14:42:44.000Z
2021-12-07T11:33:14.000Z
"""LinkNet Paper: https://arxiv.org/pdf/1707.03718 Adapted from: https://github.com/qubvel/segmentation_models.pytorch/blob/master/segmentation_models_pytorch/linknet/model.py Copyright 2021 | farabio """ from typing import List, Optional, Union, Any import torch import torch.nn as nn import torch.nn.functional as F ...
33.915929
124
0.663405
"""LinkNet Paper: https://arxiv.org/pdf/1707.03718 Adapted from: https://github.com/qubvel/segmentation_models.pytorch/blob/master/segmentation_models_pytorch/linknet/model.py Copyright 2021 | farabio """ from typing import List, Optional, Union, Any import torch import torch.nn as nn import torch.nn.functional as F ...
6,071
35
630
ab8cb05d5c02d84b5dee7c2f53886dd4b6bffb7a
971
py
Python
students/k3342/laboratory_works/Frolov_Alex/laboratory_work_2/lab2_app/migrations/0002_auto_20200613_2256.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
10
2020-03-20T09:06:12.000Z
2021-07-27T13:06:02.000Z
students/k3342/laboratory_works/Frolov_Alex/laboratory_work_2/lab2_app/migrations/0002_auto_20200613_2256.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
134
2020-03-23T09:47:48.000Z
2022-03-12T01:05:19.000Z
students/k3342/laboratory_works/Frolov_Alex/laboratory_work_2/lab2_app/migrations/0002_auto_20200613_2256.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
71
2020-03-20T12:45:56.000Z
2021-10-31T19:22:25.000Z
# Generated by Django 3.0.5 on 2020-06-13 19:56 from django.db import migrations, models
40.458333
376
0.527291
# Generated by Django 3.0.5 on 2020-06-13 19:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lab2_app', '0001_initial'), ] operations = [ migrations.AlterField( model_name='nclass', name='letter'...
0
868
25
98e6d816ecc49f008ca2ce95cf7c99f5e3356e23
94
py
Python
trading_bot/tools/setting_parameters.py
ArthurBernard/Strategy_Manager
a6c80fe1a51a300e8a612fb69e0e17d0ae06f455
[ "MIT" ]
6
2020-02-24T02:19:30.000Z
2021-12-19T03:03:11.000Z
trading_bot/tools/setting_parameters.py
ArthurBernard/Strategy_Manager
a6c80fe1a51a300e8a612fb69e0e17d0ae06f455
[ "MIT" ]
1
2020-06-17T03:29:14.000Z
2020-06-17T04:45:34.000Z
trading_bot/tools/setting_parameters.py
ArthurBernard/Trading_Bot
a6c80fe1a51a300e8a612fb69e0e17d0ae06f455
[ "MIT" ]
1
2019-01-02T16:00:07.000Z
2019-01-02T16:00:07.000Z
#!/usr/bin/env python3 # coding: utf-8 # Import built-in packages # Import external packages
15.666667
26
0.734043
#!/usr/bin/env python3 # coding: utf-8 # Import built-in packages # Import external packages
0
0
0
facf09de719c86989c7c7380adeb080e99663302
1,685
py
Python
chwall/fetcher/local.py
milouse/chwall
963045658abd41c94e29850e9f416c8970e06c32
[ "WTFPL" ]
4
2019-11-02T12:22:48.000Z
2022-01-07T11:40:40.000Z
chwall/fetcher/local.py
milouse/chwall
963045658abd41c94e29850e9f416c8970e06c32
[ "WTFPL" ]
1
2022-03-29T18:44:47.000Z
2022-03-30T07:04:54.000Z
chwall/fetcher/local.py
milouse/chwall
963045658abd41c94e29850e9f416c8970e06c32
[ "WTFPL" ]
null
null
null
import os import glob from chwall.utils import get_logger import gettext # Uncomment the following line during development. # Please, be cautious to NOT commit the following line uncommented. # gettext.bindtextdomain("chwall", "./locale") gettext.textdomain("chwall") _ = gettext.gettext logger = get_logger(__name__)...
27.622951
67
0.511573
import os import glob from chwall.utils import get_logger import gettext # Uncomment the following line during development. # Please, be cautious to NOT commit the following line uncommented. # gettext.bindtextdomain("chwall", "./locale") gettext.textdomain("chwall") _ = gettext.gettext logger = get_logger(__name__)...
1,316
0
46
170f178a212883d5eb070081e64ebf6154b68374
7,190
py
Python
python/server.py
air01a/esp32_rekognition
1e91a7ae8898e765c27153d4aedf4eef82a8e275
[ "MIT" ]
null
null
null
python/server.py
air01a/esp32_rekognition
1e91a7ae8898e765c27153d4aedf4eef82a8e275
[ "MIT" ]
null
null
null
python/server.py
air01a/esp32_rekognition
1e91a7ae8898e765c27153d4aedf4eef82a8e275
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 TOKEN = "" TIMER = 30 __all__ = ["SimpleHTTPRequestHandler"] import os import posixpath import http.server import urllib.request, urllib.parse, urllib.error import cgi import shutil import mimetypes import re from io import BytesIO import time from AWSRekognition import AWSRekognition imp...
27.760618
91
0.668846
#!/usr/bin/env python3 TOKEN = "" TIMER = 30 __all__ = ["SimpleHTTPRequestHandler"] import os import posixpath import http.server import urllib.request, urllib.parse, urllib.error import cgi import shutil import mimetypes import re from io import BytesIO import time from AWSRekognition import AWSRekognition imp...
5,885
872
47
1622590d2431eaa2a1f8c59dc73a7726022c9d22
800
py
Python
tests/data/generator/test_sea_generator.py
trajkova-elena/scikit-multiflow
dd372c677a97346a9c60cd25b45b350e0fd83d3c
[ "BSD-3-Clause" ]
1
2020-10-14T10:36:28.000Z
2020-10-14T10:36:28.000Z
tests/data/generator/test_sea_generator.py
trajkova-elena/scikit-multiflow
dd372c677a97346a9c60cd25b45b350e0fd83d3c
[ "BSD-3-Clause" ]
null
null
null
tests/data/generator/test_sea_generator.py
trajkova-elena/scikit-multiflow
dd372c677a97346a9c60cd25b45b350e0fd83d3c
[ "BSD-3-Clause" ]
3
2020-10-02T08:36:52.000Z
2020-10-21T10:50:20.000Z
import os import numpy as np from skmultiflow.data.generator.sea_generator import SEAGenerator
36.363636
125
0.72875
import os import numpy as np from skmultiflow.data.generator.sea_generator import SEAGenerator def test_sea_generator(test_path): stream = SEAGenerator(classification_function=2, random_state=112, balance_classes=False, noise_percentage=0.28) # Load test data corresponding to first 10 instances test_file...
681
0
23
68597cccb9af19fe7498a4081ce24a2e1772b686
300
py
Python
web/visualizer.py
jagsgill/410project
f3e28f796ff89aa43c48cd8e18ad0ad412335263
[ "MIT" ]
null
null
null
web/visualizer.py
jagsgill/410project
f3e28f796ff89aa43c48cd8e18ad0ad412335263
[ "MIT" ]
null
null
null
web/visualizer.py
jagsgill/410project
f3e28f796ff89aa43c48cd8e18ad0ad412335263
[ "MIT" ]
null
null
null
import json import flask import os app = flask.Flask(__name__) @app.route("/") if __name__ == "__main__": begin()
15
53
0.673333
import json import flask import os app = flask.Flask(__name__) @app.route("/") def index(): return flask.render_template("index.html") def begin(): port = 8080 os.system("open http://localhost:{0}/".format(port)) app.debug = True app.run(port=port) if __name__ == "__main__": begin()
134
0
45
9fef173258aa5bfe192c3ee01893f01998735937
597
py
Python
src/__init__.py
scott-currie/stock_portfolio
568d581ed277d1999563f4da427cc6b4fa5d387b
[ "MIT" ]
null
null
null
src/__init__.py
scott-currie/stock_portfolio
568d581ed277d1999563f4da427cc6b4fa5d387b
[ "MIT" ]
6
2020-03-24T16:39:37.000Z
2021-09-08T01:06:58.000Z
src/__init__.py
scott-currie/stock_portfolio
568d581ed277d1999563f4da427cc6b4fa5d387b
[ "MIT" ]
null
null
null
from flask import Flask import os basedir = os.path.abspath(os.path.dirname(__file__)) # `flask run` - runs application on local server app = Flask(__name__, static_url_path='', static_folder='static', instance_relative_config=True) DATABASE_URL = os.environ.get('DATABASE_URL') if os.environ.get('TEST...
24.875
65
0.743719
from flask import Flask import os basedir = os.path.abspath(os.path.dirname(__file__)) # `flask run` - runs application on local server app = Flask(__name__, static_url_path='', static_folder='static', instance_relative_config=True) DATABASE_URL = os.environ.get('DATABASE_URL') if os.environ.get('TEST...
0
0
0
6189469b12c3351f8e07df13c8b4ead29dc48169
1,376
py
Python
utils/jsdati.py
bynil/v2ex-crawler
c3ceefba9b330e1356259433e67633bf5d5da956
[ "MIT" ]
15
2017-10-09T13:15:27.000Z
2020-06-30T23:42:54.000Z
utils/jsdati.py
bynil/v2ex-crawler
c3ceefba9b330e1356259433e67633bf5d5da956
[ "MIT" ]
2
2019-10-21T15:03:29.000Z
2021-06-02T03:11:54.000Z
utils/jsdati.py
bynil/v2ex-crawler
c3ceefba9b330e1356259433e67633bf5d5da956
[ "MIT" ]
3
2017-10-17T02:52:26.000Z
2019-07-05T02:54:52.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: gexiao # Created on 2018-05-07 22:04 import logging import requests import base64 SERVER_HOST = 'https://v2-api.jsdama.com/upload' SOFTWARE_ID = 9487 SOFTWARE_SECRET = 'nb4GHmdsPxzbcB7iIrU36JPI73HOjUyUEnq3pkob'
31.272727
112
0.590843
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: gexiao # Created on 2018-05-07 22:04 import logging import requests import base64 SERVER_HOST = 'https://v2-api.jsdama.com/upload' SOFTWARE_ID = 9487 SOFTWARE_SECRET = 'nb4GHmdsPxzbcB7iIrU36JPI73HOjUyUEnq3pkob' class JsdatiApi(): def __init__(self, userna...
1,056
-3
77
21cd0b478e379ec3b6523625ca68a49624cc6e66
2,786
py
Python
rdchiral/utils.py
Furuidemu/retrosim
21f5449f617a93f2a64e927fcde224b298327727
[ "MIT" ]
65
2020-06-27T04:28:21.000Z
2022-03-30T11:18:22.000Z
template/rdchiral/utils.py
sw32-seo/GTA
86b102a14b78f6c8b50d742a56445c748e59b51e
[ "MIT" ]
15
2020-07-07T13:17:05.000Z
2022-03-22T12:52:29.000Z
template/rdchiral/utils.py
sw32-seo/GTA
86b102a14b78f6c8b50d742a56445c748e59b51e
[ "MIT" ]
14
2020-06-30T09:22:13.000Z
2022-03-30T11:18:28.000Z
from __future__ import print_function PLEVEL = 0 def parity4(data): ''' Thanks to http://www.dalkescientific.com/writings/diary/archive/2016/08/15/fragment_parity_calculation.html ''' if data[0] < data[1]: if data[2] < data[3]: if data[0] < data[2]: if data[1] < dat...
33.97561
111
0.298277
from __future__ import print_function PLEVEL = 0 def vprint(level, txt, *args): if PLEVEL >= level: print(txt.format(*args)) def parity4(data): ''' Thanks to http://www.dalkescientific.com/writings/diary/archive/2016/08/15/fragment_parity_calculation.html ''' if data[0] < data[1]: ...
66
0
22
c60aab25d55598eaca48d8eaa95733efdd745194
1,897
py
Python
Third course/5th semester/Analysis of algorithms course/Lab3 - Sorting/main1.py
tekcellat/University
9a0196a45c9cf33ac58018d636c3e4857eba0330
[ "MIT" ]
null
null
null
Third course/5th semester/Analysis of algorithms course/Lab3 - Sorting/main1.py
tekcellat/University
9a0196a45c9cf33ac58018d636c3e4857eba0330
[ "MIT" ]
null
null
null
Third course/5th semester/Analysis of algorithms course/Lab3 - Sorting/main1.py
tekcellat/University
9a0196a45c9cf33ac58018d636c3e4857eba0330
[ "MIT" ]
7
2020-12-04T07:26:46.000Z
2022-03-08T17:47:47.000Z
from sort import * import time import random n1 = int(input("Size\nFrom: ")) n2 = int(input("To: ")) h = int(input("Step:")) if n1 > n2 or n2 == n1 or h == 0: print("Wrong input") exit() else: result = measure_time(get_best_array, get_best_array, mysort_quick_middle, n1, n2 + 1, h, 100) ...
22.583333
103
0.530311
from sort import * import time import random def get_random_array(n): array = [] for i in range(n): array.append(random.randint(0, 20000)) return array def get_best_array(n): array = [] for i in range(n): array.append(i) return array def get_wor...
1,152
0
125
09f55b7870106786dba51122424f11feffb40feb
1,680
py
Python
flocker/common/_era.py
stackriot/flocker
eaa586248986d7cd681c99c948546c2b507e44de
[ "Apache-2.0" ]
2,690
2015-01-02T11:12:11.000Z
2022-03-15T15:41:51.000Z
flocker/common/_era.py
stackriot/flocker
eaa586248986d7cd681c99c948546c2b507e44de
[ "Apache-2.0" ]
2,102
2015-01-02T18:49:40.000Z
2021-01-21T18:49:47.000Z
flocker/common/_era.py
stackriot/flocker
eaa586248986d7cd681c99c948546c2b507e44de
[ "Apache-2.0" ]
333
2015-01-10T01:44:01.000Z
2022-03-08T15:03:04.000Z
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Era information for Flocker nodes. Every time a node reboots it gets a new, globally unique era. """ import sys from uuid import UUID from zope.interface import implementer from twisted.internet.defer import succeed from twisted.python.filepath import F...
24.347826
73
0.682738
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Era information for Flocker nodes. Every time a node reboots it gets a new, globally unique era. """ import sys from uuid import UUID from zope.interface import implementer from twisted.internet.defer import succeed from twisted.python.filepath import F...
214
0
26
82e9d12b07897f4af449eb7e6367c29c879bc2f3
1,801
py
Python
book/_build/jupyter_execute/pandas/Week 4-Introduction to Data Science[Coursera].py
hossainlab/dsnotes
fee64e157f45724bba1f49ad1b186dcaaf1e6c02
[ "CC0-1.0" ]
null
null
null
book/_build/jupyter_execute/pandas/Week 4-Introduction to Data Science[Coursera].py
hossainlab/dsnotes
fee64e157f45724bba1f49ad1b186dcaaf1e6c02
[ "CC0-1.0" ]
null
null
null
book/_build/jupyter_execute/pandas/Week 4-Introduction to Data Science[Coursera].py
hossainlab/dsnotes
fee64e157f45724bba1f49ad1b186dcaaf1e6c02
[ "CC0-1.0" ]
null
null
null
# Distributions in Pandas import pandas as pd import numpy as np np.random.binomial(1, 0.5) np.random.binomial(1000, 0.5)/1000 chance_of_tornado = 0.01/100 np.random.binomial(100000, chance_of_tornado) chance_of_tornado = 0.01 tornado_events = np.random.binomial(1, chance_of_tornado, 1000000) two_days_in_a_r...
22.797468
85
0.7407
# Distributions in Pandas import pandas as pd import numpy as np np.random.binomial(1, 0.5) np.random.binomial(1000, 0.5)/1000 chance_of_tornado = 0.01/100 np.random.binomial(100000, chance_of_tornado) chance_of_tornado = 0.01 tornado_events = np.random.binomial(1, chance_of_tornado, 1000000) two_days_in_a_r...
0
0
0
514f367de86a238caeba42c73f5c4c8ed5711914
207
py
Python
jarbas/settings_unit_tests.py
mazulo/serenata-de-amor
d5f6feb97f1bbd748fda6e99fe07a47c52db3fa6
[ "MIT" ]
null
null
null
jarbas/settings_unit_tests.py
mazulo/serenata-de-amor
d5f6feb97f1bbd748fda6e99fe07a47c52db3fa6
[ "MIT" ]
null
null
null
jarbas/settings_unit_tests.py
mazulo/serenata-de-amor
d5f6feb97f1bbd748fda6e99fe07a47c52db3fa6
[ "MIT" ]
null
null
null
from jarbas.settings import * MIGRATION_MODULES = DisableMigrations()
15.923077
39
0.700483
from jarbas.settings import * class DisableMigrations: def __contains__(self, item): return True def __getitem__(self, item): return None MIGRATION_MODULES = DisableMigrations()
55
3
76
129442cfda6260b8d0649c7091329a38a7fc5a11
5,173
py
Python
sdk/communication/azure-communication-identity/samples/identity_samples.py
abhahn/azure-sdk-for-python
09521dfb517e0859ec961cae006fb728d787b565
[ "MIT" ]
2
2019-08-23T21:14:00.000Z
2021-09-07T18:32:34.000Z
sdk/communication/azure-communication-identity/samples/identity_samples.py
rakshith91/azure-sdk-for-python
3c4f2575d31260fa1bda870b04e34c082ac5702b
[ "MIT" ]
null
null
null
sdk/communication/azure-communication-identity/samples/identity_samples.py
rakshith91/azure-sdk-for-python
3c4f2575d31260fa1bda870b04e34c082ac5702b
[ "MIT" ]
null
null
null
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
46.603604
107
0.7023
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
4,003
28
185
d0ae7e9e7b74ad5927d28b3655f5e9408cd4c60e
497
py
Python
receiver.py
rasathus/raspberrylogger
f2084b67b679523b6c0ec1f436a5fcad6f104aaa
[ "MIT" ]
null
null
null
receiver.py
rasathus/raspberrylogger
f2084b67b679523b6c0ec1f436a5fcad6f104aaa
[ "MIT" ]
null
null
null
receiver.py
rasathus/raspberrylogger
f2084b67b679523b6c0ec1f436a5fcad6f104aaa
[ "MIT" ]
null
null
null
''' Created on 1 Dec 2012 @author: Jeremy ''' import serial import sys import rt import time s = serial.Serial(sys.argv[1],115200,timeout=15) t = time.time() c = 0 RT = rt.RaceTech(s) RT.run(decode)
17.75
76
0.565392
''' Created on 1 Dec 2012 @author: Jeremy ''' import serial import sys import rt import time s = serial.Serial(sys.argv[1],115200,timeout=15) t = time.time() c = 0 def decode(header,length,msg,cs,variable_length): # print header,length,msg,cs global c,t c += 1 if c > 999: ...
252
0
25
e3ee2b35688dd42c5efe6d2b57469efb051f11a0
670
py
Python
project/urls.py
dmitrytk/takkand.pw
162fd5bb0e58c419977e06ce4633177918bd6f61
[ "MIT" ]
null
null
null
project/urls.py
dmitrytk/takkand.pw
162fd5bb0e58c419977e06ce4633177918bd6f61
[ "MIT" ]
10
2021-03-18T23:07:30.000Z
2022-03-12T00:13:17.000Z
project/urls.py
dmitrytk/takkand.pw
162fd5bb0e58c419977e06ce4633177918bd6f61
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static from pages import views urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('allauth.urls')), # allauth ...
39.411765
81
0.632836
from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static from pages import views urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('allauth.urls')), # allauth ...
0
0
0
5f78fda933058c7a4fb151a47534efae216f1181
2,805
py
Python
app/Http/Controllers/machinelearning.py
ChrisFodor333/early_warning
b506e6ddaa50912f3cc5b58ee73de8a463879716
[ "MIT" ]
null
null
null
app/Http/Controllers/machinelearning.py
ChrisFodor333/early_warning
b506e6ddaa50912f3cc5b58ee73de8a463879716
[ "MIT" ]
null
null
null
app/Http/Controllers/machinelearning.py
ChrisFodor333/early_warning
b506e6ddaa50912f3cc5b58ee73de8a463879716
[ "MIT" ]
null
null
null
#!/usr/bin/python import numpy as np import pandas as pd import sys df = pd.read_csv('https://raw.githubusercontent.com/ChrisFodor333/early_warning/main/assets/machine.csv',header = 0); df = df.dropna(); #df.head(20); from sklearn.model_selection import train_test_split data = df X = data[['altman', 'in05', 'quick...
31.166667
165
0.775045
#!/usr/bin/python import numpy as np import pandas as pd import sys df = pd.read_csv('https://raw.githubusercontent.com/ChrisFodor333/early_warning/main/assets/machine.csv',header = 0); df = df.dropna(); #df.head(20); from sklearn.model_selection import train_test_split data = df X = data[['altman', 'in05', 'quick...
133
0
23
ed370fff408ba9f8a4761235130117e6135851e7
215
py
Python
python/hello_world.py
alanverdugo/travis_github_pages
5a7aefc4ac09e27e9a4214469c64262e62458553
[ "Apache-2.0" ]
null
null
null
python/hello_world.py
alanverdugo/travis_github_pages
5a7aefc4ac09e27e9a4214469c64262e62458553
[ "Apache-2.0" ]
null
null
null
python/hello_world.py
alanverdugo/travis_github_pages
5a7aefc4ac09e27e9a4214469c64262e62458553
[ "Apache-2.0" ]
1
2020-01-30T16:49:12.000Z
2020-01-30T16:49:12.000Z
#!/usr/bin/python """Sample program.""" def hello_world(): """Print a message to stdout.""" print("Hello, world!") def return_true(): """You can rent this space for only $5 a week.""" return True
17.916667
53
0.609302
#!/usr/bin/python """Sample program.""" def hello_world(): """Print a message to stdout.""" print("Hello, world!") def return_true(): """You can rent this space for only $5 a week.""" return True
0
0
0
867226d0bb3ecd16b14fbd99c31bdc8838ca1406
1,616
py
Python
allaccess/tests/test_backends.py
BarracudaPff/code-golf-data-pythpn
42e8858c2ebc6a061012bcadb167d29cebb85c5e
[ "MIT" ]
null
null
null
allaccess/tests/test_backends.py
BarracudaPff/code-golf-data-pythpn
42e8858c2ebc6a061012bcadb167d29cebb85c5e
[ "MIT" ]
null
null
null
allaccess/tests/test_backends.py
BarracudaPff/code-golf-data-pythpn
42e8858c2ebc6a061012bcadb167d29cebb85c5e
[ "MIT" ]
null
null
null
from django.contrib.auth import authenticate from .base import AllAccessTestCase class AuthBackendTestCase(AllAccessTestCase): "Custom contrib.auth backend tests." def test_successful_authenticate(self): "User successfully authenticated." provider = self.access.provider identifier = self.access.identifier use...
44.888889
87
0.778465
from django.contrib.auth import authenticate from .base import AllAccessTestCase class AuthBackendTestCase(AllAccessTestCase): "Custom contrib.auth backend tests." def setUp(self): self.user = self.create_user() self.access = self.create_access(user=self.user) def test_successful_authenticate(self): "User succ...
79
0
23
e1ac703da42b95f543e965d75dca58d86d5ede31
717
py
Python
src/_stories/shortcuts.py
gtors/stories
0614624f472151f20617afa4e6c4a0af9b409b6d
[ "BSD-2-Clause" ]
null
null
null
src/_stories/shortcuts.py
gtors/stories
0614624f472151f20617afa4e6c4a0af9b409b6d
[ "BSD-2-Clause" ]
null
null
null
src/_stories/shortcuts.py
gtors/stories
0614624f472151f20617afa4e6c4a0af9b409b6d
[ "BSD-2-Clause" ]
null
null
null
from _stories.mounted import ClassMountedStory
23.9
52
0.60251
from _stories.mounted import ClassMountedStory def contract_in(cls, *args): def setter(contract): for attrname in dir(cls): attribute = getattr(cls, attrname) if type(attribute) is ClassMountedStory: attribute.contract(contract) return contract if args:...
622
0
46
6766ab8b4ecce2efa50640fdfa43566253393b40
466
py
Python
mundo_1/ex017.py
tseiiti/curso_em_video
59565ce809c1f025fb41ab69de3b8c5b53c8f7b2
[ "MIT" ]
null
null
null
mundo_1/ex017.py
tseiiti/curso_em_video
59565ce809c1f025fb41ab69de3b8c5b53c8f7b2
[ "MIT" ]
null
null
null
mundo_1/ex017.py
tseiiti/curso_em_video
59565ce809c1f025fb41ab69de3b8c5b53c8f7b2
[ "MIT" ]
null
null
null
from os import system, name system('cls' if name == 'nt' else 'clear') dsc = ('''DESAFIO 017: Faรงa um programa que leia o comprimento do cateto oposto e do cateto adjacente de um triรขngulo retรขngulo, calcule e mostre o comprimento da hipotenusa. ''') from math import hypot n1 = float(input('Cateto oposto: ')) n2 = f...
31.066667
84
0.684549
from os import system, name system('cls' if name == 'nt' else 'clear') dsc = ('''DESAFIO 017: Faรงa um programa que leia o comprimento do cateto oposto e do cateto adjacente de um triรขngulo retรขngulo, calcule e mostre o comprimento da hipotenusa. ''') from math import hypot n1 = float(input('Cateto oposto: ')) n2 = f...
0
0
0
3889096aea39db5a3ddcfe2ddce7a298cdf60775
696
py
Python
scripts/dmg_settings.py
magicien/JoyfulPlayer
a06e684bd37f387a977427a83f21b07f567f7f09
[ "MIT" ]
1
2020-07-04T18:38:54.000Z
2020-07-04T18:38:54.000Z
scripts/dmg_settings.py
magicien/JoyfulPlayer
a06e684bd37f387a977427a83f21b07f567f7f09
[ "MIT" ]
null
null
null
scripts/dmg_settings.py
magicien/JoyfulPlayer
a06e684bd37f387a977427a83f21b07f567f7f09
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import biplist import os.path app = defines.get('app', './dmg/JoyfulPlayer.app') appname = os.path.basename(app) # Basics format = defines.get('format', 'UDZO') size = defines.get('size', None) files = [ app ] icon_locations = { appname: (160, 160), } # Window co...
16.571429
50
0.712644
from __future__ import unicode_literals import biplist import os.path app = defines.get('app', './dmg/JoyfulPlayer.app') appname = os.path.basename(app) # Basics format = defines.get('format', 'UDZO') size = defines.get('size', None) files = [ app ] icon_locations = { appname: (160, 160), } # Window co...
0
0
0
d976a1a0f0149c3c740a9169eca118f522e6a8b3
916
py
Python
examples/gps/mf_lqr.py
JoeMWatson/trajopt
8b98718721e0c373cd7dc01a35f42447c1134713
[ "MIT" ]
1
2019-10-17T08:42:17.000Z
2019-10-17T08:42:17.000Z
examples/gps/mf_lqr.py
JoeMWatson/trajopt
8b98718721e0c373cd7dc01a35f42447c1134713
[ "MIT" ]
null
null
null
examples/gps/mf_lqr.py
JoeMWatson/trajopt
8b98718721e0c373cd7dc01a35f42447c1134713
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Filename: mf_lqr.py # @Date: 2019-06-16-18-38 # @Author: Hany Abdulsamad # @Contact: hany@robot-learning.de import gym from trajopt.gps import MFGPS # lqr task env = gym.make('LQR-TO-v0') env._max_episode_steps = 100 alg = MFGPS(env, nb_steps=100, kl_bo...
18.693878
66
0.649563
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Filename: mf_lqr.py # @Date: 2019-06-16-18-38 # @Author: Hany Abdulsamad # @Contact: hany@robot-learning.de import gym from trajopt.gps import MFGPS # lqr task env = gym.make('LQR-TO-v0') env._max_episode_steps = 100 alg = MFGPS(env, nb_steps=100, kl_bo...
0
0
0
ea039db56cbfde50039819cf3b9a23da17aaa55f
1,089
py
Python
L.I.S.A/client.py
malnou-org/malnou
7ebe565f5df6058bbb9b0991b4d20e2cb79cda65
[ "MIT" ]
8
2019-07-17T13:15:55.000Z
2021-11-08T09:34:04.000Z
L.I.S.A/client.py
PotatoSpudowski/malnou
7ebe565f5df6058bbb9b0991b4d20e2cb79cda65
[ "MIT" ]
null
null
null
L.I.S.A/client.py
PotatoSpudowski/malnou
7ebe565f5df6058bbb9b0991b4d20e2cb79cda65
[ "MIT" ]
1
2019-08-25T09:17:40.000Z
2019-08-25T09:17:40.000Z
import time import sys import uuid import argparse import ibmiotf.device import wiotp.sdk.device from configparser import ConfigParser
25.928571
107
0.662994
import time import sys import uuid import argparse import ibmiotf.device import wiotp.sdk.device from configparser import ConfigParser def commandProcessor(cmd): print("Command received: %s" % cmd.data) def myOnPublishCallback(): print("Confirmed event received by IoTF\n") def sendToCloud(data): authMe...
883
0
69
f5c3e4a7036aaa2b68eeebe3f97522092aaea427
2,062
py
Python
lonely-lemmings/earlyinternet/gifapp/urls.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
40
2020-08-02T07:38:22.000Z
2021-07-26T01:46:50.000Z
lonely-lemmings/earlyinternet/gifapp/urls.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
134
2020-07-31T12:15:45.000Z
2020-12-13T04:42:19.000Z
lonely-lemmings/earlyinternet/gifapp/urls.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
101
2020-07-31T12:00:47.000Z
2021-11-01T09:06:58.000Z
from django.urls import path from django.contrib.auth import views as auth_views from . import editorviews from . import userviews urlpatterns = [ # editor paths path("project", editorviews.render_all_projects, name="projects"), path("project/create", editorviews.parse_new_project_request, name="new"), ...
52.871795
115
0.739088
from django.urls import path from django.contrib.auth import views as auth_views from . import editorviews from . import userviews urlpatterns = [ # editor paths path("project", editorviews.render_all_projects, name="projects"), path("project/create", editorviews.parse_new_project_request, name="new"), ...
0
0
0
5e365b996113e0816d0acd5b8b5838506b5170ec
1,400
py
Python
src/mdscripts/mdpmaker/mdpmaker.py
awacha/mdscripts
831bda06557fa2d5f0899fc2f6552c9e49146cef
[ "BSD-3-Clause" ]
null
null
null
src/mdscripts/mdpmaker/mdpmaker.py
awacha/mdscripts
831bda06557fa2d5f0899fc2f6552c9e49146cef
[ "BSD-3-Clause" ]
null
null
null
src/mdscripts/mdpmaker/mdpmaker.py
awacha/mdscripts
831bda06557fa2d5f0899fc2f6552c9e49146cef
[ "BSD-3-Clause" ]
null
null
null
from PyQt5 import QtWidgets from .pages import IntroPage, EMPage, SimTypePage, IntegratorPage, \ NeighbourSearchPage, FreqControlPage, CoulombPage, \ VdWPage, EwaldPage, ThermostatPage, EndPage
34.146341
74
0.622857
from PyQt5 import QtWidgets from .pages import IntroPage, EMPage, SimTypePage, IntegratorPage, \ NeighbourSearchPage, FreqControlPage, CoulombPage, \ VdWPage, EwaldPage, ThermostatPage, EndPage class MDPWizard(QtWidgets.QWizard): def __init__(self, parent=None): super().__init__(parent) s...
1,025
14
157
f7728f245f6643550200ae56f152b0dcaf86976e
14,468
py
Python
sidpy/hdf/dtype_utils.py
ziatdinovmax/sidpy
299147bfc22741b5170aa00e92b34159dfc910c5
[ "MIT" ]
null
null
null
sidpy/hdf/dtype_utils.py
ziatdinovmax/sidpy
299147bfc22741b5170aa00e92b34159dfc910c5
[ "MIT" ]
null
null
null
sidpy/hdf/dtype_utils.py
ziatdinovmax/sidpy
299147bfc22741b5170aa00e92b34159dfc910c5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Utilities for transforming and validating data types Given that many of the data transformations involve copying the data, they should ideally happen in a lazy manner to avoid memory issues. Created on Tue Nov 3 21:14:25 2015 @author: Suhas Somnath, Chris Smith """ from __future__ impor...
35.99005
143
0.661736
# -*- coding: utf-8 -*- """ Utilities for transforming and validating data types Given that many of the data transformations involve copying the data, they should ideally happen in a lazy manner to avoid memory issues. Created on Tue Nov 3 21:14:25 2015 @author: Suhas Somnath, Chris Smith """ from __future__ impor...
0
0
0
e1ac5baef00b06d774dac67914421c5c10c7f2b8
4,347
py
Python
artellapipe/libs/usd/core/usdview.py
ArtellaPipe/artellapipe-libs-usd
20b89bceca730aa961cc10a98ee6b94e09908d80
[ "MIT" ]
1
2021-12-01T12:06:59.000Z
2021-12-01T12:06:59.000Z
artellapipe/libs/usd/core/usdview.py
ArtellaPipe/artellapipe-libs-usd
20b89bceca730aa961cc10a98ee6b94e09908d80
[ "MIT" ]
null
null
null
artellapipe/libs/usd/core/usdview.py
ArtellaPipe/artellapipe-libs-usd
20b89bceca730aa961cc10a98ee6b94e09908d80
[ "MIT" ]
1
2022-01-04T09:00:21.000Z
2022-01-04T09:00:21.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Module that contains functions related with Pixar USD usdview application """ from __future__ import print_function, division, absolute_import __author__ = "Tomas Poveda" __license__ = "MIT" __maintainer__ = "Tomas Poveda" __email__ = "tpovedatd@gmail.com" import o...
34.228346
117
0.700023
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Module that contains functions related with Pixar USD usdview application """ from __future__ import print_function, division, absolute_import __author__ = "Tomas Poveda" __license__ = "MIT" __maintainer__ = "Tomas Poveda" __email__ = "tpovedatd@gmail.com" import o...
411
0
46
3d6edba4947aa5c21d770035d86b0d082f1079c6
1,509
py
Python
data/transcoder_evaluation_gfg/python/LCS_FORMED_CONSECUTIVE_SEGMENTS_LEAST_LENGTH_K.py
mxl1n/CodeGen
e5101dd5c5e9c3720c70c80f78b18f13e118335a
[ "MIT" ]
241
2021-07-20T08:35:20.000Z
2022-03-31T02:39:08.000Z
data/transcoder_evaluation_gfg/python/LCS_FORMED_CONSECUTIVE_SEGMENTS_LEAST_LENGTH_K.py
mxl1n/CodeGen
e5101dd5c5e9c3720c70c80f78b18f13e118335a
[ "MIT" ]
49
2021-07-22T23:18:42.000Z
2022-03-24T09:15:26.000Z
data/transcoder_evaluation_gfg/python/LCS_FORMED_CONSECUTIVE_SEGMENTS_LEAST_LENGTH_K.py
mxl1n/CodeGen
e5101dd5c5e9c3720c70c80f78b18f13e118335a
[ "MIT" ]
71
2021-07-21T05:17:52.000Z
2022-03-29T23:49:28.000Z
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # #TOFILL if __name__ == '__main__': param = [ (4,'aggayxysdfa','aggajxaaasdfa',), (2,'55571659965107','39028665415...
35.928571
91
0.473161
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # def f_gold ( k , s1 , s2 ) : n = len ( s1 ) m = len ( s2 ) lcs = [ [ 0 for x in range ( m + 1 ) ] for y in range ( n...
675
0
22
af7b906d9f975113497674a1301d8a1da8b05a40
13,694
py
Python
TD3.py
NamKim88/PGPS
51617637cde9b46a6f9fe0ae8c418cb60b0cf15a
[ "MIT" ]
2
2020-10-06T12:11:25.000Z
2021-09-03T08:57:06.000Z
TD3.py
NamKim88/PGPS
51617637cde9b46a6f9fe0ae8c418cb60b0cf15a
[ "MIT" ]
null
null
null
TD3.py
NamKim88/PGPS
51617637cde9b46a6f9fe0ae8c418cb60b0cf15a
[ "MIT" ]
null
null
null
import numpy as np import os import copy import torch import torch.nn as nn from torch.optim import Adam import torch.nn.functional as FF os.environ['CUDA_VISIBLE_DEVICES'] = '1' USE_CUDA = torch.cuda.is_available() FloatTensor = torch.cuda.FloatTensor if USE_CUDA else torch.FloatTensor Device = torch.device("cuda" if...
39.578035
108
0.635607
import numpy as np import os import copy import torch import torch.nn as nn from torch.optim import Adam import torch.nn.functional as FF os.environ['CUDA_VISIBLE_DEVICES'] = '1' USE_CUDA = torch.cuda.is_available() FloatTensor = torch.cuda.FloatTensor if USE_CUDA else torch.FloatTensor Device = torch.device("cuda" if...
12,669
-7
682
13bdfd3b8751d680236d3414ac983cb03ec44f16
3,724
py
Python
QuickPotato/harness/results.py
JoeyHendricks/QuickPotato
5e33e64d77997b00a43f5573353138436b1f1a34
[ "MIT" ]
130
2020-11-19T00:19:53.000Z
2022-01-18T21:16:40.000Z
QuickPotato/harness/results.py
JoeyHendricks/QuickPotato
5e33e64d77997b00a43f5573353138436b1f1a34
[ "MIT" ]
16
2020-11-22T14:27:11.000Z
2022-01-19T17:38:57.000Z
QuickPotato/harness/results.py
JoeyHendricks/QuickPotato
5e33e64d77997b00a43f5573353138436b1f1a34
[ "MIT" ]
11
2020-12-02T08:36:46.000Z
2021-12-27T06:52:23.000Z
from QuickPotato.database.queries import Crud
28.868217
89
0.584855
from QuickPotato.database.queries import Crud class BoundariesTestEvidence(Crud): def __init__(self): super(BoundariesTestEvidence, self).__init__() self.test_id = None self.test_case_name = None self.database_name = None self.epoch_timestamp = None self.human_tim...
1,007
2,599
69
ebc77182ef16795e237af1a79e03276e443b251d
276
py
Python
chill/examples/chill/testcases/peel12.script.py
CompOpt4Apps/Artifact-DataDepSimplify
4fa1bf2bda2902fec50a54ee79ae405a554fc9f4
[ "MIT" ]
5
2019-05-20T03:35:41.000Z
2021-09-16T22:22:13.000Z
chill/examples/chill/testcases/peel12.script.py
CompOpt4Apps/Artifact-DataDepSimplify
4fa1bf2bda2902fec50a54ee79ae405a554fc9f4
[ "MIT" ]
null
null
null
chill/examples/chill/testcases/peel12.script.py
CompOpt4Apps/Artifact-DataDepSimplify
4fa1bf2bda2902fec50a54ee79ae405a554fc9f4
[ "MIT" ]
null
null
null
# # example from CHiLL manual page 13 # # peel 4 statements from the END of innermost loop # from chill import * source('peel9101112.c') destination('peel12modified.c') procedure('mm') loop(0) peel(1,2,-4) # statement 1, loop 2 (middle, for j), 4 statements from END
15.333333
74
0.699275
# # example from CHiLL manual page 13 # # peel 4 statements from the END of innermost loop # from chill import * source('peel9101112.c') destination('peel12modified.c') procedure('mm') loop(0) peel(1,2,-4) # statement 1, loop 2 (middle, for j), 4 statements from END
0
0
0
eb7a380c79b2a724dacaac572d80cf9e40cec552
5,408
py
Python
Main crawler/novel/spiders/crawler.py
phantom0174/Novel_Crawler
9a38ec46bb6d0963ba3d80ae99e7b4f9ff7c15a0
[ "MIT" ]
1
2022-03-19T13:20:00.000Z
2022-03-19T13:20:00.000Z
Main crawler/novel/spiders/crawler.py
phantom0174/Light-Novel-crawler
9a38ec46bb6d0963ba3d80ae99e7b4f9ff7c15a0
[ "MIT" ]
null
null
null
Main crawler/novel/spiders/crawler.py
phantom0174/Light-Novel-crawler
9a38ec46bb6d0963ba3d80ae99e7b4f9ff7c15a0
[ "MIT" ]
null
null
null
import scrapy from opencc import OpenCC import os all = [[]] del(all[0])
37.041096
225
0.514238
import scrapy from opencc import OpenCC import os all = [[]] del(all[0]) class ncrawler(scrapy.Spider): name = 'n' #Things of web links start_urls = [input('Input the url of the book :')] domain = str() domain_set = bool(0) #Crawler mode set parse_mode = int(1) next_chapter = int(0) ...
4,838
506
23
2a562ab23ac47bf79051fcbd2ddf912e304dc587
663
py
Python
examples/django_example/example/urls.py
hhru/python_social_auth
56945b8a031f276f4415a92a9ca4b7d61e951b12
[ "BSD-3-Clause" ]
1
2015-11-05T07:12:28.000Z
2015-11-05T07:12:28.000Z
examples/django_example/example/urls.py
JasonSanford/python-social-auth
2034a4390f785639c99fc05a0b747739e6d297fd
[ "BSD-3-Clause" ]
null
null
null
examples/django_example/example/urls.py
JasonSanford/python-social-auth
2034a4390f785639c99fc05a0b747739e6d297fd
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'example.app.views.home'), url(r'^admin/', include(admin.site.urls)), url(r'^signup-email/', 'example.app.views.signup_email'), url(r'^email-sent/', 'example...
36.833333
78
0.665158
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'example.app.views.home'), url(r'^admin/', include(admin.site.urls)), url(r'^signup-email/', 'example.app.views.signup_email'), url(r'^email-sent/', 'example...
0
0
0
1acfbcde022326d208f6aa498eaf13494d09b493
188
py
Python
test_examples/python_2.py
Tejas-P-Herle/Python_Language_Converter
f349659a7fcc980d31ddf58f38b35a4aae28561b
[ "MIT" ]
3
2018-05-09T14:06:55.000Z
2019-04-10T22:53:42.000Z
test_examples/python_2.py
Tejas-P-Herle/PLC
f349659a7fcc980d31ddf58f38b35a4aae28561b
[ "MIT" ]
null
null
null
test_examples/python_2.py
Tejas-P-Herle/PLC
f349659a7fcc980d31ddf58f38b35a4aae28561b
[ "MIT" ]
null
null
null
if __name__ == "__main__": main()
14.461538
26
0.478723
def main(): value = 1 if value == 0: print("False") elif value == 1: print("True") else: print("Undefined") if __name__ == "__main__": main()
126
0
22
b2974283a5479f9baea3ad417a3eb2cb36194a6b
1,308
py
Python
apps/api/auth/decorators.py
Praetorian-Defence/praetorian-api
181fa22b043e58b2ac9c5f4eae4c3471a44c9bf4
[ "MIT" ]
2
2020-06-29T15:12:04.000Z
2020-10-13T14:18:21.000Z
apps/api/auth/decorators.py
Praetorian-Defence/praetorian-api
181fa22b043e58b2ac9c5f4eae4c3471a44c9bf4
[ "MIT" ]
10
2021-01-04T11:33:38.000Z
2021-05-07T10:23:48.000Z
apps/api/auth/decorators.py
zurek11/praetorian-api
181fa22b043e58b2ac9c5f4eae4c3471a44c9bf4
[ "MIT" ]
null
null
null
from functools import wraps from http import HTTPStatus from django.utils.translation import gettext as _ from apps.api.errors import ApiException def signature_exempt(view_func): """Mark a view function as being exempt from signature and apikey check.""" wrapped_view.signature_exempt = True return wr...
33.538462
113
0.716361
from functools import wraps from http import HTTPStatus from django.utils.translation import gettext as _ from apps.api.errors import ApiException def token_required(func): @wraps(func) def inner(request, *args, **kwargs): if not hasattr(request, 'user') or not request.user or not request.user.is_au...
887
0
72
944fa87a20a65b14f77e66c05ef217e835e0f5ea
644
py
Python
qv/pages.py
Furuneko/otree_quadratic_voting
30ec9002d03153a6b22c9f1eedfe242b199c1255
[ "MIT" ]
1
2020-02-22T21:26:12.000Z
2020-02-22T21:26:12.000Z
qv/pages.py
Furuneko/otree_quadratic_voting
30ec9002d03153a6b22c9f1eedfe242b199c1255
[ "MIT" ]
null
null
null
qv/pages.py
Furuneko/otree_quadratic_voting
30ec9002d03153a6b22c9f1eedfe242b199c1255
[ "MIT" ]
null
null
null
from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants page_sequence = [ QV ]
28
89
0.614907
from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class QV(Page): form_model = 'player' form_fields = ['q' + str(n) for n in range(1, len(Constants.questions)+1)] + \ ['q' + str(n) + '_agree' for n in range(1, len(Constants...
252
220
23
26a2050769dd854ae446a223707a3abffc1952e2
1,832
py
Python
random-priority-raffle.py
greghaskins/random-priority-raffle
15cb8425a13adcd5c9b56dc3fff63646060c83a4
[ "MIT" ]
null
null
null
random-priority-raffle.py
greghaskins/random-priority-raffle
15cb8425a13adcd5c9b56dc3fff63646060c83a4
[ "MIT" ]
null
null
null
random-priority-raffle.py
greghaskins/random-priority-raffle
15cb8425a13adcd5c9b56dc3fff63646060c83a4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os import sys import random from pprint import pprint import yaml import raffle # ------------------------ # Command-line interface # ------------------------ USAGE = f""" Usage: {os.path.basename(__file__)} config_file [random_seed] config_file (required): Raffle config...
26.171429
72
0.691048
#!/usr/bin/env python3 import os import sys import random from pprint import pprint import yaml import raffle # ------------------------ # Command-line interface # ------------------------ USAGE = f""" Usage: {os.path.basename(__file__)} config_file [random_seed] config_file (required): Raffle config...
0
0
0
211a957319f53b0ed619653772aec6e92b690c12
294
py
Python
notaso/comments/admin.py
jpadilla/notaso
1c2f94d36b3d360d70f6c9937beb053beb8d8ad3
[ "MIT" ]
11
2017-03-16T21:47:51.000Z
2021-11-30T12:38:59.000Z
notaso/comments/admin.py
jpadilla/notaso
1c2f94d36b3d360d70f6c9937beb053beb8d8ad3
[ "MIT" ]
43
2015-01-13T14:14:48.000Z
2021-12-29T14:21:25.000Z
notaso/comments/admin.py
jpadilla/notaso
1c2f94d36b3d360d70f6c9937beb053beb8d8ad3
[ "MIT" ]
5
2015-09-27T15:05:36.000Z
2019-05-14T17:09:06.000Z
from django.contrib import admin from .models import Comment admin.site.register(Comment, CommentAdmin)
24.5
77
0.755102
from django.contrib import admin from .models import Comment class CommentAdmin(admin.ModelAdmin): list_display = ("created_at", "body", "professor", "created_by") search_fields = ["body", "professor__first_name", "professor__last_name"] admin.site.register(Comment, CommentAdmin)
0
163
23
57f61a27645356777c47ccb25a3133113ccffa1b
734
py
Python
output_newtargs/cp/pandas_merge_CP_bglf4_scores_newinformers_pkis1.py
SpencerEricksen/informers
5fd3934f5789c371026fc9eece1846ff1294122b
[ "MIT" ]
null
null
null
output_newtargs/cp/pandas_merge_CP_bglf4_scores_newinformers_pkis1.py
SpencerEricksen/informers
5fd3934f5789c371026fc9eece1846ff1294122b
[ "MIT" ]
1
2019-01-15T22:17:25.000Z
2019-01-16T12:14:39.000Z
output_newtargs/cp/pandas_merge_CP_bglf4_scores_newinformers_pkis1.py
SpencerEricksen/informers
5fd3934f5789c371026fc9eece1846ff1294122b
[ "MIT" ]
1
2019-01-15T12:36:15.000Z
2019-01-15T12:36:15.000Z
#!/home/ssericksen/anaconda2/bin/python2.7 import pandas as pd import numpy as np # load Ching-Pei's compound scores for BGLF4 with PKIS1 df1 = pd.read_csv('bglf4_pkis1', sep=" ") df1.set_index('fid', inplace=True) df1.columns = ['BGLF4'] df1.index.rename('molid', inplace=True) df1.index = df1.index.map(str) # load ...
27.185185
64
0.723433
#!/home/ssericksen/anaconda2/bin/python2.7 import pandas as pd import numpy as np # load Ching-Pei's compound scores for BGLF4 with PKIS1 df1 = pd.read_csv('bglf4_pkis1', sep=" ") df1.set_index('fid', inplace=True) df1.columns = ['BGLF4'] df1.index.rename('molid', inplace=True) df1.index = df1.index.map(str) # load ...
0
0
0
54ba5ac4b0ad8172cb60636d5bb318552a5456aa
3,169
py
Python
fwenchino/quique.py
fwenchino/lambdata-fwenchino
f5bfecbd858086df90af4c7280162928ef615a4f
[ "MIT" ]
1
2019-09-04T15:24:32.000Z
2019-09-04T15:24:32.000Z
fwenchino/quique.py
fwenchino/lambdata-fwenchino
f5bfecbd858086df90af4c7280162928ef615a4f
[ "MIT" ]
null
null
null
fwenchino/quique.py
fwenchino/lambdata-fwenchino
f5bfecbd858086df90af4c7280162928ef615a4f
[ "MIT" ]
1
2019-08-14T15:46:45.000Z
2019-08-14T15:46:45.000Z
import pandas as pd import numpy as np
30.76699
87
0.535185
import pandas as pd import numpy as np def null_report(df): total = df.isnull().sum() perc = total / df.isnull().count() * 100 tt = pd.concat([total, perc], axis=1, keys=['Total', 'Percent']) types = [] for col in df.columns: dtypeimport pandas as pd import numpy as np ...
2,908
0
215
360ce2242fc5b5c05d51c1ed4b51c81b17534215
8,395
py
Python
pytomato/conversion_af_er.py
robsonzagrejr/pytomato
3da3d9557f398a7ce2f3f8741c7cd70de9bfe05f
[ "MIT" ]
2
2021-02-25T14:29:13.000Z
2021-04-12T02:53:55.000Z
pytomato/conversion_af_er.py
robsonzagrejr/pytomato
3da3d9557f398a7ce2f3f8741c7cd70de9bfe05f
[ "MIT" ]
null
null
null
pytomato/conversion_af_er.py
robsonzagrejr/pytomato
3da3d9557f398a7ce2f3f8741c7cd70de9bfe05f
[ "MIT" ]
null
null
null
letters = 'abcdefghijklmnopqrstuvwxyz' numbers = '0123456789' """Teste Main criado para testar as funรงรตes. """ if __name__ == '__main__': print(er_to_afd('[J-M1-9]abc')) # er_to_afd('a(a|b)*a') # er_to_afd('aa*(bb*aa*b)*')
28.361486
94
0.517213
class Node: def __init__(self, left=None,right=None,data=None,father=None,first=None,fulfilled=None): self.left = left self.right = right self.data = data self.father = father self.is_first_of_chain = first self.fulfilled = fulfilled self.lastpos = None ...
7,851
-10
313
4efe3582bfe30a1821bdbca1585fa90da4e93489
18,842
py
Python
accelerator_abstract/models/base_core_profile.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
6
2017-06-14T19:34:01.000Z
2020-03-08T07:16:59.000Z
accelerator_abstract/models/base_core_profile.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
160
2017-06-20T17:12:13.000Z
2022-03-30T13:53:12.000Z
accelerator_abstract/models/base_core_profile.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
null
null
null
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from datetime import datetime from decimal import Decimal from pytz import utc import swapper from django.conf import settings from django.core.validators import ( RegexValidator, MaxLengthValidator, ) from django.db import models from django.db.models im...
37.608782
79
0.635495
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from datetime import datetime from decimal import Decimal from pytz import utc import swapper from django.conf import settings from django.core.validators import ( RegexValidator, MaxLengthValidator, ) from django.db import models from django.db.models im...
5,235
10,152
23
53efe294a1220ff799829ac423b0c9a968ee15e5
2,527
py
Python
game.py
AILab-FOI/MMO-IF
74a633bb7687ffdca8b3043046b0c572d5cc2969
[ "MIT" ]
null
null
null
game.py
AILab-FOI/MMO-IF
74a633bb7687ffdca8b3043046b0c572d5cc2969
[ "MIT" ]
null
null
null
game.py
AILab-FOI/MMO-IF
74a633bb7687ffdca8b3043046b0c572d5cc2969
[ "MIT" ]
null
null
null
import re import asyncio import pexpect as px import sys from glulxe.interface import i7Game from avatar import Avatar GAME_FILE_NAME = "rooms.gblorb" game = None current_location = None EXIT_COMMANDS = ["quit", "exit"] ROOM_SELECTION_PATTERN = 'You entered (.*) room' MESSAGE_PARAMS_PATTERN = '@([^\s]+) (.*)' age...
24.066667
90
0.663633
import re import asyncio import pexpect as px import sys from glulxe.interface import i7Game from avatar import Avatar GAME_FILE_NAME = "rooms.gblorb" game = None current_location = None EXIT_COMMANDS = ["quit", "exit"] ROOM_SELECTION_PATTERN = 'You entered (.*) room' MESSAGE_PARAMS_PATTERN = '@([^\s]+) (.*)' age...
1,803
0
184
91b93cc884ac8c0ea566b0f4ff9cf827afc1c82d
605
py
Python
solvers/brick_heads/instructions/gen_instructions.py
Anthony102899/Lego-ImageGenerator
52b19c8bb20f77a3394675e7c037c943a50c1e15
[ "Unlicense" ]
1
2022-03-20T10:23:38.000Z
2022-03-20T10:23:38.000Z
solvers/brick_heads/instructions/gen_instructions.py
Anthony102899/Lego-ImageGenerator
52b19c8bb20f77a3394675e7c037c943a50c1e15
[ "Unlicense" ]
null
null
null
solvers/brick_heads/instructions/gen_instructions.py
Anthony102899/Lego-ImageGenerator
52b19c8bb20f77a3394675e7c037c943a50c1e15
[ "Unlicense" ]
null
null
null
from bricks_modeling.file_IO.model_writer import write_bricks_to_file_with_steps, write_model_to_file from util.debugger import MyDebugger from bricks_modeling.file_IO.model_reader import read_model_from_file, read_bricks_from_file ''' We assume the following information is provided: 1) assembly order 2) grouping 3) d...
35.588235
101
0.813223
from bricks_modeling.file_IO.model_writer import write_bricks_to_file_with_steps, write_model_to_file from util.debugger import MyDebugger from bricks_modeling.file_IO.model_reader import read_model_from_file, read_bricks_from_file ''' We assume the following information is provided: 1) assembly order 2) grouping 3) d...
0
0
0
c4854e4f5f1c246890c85558e1848fb6019895b8
2,047
py
Python
sweeper/cloud/base/cloud_provider.py
dominoFire/sweeper
26c5497b81c8d0c50671f8ab75c1cf5c4c8191c9
[ "MIT" ]
null
null
null
sweeper/cloud/base/cloud_provider.py
dominoFire/sweeper
26c5497b81c8d0c50671f8ab75c1cf5c4c8191c9
[ "MIT" ]
null
null
null
sweeper/cloud/base/cloud_provider.py
dominoFire/sweeper
26c5497b81c8d0c50671f8ab75c1cf5c4c8191c9
[ "MIT" ]
null
null
null
from sweeper.cloud import resource_config_combinations class CloudProvider: """ A CloudProvider object represents a Cloud Computing service that sweeper can manage in order to execute a workflow in this cloud base """ def __init__(self): """ Default constructor. You should over...
31.984375
88
0.656571
from sweeper.cloud import resource_config_combinations class CloudProvider: """ A CloudProvider object represents a Cloud Computing service that sweeper can manage in order to execute a workflow in this cloud base """ def __init__(self): """ Default constructor. You should over...
0
0
0
406fc37da635061f79eb792d85f802ecf740e1cf
800
py
Python
data/Stats.py
T-amairi/IOTA
f7a212be681a002413219adca56f69bcdfbe8d17
[ "MIT" ]
3
2021-06-28T19:42:11.000Z
2021-08-11T08:23:10.000Z
data/Stats.py
T-amairi/IOTA
f7a212be681a002413219adca56f69bcdfbe8d17
[ "MIT" ]
null
null
null
data/Stats.py
T-amairi/IOTA
f7a212be681a002413219adca56f69bcdfbe8d17
[ "MIT" ]
1
2022-03-21T14:12:07.000Z
2022-03-21T14:12:07.000Z
import re import glob import os path = r".\data\log" os.chdir(path) t = [] logs = glob.glob("log*.txt") Nbrun = len(logs) for log in logs: l = open(log,'r') m = re.findall("(?<=Elapsed: )(.*?)(?=s)",l.read()) if float(m[-1]) > 0: t.append(float(m[-1])) l.close() if t: ...
19.512195
82
0.535
import re import glob import os path = r".\data\log" os.chdir(path) t = [] logs = glob.glob("log*.txt") Nbrun = len(logs) for log in logs: l = open(log,'r') m = re.findall("(?<=Elapsed: )(.*?)(?=s)",l.read()) if float(m[-1]) > 0: t.append(float(m[-1])) l.close() if t: ...
0
0
0
35fa41d37e98a2e529dec8561a025c496d6009c4
12,922
py
Python
lib/surface/topic/filters.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/topic/filters.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/topic/filters.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2014 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
39.76
166
0.627225
# -*- coding: utf-8 -*- # # Copyright 2014 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
0
0
0
e7ea76e3a00992a63464a4b9c3737bee379992e0
471
py
Python
ai2_replication/tables.py
georgetown-cset/ai-definitions-for-policymaking
667e928c8bb30f6e02696ac71081c6bae4096f50
[ "ADSL" ]
1
2020-06-24T20:45:03.000Z
2020-06-24T20:45:03.000Z
ai2_replication/tables.py
georgetown-cset/ai-definitions-for-policymaking
667e928c8bb30f6e02696ac71081c6bae4096f50
[ "ADSL" ]
null
null
null
ai2_replication/tables.py
georgetown-cset/ai-definitions-for-policymaking
667e928c8bb30f6e02696ac71081c6bae4096f50
[ "ADSL" ]
null
null
null
from bq import create_client, read_sql, query DATASET = 'ai2_replication' client = create_client() make_table('institutions') make_table('paper_authors_w_countries') make_table('language') make_table('ai_papers_any_author') make_table('paper_author_institution') make_table('oecd_comparison')
24.789474
65
0.757962
from bq import create_client, read_sql, query DATASET = 'ai2_replication' client = create_client() def make_table(table, **kw): sql = read_sql(f'../ai2_replication/{table}.sql') job = query(sql, table, dataset=DATASET, truncate=True, **kw) return job.result() make_table('institutions') make_table('pape...
151
0
23
93de89bf39c112dd5fd852b80fc612aaf44d3160
3,477
py
Python
app01/models.py
xinxinliang/ksDjango
0c0f4a5842cf225e77035b716979fcf9b8d03311
[ "Apache-2.0" ]
13
2021-03-11T12:35:29.000Z
2022-02-25T02:22:47.000Z
app01/models.py
xinxinliang/ksDjango
0c0f4a5842cf225e77035b716979fcf9b8d03311
[ "Apache-2.0" ]
1
2021-11-04T03:02:10.000Z
2021-11-04T03:02:10.000Z
app01/models.py
xinxinliang/ksDjango
0c0f4a5842cf225e77035b716979fcf9b8d03311
[ "Apache-2.0" ]
4
2021-06-12T19:27:01.000Z
2022-02-04T05:13:54.000Z
from django.db import models from datetime import datetime # Create your models here.
37.387097
119
0.708944
from django.db import models from datetime import datetime # Create your models here. class UserTitle(models.Model): #ๅฅณไธบF๏ผŒ็”ทไธบM GENDER = [ (0,"ๆœช็Ÿฅ"), (1,"็”ท"), (2,"ๅฅณ") ] STATE = [ (0,"0ๅˆๆฌก็ˆฌๅ–"), (1,"1ksVideo"), (2,"1ksLive"), (3,"2ksVideo+ksLive"), ...
77
3,525
69
8826c003f0775c51783e8ad89aa5dd24eeb638cd
1,710
py
Python
instruments/common/example/image-classification/train_imagenet.py
All-less/mxnet-speculative-synchronization
f9220e4d8451768eeee3e680bb0b2edf8f91b9f3
[ "MIT" ]
6
2017-12-09T06:36:20.000Z
2019-10-09T07:59:18.000Z
instruments/common/example/image-classification/train_imagenet.py
All-less/mxnet-speculative-synchronization
f9220e4d8451768eeee3e680bb0b2edf8f91b9f3
[ "MIT" ]
null
null
null
instruments/common/example/image-classification/train_imagenet.py
All-less/mxnet-speculative-synchronization
f9220e4d8451768eeee3e680bb0b2edf8f91b9f3
[ "MIT" ]
2
2019-12-27T12:24:08.000Z
2019-12-27T12:26:32.000Z
import os import argparse import logging role = os.getenv('DMLC_ROLE').upper() if role == 'WORKER': role = 'Worker' # backward compatibility rank = os.getenv('DMLC_{}_ID'.format(role.upper())) logging.basicConfig(level=logging.INFO, format='%(asctime)s {0}[{1}] %(message)s'.format(role, rank)) from common import f...
35.625
120
0.609942
import os import argparse import logging role = os.getenv('DMLC_ROLE').upper() if role == 'WORKER': role = 'Worker' # backward compatibility rank = os.getenv('DMLC_{}_ID'.format(role.upper())) logging.basicConfig(level=logging.INFO, format='%(asctime)s {0}[{1}] %(message)s'.format(role, rank)) from common import f...
0
0
0
4848485d15db0cd77a31069526785a7cedbeb90e
26,456
py
Python
transitfeed/loader.py
opentransitmap/transitfeed
65d9a789dd8f58ffcb1a158a1807e1ee74b688ee
[ "Apache-2.0" ]
null
null
null
transitfeed/loader.py
opentransitmap/transitfeed
65d9a789dd8f58ffcb1a158a1807e1ee74b688ee
[ "Apache-2.0" ]
null
null
null
transitfeed/loader.py
opentransitmap/transitfeed
65d9a789dd8f58ffcb1a158a1807e1ee74b688ee
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2.5 # Copyright (C) 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
40.329268
88
0.570759
#!/usr/bin/python2.5 # Copyright (C) 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
9,843
15,785
23
5ba01580c6da41b657c147d3afe1463ceba3337a
4,050
py
Python
sitetree/tests/conftest.py
jonkiparsky/django-sitetree
4b9ab29ee7c26c20cd7711b8261cc1cadd8c4e50
[ "BSD-3-Clause" ]
null
null
null
sitetree/tests/conftest.py
jonkiparsky/django-sitetree
4b9ab29ee7c26c20cd7711b8261cc1cadd8c4e50
[ "BSD-3-Clause" ]
null
null
null
sitetree/tests/conftest.py
jonkiparsky/django-sitetree
4b9ab29ee7c26c20cd7711b8261cc1cadd8c4e50
[ "BSD-3-Clause" ]
null
null
null
import pytest from pytest_djangoapp import configure_djangoapp_plugin pytest_plugins = configure_djangoapp_plugin( extend_INSTALLED_APPS=[ 'django.contrib.admin', ], ) @pytest.fixture def build_tree(): """Builds a sitetree from dict definition. Returns items indexed by urls. Example: ...
37.850467
114
0.465679
import pytest from pytest_djangoapp import configure_djangoapp_plugin pytest_plugins = configure_djangoapp_plugin( extend_INSTALLED_APPS=[ 'django.contrib.admin', ], ) @pytest.fixture def build_tree(): """Builds a sitetree from dict definition. Returns items indexed by urls. Example: ...
3,293
0
49
bf1414b0416a3eb72adcb754f86a3570bc77a1ae
433
py
Python
code/tools/pull_sz_starts.py
akashpattnaik/pre-ictal-similarity
85f963aa0c6d2d0a6e971ffa005c400e136a0a76
[ "MIT" ]
null
null
null
code/tools/pull_sz_starts.py
akashpattnaik/pre-ictal-similarity
85f963aa0c6d2d0a6e971ffa005c400e136a0a76
[ "MIT" ]
null
null
null
code/tools/pull_sz_starts.py
akashpattnaik/pre-ictal-similarity
85f963aa0c6d2d0a6e971ffa005c400e136a0a76
[ "MIT" ]
null
null
null
import numpy as np
28.866667
57
0.639723
import numpy as np def pull_sz_starts(patient, metadata): assert(patient in metadata) sz_names = metadata[patient]["Events"]["Ictal"] sz_starts = [] for sz_name in sz_names: if patient == "HUP111": if 'D01' in sz_names[sz_name]['iEEG_record']: continue sz_s...
392
0
23
7ebda6c3eb3ba2e6b4feae34ffc9e247ff699693
1,930
py
Python
kaggle/machine-learning/underfitting_and_overfitting.py
matteougolotti/ML
759eff5f5bcaa41e9ff19a2d78869bd4b968324d
[ "MIT" ]
null
null
null
kaggle/machine-learning/underfitting_and_overfitting.py
matteougolotti/ML
759eff5f5bcaa41e9ff19a2d78869bd4b968324d
[ "MIT" ]
null
null
null
kaggle/machine-learning/underfitting_and_overfitting.py
matteougolotti/ML
759eff5f5bcaa41e9ff19a2d78869bd4b968324d
[ "MIT" ]
null
null
null
import pandas as pd from sklearn.metrics import mean_absolute_error from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeRegressor iowa_file_path = 'rain.csv' home_data = pd.read_csv(iowa_file_path) # Create target object and call it y y = home_data.SalePrice # Create X features =...
33.275862
103
0.765285
import pandas as pd from sklearn.metrics import mean_absolute_error from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeRegressor def get_mae(max_leaf_nodes, train_X, val_X, train_y, val_y): model = DecisionTreeRegressor(max_leaf_nodes=max_leaf_nodes, random_state=0) model...
253
0
23
b7c8dadccc4c73a9db593b8f6745709e72ed05ab
790
py
Python
fractal.py
nayanshah/python
250d5dfe7d48a15d53288d7a9f371ff7c66de57c
[ "MIT" ]
null
null
null
fractal.py
nayanshah/python
250d5dfe7d48a15d53288d7a9f371ff7c66de57c
[ "MIT" ]
null
null
null
fractal.py
nayanshah/python
250d5dfe7d48a15d53288d7a9f371ff7c66de57c
[ "MIT" ]
1
2020-05-21T15:13:36.000Z
2020-05-21T15:13:36.000Z
from turtle import * # Fractals if __name__ == '__main__': draw_fractal(5, 90, 10, 'FX', 'X', 'X+YF+', 'Y', '-FX-Y')
25.483871
98
0.517722
from turtle import * # Fractals def draw_fractal(length, angle, level, initial_state, target, replacement, target2, replacement2): state = initial_state for counter in range(level): state2 = '' for character in state: if character == target: state2 += replacemen...
637
0
22
0889099ad9836adbaca7686283915041684afcf0
146
py
Python
fileconversions/conversions/jpeg_to_pdf_conversion.py
wilbertom/fileconversions
c48fda9b2804524fc57d1f6963d09645825b0da6
[ "MIT" ]
null
null
null
fileconversions/conversions/jpeg_to_pdf_conversion.py
wilbertom/fileconversions
c48fda9b2804524fc57d1f6963d09645825b0da6
[ "MIT" ]
null
null
null
fileconversions/conversions/jpeg_to_pdf_conversion.py
wilbertom/fileconversions
c48fda9b2804524fc57d1f6963d09645825b0da6
[ "MIT" ]
null
null
null
from .command_conversion import CommandConversion
20.857143
49
0.780822
from .command_conversion import CommandConversion class JpegToPdf(CommandConversion): command_name = 'convert' output_extension = 'pdf'
0
72
23
76b48b0af6e5bf545ed6ea33494e598053b496cb
1,989
py
Python
Doc2Vector/data/datamake.py
sladesha/algorithm
3ade2e7fd4a7b3acb6eb4f99ef81227ba51569e4
[ "MIT" ]
520
2018-02-07T05:48:49.000Z
2022-03-07T02:03:06.000Z
Doc2Vector/data/datamake.py
WADRHAW/deep_learning
3ade2e7fd4a7b3acb6eb4f99ef81227ba51569e4
[ "MIT" ]
15
2019-02-20T15:11:11.000Z
2022-02-10T00:39:57.000Z
Doc2Vector/data/datamake.py
WADRHAW/deep_learning
3ade2e7fd4a7b3acb6eb4f99ef81227ba51569e4
[ "MIT" ]
251
2017-12-28T09:46:13.000Z
2022-03-20T13:39:09.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/1/10 3:23 PM # @Author : Slade # @File : datamake.py from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow as tf import numpy as np flags = tf.app.flags flags.DEFINE...
32.080645
114
0.604827
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/1/10 3:23 PM # @Author : Slade # @File : datamake.py from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow as tf import numpy as np flags = tf.app.flags flags.DEFINE...
1,365
0
45
c777c78c953cfbfd3c1f69bdc31089c5cd84467c
3,743
py
Python
tests/fixtures.py
WilmerLab/mofun
ec95f2c4455a37ff73d0f595b56f4a246924c2dd
[ "MIT" ]
null
null
null
tests/fixtures.py
WilmerLab/mofun
ec95f2c4455a37ff73d0f595b56f4a246924c2dd
[ "MIT" ]
null
null
null
tests/fixtures.py
WilmerLab/mofun
ec95f2c4455a37ff73d0f595b56f4a246924c2dd
[ "MIT" ]
null
null
null
from math import sqrt from pathlib import Path import ase.io import numpy as np from numpy.linalg import norm from numpy.testing import assert_equal as np_assert_equal import pytest from pytest import approx import tests from mofun import Atoms from mofun.helpers import typekey sqrt2_2 = sqrt(2) / 2 sqrt3_2 = sqrt(...
34.027273
118
0.674058
from math import sqrt from pathlib import Path import ase.io import numpy as np from numpy.linalg import norm from numpy.testing import assert_equal as np_assert_equal import pytest from pytest import approx import tests from mofun import Atoms from mofun.helpers import typekey sqrt2_2 = sqrt(2) / 2 sqrt3_2 = sqrt(...
2,956
0
289
9588a3d4cd7e7a5db5bcec909837d679078f7fb9
2,535
py
Python
src/scs_core/position/nmea/nmea_report.py
seoss/scs_core
0d4323c5697a39eb44a887f179ba5dca3716c1d2
[ "MIT" ]
3
2019-03-12T01:59:58.000Z
2020-09-12T07:27:42.000Z
src/scs_core/position/nmea/nmea_report.py
seoss/scs_core
0d4323c5697a39eb44a887f179ba5dca3716c1d2
[ "MIT" ]
1
2018-04-20T07:58:38.000Z
2021-03-27T08:52:45.000Z
src/scs_core/position/nmea/nmea_report.py
seoss/scs_core
0d4323c5697a39eb44a887f179ba5dca3716c1d2
[ "MIT" ]
4
2017-09-29T13:08:43.000Z
2019-10-09T09:13:58.000Z
""" Created on 31 Dec 2016 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) A helper class for validating and preparing GPS module output strings. https://www.nmea.org https://en.wikipedia.org/wiki/NMEA_0183 """ # -------------------------------------------------------------------------------------------...
26.40625
118
0.390138
""" Created on 31 Dec 2016 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) A helper class for validating and preparing GPS module output strings. https://www.nmea.org https://en.wikipedia.org/wiki/NMEA_0183 """ # -------------------------------------------------------------------------------------------...
1,032
0
213
8376ebe3fb4d0496496aef10e2331b23800d0f80
2,280
py
Python
dojo/db_migrations/0063_jira_refactor.py
mtcolman/django-DefectDojo
76175aca446e077884bdb5e1d8e2a671a0840775
[ "BSD-3-Clause" ]
1,772
2018-01-22T23:32:15.000Z
2022-03-31T14:49:33.000Z
dojo/db_migrations/0063_jira_refactor.py
mtcolman/django-DefectDojo
76175aca446e077884bdb5e1d8e2a671a0840775
[ "BSD-3-Clause" ]
3,461
2018-01-20T19:12:28.000Z
2022-03-31T17:14:39.000Z
dojo/db_migrations/0063_jira_refactor.py
mtcolman/django-DefectDojo
76175aca446e077884bdb5e1d8e2a671a0840775
[ "BSD-3-Clause" ]
1,173
2018-01-23T07:10:23.000Z
2022-03-31T14:40:43.000Z
# Generated by Django 2.2.16 on 2020-11-07 11:31 from django.db import migrations, models import django.db.models.deletion
35.076923
159
0.60307
# Generated by Django 2.2.16 on 2020-11-07 11:31 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('dojo', '0062_add_vuln_id_from_tool'), ] operations = [ migrations.DeleteModel( name='JIRA_Clon...
0
2,132
23
f2e3923b50c3ce6f9c16b2637347a6d6f8f1281d
584
py
Python
chaoshi/chaoshi/items.py
basicworld/scrapy.com.jd
414a1827909c514dddedb552b8732d5b07a5d441
[ "MIT" ]
null
null
null
chaoshi/chaoshi/items.py
basicworld/scrapy.com.jd
414a1827909c514dddedb552b8732d5b07a5d441
[ "MIT" ]
null
null
null
chaoshi/chaoshi/items.py
basicworld/scrapy.com.jd
414a1827909c514dddedb552b8732d5b07a5d441
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy
24.333333
51
0.690068
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class ChaoshiCategoryItem(scrapy.Item): # define the fields for your item here like: cateUrl = scrapy.Field() # ๅˆ†็ฑป็š„url cateName = scrapy.Fi...
0
396
46
d33b2a5160487e545d49f24a69782cecb3600af5
215
py
Python
Tests/Test_add_new_movie.py
agafonovOleg402Targeting/Se-python-16
bc0bf860f470d0c325ee8bb9aaae4059352fb18a
[ "Apache-2.0" ]
null
null
null
Tests/Test_add_new_movie.py
agafonovOleg402Targeting/Se-python-16
bc0bf860f470d0c325ee8bb9aaae4059352fb18a
[ "Apache-2.0" ]
null
null
null
Tests/Test_add_new_movie.py
agafonovOleg402Targeting/Se-python-16
bc0bf860f470d0c325ee8bb9aaae4059352fb18a
[ "Apache-2.0" ]
null
null
null
from conftest import app from model.User import User
23.888889
33
0.725581
from conftest import app from model.User import User def test_add_new_movie(app): app.login(User.Admin()) assert app.is_logged_in() app.add_new_movie() app.logout() assert app.is_not_logged_in()
140
0
23
3c8d880715812d51e091ed9db6fa6f0f5b6498ad
27,654
py
Python
tests/unittests/BuscoConfig_unittests.py
aglabx/aglab_busco
a6f763e044cf649d82bc40b45b1c67c7dc09ee38
[ "MIT" ]
null
null
null
tests/unittests/BuscoConfig_unittests.py
aglabx/aglab_busco
a6f763e044cf649d82bc40b45b1c67c7dc09ee38
[ "MIT" ]
null
null
null
tests/unittests/BuscoConfig_unittests.py
aglabx/aglab_busco
a6f763e044cf649d82bc40b45b1c67c7dc09ee38
[ "MIT" ]
null
null
null
import unittest from busco import BuscoConfig import shutil import os from unittest.mock import Mock from unittest.mock import patch, call
42.349158
88
0.658567
import unittest from busco import BuscoConfig import shutil import os from unittest.mock import Mock from unittest.mock import patch, call class TestBuscoConfig(unittest.TestCase): maxDiff = None def setUp(self): self.maxDiff = None self.base_config = "config/config.ini" self.params ...
21,546
5,945
23
be1e37cc8ea7da820395a7b6bd5ced6c48fb173b
1,366
py
Python
migrations/versions/8fde055f9d29_add_driver_switch_activity_status.py
MTES-MCT/mobilic-api
b3754de2282262fd60a27dc90e40777df9c1e230
[ "MIT" ]
null
null
null
migrations/versions/8fde055f9d29_add_driver_switch_activity_status.py
MTES-MCT/mobilic-api
b3754de2282262fd60a27dc90e40777df9c1e230
[ "MIT" ]
8
2021-04-19T17:47:55.000Z
2022-02-16T17:40:18.000Z
migrations/versions/8fde055f9d29_add_driver_switch_activity_status.py
MTES-MCT/mobilic-api
b3754de2282262fd60a27dc90e40777df9c1e230
[ "MIT" ]
null
null
null
"""Add driver switch activity status Revision ID: 8fde055f9d29 Revises: 8fe63e4276dc Create Date: 2020-02-15 16:46:48.890628 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "8fde055f9d29" down_revision = "8fe63e4276dc" branch_labels = None depends_on = None
23.551724
62
0.590044
"""Add driver switch activity status Revision ID: 8fde055f9d29 Revises: 8fe63e4276dc Create Date: 2020-02-15 16:46:48.890628 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "8fde055f9d29" down_revision = "8fe63e4276dc" branch_labels = None depends_on = None d...
1,001
0
46
a5ae2c8bc00df24165fd508fc5d03ce301c458c9
11,501
py
Python
uweclang/corpus/manager.py
SkySchermer/uweclang
c4404b550c8c1e6d22eff0a5ddeb8127080b2ad3
[ "MIT" ]
null
null
null
uweclang/corpus/manager.py
SkySchermer/uweclang
c4404b550c8c1e6d22eff0a5ddeb8127080b2ad3
[ "MIT" ]
null
null
null
uweclang/corpus/manager.py
SkySchermer/uweclang
c4404b550c8c1e6d22eff0a5ddeb8127080b2ad3
[ "MIT" ]
null
null
null
"""UWEC Language Tools manager module Provides functions for defining and managing a corpus. """ # Python 3 forward compatability imports. from __future__ import print_function from __future__ import division from __future__ import absolute_import from __future__ import unicode_literals import sys import os impor...
33.144092
85
0.589949
"""UWEC Language Tools manager module Provides functions for defining and managing a corpus. """ # Python 3 forward compatability imports. from __future__ import print_function from __future__ import division from __future__ import absolute_import from __future__ import unicode_literals import sys import os impor...
1,461
0
138
75dfa67ec64313cca39da2e97c93a3e2e3458650
4,731
py
Python
galaxy/python/GalaxySpectrumVVDS.py
AndresSixtos/pyeBOSS
4750908c8bc409633bef8f790133e3a1f3f0c9e4
[ "CC0-1.0" ]
1
2017-05-23T13:03:27.000Z
2017-05-23T13:03:27.000Z
galaxy/python/GalaxySpectrumVVDS.py
AndresSixtos/pyeBOSS
4750908c8bc409633bef8f790133e3a1f3f0c9e4
[ "CC0-1.0" ]
null
null
null
galaxy/python/GalaxySpectrumVVDS.py
AndresSixtos/pyeBOSS
4750908c8bc409633bef8f790133e3a1f3f0c9e4
[ "CC0-1.0" ]
2
2017-09-26T11:17:30.000Z
2021-09-14T06:09:18.000Z
""" .. class:: GalaxySpectrumVVDS .. moduleauthor:: Johan Comparat <johan.comparat__at__gmail.com> The class GalaxySpectrumVVDS is dedicated to handling VVDS spectra """ from os.path import join import os import numpy as n import astropy.io.fits as fits import glob import matplotlib matplotlib.use('pdf') import matp...
39.756303
166
0.695413
""" .. class:: GalaxySpectrumVVDS .. moduleauthor:: Johan Comparat <johan.comparat__at__gmail.com> The class GalaxySpectrumVVDS is dedicated to handling VVDS spectra """ from os.path import join import os import numpy as n import astropy.io.fits as fits import glob import matplotlib matplotlib.use('pdf') import matp...
269
0
23
4d85537526d1f1be42b55ee7c3665cfaba14c3d0
460
py
Python
setup.py
EBjerrum/RAscore
d7430abeeb4246bcd9d2314e5ca9e00963dfb7ba
[ "MIT" ]
null
null
null
setup.py
EBjerrum/RAscore
d7430abeeb4246bcd9d2314e5ca9e00963dfb7ba
[ "MIT" ]
null
null
null
setup.py
EBjerrum/RAscore
d7430abeeb4246bcd9d2314e5ca9e00963dfb7ba
[ "MIT" ]
null
null
null
import setuptools setuptools.setup( name="RAscore", # Replace with your own username version="2020.9", author="Reymond Group/Molecular AI AstraZeneca", author_email="amol.thakkar@dcb.unibe.ch", license="MIT", description="Computation of retrosynthetic accessibility from machine learening of CAS...
32.857143
105
0.728261
import setuptools setuptools.setup( name="RAscore", # Replace with your own username version="2020.9", author="Reymond Group/Molecular AI AstraZeneca", author_email="amol.thakkar@dcb.unibe.ch", license="MIT", description="Computation of retrosynthetic accessibility from machine learening of CAS...
0
0
0
8ad32c038b411b3dc200c3cd070929e827a76ab5
3,559
py
Python
tests/epyccel/test_epyccel_complex_func.py
dina-fouad/pyccel
f4d919e673b400442b9c7b81212b6fbef749c7b7
[ "MIT" ]
206
2018-06-28T00:28:47.000Z
2022-03-29T05:17:03.000Z
tests/epyccel/test_epyccel_complex_func.py
dina-fouad/pyccel
f4d919e673b400442b9c7b81212b6fbef749c7b7
[ "MIT" ]
670
2018-07-23T11:02:24.000Z
2022-03-30T07:28:05.000Z
tests/epyccel/test_epyccel_complex_func.py
dina-fouad/pyccel
f4d919e673b400442b9c7b81212b6fbef749c7b7
[ "MIT" ]
19
2019-09-19T06:01:00.000Z
2022-03-29T05:17:06.000Z
# pylint: disable=missing-function-docstring, missing-module-docstring/ import numpy as np import pytest from numpy.random import rand, randint import modules.complex_func as mod from pyccel.epyccel import epyccel @pytest.mark.parametrize("f", [ mod.create_complex_literal__int_int, mod.cre...
31.776786
71
0.676595
# pylint: disable=missing-function-docstring, missing-module-docstring/ import numpy as np import pytest from numpy.random import rand, randint import modules.complex_func as mod from pyccel.epyccel import epyccel @pytest.mark.parametrize("f", [ mod.create_complex_literal__int_int, mod.cre...
2,372
0
298
edbc7186a89a966ff7d588e9b0e0a99d5c18903d
1,180
py
Python
setup.py
glanyx/segachan
b7694cc44e7ac0a261d8f3412347c50b8026fd6f
[ "MIT" ]
null
null
null
setup.py
glanyx/segachan
b7694cc44e7ac0a261d8f3412347c50b8026fd6f
[ "MIT" ]
null
null
null
setup.py
glanyx/segachan
b7694cc44e7ac0a261d8f3412347c50b8026fd6f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages from sweeperbot._version import __version__ with open("README.rst") as readme_file: readme = readme_file.read() with open("HISTORY.rst") as history_file: history = history_file.read() setup( name="sweeperbot", ...
27.44186
76
0.622881
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages from sweeperbot._version import __version__ with open("README.rst") as readme_file: readme = readme_file.read() with open("HISTORY.rst") as history_file: history = history_file.read() setup( name="sweeperbot", ...
0
0
0
ed7a72592c78b45f52182233b37b4c42c9305353
65,295
py
Python
myigbot.py
Afafabdb/MyIGBot
43a5c24993598d6827a735e620acb2a41e9fbbd0
[ "MIT" ]
91
2020-11-14T15:13:06.000Z
2021-07-27T18:14:45.000Z
myigbot.py
Afafabdb/MyIGBot
43a5c24993598d6827a735e620acb2a41e9fbbd0
[ "MIT" ]
25
2020-11-16T21:52:39.000Z
2021-05-04T20:53:24.000Z
myigbot.py
Afafabdb/MyIGBot
43a5c24993598d6827a735e620acb2a41e9fbbd0
[ "MIT" ]
18
2020-11-17T14:30:32.000Z
2021-07-16T22:23:21.000Z
import requests import os from datetime import datetime import json from bs4 import BeautifulSoup as bs import time import random import string
48.510401
448
0.524665
import requests import os from datetime import datetime import json from bs4 import BeautifulSoup as bs import time import random import string class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKCYAN = '\033[96m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ...
63,636
207
1,294
7f9cb787068686be642ce592396f41b89b8d5767
545
py
Python
app/test/test1.py
saint816/fishbook
80a4b563a05086c85eb347286d28bb0e6258ff1c
[ "MIT" ]
null
null
null
app/test/test1.py
saint816/fishbook
80a4b563a05086c85eb347286d28bb0e6258ff1c
[ "MIT" ]
null
null
null
app/test/test1.py
saint816/fishbook
80a4b563a05086c85eb347286d28bb0e6258ff1c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name๏ผš test1 Description : ๅคš็บฟ็จ‹ๅฎž็Žฐ Author : pengsheng date๏ผš 2019-04-20 ------------------------------------------------- """ import threading new_thread = threading.Thread(target=worker, name='new_thread') ...
21.8
63
0.53578
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name๏ผš test1 Description : ๅคš็บฟ็จ‹ๅฎž็Žฐ Author : pengsheng date๏ผš 2019-04-20 ------------------------------------------------- """ import threading def worker(): print('i am thread') t = threading.current...
75
0
23
535a5f8a51e655f145cc0b06696fd8a683da4409
221
py
Python
__init__.py
klonuo/SublimeJEDI
ee58759cbbfbd052bd0a972b85b1666e0e1cb6e9
[ "MIT" ]
1
2016-09-20T20:50:53.000Z
2016-09-20T20:50:53.000Z
__init__.py
klonuo/SublimeJEDI
ee58759cbbfbd052bd0a972b85b1666e0e1cb6e9
[ "MIT" ]
null
null
null
__init__.py
klonuo/SublimeJEDI
ee58759cbbfbd052bd0a972b85b1666e0e1cb6e9
[ "MIT" ]
null
null
null
# fix absolute imports on ST3 # TODO: remove #import sys #import os #sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) try: from sublime_jedi import * except ImportError: from .sublime_jedi import *
20.090909
63
0.733032
# fix absolute imports on ST3 # TODO: remove #import sys #import os #sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) try: from sublime_jedi import * except ImportError: from .sublime_jedi import *
0
0
0
667544762c302b9391cb48414210868246d7d11a
9,969
py
Python
oras/content/file.py
vsoch/oras-python
45374c6187b98f171f85dffd75a31877b6ec12ce
[ "MIT" ]
1
2021-12-06T08:54:51.000Z
2021-12-06T08:54:51.000Z
oras/content/file.py
vsoch/oras-python
45374c6187b98f171f85dffd75a31877b6ec12ce
[ "MIT" ]
1
2021-11-28T18:59:21.000Z
2021-11-28T18:59:21.000Z
oras/content/file.py
vsoch/oras-python
45374c6187b98f171f85dffd75a31877b6ec12ce
[ "MIT" ]
null
null
null
__author__ = "Vanessa Sochat" __copyright__ = "Copyright 2021, Vanessa Sochat" __license__ = "MPL 2.0" import os import time import tarfile import tempfile import time from oras.logger import logger import oras.utils as utils import oras.defaults as defaults from .const import TempFilePattern, AnnotationUnpack, Anno...
28.812139
117
0.611395
__author__ = "Vanessa Sochat" __copyright__ = "Copyright 2021, Vanessa Sochat" __license__ = "MPL 2.0" import os import time import tarfile import tempfile import time from oras.logger import logger import oras.utils as utils import oras.defaults as defaults from .const import TempFilePattern, AnnotationUnpack, Anno...
568
0
65
230b134009ad25e00f5dd4e42fe32cc5038b7a5c
4,180
py
Python
time_series_experiments/nbeats/blocks/_base.py
vikua/time-series-experiments
2f9d3fa842866c39c8c1a9906c8c5d4870a6f7da
[ "MIT" ]
null
null
null
time_series_experiments/nbeats/blocks/_base.py
vikua/time-series-experiments
2f9d3fa842866c39c8c1a9906c8c5d4870a6f7da
[ "MIT" ]
4
2020-10-11T15:14:48.000Z
2022-02-10T02:28:07.000Z
time_series_experiments/nbeats/blocks/_base.py
vikua/time-series-experiments
2f9d3fa842866c39c8c1a9906c8c5d4870a6f7da
[ "MIT" ]
null
null
null
from tensorflow import keras from tensorflow.keras import backend as K
34.262295
88
0.583493
from tensorflow import keras from tensorflow.keras import backend as K class Block(keras.layers.Layer): def __init__( self, units, theta_units, layers=4, stack_id=0, activation="relu", kernel_initializer="glorot_uniform", bias_initializer="zeros", ...
3,967
11
130
0f501a353e1da1c5ed4afdd4c955cf72bd3a1124
5,069
py
Python
cail/utils.py
Stanford-ILIAD/Confidence-Aware-Imitation-Learning
1d8af0e4ab87a025885133a2384d5a937329b2f5
[ "MIT" ]
16
2021-10-30T15:19:37.000Z
2022-03-23T12:57:49.000Z
cail/utils.py
syzhang092218-source/Confidence-Aware-Imitation-Learning
1d8af0e4ab87a025885133a2384d5a937329b2f5
[ "MIT" ]
null
null
null
cail/utils.py
syzhang092218-source/Confidence-Aware-Imitation-Learning
1d8af0e4ab87a025885133a2384d5a937329b2f5
[ "MIT" ]
2
2021-11-29T11:28:16.000Z
2022-03-06T14:12:47.000Z
import numpy as np import torch import torch.nn as nn import time from tqdm import tqdm from .buffer import Buffer from .algo.base import Expert from .env import NormalizedEnv def soft_update(target, source, tau): """Soft update for SAC""" for t, s in zip(target.parameters(), source.parameters()...
25.994872
85
0.583547
import numpy as np import torch import torch.nn as nn import time from tqdm import tqdm from .buffer import Buffer from .algo.base import Expert from .env import NormalizedEnv def soft_update(target, source, tau): """Soft update for SAC""" for t, s in zip(target.parameters(), source.parameters()...
0
0
0
83cf34bf170321319bfa3699b032ea060d189625
4,204
py
Python
tf_quant_finance/experimental/pricing_platform/framework/rate_instruments/forward_rate_agreement/forward_rate_agreement_test.py
DevarakondaV/tf-quant-finance
4502b843ca138c2ae8ad77978a2cf52fa38dbbe5
[ "Apache-2.0" ]
1
2021-04-22T15:48:38.000Z
2021-04-22T15:48:38.000Z
tf_quant_finance/experimental/pricing_platform/framework/rate_instruments/forward_rate_agreement/forward_rate_agreement_test.py
dsdinter/tf-quant-finance
b2b27e682cc091d251a53515fef96b14812acb1c
[ "Apache-2.0" ]
null
null
null
tf_quant_finance/experimental/pricing_platform/framework/rate_instruments/forward_rate_agreement/forward_rate_agreement_test.py
dsdinter/tf-quant-finance
b2b27e682cc091d251a53515fef96b14812acb1c
[ "Apache-2.0" ]
1
2021-01-30T09:32:16.000Z
2021-01-30T09:32:16.000Z
# Lint as: python3 # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
41.623762
95
0.74215
# Lint as: python3 # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
2,302
28
47
24437d77fe7c0ec9561b24914a72b35bfd70e5ea
7,035
py
Python
.template_simulation/collect_charges.py
lukaselflein/sarah_folderstructure
a725271db3d8b5b28b24918b3daf0942fa04dcd8
[ "MIT" ]
null
null
null
.template_simulation/collect_charges.py
lukaselflein/sarah_folderstructure
a725271db3d8b5b28b24918b3daf0942fa04dcd8
[ "MIT" ]
28
2019-03-29T13:34:57.000Z
2019-07-04T09:27:07.000Z
.template_simulation/collect_charges.py
lukaselflein/sarah_folderstructure
a725271db3d8b5b28b24918b3daf0942fa04dcd8
[ "MIT" ]
null
null
null
""" Extract charges obtained via HORTON and Bader. Copyright 2019 Simulation Lab University of Freiburg Author: Lukas Elflein <elfleinl@cs.uni-freiburg.de> """ import os import pandas as pd def create_dir(path='./plotting'): """Create new folder for pictures if it does not exist yet.""" if os.path.isdir(path):...
39.971591
102
0.585785
""" Extract charges obtained via HORTON and Bader. Copyright 2019 Simulation Lab University of Freiburg Author: Lukas Elflein <elfleinl@cs.uni-freiburg.de> """ import os import pandas as pd def create_dir(path='./plotting'): """Create new folder for pictures if it does not exist yet.""" if os.path.isdir(path):...
0
0
0
453864fe3cdf4c08c938afaf223db5f6a52e6a03
8,391
py
Python
main.py
foorschtbar/speedtest_ookla-to-influxdb
901b69fe57f314150a8383e2db2814f3dc7a5674
[ "MIT" ]
null
null
null
main.py
foorschtbar/speedtest_ookla-to-influxdb
901b69fe57f314150a8383e2db2814f3dc7a5674
[ "MIT" ]
null
null
null
main.py
foorschtbar/speedtest_ookla-to-influxdb
901b69fe57f314150a8383e2db2814f3dc7a5674
[ "MIT" ]
null
null
null
import os import time import json import datetime import subprocess from pythonping import ping from influxdb_client import InfluxDBClient from influxdb_client.client.write_api import SYNCHRONOUS from multiprocessing import Process # InfluxDB Settings NAMESPACE = os.getenv('NAMESPACE', 'None') DB_URL = os....
36.324675
474
0.546538
import os import time import json import datetime import subprocess from pythonping import ping from influxdb_client import InfluxDBClient from influxdb_client.client.write_api import SYNCHRONOUS from multiprocessing import Process # InfluxDB Settings NAMESPACE = os.getenv('NAMESPACE', 'None') DB_URL = os....
6,815
0
175
0fd7d1fa2baad176d6e5962f6138008014fa633a
2,444
py
Python
Cnc-Calculators-V.2/Moduler/ra.py
UniQueKakarot/Redesigned_Cnc-Calculators
0ec83234444ecb5765b14bf77782f99e432b5473
[ "MIT" ]
null
null
null
Cnc-Calculators-V.2/Moduler/ra.py
UniQueKakarot/Redesigned_Cnc-Calculators
0ec83234444ecb5765b14bf77782f99e432b5473
[ "MIT" ]
1
2021-06-02T00:32:00.000Z
2021-06-02T00:32:00.000Z
Cnc-Calculators-V.2/Moduler/ra.py
UniQueKakarot/Redesigned_Cnc-Calculators
0ec83234444ecb5765b14bf77782f99e432b5473
[ "MIT" ]
null
null
null
""" This module contains the RA calculator """ from kivy.uix.gridlayout import GridLayout from kivy.lang import Builder from kivy.properties import StringProperty from Moduler.customwidgets import MyLabel from Moduler.customwidgets import MyTextInput from Moduler.datasaving import SurfaceRaData Builder.load_string( ...
21.068966
63
0.51473
""" This module contains the RA calculator """ from kivy.uix.gridlayout import GridLayout from kivy.lang import Builder from kivy.properties import StringProperty from Moduler.customwidgets import MyLabel from Moduler.customwidgets import MyTextInput from Moduler.datasaving import SurfaceRaData Builder.load_string( ...
0
0
0
babbc8cc7067faba7f4cecd9fb2dba005c06f6f1
209
py
Python
nhdpy/__init__.py
jsta/nhdpy
38f52a68907e4d838715c77b18e61450eb775c72
[ "MIT" ]
null
null
null
nhdpy/__init__.py
jsta/nhdpy
38f52a68907e4d838715c77b18e61450eb775c72
[ "MIT" ]
8
2020-11-12T16:42:23.000Z
2021-03-04T19:00:09.000Z
nhdpy/__init__.py
jsta/nhdpy
38f52a68907e4d838715c77b18e61450eb775c72
[ "MIT" ]
null
null
null
"""Top-level package for nhdpy.""" __author__ = """Jemma Stachelek""" __email__ = 'stachel2@msu.edu' __version__ = '0.1.0' from .nhdpy import nhd_get from .nhdpy import nhd_list from .nhdpy import nhd_load
19
34
0.727273
"""Top-level package for nhdpy.""" __author__ = """Jemma Stachelek""" __email__ = 'stachel2@msu.edu' __version__ = '0.1.0' from .nhdpy import nhd_get from .nhdpy import nhd_list from .nhdpy import nhd_load
0
0
0
df287b191ac5a2dd737815fd551244686d241923
25,180
py
Python
mmdet/core/loss/losses.py
ShegnkaiWu/IoU-aware-single-stage-object-detector-for-accurate-localization
67b8955eb59137590dbadc6aac45529ae9459e4a
[ "Apache-2.0" ]
62
2020-04-15T09:01:23.000Z
2022-02-24T04:27:52.000Z
mmdet/core/loss/losses.py
ShegnkaiWu/IoU-aware-single-stage-object-detector-for-accurate-localization
67b8955eb59137590dbadc6aac45529ae9459e4a
[ "Apache-2.0" ]
10
2020-04-15T09:05:19.000Z
2022-01-04T08:05:59.000Z
mmdet/core/loss/losses.py
ShegnkaiWu/IoU-aware-single-stage-object-detector-for-accurate-localization
67b8955eb59137590dbadc6aac45529ae9459e4a
[ "Apache-2.0" ]
10
2020-04-28T06:58:09.000Z
2021-11-18T00:57:34.000Z
# TODO merge naive and weighted loss. import numpy as np import torch import torch.nn.functional as F from ..bbox import bbox_overlaps from ...ops import sigmoid_focal_loss from ..bbox.transforms import delta2bbox # added by Shengkai Wu # implement iou_balanced cross entropy loss. def iou_balanced_cross_entropy(pr...
38.918083
127
0.61668
# TODO merge naive and weighted loss. import numpy as np import torch import torch.nn.functional as F from ..bbox import bbox_overlaps from ...ops import sigmoid_focal_loss from ..bbox.transforms import delta2bbox def weighted_nll_loss(pred, label, weight, avg_factor=None): if avg_factor is None: avg_fa...
6,879
0
296