hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
โŒ€
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
โŒ€
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
โŒ€
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
โŒ€
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
โŒ€
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
โŒ€
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
โŒ€
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
โŒ€
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
โŒ€
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
1cb040e596b26589cbb11a733ba1ebdffd781115
2,400
py
Python
cohesity_management_sdk/models/nfs_connection.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
null
null
null
cohesity_management_sdk/models/nfs_connection.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
null
null
null
cohesity_management_sdk/models/nfs_connection.py
nick6655/management-sdk-python
88e792cb83e5c24a22af495b220c145d0c45841d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc.
30.379747
81
0.588333
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc. class NfsConnection(object): """Implementation of the 'NfsConnection' model. :TODO Type description here. Attributes: client_ip (string): Information of a Universal Data Adapter cluster, only valid for an entity of view_name kClu...
0
967
0
1,353
0
0
0
0
23
9599f3ef46405278aa67da39176eb1314ae4583e
12,783
py
Python
modules/windows_jumplist/JumpListParser.py
naaya17/carpe
fa2e3cfebe20f8839c985e5b9b78b538800172a1
[ "Apache-2.0" ]
56
2019-02-07T06:21:45.000Z
2022-03-21T08:19:24.000Z
modules/windows_jumplist/JumpListParser.py
naaya17/carpe
fa2e3cfebe20f8839c985e5b9b78b538800172a1
[ "Apache-2.0" ]
5
2020-05-25T17:29:00.000Z
2021-12-13T20:49:08.000Z
modules/windows_jumplist/JumpListParser.py
naaya17/carpe
fa2e3cfebe20f8839c985e5b9b78b538800172a1
[ "Apache-2.0" ]
31
2019-03-13T10:23:49.000Z
2021-11-04T12:14:58.000Z
import os.path def split_filename(fn): """ ['', '', ''] . """ v = os.path.splitext(fn) fileext = v[1] v = os.path.split(v[0]) if (fileext == '') and (len(v[1]) > 0) and (v[1][0] == '.'): v = list(v) fileext = v[1] v[1] = '' return [v[0], v[1], fileext] def get_file...
42.327815
132
0.509192
import os.path, sys from modules.windows_jumplist.consts import * from ctypes import * from modules.windows_jumplist.lib.delphi import * from modules.windows_jumplist.lib.yjSysUtils import * from modules.windows_jumplist.lib.yjDateTime import * from modules.windows_jumplist.LNKFileParser import TLNKFileParser from mod...
225
0
0
9,298
0
1,589
0
229
331
bb59e61d09ed7c1f58341c38fc5c90691b4f1d4e
774
py
Python
mimodata.py
theignorantzen/VLC-Pi
66f50d9393429c55716c4c036240c44a4e601a98
[ "MIT" ]
null
null
null
mimodata.py
theignorantzen/VLC-Pi
66f50d9393429c55716c4c036240c44a4e601a98
[ "MIT" ]
null
null
null
mimodata.py
theignorantzen/VLC-Pi
66f50d9393429c55716c4c036240c44a4e601a98
[ "MIT" ]
null
null
null
import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(12, GPIO.OUT) GPIO.setup(16, GPIO.OUT) GPIO.setup(5, GPIO.OUT) GPIO.setup(6, GPIO.OUT) GPIO.setup(13, GPIO.OUT) GPIO.setup(19, GPIO.OUT) pin = [12, 16, 5, 6, 13, 19] k = 0 st="110101011010111" cols = 6 rows = len(st)/3 arr = [[0]*cols]*rows for ...
18
40
0.564599
import RPi.GPIO as GPIO import binascii import time GPIO.setmode(GPIO.BCM) GPIO.setup(12, GPIO.OUT) GPIO.setup(16, GPIO.OUT) GPIO.setup(5, GPIO.OUT) GPIO.setup(6, GPIO.OUT) GPIO.setup(13, GPIO.OUT) GPIO.setup(19, GPIO.OUT) pin = [12, 16, 5, 6, 13, 19] k = 0 st="110101011010111" cols = 6 rows = len(st)/3 arr = [[0]*...
0
0
0
0
0
0
0
-6
22
42ae96f4a947574eed72fb622a55bbd38b1b9cc0
3,589
py
Python
code_fragment_generator/tcp_api_generator.py
Longxr/python-data-process
f5f8c2c89b449b76dde31d13c6cabb6b97b0023f
[ "MIT" ]
null
null
null
code_fragment_generator/tcp_api_generator.py
Longxr/python-data-process
f5f8c2c89b449b76dde31d13c6cabb6b97b0023f
[ "MIT" ]
null
null
null
code_fragment_generator/tcp_api_generator.py
Longxr/python-data-process
f5f8c2c89b449b76dde31d13c6cabb6b97b0023f
[ "MIT" ]
null
null
null
# coding=utf-8 import os import string from string import Template if __name__ == '__main__': root_dir = os.path.dirname(os.path.abspath(__file__)) input_file = open(os.path.join(root_dir, 'input.cpp'), 'r', encoding='gb18030', errors='ignore') out_file = open(os.path.join(root_dir, 'output.cpp'), 'w', e...
32.333333
164
0.676512
# coding=utf-8 import os import re import string from string import Template def fun_replace(str): str1 = re.sub(r'[^\w\s]','', str) return str1.strip() def fun_get_attri(line): line_list = line.split('//') comment = '' if len(line_list) > 1: comment = '//' + line_list[1] line_list ...
6
0
0
0
0
593
0
-12
68
35b5028184a8de2f02ce4af30620f4dde17fa65e
2,512
py
Python
DeeProtein/scripts/extract_targets.py
juzb/DeeProtein
487694a24abdb4656499111c8a8904dfcb1d98ab
[ "MIT" ]
12
2019-02-21T14:09:13.000Z
2021-03-05T02:02:21.000Z
DeeProtein/scripts/extract_targets.py
juzb/DeeProtein
487694a24abdb4656499111c8a8904dfcb1d98ab
[ "MIT" ]
null
null
null
DeeProtein/scripts/extract_targets.py
juzb/DeeProtein
487694a24abdb4656499111c8a8904dfcb1d98ab
[ "MIT" ]
5
2019-05-15T05:37:41.000Z
2021-09-29T12:20:00.000Z
import pandas as pd import sys import os deep_go_data = sys.argv[1] dataset_path_in = sys.argv[2] dataset_path_out = sys.argv[3] go_file_out = sys.argv[4] df = pd.read_pickle(deep_go_data) targets = list(df.targets) gos = list(df.gos) go_freqs = {} target2go = dict(zip(targets, gos)) target_path = os.path.join(dat...
35.380282
95
0.501194
import pandas as pd import sys import os deep_go_data = sys.argv[1] dataset_path_in = sys.argv[2] dataset_path_out = sys.argv[3] go_file_out = sys.argv[4] df = pd.read_pickle(deep_go_data) targets = list(df.targets) gos = list(df.gos) go_freqs = {} target2go = dict(zip(targets, gos)) target_path = os.path.join(dat...
0
0
0
0
0
0
0
0
0
a445050476ee2d8a028886e92dc18e1d0a2333df
717
py
Python
getImage.py
tzuhan1106/Crawler_Of_Cosmetic
2094388b248f269e787eeb90c01679735cc1e58c
[ "MIT" ]
1
2016-04-04T09:42:47.000Z
2016-04-04T09:42:47.000Z
getImage.py
tzuhan1106/Crawler_Of_Cosmetic
2094388b248f269e787eeb90c01679735cc1e58c
[ "MIT" ]
null
null
null
getImage.py
tzuhan1106/Crawler_Of_Cosmetic
2094388b248f269e787eeb90c01679735cc1e58c
[ "MIT" ]
null
null
null
import requests from bs4 import BeautifulSoup import shutil import os try: os.chdir('img') #means cd path except: print('path error') imageUrlPattern = 'http://www.watsons.com.tw' res =requests.get('http://www.watsons.com.tw/%E7%86%B1%E9%8A%B7%E5%95%86%E5%93%81/c/bestSeller?q=:igcBestSeller:category:1041&pa...
28.68
164
0.641562
import requests, json from bs4 import BeautifulSoup import shutil import os try: os.chdir('img') #means cd path except: print('path error') imageUrlPattern = 'http://www.watsons.com.tw' res =requests.get('http://www.watsons.com.tw/%E7%86%B1%E9%8A%B7%E5%95%86%E5%93%81/c/bestSeller?q=:igcBestSeller:category:1...
0
0
0
0
0
0
0
6
0
321a802ba08a82beb1f2f48347ea60bfd848d06e
11,155
py
Python
pyatv/mrp/__init__.py
SylvainCecchetto/pyatv
b5386440ce6c170219975a17d6b6561026bfd790
[ "MIT" ]
null
null
null
pyatv/mrp/__init__.py
SylvainCecchetto/pyatv
b5386440ce6c170219975a17d6b6561026bfd790
[ "MIT" ]
null
null
null
pyatv/mrp/__init__.py
SylvainCecchetto/pyatv
b5386440ce6c170219975a17d6b6561026bfd790
[ "MIT" ]
null
null
null
"""Implementation of the MediaRemoteTV Protocol used by ATV4 and later.""" import logging _LOGGER = logging.getLogger(__name__) # Source: https://github.com/Daij-Djan/DDHidLib/blob/master/usb_hid_usages.txt _KEY_LOOKUP = { # name: [usage_page, usage, button hold time (seconds)] 'up': [1, 0x8C, 0], 'down...
30.900277
78
0.622143
"""Implementation of the MediaRemoteTV Protocol used by ATV4 and later.""" import logging import asyncio from datetime import datetime from pyatv import (const, exceptions) from pyatv.mrp import (messages, protobuf) from pyatv.mrp.srp import SRPAuthHandler from pyatv.mrp.connection import MrpConnection from pyatv.mrp...
0
3,045
1,090
5,653
0
0
0
273
336
428811f65bf037cde24824501010272b928b75b5
1,419
py
Python
web/models/mysql.py
zhengbigbig/python_demo
29b62bea9e5abaa02e51744a926f722d1b99ec8d
[ "MIT" ]
null
null
null
web/models/mysql.py
zhengbigbig/python_demo
29b62bea9e5abaa02e51744a926f722d1b99ec8d
[ "MIT" ]
null
null
null
web/models/mysql.py
zhengbigbig/python_demo
29b62bea9e5abaa02e51744a926f722d1b99ec8d
[ "MIT" ]
null
null
null
db = MySQLDB(user='root', password='root', db='test')
23.65
90
0.677237
import pymysql import logging class MySQLDB(object): def __init__(self, host='localhost', port=3306, user='root', password='root', db='test'): # cursorclass=pymysql.cursors.DictCursor ๆ•ฐๆฎๅบ“ๆŸฅ่ฏข่ฟ”ๅ›ždict --> ้ป˜่ฎค๏ผštuple self.conn = pymysql.connect( host=host, port=port, user=user, password=password, db=db, charset='u...
96
0
0
1,277
0
0
0
-14
67
d8a7faef64fcbcfb31c2692058def68f00243918
9,244
py
Python
ark/utils/plot_utils.py
angelolab/ark-analysis
5b248e5413c383bf03fac53d8ae9180fd2310222
[ "Apache-2.0" ]
17
2020-10-15T20:50:12.000Z
2022-01-27T19:24:40.000Z
ark/utils/plot_utils.py
angelolab/ark-analysis
5b248e5413c383bf03fac53d8ae9180fd2310222
[ "Apache-2.0" ]
309
2020-08-14T16:21:36.000Z
2022-03-24T22:22:53.000Z
ark/utils/plot_utils.py
angelolab/ark-analysis
5b248e5413c383bf03fac53d8ae9180fd2310222
[ "Apache-2.0" ]
4
2020-10-12T21:04:55.000Z
2021-07-06T09:42:49.000Z
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable import xarray as xr from skimage.segmentation import find_boundaries from skimage.exposure import rescale_intensity from ark.utils import load_utils from ark.utils import misc_utils # plotting functions from ar...
44.442308
96
0.583514
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable import xarray as xr from skimage.segmentation import find_boundaries from skimage.exposure import rescale_intensity from ark.utils import load_utils from ark.utils import misc_utils # plotting functions from ar...
0
0
0
0
0
0
0
0
0
e923430b6a6eb327b695a54846e7a3076c5d0662
1,542
py
Python
src/trainer/sr/base.py
sanghyun-son/srwarp
d7cc08db5ba5ec9103f1813f76d1da825afe1a5b
[ "MIT" ]
82
2021-04-22T09:22:46.000Z
2022-03-30T03:06:47.000Z
src/trainer/sr/base.py
sanghyun-son/srwarp
d7cc08db5ba5ec9103f1813f76d1da825afe1a5b
[ "MIT" ]
3
2021-08-04T15:40:52.000Z
2022-02-21T10:10:52.000Z
src/trainer/sr/base.py
sanghyun-son/srwarp
d7cc08db5ba5ec9103f1813f76d1da825afe1a5b
[ "MIT" ]
11
2021-05-16T14:54:33.000Z
2022-02-18T08:25:37.000Z
from trainer.gan import dcgan _parent_class = dcgan.GANTrainer
27.052632
63
0.479248
from trainer.gan import dcgan from misc.gpu_utils import parallel_forward as pforward from model.utils import forward_utils as futils _parent_class = dcgan.GANTrainer class SRTrainer(_parent_class): def __init__(self, *args, x8=False, quads=False, **kwargs): super().__init__(*args, **kwargs) self...
0
152
0
1,199
0
0
0
60
67
132727ab48ce64a42309c69292ca835404984f0d
9,500
py
Python
soft/compiler.ctuning-cc/customize.py
G4V/ck-env
b882480b00b9dbd88f15eef58440772e09414f64
[ "BSD-3-Clause" ]
80
2015-03-03T14:27:39.000Z
2022-01-04T15:37:01.000Z
soft/compiler.ctuning-cc/customize.py
G4V/ck-env
b882480b00b9dbd88f15eef58440772e09414f64
[ "BSD-3-Clause" ]
78
2016-02-20T07:47:05.000Z
2021-05-01T13:33:31.000Z
soft/compiler.ctuning-cc/customize.py
G4V/ck-env
b882480b00b9dbd88f15eef58440772e09414f64
[ "BSD-3-Clause" ]
22
2016-07-29T07:25:11.000Z
2021-02-08T16:18:26.000Z
# # Collective Knowledge (individual environment - setup) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net # ############################################################################## # setup envir...
33.333333
116
0.572842
# # Collective Knowledge (individual environment - setup) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net # ############################################################################## # setup envir...
0
0
0
0
0
0
0
0
0
292b05d1269b68175aa7424e7be5c81a7dc02868
34,115
py
Python
scripts/external.py
tth030/SM_ESR_isostasy
fbd2ac586e8e31dd18a0988181514bc2fff7f08a
[ "MIT" ]
null
null
null
scripts/external.py
tth030/SM_ESR_isostasy
fbd2ac586e8e31dd18a0988181514bc2fff7f08a
[ "MIT" ]
null
null
null
scripts/external.py
tth030/SM_ESR_isostasy
fbd2ac586e8e31dd18a0988181514bc2fff7f08a
[ "MIT" ]
null
null
null
#!/usr/bin/env python import numpy as np import colorsys import matplotlib.pyplot as plt from matplotlib.ticker import (MultipleLocator, ScalarFormatter) import os import pyproj import pickle from statsmodels.stats.weightstats import DescrStatsW geod = pyproj.Geod(ellps='WGS84') def gmtColormap(fileName,GMTPath = No...
42.378882
179
0.563535
#!/usr/bin/env python import numpy as np import colorsys import matplotlib.pyplot as plt from matplotlib.ticker import (MultipleLocator, FormatStrFormatter, AutoMinorLocator,ScalarFormatter) import netCDF4 import os import pyproj import pickle from statsmodels.stats.weightstats import De...
0
0
0
0
0
12,773
0
86
298
7efc8c4fae98330e9b5cd2edb68a5c99c316055a
1,601
py
Python
connection_ss_simple.py
Liuzhe30/pygcn
ac13e8873b9eb7360ac88a88afb160db652e4699
[ "MIT" ]
null
null
null
connection_ss_simple.py
Liuzhe30/pygcn
ac13e8873b9eb7360ac88a88afb160db652e4699
[ "MIT" ]
null
null
null
connection_ss_simple.py
Liuzhe30/pygcn
ac13e8873b9eb7360ac88a88afb160db652e4699
[ "MIT" ]
null
null
null
import numpy as np content = np.loadtxt('/data/rasa.content') with open('/data/join.fasta') as fasta: with open('/data/rasa.cites', 'a+') as w: line = fasta.readline() num = 0 while line: if(line[0] == '>'): line = fasta.readline() continue ...
39.04878
134
0.381012
import numpy as np content = np.loadtxt('/data/rasa.content') with open('/data/join.fasta') as fasta: with open('/data/rasa.cites', 'a+') as w: line = fasta.readline() num = 0 while line: if(line[0] == '>'): line = fasta.readline() continue ...
0
0
0
0
0
0
0
0
0
81cccc9193a552e5305de4736e9b47ff1daf7cbb
431
py
Python
cpp/apps/MolecularEditor/py/gen_linkers.py
ProkopHapala/SimpleSimulationEngine
240f9b7e85b3a6eda7a27dc15fe3f7b8c08774c5
[ "MIT" ]
26
2016-12-04T04:45:12.000Z
2022-03-24T09:39:28.000Z
cpp/apps/MolecularEditor/py/gen_linkers.py
Aki78/FlightAI
9c5480f2392c9c89b9fee4902db0c4cde5323a6c
[ "MIT" ]
null
null
null
cpp/apps/MolecularEditor/py/gen_linkers.py
Aki78/FlightAI
9c5480f2392c9c89b9fee4902db0c4cde5323a6c
[ "MIT" ]
2
2019-02-09T12:31:06.000Z
2019-04-28T02:24:50.000Z
#!/usr/bin/python import numpy as np #fin = open("H56.bas",r) bas=np.genfromtxt("H56.bas", skip_header=1) #bas=bas[:5] #print( bas ) k0=30.0 l0=0.0 mol0=0 pos0 = np.array([0.0,0.0,0.0]) fout = open("linkers.ini",'w') fout.write("%i\n" %(len(bas)) ) for i,l in enumerate( bas ): pos = l[1:] fout.write("%i %i ...
15.962963
115
0.561485
#!/usr/bin/python import numpy as np #fin = open("H56.bas",r) bas=np.genfromtxt("H56.bas", skip_header=1) #bas=bas[:5] #print( bas ) k0=30.0 l0=0.0 mol0=0 pos0 = np.array([0.0,0.0,0.0]) fout = open("linkers.ini",'w') fout.write("%i\n" %(len(bas)) ) for i,l in enumerate( bas ): pos = l[1:] fout.write("%i %i ...
0
0
0
0
0
0
0
0
0
083025e9c10a03d7077ec680c49de682ca96c2ac
975
py
Python
reconstruct_itinerary.py
pranavdave893/Leetcode
1f30ea37af7b60585d168b15d9397143f53c92a1
[ "MIT" ]
null
null
null
reconstruct_itinerary.py
pranavdave893/Leetcode
1f30ea37af7b60585d168b15d9397143f53c92a1
[ "MIT" ]
null
null
null
reconstruct_itinerary.py
pranavdave893/Leetcode
1f30ea37af7b60585d168b15d9397143f53c92a1
[ "MIT" ]
null
null
null
abc = Solution() print (abc.findItinerary([["JFK","KUL"],["JFK","NRT"],["NRT","JFK"]])) # ["JFK","NRT","JFK","KUL"] print (abc.findItinerary([["MUC", "LHR"], ["JFK", "MUC"], ["SFO", "SJC"], ["LHR", "SFO"]])) print (abc.findItinerary([["JFK","SFO"],["JFK","ATL"],["SFO","ATL"],["ATL","JFK"],["ATL","SFO"]]))
30.46875
98
0.493333
from collections import defaultdict class Solution(object): def findItinerary(self, tickets): """ :type tickets: List[List[str]] :rtype: List[str] """ if not tickets: return [] tickets.sort(key=lambda x:x[1]) graph = defaultdict(list) for x,...
0
0
0
609
0
0
0
14
45
afd755dfee7d3d7bac1e03b8b5df69a6f5aad4ee
2,906
py
Python
RoadCrackSegmentation/train.py
ForrestPi/DefectDetection
7e999335ffbd50519cdfaba7de0d6bfa306a579a
[ "Unlicense" ]
4
2020-06-03T08:10:13.000Z
2021-06-11T09:46:48.000Z
RoadCrackSegmentation/train.py
ForrestPi/DefectDetection
7e999335ffbd50519cdfaba7de0d6bfa306a579a
[ "Unlicense" ]
null
null
null
RoadCrackSegmentation/train.py
ForrestPi/DefectDetection
7e999335ffbd50519cdfaba7de0d6bfa306a579a
[ "Unlicense" ]
1
2020-04-14T08:28:04.000Z
2020-04-14T08:28:04.000Z
import argparse, glob, os from keras.callbacks import ModelCheckpoint, ReduceLROnPlateau from keras.optimizers import Adam import data_loader from net.Unet import Net # from net.GCUnet import Net os.environ["CUDA_VISIBLE_DEVICES"] = "3" parser = argparse.ArgumentParser() parser.add_argument("--train_images", type=str...
38.236842
131
0.73916
import argparse, glob,os from keras.callbacks import ModelCheckpoint, LearningRateScheduler, EarlyStopping, ReduceLROnPlateau from keras.optimizers import Adam import data_loader from metrics import * from net.Unet import Net # from net.GCUnet import Net os.environ["CUDA_VISIBLE_DEVICES"] = "3" parser = argparse.Argu...
0
0
0
0
0
0
0
37
22
caa97c1dcca054cf4bc1742ac91c84392b651a86
476
py
Python
5th/date_time.py
byplacebo/introduction-to-programming-with-python_kor
73e2b023c30f0d70006540371b547e1ba5d020ff
[ "MIT" ]
null
null
null
5th/date_time.py
byplacebo/introduction-to-programming-with-python_kor
73e2b023c30f0d70006540371b547e1ba5d020ff
[ "MIT" ]
null
null
null
5th/date_time.py
byplacebo/introduction-to-programming-with-python_kor
73e2b023c30f0d70006540371b547e1ba5d020ff
[ "MIT" ]
null
null
null
import datetime print(datetime.date.today()) today = datetime.date.today() print(today) print(today.year) print(today.month) print(today.day) print(today.strftime("%d %b %Y")) print(today.strftime("%A %B %y")) print(today.strftime("Please attend out event %A, %B %d in the year %Y")) userInput = input("Please enter ...
22.666667
73
0.712185
import datetime print(datetime.date.today()) today = datetime.date.today() print(today) print(today.year) print(today.month) print(today.day) print(today.strftime("%d %b %Y")) print(today.strftime("%A %B %y")) print(today.strftime("Please attend out event %A, %B %d in the year %Y")) userInput = input("Please enter ...
0
0
0
0
0
0
0
0
0
4c4d5fd83018f166f6ed697aab80a4fea008d871
7,005
py
Python
zobs/ross/hf_precip_all.py
NMTHydro/Recharge
bbc1a05add92064acffeffb19f04e370b99a7918
[ "Apache-2.0" ]
7
2016-08-30T15:18:11.000Z
2021-08-22T00:28:10.000Z
zobs/ross/hf_precip_all.py
dgketchum/etrm
f74f5771fbc6ba5750a790e384eac422b598325a
[ "Apache-2.0" ]
2
2016-06-08T06:41:45.000Z
2016-06-23T20:47:26.000Z
zobs/ross/hf_precip_all.py
dgketchum/etrm
f74f5771fbc6ba5750a790e384eac422b598325a
[ "Apache-2.0" ]
1
2018-09-18T10:38:08.000Z
2018-09-18T10:38:08.000Z
# =============================================================================== # Copyright 2016 ross # # 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/LICE...
42.97546
116
0.47666
# =============================================================================== # Copyright 2016 ross # # 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/LICE...
0
0
0
0
0
5,499
0
27
133
9dad5462e0f34fe2372c1417e1e6437ba154dbda
115
py
Python
python/setup.py
brkyvz/test-python
73ca100915542cdde9aab2bdb97d1f37dc107249
[ "Apache-2.0" ]
892
2016-02-13T19:33:07.000Z
2022-03-29T09:49:49.000Z
graphframes-dist/graphframes-0.4.0-spark2.1-s_2.11/python/setup.py
thuongdinh-agilityio/docker-spark-anaconda
79834649704e94678752aef6e34b47b649c26349
[ "MIT" ]
380
2016-02-03T23:10:21.000Z
2022-02-24T05:52:31.000Z
graphframes-dist/graphframes-0.4.0-spark2.1-s_2.11/python/setup.py
thuongdinh-agilityio/docker-spark-anaconda
79834649704e94678752aef6e34b47b649c26349
[ "MIT" ]
250
2016-02-03T00:02:52.000Z
2022-03-28T08:46:07.000Z
# Your python setup file. An example can be found at: # https://github.com/pypa/sampleproject/blob/master/setup.py
38.333333
60
0.765217
# Your python setup file. An example can be found at: # https://github.com/pypa/sampleproject/blob/master/setup.py
0
0
0
0
0
0
0
0
0
a06fa2fed28030104a105135e887bc003bb4ac6c
9,122
py
Python
NLPCode/sentiment_analysis/LSTM/main.py
trusthlt/dp-across-nlp-tasks
ec3e03511420044cdb0bb1a3574925d354ff03f4
[ "Apache-2.0" ]
1
2021-12-21T14:05:34.000Z
2021-12-21T14:05:34.000Z
NLPCode/sentiment_analysis/LSTM/main.py
trusthlt/dp-across-nlp-tasks
ec3e03511420044cdb0bb1a3574925d354ff03f4
[ "Apache-2.0" ]
null
null
null
NLPCode/sentiment_analysis/LSTM/main.py
trusthlt/dp-across-nlp-tasks
ec3e03511420044cdb0bb1a3574925d354ff03f4
[ "Apache-2.0" ]
null
null
null
import sys import os sys.path.insert(1, os.path.join(sys.path[0], '..')) import torch.optim as optim import torch.nn as nn # download the dataset takes time so only do it once since it is not effected by the SEED if __name__ == "__main__": pass
46.540816
228
0.638128
import sys import os sys.path.insert(1, os.path.join(sys.path[0], '..')) import torch from torchtext.legacy import data from torchtext.legacy import datasets import random import torch.optim as optim import torch.nn as nn import time from train_eval_models import train, evaluate from lstm_model import LSTM from utils i...
12
0
0
0
0
8,411
0
97
355
006efc88627e312fb8810bcd78fa7b9cddb78c3f
659
py
Python
BOJ/exaustive_search_boj/start_link.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
BOJ/exaustive_search_boj/start_link.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
BOJ/exaustive_search_boj/start_link.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
# BOJ 14889 import sys from itertools import combinations si = sys.stdin.readline n = int(si()) graph = [list(map(int, si().split())) for _ in range(n)] people = [i for i in range(n)] comb = list(combinations(people, n // 2)) size = len(comb) start = comb[: size // 2] link = list(reversed(comb[size // 2 :])) sub = 1...
20.59375
56
0.569044
# BOJ 14889 import sys from itertools import combinations si = sys.stdin.readline n = int(si()) graph = [list(map(int, si().split())) for _ in range(n)] people = [i for i in range(n)] comb = list(combinations(people, n // 2)) size = len(comb) start = comb[: size // 2] link = list(reversed(comb[size // 2 :])) sub = 1...
0
0
0
0
0
0
0
0
0
f18108c4b4b18796e84bfc2bec317d23dbceab63
1,117
py
Python
leetcode/math/largest-time-for-given-digits.py
jaimeulloa61/data-structure-and-algorithms
76140bb36b62ebc7c60914c48a323aae4956fb0a
[ "MIT" ]
81
2020-05-22T14:22:04.000Z
2021-12-18T10:11:23.000Z
leetcode/math/largest-time-for-given-digits.py
jaimeulloa61/data-structure-and-algorithms
76140bb36b62ebc7c60914c48a323aae4956fb0a
[ "MIT" ]
4
2020-08-06T21:08:00.000Z
2021-03-31T16:07:50.000Z
leetcode/math/largest-time-for-given-digits.py
jaimeulloa61/data-structure-and-algorithms
76140bb36b62ebc7c60914c48a323aae4956fb0a
[ "MIT" ]
37
2020-05-22T14:25:21.000Z
2021-12-30T03:13:13.000Z
""" ## Questions: EASY ### 949. [Largest Time for Given Digits](https://leetcode.com/problems/largest-time-for-given-digits) Given an array of 4 digits, return the largest 24 hour time that can be made. The smallest 24 hour time is 00:00, and the largest is 23:59. Starting from 00:00, a time is larger if more time ...
24.822222
117
0.622202
""" ## Questions: EASY ### 949. [Largest Time for Given Digits](https://leetcode.com/problems/largest-time-for-given-digits) Given an array of 4 digits, return the largest 24 hour time that can be made. The smallest 24 hour time is 00:00, and the largest is 23:59. Starting from 00:00, a time is larger if more time ...
0
0
0
322
0
0
0
13
45
2d9606afaaacd45328bcef0d50dd3a9ce97bc2cc
3,244
py
Python
docs/conf.py
Substancia/fdtd
9444deba9a31f9ef4b4618c1b6c753cf46cc1ae7
[ "MIT" ]
null
null
null
docs/conf.py
Substancia/fdtd
9444deba9a31f9ef4b4618c1b6c753cf46cc1ae7
[ "MIT" ]
null
null
null
docs/conf.py
Substancia/fdtd
9444deba9a31f9ef4b4618c1b6c753cf46cc1ae7
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
34.147368
79
0.664612
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
0
0
0
0
0
140
0
0
45
5d5cfccfe104c17e1292b078cb47b07be3d866c4
1,065
py
Python
app/deleteuser.py
ST4NSB/music-recommendation-system
eb8fef34b96a097b78c58e908307032f043bfcd2
[ "MIT" ]
null
null
null
app/deleteuser.py
ST4NSB/music-recommendation-system
eb8fef34b96a097b78c58e908307032f043bfcd2
[ "MIT" ]
null
null
null
app/deleteuser.py
ST4NSB/music-recommendation-system
eb8fef34b96a097b78c58e908307032f043bfcd2
[ "MIT" ]
1
2021-09-04T21:17:37.000Z
2021-09-04T21:17:37.000Z
from flask import make_response
35.5
74
0.613146
from typing import Any, Dict from flask import jsonify, make_response, request, abort from flask.helpers import make_response from flask_restful import Resource from werkzeug.exceptions import HTTPException from werkzeug.wrappers import Response class DeleteUser(Resource): def __init__(self, rs: Any, api_key: str)...
0
0
0
777
0
0
0
104
133
4c2412ee0bfe7391af1f0ace035b2d7d655dc6b5
872
py
Python
visual_mpc/policy/handcrafted/playback_policy.py
thomasweng15/visual_foresight
0f00ffcfc05e9ce47d76d440d91c298a35d8f7b1
[ "MIT" ]
108
2018-12-04T04:57:07.000Z
2022-03-15T21:13:36.000Z
visual_mpc/policy/handcrafted/playback_policy.py
thomasweng15/visual_foresight
0f00ffcfc05e9ce47d76d440d91c298a35d8f7b1
[ "MIT" ]
16
2019-03-12T13:31:45.000Z
2022-03-11T23:36:12.000Z
visual_mpc/policy/handcrafted/playback_policy.py
thomasweng15/visual_foresight
0f00ffcfc05e9ce47d76d440d91c298a35d8f7b1
[ "MIT" ]
35
2018-12-05T08:41:54.000Z
2022-03-15T21:13:37.000Z
import sys if sys.version_info[0] < 3: import cPickle as pkl else:
30.068966
70
0.649083
import numpy as np from visual_mpc.policy.policy import Policy import sys if sys.version_info[0] < 3: import cPickle as pkl else: import pickle as pkl class PlaybackPolicy(Policy): def __init__(self, agentparams, policyparams, gpu_id, npgu): self._hp = self._default_hparams() self._overrid...
0
0
0
689
0
0
0
18
93
705c2e7f64edcd9f9ffde7a0277d8c6b633c79e3
2,338
py
Python
portfolio/Python/scrapy/netthandelen/coverbrands_spider.py
0--key/lib
ba7a85dda2b208adc290508ca617bdc55a5ded22
[ "Apache-2.0" ]
null
null
null
portfolio/Python/scrapy/netthandelen/coverbrands_spider.py
0--key/lib
ba7a85dda2b208adc290508ca617bdc55a5ded22
[ "Apache-2.0" ]
null
null
null
portfolio/Python/scrapy/netthandelen/coverbrands_spider.py
0--key/lib
ba7a85dda2b208adc290508ca617bdc55a5ded22
[ "Apache-2.0" ]
5
2016-03-22T07:40:46.000Z
2021-05-30T16:12:21.000Z
import os HERE = os.path.abspath(os.path.dirname(__file__))
50.826087
151
0.639008
import os from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.url import urljoin_rfc from scrapy.utils.response import get_base_url from product_spiders.items import Product, ProductLoaderWithNameStrip as ProductLoader from ...
0
0
0
1,858
0
0
0
219
200
70ec56ff780f5dd797f1ef1f0a062e333cc08162
1,829
py
Python
tests/integration/agent/test_agent_manager.py
datacraft-dsc/starfish-py
95ff24410f056e8e2d313c3af97439fe003e294a
[ "Apache-2.0" ]
4
2019-02-08T03:47:36.000Z
2019-10-17T21:45:23.000Z
tests/integration/agent/test_agent_manager.py
datacraft-dsc/starfish-py
95ff24410f056e8e2d313c3af97439fe003e294a
[ "Apache-2.0" ]
81
2019-02-09T01:01:51.000Z
2020-07-01T08:35:07.000Z
tests/integration/agent/test_agent_manager.py
oceanprotocol/ocean-py
318ad0de2519e61d0a301c040a48d1839cd82425
[ "Apache-2.0" ]
1
2021-01-28T12:14:03.000Z
2021-01-28T12:14:03.000Z
""" Unit test AgentManager """
25.054795
83
0.726627
""" Unit test AgentManager """ import pytest import secrets from starfish.agent_manager import AgentManager from starfish.asset import DataAsset from starfish.network.ddo import DDO def test_agent_manager_register(config): manager = AgentManager() manager.register_agents(config['agents']) assert(mana...
0
0
0
0
0
1,572
0
41
180
032adfb13952d189310f2016bb5a3fedf65a3dad
2,356
py
Python
ahvl/options/lookup/sshhostkey.py
gardar/ahvl
045b5882d94fc2d4ba7b194bf65ebfbf9d2e1d6d
[ "MIT" ]
4
2019-10-12T12:11:23.000Z
2021-12-20T13:53:28.000Z
ahvl/options/lookup/sshhostkey.py
gardar/ahvl
045b5882d94fc2d4ba7b194bf65ebfbf9d2e1d6d
[ "MIT" ]
2
2021-02-05T12:52:55.000Z
2022-02-11T10:58:52.000Z
ahvl/options/lookup/sshhostkey.py
gardar/ahvl
045b5882d94fc2d4ba7b194bf65ebfbf9d2e1d6d
[ "MIT" ]
1
2020-08-13T07:52:27.000Z
2020-08-13T07:52:27.000Z
# # import modules # from ahvl.helper import AhvlMsg, AhvlHelper # # helper/message # msg = AhvlMsg() hlp = AhvlHelper() # # OptionsLookupSSHHostKey #
24.040816
129
0.532683
# # import modules # from ahvl.options.base import OptionsBase from ahvl.helper import AhvlMsg, AhvlHelper # # helper/message # msg = AhvlMsg() hlp = AhvlHelper() # # OptionsLookupSSHHostKey # class OptionsLookupSSHHostKey(OptionsBase): # set option prefix def get_prefix(self): # return option prefi...
0
0
0
2,139
0
0
0
20
44
3a1594135a5ff0e3497e305d1ed292ee397596f7
1,276
py
Python
tests/integration/__init__.py
codeanonorg/Simple
f96d241f6a39e9f9dc949a3598cd46f4b6d044f4
[ "MIT" ]
2
2021-01-23T23:33:08.000Z
2021-01-24T14:01:53.000Z
tests/integration/__init__.py
codeanonorg/Simple
f96d241f6a39e9f9dc949a3598cd46f4b6d044f4
[ "MIT" ]
null
null
null
tests/integration/__init__.py
codeanonorg/Simple
f96d241f6a39e9f9dc949a3598cd46f4b6d044f4
[ "MIT" ]
null
null
null
""" Copyright (c) 2021 SolarLiner, jdrprod, Arxaqapi This software is released under the MIT License. https://opensource.org/licenses/MIT """
27.73913
83
0.583072
""" Copyright (c) 2021 SolarLiner, jdrprod, Arxaqapi This software is released under the MIT License. https://opensource.org/licenses/MIT """ import os import json import unittest from pathlib import Path from Simple.document import Document class FolderExpansionTest(unittest.TestCase): def __init__(self, ...
0
0
0
979
0
0
0
-10
158
4d22960ef5f9a340afb99d07dec3bd573b96f594
2,096
py
Python
lesson 1/parseXLS.py
olive-everest/wrangling_mongodb
f4af9c0e5d6ac9611b2a1b6dc2b2ed46df07bc15
[ "MIT" ]
2
2020-03-03T23:57:09.000Z
2020-10-20T03:30:40.000Z
lesson 1/parseXLS.py
olive-everest/wrangling_mongodb
f4af9c0e5d6ac9611b2a1b6dc2b2ed46df07bc15
[ "MIT" ]
null
null
null
lesson 1/parseXLS.py
olive-everest/wrangling_mongodb
f4af9c0e5d6ac9611b2a1b6dc2b2ed46df07bc15
[ "MIT" ]
2
2018-09-03T21:48:51.000Z
2019-05-27T07:45:42.000Z
#!~/envs/python3/udacity_python_mongodb import pprint datafile = "datasets/2013_ERCOT_Hourly_Load_Data.xls" data = parse_file(datafile) pprint.pprint(data) assert data['maxtime'] == (2013, 8, 13, 17, 0, 0) assert round(data['maxvalue'], 10) == round(18779.02551, 10)
27.578947
113
0.614504
#!~/envs/python3/udacity_python_mongodb import xlrd import pprint datafile = "datasets/2013_ERCOT_Hourly_Load_Data.xls" def parse_file(datafile): workbook = xlrd.open_workbook(datafile) sheet = workbook.sheet_by_index(0) data = [ [ sheet.cell_value(r, col) for col in ra...
0
0
0
0
0
1,787
0
-10
46
f2cc08c2712855bb70c1b2df5f5eceb724bfcb74
2,611
py
Python
LinkedList/NthNode.py
pritsheth/Algorithms-Python
b8af30cbf95a772c9b9b997a30ff2c8b56a040e0
[ "MIT" ]
null
null
null
LinkedList/NthNode.py
pritsheth/Algorithms-Python
b8af30cbf95a772c9b9b997a30ff2c8b56a040e0
[ "MIT" ]
null
null
null
LinkedList/NthNode.py
pritsheth/Algorithms-Python
b8af30cbf95a772c9b9b997a30ff2c8b56a040e0
[ "MIT" ]
null
null
null
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None l1 = ListNode(1) l2 = ListNode(6) l3 = ListNode(2) l4 = ListNode(5) l5 = ListNode(4) l1.next = l2 l2.next = l3 l3.next = l4 l4.next = l5 list = [1,2,3,4] print("cond",list) s = S...
20.24031
57
0.475297
class Solution(object): def mergeKLists(self, lists): """ :type lists: List[ListNode] :rtype: ListNode """ head = point = ListNode(0) q = PriorityQueue() for l in lists: if l: q.put((l.val, l)) while not q.empty(): ...
0
0
0
2,165
0
0
0
0
69
af764e5dafc2947fe07066ff6030906511929558
4,562
py
Python
language-model/optimizers/.ipynb_checkpoints/SRRAdam-checkpoint.py
minhtannguyen/RAdam
44f403288df375bae0785cc82dd8c888eaaaa441
[ "Apache-2.0" ]
null
null
null
language-model/optimizers/.ipynb_checkpoints/SRRAdam-checkpoint.py
minhtannguyen/RAdam
44f403288df375bae0785cc82dd8c888eaaaa441
[ "Apache-2.0" ]
null
null
null
language-model/optimizers/.ipynb_checkpoints/SRRAdam-checkpoint.py
minhtannguyen/RAdam
44f403288df375bae0785cc82dd8c888eaaaa441
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Scheduled restarting RAdam """
43.447619
176
0.47523
# -*- coding: utf-8 -*- """ Scheduled restarting RAdam """ import math import torch from optimizer import Optimizer class SRRAdam(Optimizer): def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=5e-4, iter_count=1, restarting_iter=50): defaults = dict(lr=lr, betas=betas, eps=eps, ...
0
0
0
4,424
0
0
0
-9
89
69cc881c3132317dc99b291b997c426537752b21
591
py
Python
_Dist/NeuralNetworks/_Tests/_UnitTests/UnitTestUtil.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
1,107
2016-09-21T02:18:36.000Z
2022-03-29T02:52:12.000Z
_Dist/NeuralNetworks/_Tests/_UnitTests/UnitTestUtil.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
18
2016-12-22T10:24:47.000Z
2022-03-11T23:18:43.000Z
_Dist/NeuralNetworks/_Tests/_UnitTests/UnitTestUtil.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
776
2016-12-21T12:08:08.000Z
2022-03-21T06:12:08.000Z
import os root_cwd = os.path.abspath("../")
31.105263
69
0.700508
import os import shutil root_cwd = os.path.abspath("../") def clear_cache(): cwd = os.getcwd() local_data_folder = os.path.join(cwd, "_Data") if os.path.isdir(local_data_folder): shutil.rmtree(local_data_folder) shutil.rmtree(os.path.join(cwd, "_Models")) remote_cache_folder = os.path.joi...
0
0
0
0
0
508
0
-8
45
6f5491579cffa286e720c032978958a0958d8bfb
7,293
py
Python
cryptonote/classes/wallet/address.py
kayabaNerve/cryptonote-library
00bef43527172cffa75c2445430f36ceb80fbcb6
[ "MIT" ]
8
2020-11-08T07:13:43.000Z
2021-09-20T11:14:23.000Z
cryptonote/classes/wallet/address.py
kayabaNerve/cryptonote-library
00bef43527172cffa75c2445430f36ceb80fbcb6
[ "MIT" ]
7
2020-11-08T04:23:32.000Z
2022-03-24T04:26:13.000Z
cryptonote/classes/wallet/address.py
kayabaNerve/cryptonote-library
00bef43527172cffa75c2445430f36ceb80fbcb6
[ "MIT" ]
5
2020-11-08T06:09:38.000Z
2021-05-10T17:52:24.000Z
"""Address file. Handles address encoding and decoding.""" # Types. # Keccak hash function. # Crypto class. # Base58 Character Set. BASE58: str = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" # AddressError. # Address class.
34.728571
92
0.574386
"""Address file. Handles address encoding and decoding.""" # Types. from typing import Tuple, Optional, Any # Keccak hash function. from Cryptodome.Hash import keccak # Crypto class. from cryptonote.crypto.crypto import Crypto # Base58 Character Set. BASE58: str = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqr...
0
2,527
0
4,356
0
0
0
53
110
ea472ba98b118db51678256b53b75e13e1db4839
5,171
py
Python
tests/mypy/test_mypy.py
jasujm/pydantic
cc1cb4826c74ac5b651ef2d80c3478428a9950ca
[ "MIT" ]
1
2020-05-03T06:32:47.000Z
2020-05-03T06:32:47.000Z
tests/mypy/test_mypy.py
jasujm/pydantic
cc1cb4826c74ac5b651ef2d80c3478428a9950ca
[ "MIT" ]
189
2020-07-12T08:13:29.000Z
2022-03-28T01:16:29.000Z
tests/mypy/test_mypy.py
jasujm/pydantic
cc1cb4826c74ac5b651ef2d80c3478428a9950ca
[ "MIT" ]
2
2021-11-23T16:28:21.000Z
2021-11-23T16:28:33.000Z
import os from pathlib import Path try: from mypy import api as mypy_api except ImportError: mypy_api = None # type: ignore try: import dotenv except ImportError: dotenv = None # type: ignore # This ensures mypy can find the test files, no matter where tests are run from: os.chdir(Path(__file__).pa...
46.169643
116
0.705473
import importlib import os import re from pathlib import Path import pytest try: from mypy import api as mypy_api except ImportError: mypy_api = None # type: ignore try: import dotenv except ImportError: dotenv = None # type: ignore # This ensures mypy can find the test files, no matter where test...
0
2,907
0
0
0
512
0
-25
159
f8b9e4e8b0c62ee60777e7974dd1a400acc61e2c
18,835
py
Python
cli/aps.py
Verimatrix/app-shield-protect
1e9e02ef2760139fb7cf6efc0e22155234e7aa4c
[ "MIT" ]
19
2021-04-26T15:38:22.000Z
2022-03-30T20:01:20.000Z
cli/aps.py
Daniel1Rosen/app-shield-protect
1e9e02ef2760139fb7cf6efc0e22155234e7aa4c
[ "MIT" ]
1
2021-03-11T14:20:55.000Z
2021-03-11T17:32:13.000Z
cli/aps.py
Daniel1Rosen/app-shield-protect
1e9e02ef2760139fb7cf6efc0e22155234e7aa4c
[ "MIT" ]
1
2022-01-06T20:53:32.000Z
2022-01-06T20:53:32.000Z
#!/usr/bin/python '''Entrypoint for APS CLI''' import logging import os LOGGER = logging.getLogger(__name__) # set environment variables that control coloredlog module output os.environ['COLOREDLOGS_LOG_FORMAT'] = '%(levelname)s:%(message)s' os.environ['COLOREDLOGS_FIELD_STYLES'] = '' os.environ['COLOREDLOGS_LEVEL_ST...
43.700696
124
0.628935
#!/usr/bin/python '''Entrypoint for APS CLI''' import argparse import json import logging import os import sys import traceback import coloredlogs from aps_commands import ApsCommands from aps_utils import get_config, authenticate_secret LOGGER = logging.getLogger(__name__) # set environment variables that control ...
0
0
0
17,625
0
0
0
12
179
9cd14774cef42968c64c6869f09ed35f3728ce7a
2,379
py
Python
botx/bots/mixins/collectors.py
ExpressApp/pybotx
97c8b1ce5d45a05567ed01d545cb43174a2dcbb9
[ "MIT" ]
13
2021-01-21T12:43:10.000Z
2022-03-23T11:11:59.000Z
botx/bots/mixins/collectors.py
ExpressApp/pybotx
97c8b1ce5d45a05567ed01d545cb43174a2dcbb9
[ "MIT" ]
259
2020-02-26T08:51:03.000Z
2022-03-23T11:08:36.000Z
botx/bots/mixins/collectors.py
ExpressApp/pybotx
97c8b1ce5d45a05567ed01d545cb43174a2dcbb9
[ "MIT" ]
5
2019-12-02T16:19:22.000Z
2021-11-22T20:33:34.000Z
"""Definition for bot's collecting component. All of this methods are just wrappers around inner collector. """
30.896104
85
0.688525
"""Definition for bot's collecting component. All of this methods are just wrappers around inner collector. """ from typing import Any, List, Optional, Sequence from botx.bots.mixins.collecting.add_handler import AddHandlerMixin from botx.bots.mixins.collecting.default import DefaultHandlerMixin from botx.bots.mixin...
0
186
0
1,506
0
0
0
350
223
7f4f696664f38e804ec5049ca26eb5c74828b503
1,455
py
Python
cds_ils/ldap/cli.py
kpsherva/cds-ils
8eeeb6e03784756ed24895c8d030682f9d733e8a
[ "MIT" ]
6
2020-09-18T00:13:38.000Z
2021-11-14T17:12:19.000Z
cds_ils/ldap/cli.py
kpsherva/cds-ils
8eeeb6e03784756ed24895c8d030682f9d733e8a
[ "MIT" ]
321
2020-08-28T15:42:25.000Z
2022-03-14T15:11:50.000Z
cds_ils/ldap/cli.py
kpsherva/cds-ils
8eeeb6e03784756ed24895c8d030682f9d733e8a
[ "MIT" ]
4
2020-08-31T08:55:47.000Z
2022-01-14T11:30:23.000Z
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2020 CERN. # # cds-migrator-kit is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """CDS-ILS ldap users CLI."""
25.982143
77
0.717526
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2020 CERN. # # cds-migrator-kit is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """CDS-ILS ldap users CLI.""" import click from flask import current_app fr...
0
780
0
0
0
0
0
127
270
eb6df24de1ebfc73472eb5e92e6a7151f65ea7fd
1,354
py
Python
myDjangoProject/myDjangoProject/SSHConn.py
yueheng-li/pythonLearn
375028537be08a8ae14104bf439172816017323e
[ "MIT" ]
null
null
null
myDjangoProject/myDjangoProject/SSHConn.py
yueheng-li/pythonLearn
375028537be08a8ae14104bf439172816017323e
[ "MIT" ]
null
null
null
myDjangoProject/myDjangoProject/SSHConn.py
yueheng-li/pythonLearn
375028537be08a8ae14104bf439172816017323e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
27.632653
89
0.718612
# -*- coding: utf-8 -*- import paramiko import logging class SSHConn: logger = logging.getLogger('scripts') def __init__(self, hostname, port, username, password): self.client = paramiko.SSHClient() self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.client.connect(hostname=hostname, port=...
66
0
0
1,254
0
0
0
-13
67
91d9922392d11c99a25f3dd872cb144761ea21f3
1,732
py
Python
pytdx/pytdx/parser/get_company_info_content.py
iamweilee/nodetdx
5048cb25da6aae18e3204fa365e92866c0914340
[ "MIT" ]
7
2021-06-27T11:42:00.000Z
2022-03-15T15:01:29.000Z
pytdx/pytdx/parser/get_company_info_content.py
hitrading/nodetdx
5048cb25da6aae18e3204fa365e92866c0914340
[ "MIT" ]
null
null
null
pytdx/pytdx/parser/get_company_info_content.py
hitrading/nodetdx
5048cb25da6aae18e3204fa365e92866c0914340
[ "MIT" ]
2
2021-07-08T03:44:41.000Z
2021-09-15T00:41:19.000Z
# coding=utf-8
34.64
264
0.691109
# coding=utf-8 from pytdx.parser.base import BaseParser from pytdx.helper import get_datetime, get_volume, get_price from collections import OrderedDict import struct import six import zlib class GetCompanyInfoContent(BaseParser): def setParams(self, market, code, filename, start, length): if type(code)...
0
0
0
1,071
0
424
0
43
179
7d8dbfd1ee273cc85c76d1e6dd4508382ec92620
5,927
py
Python
wsrpc/__init__.py
guyingbo/websocket-rpc
326765cd660b5ae4c77cea456ca774deae80e9f6
[ "MIT" ]
8
2018-01-22T12:03:13.000Z
2021-07-06T15:24:48.000Z
wsrpc/__init__.py
guyingbo/websocket-rpc
326765cd660b5ae4c77cea456ca774deae80e9f6
[ "MIT" ]
2
2019-10-22T17:43:15.000Z
2020-04-27T15:09:36.000Z
wsrpc/__init__.py
guyingbo/websocket-rpc
326765cd660b5ae4c77cea456ca774deae80e9f6
[ "MIT" ]
1
2020-06-08T19:34:13.000Z
2020-06-08T19:34:13.000Z
"""msgpack rpc over websockets""" import logging logger = logging.getLogger(__name__) __version__ = "0.0.6"
31.359788
86
0.596254
"""msgpack rpc over websockets""" import asyncio import inspect import itertools import logging import typing import msgpack # type: ignore logger = logging.getLogger(__name__) __version__ = "0.0.6" class RPCError(Exception): pass class RemoteCallError(Exception): pass class WebsocketRPC: REQUEST =...
0
0
3,345
2,260
0
0
0
-34
242
c945c07012decbd51269c28e92ef14a6644a2d2e
1,279
py
Python
tests/neurofire/datasets/isbi/loaders/master.py
nasimrahaman/neurofire
4d645be149165da4c8202fe13b3c2360c2832383
[ "MIT" ]
9
2018-01-29T07:30:14.000Z
2022-03-09T04:23:14.000Z
tests/neurofire/datasets/isbi/loaders/master.py
nasimrahaman/neurofire
4d645be149165da4c8202fe13b3c2360c2832383
[ "MIT" ]
1
2017-12-19T14:27:18.000Z
2017-12-19T15:35:59.000Z
tests/neurofire/datasets/isbi/loaders/master.py
nasimrahaman/neurofire
4d645be149165da4c8202fe13b3c2360c2832383
[ "MIT" ]
5
2018-01-27T12:16:37.000Z
2020-01-20T13:14:26.000Z
if __name__ == '__main__': TestMaster().test_master()
36.542857
96
0.621579
import os import unittest class TestMaster(unittest.TestCase): DATA_CONFIG = os.path.join(os.path.dirname(__file__), 'data_config_test.yml') PLOT_DIRECTORY = os.path.join(os.path.dirname(__file__), 'plots') def test_master(self): from neurofire.datasets.isbi2012.loaders.master import ISBI2012Data...
0
0
0
1,170
0
0
0
-18
67
8f92f89adceb8143275e8758b8bfe37c82df0da9
481
py
Python
setup.py
DiegoLigtenberg/Workspace-MasterThesis-MSS
e8183031b6223051049f48e0da2bc2824e60239e
[ "MIT" ]
null
null
null
setup.py
DiegoLigtenberg/Workspace-MasterThesis-MSS
e8183031b6223051049f48e0da2bc2824e60239e
[ "MIT" ]
null
null
null
setup.py
DiegoLigtenberg/Workspace-MasterThesis-MSS
e8183031b6223051049f48e0da2bc2824e60239e
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name="mss_project", version="1.0", author="Diego Ligtenberg", author_email="diegoligtenberg@gmail.com", description="Master Thesis about Music Source Separation, and Instrument classification", license="MIT", long_description=("README"), ...
30.0625
93
0.711019
from setuptools import setup, find_packages setup( name="mss_project", version="1.0", author="Diego Ligtenberg", author_email="diegoligtenberg@gmail.com", description="Master Thesis about Music Source Separation, and Instrument classification", license="MIT", long_description=("README"), ...
0
0
0
0
0
0
0
0
0
3f84395d2f49e57e7b6548b518e2f701e3b76824
236
py
Python
backend/reports/admin.py
nikhilkutinha/athena
dd46eac06ed3bf2d24e4c0882c1a79adca8025b5
[ "MIT" ]
1
2021-02-12T10:25:03.000Z
2021-02-12T10:25:03.000Z
backend/reports/admin.py
nikhilkutinha/athena
dd46eac06ed3bf2d24e4c0882c1a79adca8025b5
[ "MIT" ]
null
null
null
backend/reports/admin.py
nikhilkutinha/athena
dd46eac06ed3bf2d24e4c0882c1a79adca8025b5
[ "MIT" ]
null
null
null
from django.contrib import admin from . models import Region, Report admin.site.register(Region, RegionAdmin) admin.site.register(Report)
23.6
57
0.771186
from django.contrib import admin from . models import Region, Report class RegionAdmin(admin.ModelAdmin): list_display = ('name', 'get_type_display', 'parent') admin.site.register(Region, RegionAdmin) admin.site.register(Report)
0
0
0
73
0
0
0
0
23
df8b64d264ab4c00a24b54e27a1d1471a8499466
2,390
py
Python
tardis/configuration/configuration.py
stwunsch/tardis
cfc01a7a3b2e58e7e88653dd8d119a724e27d620
[ "MIT" ]
11
2019-06-06T14:44:56.000Z
2021-12-17T19:46:18.000Z
tardis/configuration/configuration.py
stwunsch/tardis
cfc01a7a3b2e58e7e88653dd8d119a724e27d620
[ "MIT" ]
165
2019-04-26T09:31:19.000Z
2022-03-09T16:45:45.000Z
tardis/configuration/configuration.py
stwunsch/tardis
cfc01a7a3b2e58e7e88653dd8d119a724e27d620
[ "MIT" ]
12
2019-06-06T14:06:15.000Z
2021-12-21T12:31:03.000Z
# Need to import all pyyaml loadable classes (bootstrapping problem) FIX ME
36.769231
81
0.667364
from ..interfaces.borg import Borg from ..utilities.attributedict import AttributeDict from ..utilities.attributedict import convert_to_attribute_dict # Need to import all pyyaml loadable classes (bootstrapping problem) FIX ME from ..utilities.executors import * # noqa: F403, F401 from ..utilities.simulators import *...
0
1,143
0
0
0
685
0
175
308
120369d341d9b59da985a66835a1ca1e27100fb4
3,626
py
Python
src/sparsezoo/requests/get.py
signalism/sparsezoo
5ca44f8cb514e80844034920d743baba97279ec2
[ "Apache-2.0" ]
116
2021-02-04T17:51:22.000Z
2022-03-25T03:15:19.000Z
src/sparsezoo/requests/get.py
PIlotcnc/new
6e6413632de01f6acf691dca8fadb84f841444b9
[ "Apache-2.0" ]
15
2021-02-13T12:00:40.000Z
2022-03-17T18:44:54.000Z
src/sparsezoo/requests/get.py
PIlotcnc/new
6e6413632de01f6acf691dca8fadb84f841444b9
[ "Apache-2.0" ]
11
2021-02-04T22:20:47.000Z
2021-12-03T12:20:09.000Z
# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
32.088496
88
0.714286
# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
0
0
0
0
0
0
0
0
0
0a9e5488d671080d52c88d3170387721e61d8893
4,851
py
Python
data_filter.py
linmengsysu/isonode
e471def853adbcbc25ef169c178510bbcddeab38
[ "MIT" ]
1
2022-01-28T23:59:24.000Z
2022-01-28T23:59:24.000Z
data_filter.py
linmengsysu/isonode
e471def853adbcbc25ef169c178510bbcddeab38
[ "MIT" ]
null
null
null
data_filter.py
linmengsysu/isonode
e471def853adbcbc25ef169c178510bbcddeab38
[ "MIT" ]
null
null
null
# from pytorch_transformers import * # from sklearn.preprocessing import OneHotEncoder, LabelBinarizer, MultiLabelBinarizer # from data import * # import gensim # from gensim.models import Word2Vec # from tqdm import tqdm # from tqdm import tqdm_notebook as tqdm # Comment this line if using jupyter notebook import ar...
37.604651
141
0.603793
# from pytorch_transformers import * # from sklearn.preprocessing import OneHotEncoder, LabelBinarizer, MultiLabelBinarizer # from data import * # import gensim # from gensim.models import Word2Vec # from tqdm import tqdm # from tqdm import tqdm_notebook as tqdm # Comment this line if using jupyter notebook from scip...
0
0
0
0
0
0
0
-5
44
53535af0d4e9f21ee100b03504a8ad034178c9c9
738
py
Python
planners/mouseSampler.py
jkwang1992/rrdt
5579081fc53f56573c772ff9a894c0093e0bc5e0
[ "MIT" ]
8
2019-05-21T04:40:53.000Z
2020-10-17T07:20:04.000Z
planners/mouseSampler.py
soraxas/rrdt
5579081fc53f56573c772ff9a894c0093e0bc5e0
[ "MIT" ]
null
null
null
planners/mouseSampler.py
soraxas/rrdt
5579081fc53f56573c772ff9a894c0093e0bc5e0
[ "MIT" ]
3
2021-07-16T07:06:14.000Z
2022-02-09T12:06:06.000Z
""" For demo / testing only. This policy wait for user mouse input for next sampling node. """
27.333333
110
0.650407
import time import pygame from overrides import overrides from planners.baseSampler import Sampler """ For demo / testing only. This policy wait for user mouse input for next sampling node. """ class MouseSampler(Sampler): @overrides def get_next_pos(self): return self.get_mouse_click_position(scal...
0
457
0
7
0
0
0
11
167
b36409855170a5bba1fa8e4bfcd74d4fb54b5b4d
5,887
py
Python
Tutorial 2 - Data Navigation/PlugIns/experimental/scripts/CompositeSurveyImage.py
paradimdata/Cornell_EM_SummerSchool_2021
9f3583e1b85a9cdd86e1b91800027966d501ce96
[ "MIT" ]
8
2021-06-13T20:02:12.000Z
2022-03-24T09:19:23.000Z
Tutorial 2 - Data Navigation/PlugIns/experimental/scripts/CompositeSurveyImage.py
paradimdata/Cornell_EM_SummerSchool_2021
9f3583e1b85a9cdd86e1b91800027966d501ce96
[ "MIT" ]
null
null
null
Tutorial 2 - Data Navigation/PlugIns/experimental/scripts/CompositeSurveyImage.py
paradimdata/Cornell_EM_SummerSchool_2021
9f3583e1b85a9cdd86e1b91800027966d501ce96
[ "MIT" ]
1
2021-07-16T20:12:28.000Z
2021-07-16T20:12:28.000Z
""" Example script to do acquire a composite survey image using stage shift. The script uses the center 50% of the image, shifts the stage by the appropriate amount in x, y directions, and stitches the resulting images together into a larger super image. To use: Run Nion Swift and get a good image Set the def...
51.191304
189
0.675556
""" Example script to do acquire a composite survey image using stage shift. The script uses the center 50% of the image, shifts the stage by the appropriate amount in x, y directions, and stitches the resulting images together into a larger super image. To use: Run Nion Swift and get a good image Set the def...
0
0
0
0
0
4,368
0
-26
90
7b6e6935e9f10e3177f7f225ae50e045d968b7a9
18,997
py
Python
python/biograph/vdb/study_cmd.py
spiralgenetics/biograph
33c78278ce673e885f38435384f9578bfbf9cdb8
[ "BSD-2-Clause" ]
16
2021-07-14T23:32:31.000Z
2022-03-24T16:25:15.000Z
python/biograph/vdb/study_cmd.py
spiralgenetics/biograph
33c78278ce673e885f38435384f9578bfbf9cdb8
[ "BSD-2-Clause" ]
9
2021-07-20T20:39:47.000Z
2021-09-16T20:57:59.000Z
python/biograph/vdb/study_cmd.py
spiralgenetics/biograph
33c78278ce673e885f38435384f9578bfbf9cdb8
[ "BSD-2-Clause" ]
9
2021-07-15T19:38:35.000Z
2022-01-31T19:24:56.000Z
#!/usr/bin/env python3 ''' Manage VDB studies ''' import argparse import inspect import multiprocessing import subprocess import sys import tempfile from pathlib import Path import biograph.vdb.athena as athena from biograph.tools.log import setup_logging, log from biograph.tools.refhash import refhash def write_vc...
37.031189
177
0.635574
#!/usr/bin/env python3 ''' Manage VDB studies ''' import argparse import inspect import multiprocessing import subprocess import sys import tempfile from pathlib import Path import orjson as json import biograph.vdb.athena as athena from biograph.tools.log import setup_logging, log from biograph.tools.refhash import...
0
0
0
2,761
0
0
0
0
46
4fd45db9c2e379d53922d350b4c817fe2011fd1f
38
py
Python
tests/core/backend_tests.py
LTD-Beget/cement
e885932583c14037599a2aa8a16d4d8a521364bd
[ "BSD-3-Clause" ]
null
null
null
tests/core/backend_tests.py
LTD-Beget/cement
e885932583c14037599a2aa8a16d4d8a521364bd
[ "BSD-3-Clause" ]
null
null
null
tests/core/backend_tests.py
LTD-Beget/cement
e885932583c14037599a2aa8a16d4d8a521364bd
[ "BSD-3-Clause" ]
null
null
null
"""Tests for cement.core.backend."""
12.666667
36
0.657895
"""Tests for cement.core.backend."""
0
0
0
0
0
0
0
0
0
8038c2dcc55dc95a304ef67bf6c48b936f148f68
3,610
py
Python
sdk/python/lib/pulumi/runtime/proto/language_pb2_grpc.py
goverdhan07/pulumi
301efa60653c90047a3427af41339387223dbccd
[ "Apache-2.0" ]
1
2021-11-23T21:49:18.000Z
2021-11-23T21:49:18.000Z
sdk/python/lib/pulumi/runtime/proto/language_pb2_grpc.py
goverdhan07/pulumi
301efa60653c90047a3427af41339387223dbccd
[ "Apache-2.0" ]
null
null
null
sdk/python/lib/pulumi/runtime/proto/language_pb2_grpc.py
goverdhan07/pulumi
301efa60653c90047a3427af41339387223dbccd
[ "Apache-2.0" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
43.493976
119
0.726593
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from . import language_pb2 as language__pb2 from . import plugin_pb2 as plugin__pb2 class LanguageRuntimeStub(object): """LanguageRuntime is the interface ...
0
0
0
2,242
0
1,053
0
84
158
c371bf194a11f9f676fde05a640618c87f3d85b8
2,632
py
Python
slope/models/corefres/mentionpair/data.py
RyanElliott10/slope
3247b04181cb6696978ce544382d97fa570b862d
[ "MIT" ]
1
2020-10-07T04:33:54.000Z
2020-10-07T04:33:54.000Z
slope/models/corefres/mentionpair/data.py
RyanElliott10/slope
3247b04181cb6696978ce544382d97fa570b862d
[ "MIT" ]
1
2021-08-31T04:10:05.000Z
2021-08-31T04:10:05.000Z
slope/models/corefres/mentionpair/data.py
RyanElliott10/slope
3247b04181cb6696978ce544382d97fa570b862d
[ "MIT" ]
null
null
null
import pprint from typing import List MentionIndices = List[int] RawMentionClusters = List[List[MentionIndices]] pp = pprint.PrettyPrinter()
31.710843
106
0.616261
from itertools import combinations, product import pprint from typing import List, Tuple import numpy as np from slope.utils.preco_parser import PreCoFileType, PreCoParser MentionIndices = List[int] RawMentionClusters = List[List[MentionIndices]] pp = pprint.PrettyPrinter() class MentionPair(object): def __in...
0
163
0
2,142
0
0
0
68
114
bcc5f415ab3d29c23264e830404576ecdb146419
4,816
py
Python
doorman/webserver.py
fruch/doorman
75bea9f5e776af6e8a0f1d5a27d8bb508bb9687d
[ "BSD-2-Clause" ]
8
2016-10-23T13:00:06.000Z
2021-03-05T13:03:24.000Z
doorman/webserver.py
fruch/doorman
75bea9f5e776af6e8a0f1d5a27d8bb508bb9687d
[ "BSD-2-Clause" ]
null
null
null
doorman/webserver.py
fruch/doorman
75bea9f5e776af6e8a0f1d5a27d8bb508bb9687d
[ "BSD-2-Clause" ]
2
2019-05-23T13:12:47.000Z
2021-02-15T18:34:33.000Z
import pymongo.errors import pymongo from flask import Flask, g from flask_restful import Api, reqparse app = Flask(__name__) api = Api(app) app.config.from_pyfile('config.py', silent=True) def get_resources_db(): """Opens a new database connection if there is none yet for the current application context. ...
31.477124
121
0.61711
import datetime import json import pymongo.errors from bson import json_util import pymongo import pql from flask import Flask, request, g from flask_restful import Resource, Api, reqparse, abort app = Flask(__name__) api = Api(app) app.config.from_pyfile('config.py', silent=True) def get_resources_db(): """Op...
0
2,722
0
468
0
0
0
4
317
05240aa8c3b464addff9da5629d2e9178b976d59
2,229
py
Python
examples/hireps/pendulum/pendulum_cart.py
hanyas/reps
447c461b89dec516ce3368d841cfe9734be78199
[ "MIT" ]
8
2021-06-21T18:58:56.000Z
2021-12-13T09:47:41.000Z
examples/hireps/pendulum/pendulum_cart.py
hanyas/reps
447c461b89dec516ce3368d841cfe9734be78199
[ "MIT" ]
null
null
null
examples/hireps/pendulum/pendulum_cart.py
hanyas/reps
447c461b89dec516ce3368d841cfe9734be78199
[ "MIT" ]
1
2021-06-29T04:42:45.000Z
2021-06-29T04:42:45.000Z
import numpy as np import gym from scipy.special import comb import torch from sds.distributions.gamma import Gamma from sds.models import HybridController from reps.hireps import hbREPS # np.random.seed(1337) # torch.manual_seed(1337) torch.set_num_threads(1) env = gym.make('Pendulum-RL-v1') env._max_episode_steps...
29.72
89
0.677882
import numpy as np import gym import scipy as sc from scipy.special import comb import torch from sds.distributions.gamma import Gamma from sds.models import HybridController from reps.hireps import hbREPS # np.random.seed(1337) # torch.manual_seed(1337) torch.set_num_threads(1) env = gym.make('Pendulum-RL-v1') en...
0
0
0
0
0
0
0
-3
23
18c63db8476e3140408ff6aba738699a1ebfd1e2
3,660
py
Python
Algorithm.Python/DividendAlgorithm.py
albertozatton/quant
17381cb2520de0fbad328a7d7412a6e5aacb2e19
[ "Apache-2.0" ]
1
2022-03-11T09:30:09.000Z
2022-03-11T09:30:09.000Z
Algorithm.Python/DividendAlgorithm.py
vmanjunathan/Lean
ff783a4d3abd38e6f56c8f9d55804175a421a021
[ "Apache-2.0" ]
null
null
null
Algorithm.Python/DividendAlgorithm.py
vmanjunathan/Lean
ff783a4d3abd38e6f56c8f9d55804175a421a021
[ "Apache-2.0" ]
1
2020-08-09T21:36:47.000Z
2020-08-09T21:36:47.000Z
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Lic...
48.8
151
0.694809
๏ปฟ# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Li...
3
0
0
2,589
0
0
0
74
178
176d5912fea1a5af11e2bc7beb6f9b3f56c0ae8d
2,730
py
Python
adept/__init__.py
fictivekin/adept-python
56dad62922badd238fd1614fc27ba3ad31380446
[ "MIT" ]
1
2019-01-14T11:50:04.000Z
2019-01-14T11:50:04.000Z
adept/__init__.py
fictivekin/adept-python
56dad62922badd238fd1614fc27ba3ad31380446
[ "MIT" ]
null
null
null
adept/__init__.py
fictivekin/adept-python
56dad62922badd238fd1614fc27ba3ad31380446
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
30.333333
110
0.545788
# -*- coding: utf-8 -*- import hashlib import hmac from urllib import quote as urlquote from .errors import OperationError, AccountError class Adept(object): def __init__(self, account_id, account_key, cloudfront_hostname, default_bucket=None): if account_id is not None: self.account_id = acc...
0
0
0
2,569
0
0
0
25
111
99714978b0b817fb700292a492f8900f1517ebec
4,771
py
Python
bash_to_python/tail.py
blakfeld/Bash-To-Python
d6a56dedbce1314e33e9773fa7039f25fccef1c3
[ "MIT" ]
null
null
null
bash_to_python/tail.py
blakfeld/Bash-To-Python
d6a56dedbce1314e33e9773fa7039f25fccef1c3
[ "MIT" ]
null
null
null
bash_to_python/tail.py
blakfeld/Bash-To-Python
d6a56dedbce1314e33e9773fa7039f25fccef1c3
[ "MIT" ]
null
null
null
""" tail.py -- Emulate UNIX tail. Author: Corwin Brown E-Mail: blakfeld@gmail.com Date: 5/24/2015 """
29.269939
76
0.518759
""" tail.py -- Emulate UNIX tail. Author: Corwin Brown E-Mail: blakfeld@gmail.com Date: 5/24/2015 """ import sys import time class Tail(object): BLOCK_SIZE = 512 SLEEP_INTERVAL = 1.0 def __init__(self, stdin=None, fname=None, num_lines=10, watch=False): """ Constructor Args: ...
0
0
0
4,620
0
0
0
-21
68
e7bd25abfac8f18d2b26d78c00a893195783ee97
822
py
Python
KernelGAN/blur_images.py
geopi1/Improved_USRNet
06395641c30f3df2986cf70f7ceee6c9a5bc0aa9
[ "MIT" ]
20
2020-08-24T07:21:30.000Z
2021-07-09T04:20:06.000Z
KernelGAN/blur_images.py
geopi1/Improved_USRNet
06395641c30f3df2986cf70f7ceee6c9a5bc0aa9
[ "MIT" ]
1
2020-10-21T08:02:18.000Z
2021-01-17T23:29:58.000Z
KernelGAN/blur_images.py
geopi1/Improved_USRNet
06395641c30f3df2986cf70f7ceee6c9a5bc0aa9
[ "MIT" ]
3
2020-11-19T05:17:10.000Z
2021-05-04T11:01:10.000Z
import numpy as np import cv2 as cv from matplotlib import pyplot as plt from scipy.ndimage.filters import gaussian_filter img = cv.imread('/home/george/PycharmProjects/Statistical_im_proc/KernelGAN/test.jpg') kernel = np.ones((17,17),np.float32)/289 dst = cv.filter2D(img,-1,kernel) g_img = gaussian_filter(img, [1,1...
37.363636
97
0.733577
import numpy as np import cv2 as cv from matplotlib import pyplot as plt from scipy.ndimage.filters import gaussian_filter img = cv.imread('/home/george/PycharmProjects/Statistical_im_proc/KernelGAN/test.jpg') kernel = np.ones((17,17),np.float32)/289 dst = cv.filter2D(img,-1,kernel) g_img = gaussian_filter(img, [1,1...
0
0
0
0
0
0
0
0
0
b148aa310011894324b56d871905e3d3bdc30a06
2,550
py
Python
examples/sample_iso_cliques.py
AtsushiHashimoto/isolated_clique_enumeration
9ff817f57d929b5db07265fe6d85013c13825869
[ "MIT" ]
null
null
null
examples/sample_iso_cliques.py
AtsushiHashimoto/isolated_clique_enumeration
9ff817f57d929b5db07265fe6d85013c13825869
[ "MIT" ]
null
null
null
examples/sample_iso_cliques.py
AtsushiHashimoto/isolated_clique_enumeration
9ff817f57d929b5db07265fe6d85013c13825869
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import sys sys.path.append('../isoclique') import isoclique as ic import networkx as nx import matplotlib.pyplot as plt import time if __name__ == '__main__': E = nx.karate_club_graph().edges() start = time.time() ic_graph = ic.IsolatedCliques(E) elaps...
28.651685
83
0.626275
#!/usr/bin/env python # coding: utf-8 import sys sys.path.append('../isoclique') import isoclique as ic import networkx as nx import matplotlib.pyplot as plt import random import math import time def generate_random_color(): return '#{:X}{:X}{:X}'.format(*[random.randint(16, 255) for _ in range(3)]) def generate...
0
0
0
0
0
252
0
-18
116
10e2930227e6a62d0a350d6fdef2abb269d54845
4,920
py
Python
run_ensemble.py
gnkm/kaggle.house-prices
5fd1fcc9fcf8e191c0729ab6244b01180d44f535
[ "MIT" ]
null
null
null
run_ensemble.py
gnkm/kaggle.house-prices
5fd1fcc9fcf8e191c0729ab6244b01180d44f535
[ "MIT" ]
null
null
null
run_ensemble.py
gnkm/kaggle.house-prices
5fd1fcc9fcf8e191c0729ab6244b01180d44f535
[ "MIT" ]
null
null
null
import argparse from datetime import datetime as dt from lightgbm import LGBMRegressor import numpy as np import pandas as pd from sklearn.ensemble import GradientBoostingRegressor, RandomForestRegressor, StackingRegressor from sklearn.kernel_ridge import KernelRidge from sklearn.linear_model import ElasticNet, Lasso f...
27.333333
96
0.74878
import argparse from datetime import datetime as dt from lightgbm import LGBMRegressor import numpy as np import pandas as pd from sklearn.ensemble import GradientBoostingRegressor, RandomForestRegressor, StackingRegressor from sklearn.kernel_ridge import KernelRidge from sklearn.linear_model import ElasticNet, Lasso, ...
0
0
0
0
0
0
0
84
66
500b280c30d2110068a5ebf3ccc96e2778c5344d
807
py
Python
Python/HotelPrices/solution.py
cs-mshah/AlgoCode
0d6556483c08f63166fd74d4ff80fb48d75e4a63
[ "MIT" ]
151
2020-10-01T07:38:26.000Z
2022-03-31T10:07:55.000Z
Python/HotelPrices/solution.py
cs-mshah/AlgoCode
0d6556483c08f63166fd74d4ff80fb48d75e4a63
[ "MIT" ]
285
2020-10-01T09:34:29.000Z
2021-08-02T12:13:49.000Z
Python/HotelPrices/solution.py
cs-mshah/AlgoCode
0d6556483c08f63166fd74d4ff80fb48d75e4a63
[ "MIT" ]
275
2020-10-01T09:43:51.000Z
2022-03-30T19:30:53.000Z
# object created and method calling objHotel = hotel() objHotel.calculateFee()
29.888889
69
0.525403
class hotel(): def calculateFee(self): """ This Method calculates cost of hotel room based on described scenario. :return: none. """ testCases = int(input("Enter no of test cases:")) totalCost = 0 while (testCases != 0): ...
0
0
0
698
0
0
0
0
23
985bde9d000f6e6ceedb6a8dd30d3f11831b4cdb
497
py
Python
Python/Shape Constrained risk measures/Prototype code ( not cleaned )/plot.py
MohamedMkaouar/Some_Projects
8170126dc91f313638595f9f4b81e9ae8b308334
[ "Apache-2.0" ]
null
null
null
Python/Shape Constrained risk measures/Prototype code ( not cleaned )/plot.py
MohamedMkaouar/Some_Projects
8170126dc91f313638595f9f4b81e9ae8b308334
[ "Apache-2.0" ]
null
null
null
Python/Shape Constrained risk measures/Prototype code ( not cleaned )/plot.py
MohamedMkaouar/Some_Projects
8170126dc91f313638595f9f4b81e9ae8b308334
[ "Apache-2.0" ]
1
2021-02-02T17:09:04.000Z
2021-02-02T17:09:04.000Z
test=np.arange(-2,2,0.1) v1=[] v2=[] v3=[] for i in test: i=cp.Constant(i) v1.append(pinball(i,0.2).value) v2.append(pinball(i,0.5).value) v3.append(pinball(i,0.8).value) plt.plot(test,v1,label="$\\tau=0.2$") plt.plot(test,v2,label="$\\tau=0.5$") plt.plot(test,v3,label="$\\tau=0.8$") plt.x...
23.666667
48
0.585513
test=np.arange(-2,2,0.1) v1=[] v2=[] v3=[] for i in test: i=cp.Constant(i) v1.append(pinball(i,0.2).value) v2.append(pinball(i,0.5).value) v3.append(pinball(i,0.8).value) plt.plot(test,v1,label="$\\tau=0.2$") plt.plot(test,v2,label="$\\tau=0.5$") plt.plot(test,v3,label="$\\tau=0.8$") plt.x...
0
0
0
0
0
0
0
0
0
005b4ddbd559ece75bff42e2ee12e7619e1eb168
30,771
py
Python
venv/lib/python3.8/site-packages/gtfs_kit/routes.py
MaximilianJanetschek/Urban_Intermodal_Transportation
632caf668636448dc9290d54cf1c7b527c68a957
[ "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/gtfs_kit/routes.py
MaximilianJanetschek/Urban_Intermodal_Transportation
632caf668636448dc9290d54cf1c7b527c68a957
[ "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/gtfs_kit/routes.py
MaximilianJanetschek/Urban_Intermodal_Transportation
632caf668636448dc9290d54cf1c7b527c68a957
[ "MIT" ]
null
null
null
""" Functions about routes. """ from typing import Optional, Iterable, List, Dict, TYPE_CHECKING import json import geopandas as gp import pandas as pd import numpy as np import shapely.geometry as sg import shapely.ops as so import folium as fl from . import constants as cs from . import helpers as hp # Help mypy b...
35.491349
99
0.624192
""" Functions about routes. """ from collections import OrderedDict from typing import Optional, Iterable, List, Dict, TYPE_CHECKING import json import geopandas as gp import pandas as pd import numpy as np import shapely.geometry as sg import shapely.ops as so import folium as fl from . import constants as cs from ....
0
0
0
0
0
3,859
0
14
159
55261d12666c02ea8f67b72d2e1ed2b304a01b9b
405
py
Python
instagram_api/response/user_story_feed.py
Yuego/instagram_api
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
[ "MIT" ]
13
2019-08-07T21:24:34.000Z
2020-12-12T12:23:50.000Z
instagram_api/response/user_story_feed.py
Yuego/instagram_api
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
[ "MIT" ]
null
null
null
instagram_api/response/user_story_feed.py
Yuego/instagram_api
b53f72db36c505a2eb24ebac1ba8267a0cc295bb
[ "MIT" ]
null
null
null
__all__ = ['UserStoryFeedResponse']
25.3125
73
0.814815
from .mapper import ApiResponse, ApiResponseInterface from .mapper.types import Timestamp, AnyType from .model import Broadcast, PostLiveItem, Reel __all__ = ['UserStoryFeedResponse'] class UserStoryFeedResponseInterface(ApiResponseInterface): broadcast: Broadcast reel: Reel post_live_item: PostLiveItem ...
0
0
0
172
0
0
0
82
112
003530ab7e606f4f6731fe033677de163d5cdf63
2,640
py
Python
b_tree/binary_search_tree/sum_of_common_nodes_in_bst.py
rjsnh1522/geeks-4-geeks-python
9bea0ce4f3fae9b5f9e5952fb5b4b3a8c6186cf4
[ "MIT" ]
null
null
null
b_tree/binary_search_tree/sum_of_common_nodes_in_bst.py
rjsnh1522/geeks-4-geeks-python
9bea0ce4f3fae9b5f9e5952fb5b4b3a8c6186cf4
[ "MIT" ]
5
2021-03-10T11:49:39.000Z
2022-02-27T01:35:59.000Z
b_tree/binary_search_tree/sum_of_common_nodes_in_bst.py
rjsnh1522/geeks-4-geeks-python
9bea0ce4f3fae9b5f9e5952fb5b4b3a8c6186cf4
[ "MIT" ]
null
null
null
# Definition for a binary tree node # tree 1 t5 = TreeNode(5) t2 = TreeNode(2) t3 = TreeNode(3) t5.left = t2 t2.right = t3 t8 = TreeNode(8) t5.right = t8 t15 = TreeNode(15) t8.right = t15 t7 = TreeNode(7) t15.left = t7 # tree 2 b7 = TreeNode(7) b1 = TreeNode(1) b2 = TreeNode(2) b10 = TreeNode(10) b15 = TreeNo...
20.787402
50
0.507197
# Definition for a binary tree node class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: # @param A : root node of tree # @param B : root node of tree # @return an integer def in_order_traversal(self, root): curren...
0
0
0
1,218
0
0
0
0
45
2707c7185ae66c32193ea16931b8b78b32de7be0
1,039
py
Python
autonomous-fleet/afm-auction_house/server/migrations/0002_auto_20200622_0946.py
CodexWorks/autonomous-fleet
26fd71e9b2e6ee1d97e04959c3a31c094fc40bc6
[ "BSD-3-Clause" ]
null
null
null
autonomous-fleet/afm-auction_house/server/migrations/0002_auto_20200622_0946.py
CodexWorks/autonomous-fleet
26fd71e9b2e6ee1d97e04959c3a31c094fc40bc6
[ "BSD-3-Clause" ]
3
2020-05-14T14:30:00.000Z
2020-06-09T15:03:12.000Z
autonomous-fleet/afm-auction_house/server/migrations/0002_auto_20200622_0946.py
CodexWorks/autonomous-fleet
26fd71e9b2e6ee1d97e04959c3a31c094fc40bc6
[ "BSD-3-Clause" ]
1
2020-06-10T09:30:32.000Z
2020-06-10T09:30:32.000Z
# Generated by Django 3.0.7 on 2020-06-22 06:46
25.341463
74
0.533205
# Generated by Django 3.0.7 on 2020-06-22 06:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('server', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='text', name='main_title', ), ...
0
0
0
925
0
0
0
19
46
702293d9777a391ba191cfd89a932a4b0167e14b
268
py
Python
BeyondChaos/constants.py
emberling/BeyondChaosRandomizer
2f69752611e25146a29aef51044d0446d4e80332
[ "MIT" ]
1
2021-06-15T03:54:53.000Z
2021-06-15T03:54:53.000Z
BeyondChaos/constants.py
emberling/BeyondChaosRandomizer
2f69752611e25146a29aef51044d0446d4e80332
[ "MIT" ]
1
2021-09-13T04:32:43.000Z
2021-09-13T04:32:43.000Z
BeyondChaos/Constants.py
razzlestorm/BeyondChaosRandomizer
04a0acdcd9d4c3991a3e42cf1bba4299adda4435
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 #plans a lot of the "magic string" text will move into here to make modifying them alot easier on the fly. UpdateFound = "Applying update..." UpdateLaunching = "Launching the updater application. This application will now close automatically."
44.666667
106
0.776119
#!/usr/bin/env python3 #plans a lot of the "magic string" text will move into here to make modifying them alot easier on the fly. UpdateFound = "Applying update..." UpdateLaunching = "Launching the updater application. This application will now close automatically."
0
0
0
0
0
0
0
0
0
5028b9618c72260c18e7e30aa727af8e41dfc7a6
7,222
py
Python
app/label_maker/real/generate_labels.py
yuecideng/Misc3D
a4554b171d72e03ac8d03880523934a39a9ff515
[ "MIT" ]
13
2022-02-09T11:56:20.000Z
2022-03-31T15:45:04.000Z
app/label_maker/real/generate_labels.py
yuecideng/Misc3D
a4554b171d72e03ac8d03880523934a39a9ff515
[ "MIT" ]
7
2022-02-26T08:58:43.000Z
2022-03-29T11:19:05.000Z
app/label_maker/real/generate_labels.py
yuecideng/Misc3D
a4554b171d72e03ac8d03880523934a39a9ff515
[ "MIT" ]
5
2022-02-16T06:59:00.000Z
2022-03-31T12:03:11.000Z
#!/usr/bin/python3 # -*- coding: utf-8 -*- import time import argparse import os import cv2 import numpy as np import misc3d as m3d import json from utils import Colors if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--model_path', help='path to CAD model') pars...
34.721154
123
0.620742
#!/usr/bin/python3 # -*- coding: utf-8 -*- import time import argparse import os import cv2 import shutil import numpy as np import open3d as o3d import misc3d as m3d import json from utils import Colors, mask_to_bbox, rgbd_to_pointcloud def remove_and_create_dir(dir_path): mask_path = os.path.join(dir_path, 'm...
0
0
0
0
0
3,836
0
25
205
2fc2dadded385489f36ae8202bdaf7d1a553a3eb
1,435
py
Python
step by step/Dominant topic.py
YuchenTan777/CCI-S2-Coding-Two-Final
0f2faacbae741c0809f6de3f8ef2d5c16a009583
[ "MIT" ]
null
null
null
step by step/Dominant topic.py
YuchenTan777/CCI-S2-Coding-Two-Final
0f2faacbae741c0809f6de3f8ef2d5c16a009583
[ "MIT" ]
null
null
null
step by step/Dominant topic.py
YuchenTan777/CCI-S2-Coding-Two-Final
0f2faacbae741c0809f6de3f8ef2d5c16a009583
[ "MIT" ]
null
null
null
df_topic_sents_keywords = format_topics_sentences(ldamodel=lda_model, corpus=corpus, texts=data_ready) # Format df_dominant_topic = df_topic_sents_keywords.reset_index() df_dominant_topic.columns = ['Document_No', 'Dominant_Topic', 'Topic_Perc_Contrib', 'Keywords', 'Text'] df_dominant_topic.head(10)
44.84375
139
0.681533
def format_topics_sentences(ldamodel=None, corpus=corpus, texts=data): # Init output sent_topics_df = pd.DataFrame() # Get main topic in each document for i, row_list in enumerate(ldamodel[corpus]): row = row_list[0] if ldamodel.per_word_topics else row_list # print(row) ...
0
0
0
0
0
1,109
0
0
22
31b014feff5c20c649627b27c2443f43f373894c
410
py
Python
_init_paths.py
klo9klo9kloi/win_det_heatmaps
fc427bcd593831d627698455b8917eb37add3f6e
[ "MIT" ]
29
2020-07-27T10:49:09.000Z
2022-03-17T02:15:03.000Z
_init_paths.py
klo9klo9kloi/win_det_heatmaps
fc427bcd593831d627698455b8917eb37add3f6e
[ "MIT" ]
6
2020-09-30T01:51:34.000Z
2022-01-02T08:00:22.000Z
_init_paths.py
klo9klo9kloi/win_det_heatmaps
fc427bcd593831d627698455b8917eb37add3f6e
[ "MIT" ]
10
2020-07-31T00:43:38.000Z
2022-03-07T02:45:25.000Z
import os import sys this_dir = os.path.dirname(__file__) add_path(os.path.join(this_dir)) add_path(os.path.join(this_dir, 'common')) add_path(os.path.join(this_dir, 'common_pytorch')) print("=================SYS PATH================") for path in sys.path: print(path) print("=================SYS PATH============...
24.117647
50
0.595122
import os import sys def add_path(path): if path not in sys.path: sys.path.insert(0, path) this_dir = os.path.dirname(__file__) add_path(os.path.join(this_dir)) add_path(os.path.join(this_dir, 'common')) add_path(os.path.join(this_dir, 'common_pytorch')) print("=================SYS PATH================")...
0
0
0
0
0
60
0
0
23
22d1d15046cddd021171b44b762d0bc39889be72
8,131
py
Python
stephanie_protocol/step1_template.py
caseystone/ot2-protocols
ca8ae72b5298c8064d91139f266996d0cb4d03cc
[ "MIT" ]
null
null
null
stephanie_protocol/step1_template.py
caseystone/ot2-protocols
ca8ae72b5298c8064d91139f266996d0cb4d03cc
[ "MIT" ]
null
null
null
stephanie_protocol/step1_template.py
caseystone/ot2-protocols
ca8ae72b5298c8064d91139f266996d0cb4d03cc
[ "MIT" ]
null
null
null
### start import sys import os ### end """ step1_tepmplate.py Description: Generates python protocol file that can be uploaded directly to Opentrons app Usage: python step1_template.py -r <number of reactions> -f <output file name> ex. pyhton step1_template.py -r 96 -f protocol1.py Note: Make sure yo...
34.163866
136
0.64002
### start import profile import sys import os import pandas as pd from opentrons import protocol_api, simulate, execute import json import argparse ### end """ step1_tepmplate.py Description: Generates python protocol file that can be uploaded directly to Opentrons app Usage: python step1_template.py -r <number of...
0
0
0
0
0
3,248
0
7
156
544feca6b337dade97f3293e72f1e900e9812832
6,173
py
Python
ceilometer/tests/db.py
aristanetworks/ceilometer
8776b137f82f71eef1241bcb1600de10c1f77394
[ "Apache-2.0" ]
null
null
null
ceilometer/tests/db.py
aristanetworks/ceilometer
8776b137f82f71eef1241bcb1600de10c1f77394
[ "Apache-2.0" ]
null
null
null
ceilometer/tests/db.py
aristanetworks/ceilometer
8776b137f82f71eef1241bcb1600de10c1f77394
[ "Apache-2.0" ]
null
null
null
# # Copyright 2012 New Dream Network, LLC (DreamHost) # Copyright 2013 eNovance # # Author: Doug Hellmann <doug.hellmann@dreamhost.com> # Julien Danjou <julien@danjou.info> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You ...
32.319372
79
0.634861
# # Copyright 2012 New Dream Network, LLC (DreamHost) # Copyright 2013 eNovance # # Author: Doug Hellmann <doug.hellmann@dreamhost.com> # Julien Danjou <julien@danjou.info> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You ...
0
744
0
3,598
0
375
0
108
407
6050d946cca8c0645650b5ae57129fc0fbaca682
23,113
py
Python
src/nli/modified_esim_v1_0.py
Derrors/Combine-FEVER-NSMN
e3458ee99f086e3d44c9da3ec3e2885511cd42c2
[ "MIT" ]
4
2020-10-09T16:46:56.000Z
2022-01-03T18:42:24.000Z
src/nli/modified_esim_v1_0.py
Frankey419/combine-FEVER-NSMN
8577ad47092c052d6c0456415cb2eebc2a392984
[ "MIT" ]
4
2020-11-02T01:00:33.000Z
2020-11-02T01:07:45.000Z
src/nli/modified_esim_v1_0.py
Frankey419/combine-FEVER-NSMN
8577ad47092c052d6c0456415cb2eebc2a392984
[ "MIT" ]
2
2020-12-10T12:50:45.000Z
2021-03-06T11:26:53.000Z
import torch.optim as optim if __name__ == "__main__": # train_fever() # hidden_eval_fever() spectrum_eval_manual_check()
37.76634
198
0.662008
import torch from allennlp.data.iterators import BasicIterator from allennlp.data.token_indexers import SingleIdTokenIndexer, ELMoTokenCharactersIndexer from allennlp.modules import Embedding, Elmo from torch import nn import os import config from data_util.data_readers.fever_reader import BasicReader from data_util....
0
0
0
6,583
0
15,394
0
358
632
3ccf1d20e9550ceb4e18ff07cf68d4676f4502b9
537
py
Python
educative/course1/arrays/ch3_add_upto_n_1.py
liveroot/ambition2020
f312aa684caab5da82504c2bcd98bef64d102caf
[ "MIT" ]
null
null
null
educative/course1/arrays/ch3_add_upto_n_1.py
liveroot/ambition2020
f312aa684caab5da82504c2bcd98bef64d102caf
[ "MIT" ]
null
null
null
educative/course1/arrays/ch3_add_upto_n_1.py
liveroot/ambition2020
f312aa684caab5da82504c2bcd98bef64d102caf
[ "MIT" ]
1
2019-12-27T01:08:08.000Z
2019-12-27T01:08:08.000Z
array = [1, 21, 3, 14, 5, 60, 7, 6] n = 27 result = "[21, 6] or [6, 21]" # iterate both arrays in a nested loop, check for sum == n, return when pair is found print("Input: " + "array = " + str(array) + ", " + "n = " + str(n)) print("Expected: " + str(result)) print("Output: " + str(add_upto_n_1(array, n)))
22.375
85
0.510242
array = [1, 21, 3, 14, 5, 60, 7, 6] n = 27 result = "[21, 6] or [6, 21]" # iterate both arrays in a nested loop, check for sum == n, return when pair is found def add_upto_n_1(arr, n): output = [] for x in arr: for y in arr: if x + y == n: output.append(x) ...
0
0
0
0
0
201
0
0
23
90ef0d2c16b49b287d1c5badd6ad2ca0f4bad954
7,959
py
Python
nlp_toolkit/tools/farasa.py
abdelrahman-t/nlp-toolkit
2617c5c91d369279fe73ea213709a4c29ffc6605
[ "MIT" ]
1
2019-05-22T12:12:28.000Z
2019-05-22T12:12:28.000Z
nlp_toolkit/tools/farasa.py
abdelrahman-t/nlp-toolkit
2617c5c91d369279fe73ea213709a4c29ffc6605
[ "MIT" ]
null
null
null
nlp_toolkit/tools/farasa.py
abdelrahman-t/nlp-toolkit
2617c5c91d369279fe73ea213709a4c29ffc6605
[ "MIT" ]
1
2020-04-04T14:30:29.000Z
2020-04-04T14:30:29.000Z
""" Pythonic and thread-safe wrapper around Farasa. Farasa is developed at QCRI and can be found at http://qatsdemo.cloudapp.net/farasa/ Paper can be found at http://www.aclweb.org/anthology/N16-3003 """ import logging import nlp_toolkit.dependencies as dependencies from .utils import setup_logger LOGGER = setup_lo...
31.963855
94
0.582108
""" Pythonic and thread-safe wrapper around Farasa. Farasa is developed at QCRI and can be found at http://qatsdemo.cloudapp.net/farasa/ Paper can be found at http://www.aclweb.org/anthology/N16-3003 """ import logging from collections import defaultdict from operator import concat, itemgetter from threading import RL...
0
4,295
0
2,800
0
0
0
149
156
e151479c93a744211f6cfbfa208a26ae6d6d7fb4
597
py
Python
tests/cars.py
ganmodokix/vaetc
866b79677b4f06603203376d967989dedadbffae
[ "MIT" ]
null
null
null
tests/cars.py
ganmodokix/vaetc
866b79677b4f06603203376d967989dedadbffae
[ "MIT" ]
null
null
null
tests/cars.py
ganmodokix/vaetc
866b79677b4f06603203376d967989dedadbffae
[ "MIT" ]
null
null
null
import os, sys import yaml sys.path.append(os.path.dirname(__file__) + '/../') import vaetc if __name__ == "__main__": checkpoint = vaetc.Checkpoint(options={ "model_name": "vae", "dataset": "cars", "epochs": 512, "batch_size": 256, "logger_path": "runs.tests/cars", ...
20.586207
51
0.564489
import os, sys import yaml import torch sys.path.append(os.path.dirname(__file__) + '/../') import vaetc if __name__ == "__main__": checkpoint = vaetc.Checkpoint(options={ "model_name": "vae", "dataset": "cars", "epochs": 512, "batch_size": 256, "logger_path": "runs.test...
0
0
0
0
0
0
0
-9
23
15c8c9a3ffaf7fa04e27d51c7f0037d2ac150f9b
1,224
py
Python
rex/exploit/shellcodes/linux_amd64_connectback.py
tiedaoxiaotubie/rex
049bbce3ab2717cbb4d2f0fc10fe8c0433b39c1d
[ "BSD-2-Clause" ]
1
2021-01-22T11:25:40.000Z
2021-01-22T11:25:40.000Z
rex/exploit/shellcodes/linux_amd64_connectback.py
tiedaoxiaotubie/rex
049bbce3ab2717cbb4d2f0fc10fe8c0433b39c1d
[ "BSD-2-Clause" ]
null
null
null
rex/exploit/shellcodes/linux_amd64_connectback.py
tiedaoxiaotubie/rex
049bbce3ab2717cbb4d2f0fc10fe8c0433b39c1d
[ "BSD-2-Clause" ]
1
2020-09-16T07:07:28.000Z
2020-09-16T07:07:28.000Z
import logging l = logging.getLogger("rex.exploit.shellcodes.linux_amd64_connectback")
33.081081
245
0.716503
import socket import struct import logging from rex.exploit.shellcode import Shellcode l = logging.getLogger("rex.exploit.shellcodes.linux_amd64_connectback") class LinuxAMD64Connectback(Shellcode): # TODO: should be 'linux' once CLE can identify linux files supported_platforms = ["unix"] arch = "AMD64"...
0
0
0
1,041
0
0
0
6
89
f6c2251d9ad5a3d88156559765bec4c7ee6737d7
25,182
py
Python
gluon/packages/dal/pydal/adapters/mongo.py
crania/dockconfig
ed981b9efefd6de8a00e0ec9d6c2530e1452fd17
[ "BSD-3-Clause" ]
2
2015-07-05T12:25:08.000Z
2015-07-05T15:39:32.000Z
gluon/packages/dal/pydal/adapters/mongo.py
crania/dockconfig
ed981b9efefd6de8a00e0ec9d6c2530e1452fd17
[ "BSD-3-Clause" ]
null
null
null
gluon/packages/dal/pydal/adapters/mongo.py
crania/dockconfig
ed981b9efefd6de8a00e0ec9d6c2530e1452fd17
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from .._compat import integer_types try: from bson.binary import USER_DEFINED_SUBTYPE except: USER_DEFINED_SUBTYPE = 0 long = integer_types[-1]
37.529061
80
0.560797
# -*- coding: utf-8 -*- import datetime import re from .._globals import IDENTITY from .._compat import integer_types, basestring from ..objects import Table, Query, Field, Expression from ..helpers.classes import SQLALL, Reference from ..helpers.methods import use_common_filters, xorify from .base import NoSQLAdapter...
0
275
0
24,368
0
0
0
108
253
751978667c9b933dfa751e93be53aa234dc1a2f2
897
py
Python
ogs5py/fileclasses/asc/core.py
MuellerSeb/ogs5py
752e7bd2298fbd476406d168f6b7d1a85863dccd
[ "MIT" ]
3
2018-05-27T15:39:07.000Z
2018-10-29T17:02:11.000Z
ogs5py/fileclasses/asc/core.py
MuellerSeb/ogs5py
752e7bd2298fbd476406d168f6b7d1a85863dccd
[ "MIT" ]
1
2018-11-12T11:32:12.000Z
2018-11-12T13:07:48.000Z
ogs5py/fileclasses/asc/core.py
MuellerSeb/ogs5py
752e7bd2298fbd476406d168f6b7d1a85863dccd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Class for the ogs ASC file."""
23.605263
77
0.595318
# -*- coding: utf-8 -*- """Class for the ogs ASC file.""" from ogs5py.fileclasses.base import LineFile class ASC(LineFile): """ Class for the ogs ASC file. Parameters ---------- lines : list of str, optional content of the file as a list of lines Default: None name : str, opti...
0
0
0
770
0
0
0
23
45
d2ba4b0ec04f23a3715468b1721b22e8bd62bf9f
4,361
py
Python
Newcastle University/FewCloudComputing/Load.py
haoranD/Postgraduate-Master
b297211eeb20e3dc5535fefc84e1e0c2b71ddaa3
[ "MIT" ]
null
null
null
Newcastle University/FewCloudComputing/Load.py
haoranD/Postgraduate-Master
b297211eeb20e3dc5535fefc84e1e0c2b71ddaa3
[ "MIT" ]
null
null
null
Newcastle University/FewCloudComputing/Load.py
haoranD/Postgraduate-Master
b297211eeb20e3dc5535fefc84e1e0c2b71ddaa3
[ "MIT" ]
1
2019-12-08T03:14:15.000Z
2019-12-08T03:14:15.000Z
import sys import time import matplotlib.mlab as mlab import csv #Generate a list of random number from Normal distribution #Generate a list of random number from Poisson distribution # Visualize the number we generated #Connect to url if __name__ == '__main__': # How many parameters w...
39.645455
90
0.575327
import sys import numpy import time import matplotlib.mlab as mlab import matplotlib.pyplot as plt import urllib import csv import time #Generate a list of random number from Normal distribution def gettimelistbyN(para1, para2, size): timelistN = numpy.random.normal(loc=para1, scale=para2, size=size) ...
6
0
0
0
0
2,124
0
-17
184
1ebb0e2aefaa78274c44b66323485a579a2f7e3a
3,675
py
Python
src/python/nimbusml/examples/EnsembleClassifier.py
michaelgsharp/NimbusML
50031157265f49eec85d27fe67582d9ddaf01ef9
[ "MIT" ]
134
2018-11-01T22:15:24.000Z
2019-05-04T11:30:08.000Z
src/python/nimbusml/examples/EnsembleClassifier.py
michaelgsharp/NimbusML
50031157265f49eec85d27fe67582d9ddaf01ef9
[ "MIT" ]
226
2019-05-07T19:00:44.000Z
2021-01-06T07:59:48.000Z
src/python/nimbusml/examples/EnsembleClassifier.py
michaelgsharp/NimbusML
50031157265f49eec85d27fe67582d9ddaf01ef9
[ "MIT" ]
43
2019-05-15T20:19:42.000Z
2022-03-30T10:26:07.000Z
############################################################################### # EnsembleClassifier from nimbusml import Pipeline, FileDataStream from nimbusml.datasets import get_dataset from nimbusml.feature_extraction.categorical import OneHotVectorizer from nimbusml.ensemble import EnsembleClassifier from nimbusml...
43.235294
86
0.578503
############################################################################### # EnsembleClassifier from nimbusml import Pipeline, FileDataStream from nimbusml.datasets import get_dataset from nimbusml.feature_extraction.categorical import OneHotVectorizer from nimbusml.ensemble import EnsembleClassifier from nimbusml...
0
0
0
0
0
0
0
0
0
c50880c9f81ec471512cd26e3870a7cb328aba45
2,365
py
Python
lte/gateway/python/integ_tests/s1aptests/test_s1setup_incorrect_plmn.py
saurabhsoni88/magma
4236c9d8edb7bd203707ff7e861b1f7c12fb84c7
[ "BSD-3-Clause" ]
2
2020-12-09T11:42:30.000Z
2021-09-26T03:28:33.000Z
lte/gateway/python/integ_tests/s1aptests/test_s1setup_incorrect_plmn.py
saurabhsoni88/magma
4236c9d8edb7bd203707ff7e861b1f7c12fb84c7
[ "BSD-3-Clause" ]
151
2020-09-03T20:44:13.000Z
2022-03-31T20:28:52.000Z
lte/gateway/python/integ_tests/s1aptests/test_s1setup_incorrect_plmn.py
kkahrs/magma
73e666627dc28e0c492feab7321bb7d6dd433b09
[ "BSD-3-Clause" ]
2
2021-05-27T18:15:16.000Z
2021-05-27T18:41:39.000Z
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
36.953125
78
0.668922
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
0
0
0
1,713
0
0
0
20
89
ec7e896333522e77965ed3aa0a3b8527b6fb7d82
2,714
py
Python
api/views/estate.py
sirghiny/Real-Estate-Manager
10272feec22c40da7f927219225b8d2e27a20e38
[ "MIT" ]
null
null
null
api/views/estate.py
sirghiny/Real-Estate-Manager
10272feec22c40da7f927219225b8d2e27a20e38
[ "MIT" ]
1
2018-05-09T13:17:41.000Z
2018-05-09T13:17:41.000Z
api/views/estate.py
sirghiny/Real-Estate-Manager
10272feec22c40da7f927219225b8d2e27a20e38
[ "MIT" ]
2
2018-05-01T15:03:13.000Z
2019-10-28T13:59:29.000Z
"""Estate manipulation functionality."""
30.155556
74
0.517686
"""Estate manipulation functionality.""" from flask import request from flask_restful import Resource from api.helpers.modelops import get_boards, get_estates from api.helpers.validation import validate_json from api.models import Estate class EstateResource(Resource): """View functions for estates.""" def...
0
0
0
2,426
0
0
0
87
158
5ae4dfd0e7e700b5e5ca748a5ebfbe8d81ff66ab
1,192
py
Python
ensemble.py
piotrmirowski/DependencyTreeRnn
8211a4ff4d0708dab83079295f9b768ebaeae68a
[ "BSD-3-Clause" ]
39
2015-07-07T06:17:06.000Z
2021-05-02T23:14:41.000Z
ensemble.py
zjh-nudger/DependencyRNN
c48c25c153551f340de704edf35b8831eab6e7a2
[ "BSD-3-Clause" ]
3
2016-06-21T02:58:04.000Z
2016-07-05T17:27:55.000Z
ensemble.py
zjh-nudger/DependencyRNN
c48c25c153551f340de704edf35b8831eab6e7a2
[ "BSD-3-Clause" ]
11
2015-07-07T17:43:30.000Z
2019-09-18T03:39:52.000Z
# first arg gold, following ones files with scores to ensemble import sys goldFile = sys.argv[1] answers = [] for line in open(goldFile).readlines(): answers.append(int(line.strip())) print "loaded " + str(len(answers)) + " answers" # an array with an array per model to be ensebled individualSentencePredictio...
23.84
62
0.661074
# first arg gold, following ones files with scores to ensemble import sys goldFile = sys.argv[1] answers = [] for line in open(goldFile).readlines(): answers.append(int(line.strip())) print "loaded " + str(len(answers)) + " answers" # an array with an array per model to be ensebled individualSentencePredictio...
0
0
0
0
0
0
0
0
0
444c86d26250a7f57c0ea4bb01d3e3286fcbf2ee
54,114
py
Python
animation/face_editor.py
jzboylxj/XDLibs
76ab640502d7e254bc98930d6ebb9e870476ed9a
[ "MIT" ]
1
2021-03-11T02:24:08.000Z
2021-03-11T02:24:08.000Z
animation/face_editor.py
jzboylxj/XDLibs
76ab640502d7e254bc98930d6ebb9e870476ed9a
[ "MIT" ]
null
null
null
animation/face_editor.py
jzboylxj/XDLibs
76ab640502d7e254bc98930d6ebb9e870476ed9a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # @Time : 2020/9/7 9:39 # @Author : Li XiaoJun # @Site : # @File : face_editor.py from imp import reload from animation import common from animation import test_node from pymel import core as pm reload(common) reload(test_node) def get_channel_values(jnt, pre=5): ...
38.460554
89
0.533023
#!/usr/bin/env python # coding: utf-8 # @Time : 2020/9/7 9:39 # @Author : Li XiaoJun # @Site : # @File : face_editor.py import json import os from imp import reload from animation import common from animation import test_node from animation.helper import manager_version from pymel import core as pm reload(...
1,461
0
0
50,228
0
2,295
0
1
159
718fa4fe50d6852876511690c70b17f636bd0209
10,738
py
Python
gibson2/utils/assets_utils.py
dnandha/iGibson
bbd8c294aad1ddffce868244a474dd40c2976590
[ "MIT" ]
3
2021-02-07T14:00:38.000Z
2021-07-03T19:40:59.000Z
gibson2/utils/assets_utils.py
dnandha/iGibson
bbd8c294aad1ddffce868244a474dd40c2976590
[ "MIT" ]
null
null
null
gibson2/utils/assets_utils.py
dnandha/iGibson
bbd8c294aad1ddffce868244a474dd40c2976590
[ "MIT" ]
2
2021-04-01T12:14:59.000Z
2021-06-18T13:04:39.000Z
import gibson2 import os import argparse import subprocess from collections import defaultdict def get_ig_category_ids(): """ Get iGibson object categories :return: file path to the scene name """ ig_dataset_path = gibson2.ig_dataset_path ig_categories_files = os.path.join( ig_dataset...
36.033557
145
0.655336
import gibson2 import os import argparse import random import subprocess import json from collections import defaultdict import yaml def get_ig_category_ids(): """ Get iGibson object categories :return: file path to the scene name """ ig_dataset_path = gibson2.ig_dataset_path ig_categories_fi...
0
0
0
0
0
1,696
0
-28
112
98b43896db4a9743c1b1d21ae5bcb6569ad055c4
2,797
py
Python
satori/tests/test_common_templating.py
mgeisler/satori
dea382bae1cd043189589c0f7d4c20b4b6725ab5
[ "Apache-2.0" ]
1
2015-01-18T19:56:28.000Z
2015-01-18T19:56:28.000Z
satori/tests/test_common_templating.py
samstav/satori
239fa1e3c7aac78599145c670576f0ac76a41a89
[ "Apache-2.0" ]
null
null
null
satori/tests/test_common_templating.py
samstav/satori
239fa1e3c7aac78599145c670576f0ac76a41a89
[ "Apache-2.0" ]
null
null
null
# pylint: disable=C0103,R0904 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
34.9625
77
0.648552
# pylint: disable=C0103,R0904 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
0
0
0
1,933
0
0
0
15
46
03e934b55fee6d774e434334e745d004e74e3130
4,638
py
Python
finetune/lm_entailment.py
johndpope/finetune
8cdc2a29104f3f2f6e032a9496b3c4e251ac028c
[ "MIT" ]
null
null
null
finetune/lm_entailment.py
johndpope/finetune
8cdc2a29104f3f2f6e032a9496b3c4e251ac028c
[ "MIT" ]
null
null
null
finetune/lm_entailment.py
johndpope/finetune
8cdc2a29104f3f2f6e032a9496b3c4e251ac028c
[ "MIT" ]
null
null
null
import json from sklearn.model_selection import train_test_split if __name__ == "__main__": with open("data/questions.json", "rt") as fp: data = json.load(fp) scores = [] questions = [] answers = [] save_path = 'saved-models/cola' model = LanguageModelEntailment(save_path) for...
42.163636
117
0.689521
import json from sklearn.model_selection import train_test_split from finetune.config import BATCH_SIZE from finetune.lm_base import LanguageModelBase from finetune.target_encoders import OrdinalClassificationEncoder class LanguageModelEntailment(LanguageModelBase): def get_target_encoder(self): return...
0
0
0
3,360
0
0
0
86
90
e543001c6dbbf7c0f14676334e540a1dbbbed706
4,780
py
Python
backend.py
MahatKC/expertsystemassignment
4db94390c9b7651d46b6a6e6a69c35e93aafcf31
[ "MIT" ]
null
null
null
backend.py
MahatKC/expertsystemassignment
4db94390c9b7651d46b6a6e6a69c35e93aafcf31
[ "MIT" ]
null
null
null
backend.py
MahatKC/expertsystemassignment
4db94390c9b7651d46b6a6e6a69c35e93aafcf31
[ "MIT" ]
null
null
null
#trabalho por Leonardo Vanzin, Mateus Karvat e Roberta Aparecida #inicialmente, so importadas as bibliotecas necessrias import interface valores_convertidos = { 'proximidadeMar': float(interface.valores['proximidadeMar']), 'desnivel': float(interface.valores['desnivel']), 'velocidadeVento': float(interfac...
45.961538
127
0.722803
#trabalho por Leonardo Vanzin, Mateus Karvat e Roberta Aparecida #inicialmente, sรฃo importadas as bibliotecas necessรกrias from experta import * import interface valores_convertidos = { 'proximidadeMar': float(interface.valores['proximidadeMar']), 'desnivel': float(interface.valores['desnivel']), 'velocida...
154
681
0
1,352
0
0
0
0
292
880bad578d9944f1ec06e580824fc923f1978b8e
2,886
py
Python
main.py
warifp/InstagramPostAndDelete
d22577325eccf42e629cef076ab43f7788587bc4
[ "MIT" ]
4
2019-06-03T04:00:51.000Z
2021-11-09T21:34:38.000Z
main.py
nittaya1990/InstagramPostAndDelete
d22577325eccf42e629cef076ab43f7788587bc4
[ "MIT" ]
null
null
null
main.py
nittaya1990/InstagramPostAndDelete
d22577325eccf42e629cef076ab43f7788587bc4
[ "MIT" ]
4
2019-10-30T19:44:08.000Z
2021-09-07T16:30:09.000Z
#! @@Author : WAHYU ARIF PURNOMO #! @@Create : 18 Januari 2019 #! @@Modify : 19 Januari 2019 #! Gambar dari reddit. #! Gunakan VPN karena DNS situs reddit sudah di blokir dari negara Indonesia. import os from time import sleep from InstagramAPI import InstagramAPI InstagramAPI = InstagramAPI(input("Username: "), inpu...
28.574257
125
0.615731
#! @@Author : WAHYU ARIF PURNOMO #! @@Create : 18 Januari 2019 #! @@Modify : 19 Januari 2019 #! Gambar dari reddit. #! Gunakan VPN karena DNS situs reddit sudah di blokir dari negara Indonesia. import os import json import requests import progressbar from PIL import Image from lxml import html from time import sleep f...
0
0
0
0
0
1,986
0
-5
247
66a485d2b69e5ed6b33aeebb70db814ec8baae6b
3,101
py
Python
examples/simple/simple_ep.py
thomashopkins32/LEAP
aafada03a261543f35ebfbb9b1ef7140cb079f6c
[ "AFL-3.0" ]
53
2018-10-04T18:01:22.000Z
2022-03-24T05:24:37.000Z
examples/simple/simple_ep.py
thomashopkins32/LEAP
aafada03a261543f35ebfbb9b1ef7140cb079f6c
[ "AFL-3.0" ]
180
2018-10-11T21:36:57.000Z
2022-03-25T17:38:33.000Z
examples/simple/simple_ep.py
thomashopkins32/LEAP
aafada03a261543f35ebfbb9b1ef7140cb079f6c
[ "AFL-3.0" ]
8
2019-09-27T23:11:26.000Z
2021-09-29T21:15:35.000Z
#!/usr/bin/env python3 """ This implements a simple Evolutionary Programming (EP) system, but it does not evolve state machines as done with the original EP approach. TODO convert to a state machines problem """ import os from toolz import pipe from leap_ec import Individual, context, test_env_var from ...
37.361446
85
0.6198
#!/usr/bin/env python3 """ This implements a simple Evolutionary Programming (EP) system, but it does not evolve state machines as done with the original EP approach. TODO convert to a state machines problem """ import os from toolz import pipe from leap_ec import Individual, context, test_env_var from ...
0
0
0
0
0
0
0
0
0
3274152719814b53020602fee540527b2afc4a45
481
py
Python
intervention_herd/intervention_herd/make_rand_pop.py
molkjar/bachelor
a0591691b820c6c8a45d16f8d55f3a7e80ea384b
[ "MIT" ]
null
null
null
intervention_herd/intervention_herd/make_rand_pop.py
molkjar/bachelor
a0591691b820c6c8a45d16f8d55f3a7e80ea384b
[ "MIT" ]
null
null
null
intervention_herd/intervention_herd/make_rand_pop.py
molkjar/bachelor
a0591691b820c6c8a45d16f8d55f3a7e80ea384b
[ "MIT" ]
null
null
null
import covasim as cv import sciris as sc import population_random as pr if __name__ == '__main__': #Without dispersion cv.set_seed(1) people = pr.generate_people(n_people=200e3, n_contacts=20, dispersion=None) sc.saveobj('randppl.pop', people) # With dispersion cv.set_seed(1) peopleDisp ...
21.863636
82
0.721414
import covasim as cv import pandas as pd import sciris as sc import numpy as np import population_random as pr if __name__ == '__main__': #Without dispersion cv.set_seed(1) people = pr.generate_people(n_people=200e3, n_contacts=20, dispersion=None) sc.saveobj('randppl.pop', people) # With disper...
0
0
0
0
0
0
0
-5
44
0321cbc0cd8aae6294dc88fca152c51fa61272fc
978
py
Python
LeetCode/069 Sqrt(x).py
gesuwen/Algorithms
0c9cf4412d76f8b69ef68cc80636323f5a0e5786
[ "MIT" ]
null
null
null
LeetCode/069 Sqrt(x).py
gesuwen/Algorithms
0c9cf4412d76f8b69ef68cc80636323f5a0e5786
[ "MIT" ]
null
null
null
LeetCode/069 Sqrt(x).py
gesuwen/Algorithms
0c9cf4412d76f8b69ef68cc80636323f5a0e5786
[ "MIT" ]
null
null
null
# Math; Binary Search # Implement int sqrt(int x). # # Compute and return the square root of x, where x is guaranteed to be a non-negative integer. # # Since the return type is an integer, the decimal digits are truncated and only the integer part of the result is returned. # # Example 1: # # Input: 4 # Output: 2 # Ex...
25.736842
124
0.52863
# Math; Binary Search # Implement int sqrt(int x). # # Compute and return the square root of x, where x is guaranteed to be a non-negative integer. # # Since the return type is an integer, the decimal digits are truncated and only the integer part of the result is returned. # # Example 1: # # Input: 4 # Output: 2 # Ex...
0
0
0
480
0
0
0
0
22
c78ae29735b85b179be5cc23fb9f757749681fab
1,645
py
Python
compilador.py
RevertonLuis/NavierStokesSpaceTimeParallelProjectionMethod
23fbf3b01a34c244d8928fae4ad9d12bffef8d07
[ "MIT" ]
1
2021-03-02T16:28:12.000Z
2021-03-02T16:28:12.000Z
compilador.py
RevertonLuis/NavierStokesSpaceTimeParallelProjectionMethod
23fbf3b01a34c244d8928fae4ad9d12bffef8d07
[ "MIT" ]
null
null
null
compilador.py
RevertonLuis/NavierStokesSpaceTimeParallelProjectionMethod
23fbf3b01a34c244d8928fae4ad9d12bffef8d07
[ "MIT" ]
null
null
null
import os import subprocess import sys fontes = ["funcoes_abstratas.f90", "funcoes_alias.f90", 'matriz_A.f90', 'gs.f90', 'extrapolacoes_de_u_e_v.f90', 'fontes_subrotinas.f90', 'class_array_subrotinas.f90', 'residuo.f90', 'variaveis_solvers...
22.22973
44
0.606687
import os import subprocess import sys fontes = ["funcoes_abstratas.f90", "funcoes_alias.f90", 'matriz_A.f90', 'gs.f90', 'extrapolacoes_de_u_e_v.f90', 'fontes_subrotinas.f90', 'class_array_subrotinas.f90', 'residuo.f90', 'variaveis_solvers...
0
0
0
0
0
0
0
0
0
486c6736e43246d360dbfa3421cf92c6a8d90770
8,057
py
Python
s3splitmerge/tests/run.py
MacHu-GWU/s3splitmerge-project
873892158f4a2d0ee20f291e5d3b2a80f0bae1ba
[ "MIT" ]
null
null
null
s3splitmerge/tests/run.py
MacHu-GWU/s3splitmerge-project
873892158f4a2d0ee20f291e5d3b2a80f0bae1ba
[ "MIT" ]
null
null
null
s3splitmerge/tests/run.py
MacHu-GWU/s3splitmerge-project
873892158f4a2d0ee20f291e5d3b2a80f0bae1ba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import typing import awswrangler as wr from .data import (create_s3_csv_file, create_s3_json_file) from ..helpers import (is_s3_object_exists) def run_test_split_csv( boto_ses, n_k_rows: int, header: bool, source_bucket: str, source_key: str, target_bucket: str, ta...
31.84585
93
0.601092
# -*- coding: utf-8 -*- import typing import awswrangler as wr from .data import ( create_s3_csv_file, create_s3_json_file, create_many_parquet_file, create_many_json_file, ) from ..merge import ( merge_parquet_by_prefix, merge_json_by_prefix, ) from ..helpers import ( is_s3_object_exists, ...
0
0
0
0
0
3,594
0
132
68
1a0d56e351e57ca087fab587b737387fabc26c12
12,731
py
Python
pymilvus_orm/utility.py
scipe/pymilvus-orm
cdcf5b7c99430d9c7e6da16556964323cdb58e80
[ "Apache-2.0" ]
null
null
null
pymilvus_orm/utility.py
scipe/pymilvus-orm
cdcf5b7c99430d9c7e6da16556964323cdb58e80
[ "Apache-2.0" ]
null
null
null
pymilvus_orm/utility.py
scipe/pymilvus-orm
cdcf5b7c99430d9c7e6da16556964323cdb58e80
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2019-2021 Zilliz. 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 ag...
48.406844
139
0.684392
# Copyright (C) 2019-2021 Zilliz. 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 ag...
0
0
0
0
0
153
0
67
68
a3d9228044efb6c05033803e028e1c86272deb18
3,595
py
Python
pyocd/rtos/provider.py
majorlin/pyOCD
62dbca36645a72152f0fb9049e5d46070f8b66b7
[ "Apache-2.0" ]
1
2022-02-13T13:47:49.000Z
2022-02-13T13:47:49.000Z
pyocd/rtos/provider.py
majorlin/pyOCD
62dbca36645a72152f0fb9049e5d46070f8b66b7
[ "Apache-2.0" ]
null
null
null
pyocd/rtos/provider.py
majorlin/pyOCD
62dbca36645a72152f0fb9049e5d46070f8b66b7
[ "Apache-2.0" ]
null
null
null
# pyOCD debugger # Copyright (c) 2016 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
28.991935
100
0.667038
# pyOCD debugger # Copyright (c) 2016 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
0
558
0
2,306
0
0
0
0
46
4aef6a340594c5e0b0940fd61bf81cef75f15b6f
2,822
py
Python
workflow/jena_functions.py
ChalkLab/SciFlow
5bf021007d6184402ebfe6cefc2111d99160cb69
[ "MIT" ]
null
null
null
workflow/jena_functions.py
ChalkLab/SciFlow
5bf021007d6184402ebfe6cefc2111d99160cb69
[ "MIT" ]
null
null
null
workflow/jena_functions.py
ChalkLab/SciFlow
5bf021007d6184402ebfe6cefc2111d99160cb69
[ "MIT" ]
null
null
null
import requests import urllib3 from sciflow import localsettings path = "http://jena1.unfcsd.unf.edu:3030/" dset = "SciData" hdrs = {'Content-Type': 'application/json'} hdrsld = {'Content-Type': 'application/ld+json'} fpath = localsettings.ppath + "/static/files/" def server(): """get the server info from the f...
32.068182
114
0.634656
import requests import urllib3 from sciflow import localsettings path = "http://jena1.unfcsd.unf.edu:3030/" dset = "SciData" hdrs = {'Content-Type': 'application/json'} hdrsld = {'Content-Type': 'application/ld+json'} fpath = localsettings.ppath + "/static/files/" def server(): """get the server info from the f...
0
0
0
0
0
0
0
0
0
d16129aa31fa37f2f468978bdec0a57ead1ab1be
678
py
Python
add_categories.py
1dot75cm/taobaobao
bce05319b57f6737a249945a75a99e09125734c3
[ "MIT" ]
14
2017-03-29T11:03:39.000Z
2020-06-29T14:06:13.000Z
add_categories.py
1dot75cm/taobaobao
bce05319b57f6737a249945a75a99e09125734c3
[ "MIT" ]
1
2017-12-19T09:50:30.000Z
2017-12-19T09:50:30.000Z
add_categories.py
1dot75cm/taobaobao
bce05319b57f6737a249945a75a99e09125734c3
[ "MIT" ]
4
2017-05-24T08:03:00.000Z
2019-04-19T13:33:02.000Z
# -*- coding: utf-8 -*- if __name__ in '__main__': main()
24.214286
65
0.575221
# -*- coding: utf-8 -*- import pymongo import json def main(): conn = pymongo.MongoClient('127.0.0.1', 27017) db = conn['taobao'] goods_coll = db['goods'] cate_coll = db['categories'] print('Reading categories.') cate = set() for i in goods_coll.find(): cate.add(json.dumps(i['categ...
0
0
0
0
0
565
0
-17
67