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
47543c1ac833e87d3d5612f874d23ecb800b05cb
2,165
py
Python
rq1.py
ai-se/TimeLIME
eaf8cd44715bb1f6dcac29f4c0bfb2c93809ac98
[ "MIT" ]
null
null
null
rq1.py
ai-se/TimeLIME
eaf8cd44715bb1f6dcac29f4c0bfb2c93809ac98
[ "MIT" ]
null
null
null
rq1.py
ai-se/TimeLIME
eaf8cd44715bb1f6dcac29f4c0bfb2c93809ac98
[ "MIT" ]
1
2021-04-28T17:21:30.000Z
2021-04-28T17:21:30.000Z
if __name__ == "__main__": main()
42.45098
114
0.62448
from planner import * from othertools import * import matplotlib.pyplot as plt def main(): score_2t = readfile('rq1_TimeLIME.csv') score_2f = readfile('rq1_LIME.csv') scores2_x = readfile('rq1_XTREE.csv') scores2_alve = readfile('rq1_Alves.csv') scores2_shat = readfile('rq1_Shat.csv') scores2_...
0
0
0
0
0
2,022
0
13
89
c0a16e3749506bef84fa901fa7d4b90d64b11cac
129
py
Python
livechat/customer/__init__.py
livechat/lc-sdk-python
536483590b9600ef1bc86fe36a1f810368b85a9d
[ "Apache-2.0" ]
5
2021-03-22T19:22:05.000Z
2022-01-18T13:38:22.000Z
livechat/customer/__init__.py
livechat/lc-sdk-python
536483590b9600ef1bc86fe36a1f810368b85a9d
[ "Apache-2.0" ]
5
2021-10-05T14:44:33.000Z
2022-02-16T07:33:51.000Z
livechat/customer/__init__.py
livechat/lc-sdk-python
536483590b9600ef1bc86fe36a1f810368b85a9d
[ "Apache-2.0" ]
null
null
null
#pylint: disable=C0114
32.25
52
0.852713
#pylint: disable=C0114 from livechat.customer.rtm.client import CustomerRTM from livechat.customer.web.client import CustomerWeb
0
0
0
0
0
0
0
62
44
8532b6e0caf9273719815c7bb094f49cd9b9c2d3
1,821
py
Python
master-branches/add_master_branch.py
FrNecas/source-git-onboarding
550a39045af2ddb9517e2c323a2697a40dd27f6f
[ "MIT" ]
null
null
null
master-branches/add_master_branch.py
FrNecas/source-git-onboarding
550a39045af2ddb9517e2c323a2697a40dd27f6f
[ "MIT" ]
4
2020-10-26T16:06:34.000Z
2022-03-30T13:32:28.000Z
master-branches/add_master_branch.py
FrNecas/source-git-onboarding
550a39045af2ddb9517e2c323a2697a40dd27f6f
[ "MIT" ]
6
2020-10-20T15:14:07.000Z
2022-03-16T09:56:31.000Z
import os from logging import getLogger from pathlib import Path import requests from ogr.services.pagure import PagureService logger = getLogger(__name__) work_dir = Path("/tmp/playground") readme_path = Path(__file__).parent / "README.md" service = PagureService( token=os.getenv("PAGURE_TOKEN"), instance_url="...
29.370968
86
0.637013
import os import shutil from logging import getLogger from pathlib import Path from shutil import copyfile import git import requests from ogr.services.pagure import PagureService logger = getLogger(__name__) work_dir = Path("/tmp/playground") readme_path = Path(__file__).parent / "README.md" service = PagureServic...
0
0
0
924
0
0
0
-13
90
442feb0e4bfea18cece7737dc7439b2f3bbaf507
1,468
py
Python
lintcode/86.py
jianershi/algorithm
c3c38723b9c5f1cc745550d89e228f92fd4abfb2
[ "MIT" ]
1
2021-01-08T06:57:49.000Z
2021-01-08T06:57:49.000Z
lintcode/86.py
jianershi/algorithm
c3c38723b9c5f1cc745550d89e228f92fd4abfb2
[ "MIT" ]
null
null
null
lintcode/86.py
jianershi/algorithm
c3c38723b9c5f1cc745550d89e228f92fd4abfb2
[ "MIT" ]
1
2021-01-08T06:57:52.000Z
2021-01-08T06:57:52.000Z
""" 86. Binary Search Tree Iterator https://www.lintcode.com/problem/binary-search-tree-iterator/description the difference between this method and the standard method is: if one has right subtree, it no longer keep itself in the stack. so when taken out of the stack, it does not need to make extra step to remove itse...
23.677419
85
0.615123
""" 86. Binary Search Tree Iterator https://www.lintcode.com/problem/binary-search-tree-iterator/description the difference between this method and the standard method is: if one has right subtree, it no longer keep itself in the stack. so when taken out of the stack, it does not need to make extra step to remove itse...
0
0
0
721
0
0
0
0
23
6ee76beff0708fcda0432ab4f6d907a3ceecdcc1
153
py
Python
config/settings/deploy_example_2.py
hyphae/apis-service_center
0a6f0d349a435a3c739c2ee1ebdcc010c2dd13d1
[ "Apache-2.0" ]
null
null
null
config/settings/deploy_example_2.py
hyphae/apis-service_center
0a6f0d349a435a3c739c2ee1ebdcc010c2dd13d1
[ "Apache-2.0" ]
3
2021-03-20T10:35:08.000Z
2022-03-21T16:54:05.000Z
config/settings/deploy_example_2.py
hyphae/apis-service_center
0a6f0d349a435a3c739c2ee1ebdcc010c2dd13d1
[ "Apache-2.0" ]
null
null
null
""" settings base.py . """ DEBUG = False ALLOWED_HOSTS = ['*'] STATIC_URL = '/apis-service-center/app/static/'
15.3
47
0.69281
"""切り替え用 settings ファイル base.py をベースに上書きする. """ from .base import * DEBUG = False ALLOWED_HOSTS = ['*'] STATIC_URL = '/apis-service-center/app/static/'
57
0
0
0
0
0
0
-2
22
e3f69d32d00a3bb7eba166c677394c55c97dc3c6
6,928
py
Python
waldur_batch_offering.py
ServerAnt/ansible-waldur-module
4406a176a9a11f37e37affb6ccc0478f15ad1081
[ "MIT" ]
null
null
null
waldur_batch_offering.py
ServerAnt/ansible-waldur-module
4406a176a9a11f37e37affb6ccc0478f15ad1081
[ "MIT" ]
null
null
null
waldur_batch_offering.py
ServerAnt/ansible-waldur-module
4406a176a9a11f37e37affb6ccc0478f15ad1081
[ "MIT" ]
null
null
null
#!/usr/bin/python ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'OpenNode', } DOCUMENTATION = ''' --- options: api_url: description: - Fully qualified URL to the Waldur. required: true access_token: description: ...
30.121739
83
0.587904
#!/usr/bin/python from ansible.module_utils.basic import AnsibleModule from waldur_client import WaldurClientException, waldur_client_from_module ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'OpenNode', } DOCUMENTATION = ''' --- options: api_url: des...
0
0
0
0
0
3,073
0
84
115
abbe93d8493620ffe594b9b4c940094d973e1987
4,282
py
Python
ConvNet.py
Gregory-Eales/Convolutional-Neural-Network
50c07208f59526b9a86a162d8b356e9e19dd3310
[ "MIT" ]
1
2019-05-03T21:48:34.000Z
2019-05-03T21:48:34.000Z
ConvNet.py
Gregory-Eales/Convolutional-Neural-Network
50c07208f59526b9a86a162d8b356e9e19dd3310
[ "MIT" ]
null
null
null
ConvNet.py
Gregory-Eales/Convolutional-Neural-Network
50c07208f59526b9a86a162d8b356e9e19dd3310
[ "MIT" ]
null
null
null
# loading bar imports
32.439394
96
0.569827
import numpy as np # loading bar imports import os from tqdm import tqdm import time class ConvNet(object): def __init__(self, x, y): # define network topology # remember to change # of each type of layers # topology parameter? self.x_size = x.shape self.y_size = y.shape ...
0
0
0
4,173
0
0
0
-25
111
aac0f27d69e7306681029adb483e49112422799f
1,156
py
Python
make_sqls.py
na0fu3y/bqfunc
a77554c6160b37e01de6dbb6e36dd499acb17bf4
[ "MIT" ]
5
2020-11-30T13:25:05.000Z
2022-02-25T12:29:39.000Z
make_sqls.py
na0fu3y/bqfunc
a77554c6160b37e01de6dbb6e36dd499acb17bf4
[ "MIT" ]
null
null
null
make_sqls.py
na0fu3y/bqfunc
a77554c6160b37e01de6dbb6e36dd499acb17bf4
[ "MIT" ]
null
null
null
if __name__ == "__main__": make_holidays_sql()
28.9
109
0.619377
import datetime import urllib.request from pathlib import Path def fetch_holidays(): # 内閣府「国民の祝日」 # https://www8.cao.go.jp/chosei/shukujitsu/gaiyou.html url = "https://www8.cao.go.jp/chosei/shukujitsu/syukujitsu.csv" with urllib.request.urlopen(url) as res: body = res.readlines() # header ...
159
0
0
0
465
474
0
-3
112
dce5baf6c786a397b5a9edbf5f8a799edd0e5d8c
1,299
py
Python
login/login.py
nju161250102/NJUSystem_Server
8b72fde8701d55e62ce8ed4bcb299ec8f0ab32fe
[ "MIT" ]
1
2018-07-31T13:31:52.000Z
2018-07-31T13:31:52.000Z
login/login.py
nju161250102/NJUSystem_Server
8b72fde8701d55e62ce8ed4bcb299ec8f0ab32fe
[ "MIT" ]
null
null
null
login/login.py
nju161250102/NJUSystem_Server
8b72fde8701d55e62ce8ed4bcb299ec8f0ab32fe
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- from flask import Blueprint loginModule = Blueprint('login', __name__) # cookie, http://cer.nju.edu.cn/amserver/UI/Login
30.928571
116
0.664357
# -*- coding:utf-8 -*- from flask import Blueprint from flask import request from flask import Response import json import requests loginModule = Blueprint('login', __name__) @loginModule.route('/', methods=['POST']) def login(): req_data = json.loads(request.data) post_data = { "IDToken1": req_data[...
117
986
0
0
0
0
0
-7
133
cf41028c39b31a7dc048944cfc4a553f51366dea
4,434
py
Python
scrape_mars.py
junki-ogawa/web-scraping-challenge
eeb181cabe48396a8068ef93ac41a62cc261b6a0
[ "ADSL" ]
null
null
null
scrape_mars.py
junki-ogawa/web-scraping-challenge
eeb181cabe48396a8068ef93ac41a62cc261b6a0
[ "ADSL" ]
null
null
null
scrape_mars.py
junki-ogawa/web-scraping-challenge
eeb181cabe48396a8068ef93ac41a62cc261b6a0
[ "ADSL" ]
null
null
null
import pymongo conn = 'mongodb://localhost:27017' client = pymongo.MongoClient(conn) db = client.mars_db mars = db.mars scrape()
37.897436
97
0.690798
from splinter import Browser from bs4 import BeautifulSoup from webdriver_manager.chrome import ChromeDriverManager import pymongo import pandas as pd import requests from flask import Flask, render_template import time conn = 'mongodb://localhost:27017' client = pymongo.MongoClient(conn) db = client.mars...
0
0
0
0
0
4,059
0
51
185
13806065b202f1f3a84428e15535c568b7658007
1,205
py
Python
tchron/tests/vtk_test.py
dyvasey/riftinversion
6707a22d3413ee5af6c8aee2660f1024214f1a31
[ "MIT" ]
null
null
null
tchron/tests/vtk_test.py
dyvasey/riftinversion
6707a22d3413ee5af6c8aee2660f1024214f1a31
[ "MIT" ]
null
null
null
tchron/tests/vtk_test.py
dyvasey/riftinversion
6707a22d3413ee5af6c8aee2660f1024214f1a31
[ "MIT" ]
null
null
null
""" Test for forward modeling of ASPECT output, using cookbook output """ #%% Import and setup files import matplotlib.pyplot as plt import pyvista as pv import vtk_plot as vp # Read in sample data from continental extension cookbook meshes = pv.read('../../sample_data/vtk_tchron_test.vtm') #%% Add H...
30.125
108
0.66805
""" Test for forward modeling of ASPECT output, using cookbook output """ #%% Import and setup files import matplotlib.pyplot as plt from matplotlib import cm,colors import numpy as np import pyvista as pv import vtk_plot as vp # Read in sample data from continental extension cookbook meshes = pv.re...
0
0
0
0
0
0
0
8
48
a8b0260995482da49d8adf4cf28f57de040c3349
1,759
py
Python
final_gpt2_test_wikitext103-fp32.py
minhhn2910/conga2022
81ad2fb9c0055c332f8f305b2ea409b6577003f4
[ "MIT" ]
null
null
null
final_gpt2_test_wikitext103-fp32.py
minhhn2910/conga2022
81ad2fb9c0055c332f8f305b2ea409b6577003f4
[ "MIT" ]
null
null
null
final_gpt2_test_wikitext103-fp32.py
minhhn2910/conga2022
81ad2fb9c0055c332f8f305b2ea409b6577003f4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Transformers installation from transformers import GPT2TokenizerFast device = 'cuda' model_id = 'gpt2-large' tokenizer = GPT2TokenizerFast.from_pretrained(model_id) from datasets import load_dataset #test = load_dataset("lambada", split='test') test = load_dataset('wikitext', 'wikitext-10...
25.128571
84
0.670836
# -*- coding: utf-8 -*- # Transformers installation import numpy as np from transformers import GPT2LMHeadModel, GPT2TokenizerFast from qtorch.quant import posit_quantize, float_quantize, configurable_table_quantize device = 'cuda' model_id = 'gpt2-large' tokenizer = GPT2TokenizerFast.from_pretrained(model_id) fro...
0
0
0
0
0
1,120
0
77
68
810202aa9efdc363b89d45a92de4e299f0f1ac3c
4,067
py
Python
modules/iib_api.py
AATools/ib-metrics-pyclient
2f3bae726201eabcb6c1bec0cfdf5957df538787
[ "MIT" ]
1
2020-07-28T15:47:44.000Z
2020-07-28T15:47:44.000Z
modules/iib_api.py
AATools/ib-metrics-pyclient
2f3bae726201eabcb6c1bec0cfdf5957df538787
[ "MIT" ]
5
2020-04-27T12:05:03.000Z
2020-12-11T10:27:08.000Z
modules/iib_api.py
AATools/ib-metrics-pyclient
2f3bae726201eabcb6c1bec0cfdf5957df538787
[ "MIT" ]
2
2020-11-11T03:21:13.000Z
2022-03-08T17:45:12.000Z
# -*- coding: utf-8 -*- """Various functions for client api.""" import subprocess def run_iib_command(**kwargs): """Calls predefined commands and returns their result.""" command_mapping = { 'get_brokers_status': 'mqsilist | grep Broker', 'get_integration_nodes_status': 'mqsilist | grep "Integ...
40.267327
110
0.595771
# -*- coding: utf-8 -*- """Various functions for client api.""" import subprocess def run_iib_command(**kwargs): """Calls predefined commands and returns their result.""" command_mapping = { 'get_brokers_status': 'mqsilist | grep Broker', 'get_integration_nodes_status': 'mqsilist | grep "Integ...
0
0
0
0
0
0
0
0
0
8cee128cf4e93fd417bbdce4ad0272375e780eed
963
py
Python
test/command_line/test_stereographic_projections.py
jbeilstenedmands/dials
fb9672b91854f564cbbba6f1cceeefa18d135965
[ "BSD-3-Clause" ]
null
null
null
test/command_line/test_stereographic_projections.py
jbeilstenedmands/dials
fb9672b91854f564cbbba6f1cceeefa18d135965
[ "BSD-3-Clause" ]
null
null
null
test/command_line/test_stereographic_projections.py
jbeilstenedmands/dials
fb9672b91854f564cbbba6f1cceeefa18d135965
[ "BSD-3-Clause" ]
1
2020-02-04T15:39:06.000Z
2020-02-04T15:39:06.000Z
from __future__ import absolute_import, division, print_function
30.09375
65
0.628245
from __future__ import absolute_import, division, print_function import json import os import procrunner def test_stereographic_projection(dials_regression, tmpdir): path = os.path.join(dials_regression, "experiment_test_data") result = procrunner.run( ( "dials.stereographic_projection",...
0
0
0
0
0
832
0
-26
91
bc6827cecb880364d64ad812e4e93528bfdf6b85
1,795
py
Python
setup.py
nyergler/hieroglyph
843ed9553fe640f9d6061dfb1accf131b467492e
[ "BSD-3-Clause" ]
115
2015-01-08T12:54:49.000Z
2021-05-20T18:27:14.000Z
setup.py
lpirl/hieroglyph
e41533276594fa9b826d5e9c48164db628fe1541
[ "BSD-3-Clause" ]
94
2015-01-05T15:34:27.000Z
2020-10-09T08:13:25.000Z
setup.py
lpirl/hieroglyph
e41533276594fa9b826d5e9c48164db628fe1541
[ "BSD-3-Clause" ]
48
2015-01-21T06:13:34.000Z
2020-05-07T22:10:24.000Z
#!/usr/bin/env python import os from setuptools import setup, find_packages import versioneer here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() NEWS = open(os.path.join(here, 'NEWS.txt')).read() install_requires = [ "setuptools", "Sphinx >= 2.0", ] se...
28.951613
71
0.58663
#!/usr/bin/env python import os from setuptools import setup, find_packages import versioneer here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() NEWS = open(os.path.join(here, 'NEWS.txt')).read() install_requires = [ "setuptools", "Sphinx >= 2.0", ] se...
0
0
0
0
0
0
0
0
0
aff8057d4e984138d871f670277a645965da11d6
33,638
py
Python
post_optimization_studies/mad_analyses/ma100MeV_L1pt8-2pt4TeV_deta2pt6/Output/Histos/MadAnalysis5job_0/selection_3.py
sheride/axion_pheno
7d3fc08f5ae5b17a3500eba19a2e43f87f076ce5
[ "MIT" ]
null
null
null
post_optimization_studies/mad_analyses/ma100MeV_L1pt8-2pt4TeV_deta2pt6/Output/Histos/MadAnalysis5job_0/selection_3.py
sheride/axion_pheno
7d3fc08f5ae5b17a3500eba19a2e43f87f076ce5
[ "MIT" ]
null
null
null
post_optimization_studies/mad_analyses/ma100MeV_L1pt8-2pt4TeV_deta2pt6/Output/Histos/MadAnalysis5job_0/selection_3.py
sheride/axion_pheno
7d3fc08f5ae5b17a3500eba19a2e43f87f076ce5
[ "MIT" ]
null
null
null
# Running! if __name__ == '__main__': selection_3()
154.302752
1,799
0.768238
def selection_3(): # Library import import numpy import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec # Library version matplotlib_version = matplotlib.__version__ numpy_version = numpy.__version__ # Histo binning xBinning = numpy.lin...
0
0
0
0
0
33,559
0
0
22
7e8f902ed35a3c9b042fcc03e4adf01f5802e3f3
1,015
py
Python
pyqt/getting_started/widget_layout.py
CospanDesign/python
9f911509aae7abd9237c14a4635294c7719c9129
[ "MIT" ]
5
2015-12-12T20:16:45.000Z
2020-02-21T19:50:31.000Z
pyqt/getting_started/widget_layout.py
CospanDesign/python
9f911509aae7abd9237c14a4635294c7719c9129
[ "MIT" ]
null
null
null
pyqt/getting_started/widget_layout.py
CospanDesign/python
9f911509aae7abd9237c14a4635294c7719c9129
[ "MIT" ]
2
2020-06-01T06:27:06.000Z
2022-03-10T13:21:03.000Z
import sys if __name__ == '__main__': app = QApplication(sys.argv) scene = QGraphicsScene() #text_edit = scene.addWidget(QLabel("Test")) #push_button = scene.addWidget(QPushButton("button")) #layout = QGraphicsGridLayout() #layout.addItem(text_edit, 0, 0) #layout.addItem(push_button, 0, 1...
24.756098
69
0.649261
import os import sys from PyQt4.Qt import * from PyQt4.QtCore import * from PyQt4.QtGui import * class Example(QtGui.QWidget): def __init__(self): super(Example, self).__init__() self.init_ui() def init_ui(self): qbtn = QtGui.QPushButton('Quit', self) qbtn.clicked.connect(QtCo...
0
0
0
384
0
0
0
-2
111
52fe956ddac463089ef4c1dd09b2e5106fe7a862
4,001
py
Python
playwell-client/playwell/slots.py
jiyulongxu/playwell
3a5dc4d009c6fd75487e208edf0318db4f9ad21d
[ "Apache-2.0" ]
4
2019-09-01T02:05:09.000Z
2022-01-04T06:08:14.000Z
playwell-client/playwell/slots.py
jiyulongxu/playwell
3a5dc4d009c6fd75487e208edf0318db4f9ad21d
[ "Apache-2.0" ]
null
null
null
playwell-client/playwell/slots.py
jiyulongxu/playwell
3a5dc4d009c6fd75487e208edf0318db4f9ad21d
[ "Apache-2.0" ]
6
2019-11-14T13:55:17.000Z
2022-02-09T01:42:24.000Z
"""Playwell slots API """ from playwell import (API, Arg, ArgPos, Methods, load_config) ## Alloc slots ## ALLOC = API( Methods.POST, "/v1/slot/alloc", ( Arg( "slots_num", ArgPos.BODY, { "required": True, "help": "All slots num" ...
20.623711
82
0.444639
"""Playwell slots API """ from playwell import ( API, Arg, ArgPos, Methods, load_config ) ## Alloc slots ## ALLOC = API( Methods.POST, "/v1/slot/alloc", ( Arg( "slots_num", ArgPos.BODY, { "required": True, "hel...
0
0
0
0
0
0
0
22
0
dc69d9f154a8a3dabd67814afb995e90b42c086e
19,711
py
Python
tests/autodiff/test_single_state.py
manuelburger/daceml
501a05b0531bcf208b43816eeaba998feb83feb5
[ "BSD-3-Clause" ]
null
null
null
tests/autodiff/test_single_state.py
manuelburger/daceml
501a05b0531bcf208b43816eeaba998feb83feb5
[ "BSD-3-Clause" ]
null
null
null
tests/autodiff/test_single_state.py
manuelburger/daceml
501a05b0531bcf208b43816eeaba998feb83feb5
[ "BSD-3-Clause" ]
null
null
null
################################## # Testing utilities ################################## # Tests
26.072751
79
0.536705
from functools import reduce import numpy as np import pytest import torch import torch.nn.functional as F import dace from dace import data import dace.sdfg.nodes as nd from dace.transformation.interstate import StateFusion import daceml.onnx as donnx from daceml.autodiff import AutoDiffException, add_backward_pass...
0
14,739
0
1,719
0
2,399
0
76
659
9eac8f5e2421103e0d037b229996a1a81517e5c6
1,245
py
Python
4point5.py
ishah011/CTCI
41fb337c03aba98edb6a619c878c618a1113f231
[ "MIT" ]
null
null
null
4point5.py
ishah011/CTCI
41fb337c03aba98edb6a619c878c618a1113f231
[ "MIT" ]
null
null
null
4point5.py
ishah011/CTCI
41fb337c03aba98edb6a619c878c618a1113f231
[ "MIT" ]
null
null
null
# # 4.5 # Implement a function to check if a binary tree is a binary search tree # # create a new tree # 2 # / \ # 1 3 # \ \ # 0 4 # left_right = Tree(0) left = Tree(1, None, left_right) right_right = Tree(4) right = Tree(3, None, right_right) tree = Tree(2, left, rig...
23.942308
84
0.632129
# # 4.5 # Implement a function to check if a binary tree is a binary search tree # class Tree: def __init__(self, dat, left=None, right=None): self.left = left self.right = right self.data = dat def isBST(root, answer): # check if the left and/or right nodes exist and if th...
0
0
0
122
0
665
0
0
50
f0a10fa0d2ee577c5d57bffcf06a524f47af6306
1,378
py
Python
Leetcode/medium/partition-equal-subset-sum.py
jen-sjen/data-structures-basics-leetcode
addac32974b16e0a37aa60c210ab7820b349b279
[ "MIT" ]
6
2021-07-29T03:26:20.000Z
2022-01-28T15:11:45.000Z
Leetcode/medium/partition-equal-subset-sum.py
jen-sjen/data-structures-basics-leetcode
addac32974b16e0a37aa60c210ab7820b349b279
[ "MIT" ]
2
2021-09-30T09:47:23.000Z
2022-01-31T03:08:24.000Z
Leetcode/medium/partition-equal-subset-sum.py
jen-sjen/data-structures-basics-leetcode
addac32974b16e0a37aa60c210ab7820b349b279
[ "MIT" ]
5
2021-08-10T06:41:11.000Z
2022-01-29T17:50:20.000Z
""" # PARTITION EQUAL SUBSET SUM Given a non-empty array nums containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal. Example 1: Input: nums = [1,5,11,5] Output: true Explanation: The array can be partitioned as [1, 5, 5] and [...
25.054545
173
0.571118
""" # PARTITION EQUAL SUBSET SUM Given a non-empty array nums containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal. Example 1: Input: nums = [1,5,11,5] Output: true Explanation: The array can be partitioned as [1, 5, 5] and [...
0
0
0
846
0
0
0
0
23
e448d6c01725ab50de459e6de0fd3807ef933967
321
py
Python
tests/test_utilities/__init__.py
amih90/bacpypes
27ab4f18aa252ceb6ffdc32d53af2995a2e92647
[ "MIT" ]
240
2015-07-17T16:27:54.000Z
2022-03-29T13:53:06.000Z
tests/test_utilities/__init__.py
amih90/bacpypes
27ab4f18aa252ceb6ffdc32d53af2995a2e92647
[ "MIT" ]
400
2015-07-23T05:37:52.000Z
2022-03-29T12:32:30.000Z
tests/test_utilities/__init__.py
amih90/bacpypes
27ab4f18aa252ceb6ffdc32d53af2995a2e92647
[ "MIT" ]
143
2015-07-17T18:22:27.000Z
2022-03-22T01:21:24.000Z
#!/usr/bin/python """ Test Utilities -------------- This module tests the test utilities. """
17.833333
39
0.772586
#!/usr/bin/python """ Test Utilities -------------- This module tests the test utilities. """ from . import test_state_machine from . import test_time_machine from . import test_extended_tag_list from . import test_client_state_machine from . import test_server_state_machine from . import test_service_access_point...
0
0
0
0
0
0
0
90
135
4a41309297f5de0b6f38be80941bd38d0bb9c316
7,090
py
Python
cloudmersive_validate_api_client/models/address_verify_syntax_only_response.py
Cloudmersive/Cloudmersive.APIClient.Python.Validate
894a3f578c3860db41b3eed179dcc52e02f565a0
[ "Apache-2.0" ]
3
2018-06-23T21:37:21.000Z
2020-04-20T23:07:36.000Z
cloudmersive_validate_api_client/models/address_verify_syntax_only_response.py
Cloudmersive/Cloudmersive.APIClient.Python.Validate
894a3f578c3860db41b3eed179dcc52e02f565a0
[ "Apache-2.0" ]
1
2019-02-04T17:03:35.000Z
2019-03-02T20:16:52.000Z
cloudmersive_validate_api_client/models/address_verify_syntax_only_response.py
Cloudmersive/Cloudmersive.APIClient.Python.Validate
894a3f578c3860db41b3eed179dcc52e02f565a0
[ "Apache-2.0" ]
2
2019-03-21T15:54:15.000Z
2020-05-27T17:30:43.000Z
# coding: utf-8 """ validateapi The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API. # noqa: E501 OpenAPI spec version: v1 Ge...
35.09901
240
0.642877
# coding: utf-8 """ validateapi The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API. # noqa: E501 OpenAPI spec version: v1 Ge...
0
3,366
0
3,261
0
0
0
-31
105
10f6ed57eea3cf337b34879e604de30cac9c4f7f
130
py
Python
Configuration/ProcessModifiers/python/siPixelDigiMorphing_cff.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Configuration/ProcessModifiers/python/siPixelDigiMorphing_cff.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Configuration/ProcessModifiers/python/siPixelDigiMorphing_cff.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms # This modifier is to run the SiPixelDigiMorphing siPixelDigiMorphing = cms.Modifier()
26
49
0.815385
import FWCore.ParameterSet.Config as cms # This modifier is to run the SiPixelDigiMorphing siPixelDigiMorphing = cms.Modifier()
0
0
0
0
0
0
0
0
0
76d32f5341315082a53f44fb5fb5c02ec0b7bbfd
3,683
py
Python
src/Fourteenth Chapter/Exercise2.py
matthijskrul/ThinkPython
34c1d81f4ef535c32b8b0309b23c7ca37f851606
[ "MIT" ]
null
null
null
src/Fourteenth Chapter/Exercise2.py
matthijskrul/ThinkPython
34c1d81f4ef535c32b8b0309b23c7ca37f851606
[ "MIT" ]
null
null
null
src/Fourteenth Chapter/Exercise2.py
matthijskrul/ThinkPython
34c1d81f4ef535c32b8b0309b23c7ca37f851606
[ "MIT" ]
null
null
null
# Adapt the merge algorithm to write each of these functions, as was suggested there: # # Return only those items that are present in the first list, but not in the second. import random def return_xs_unique(xs, ys): """ merge sorted lists xs and ys. Return only those items that are present in the first list, ...
27.901515
110
0.590551
# Adapt the merge algorithm to write each of these functions, as was suggested there: # # Return only those items that are present in the first list, but not in the second. import random def return_xs_unique(xs, ys): """ merge sorted lists xs and ys. Return only those items that are present in the first list, ...
6
0
0
0
0
0
0
0
0
053914ae8ca6bed144522d26cba1f2a52c6014f5
2,582
py
Python
EE475/Ch6P13.py
PhoeniXuzoo/NU-Projects
a217ad46e6876ceffb3dec1d6e52f775674b2e8b
[ "MIT" ]
null
null
null
EE475/Ch6P13.py
PhoeniXuzoo/NU-Projects
a217ad46e6876ceffb3dec1d6e52f775674b2e8b
[ "MIT" ]
null
null
null
EE475/Ch6P13.py
PhoeniXuzoo/NU-Projects
a217ad46e6876ceffb3dec1d6e52f775674b2e8b
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt ## softmax: 0.1 600 ## perceptron: 0.05 550 if __name__ == "__main__": csvname = 'breast_cancer_data.csv' x, y = readData(csvname) w = np.ones([x.shape[0] + 1, 1]) x = np.insert(x, 0, values=np.ones([1, x.shape[1]]), axis=0) xSoftList = [...
29.011236
82
0.573199
import numpy as np import matplotlib.pyplot as plt ## softmax: 0.1 600 ## perceptron: 0.05 550 def readData(csvname): data = np.loadtxt(csvname, delimiter=',') x = data[:-1, :] y = data[-1:, :] return x, y def softmaxCostFunc(x, y, w): cost = np.sum(np.log(1 + np.exp(-y*np.transpose(np.dot(np.t...
0
0
0
0
0
962
0
0
115
7e5329dd16ac953e5b877329a106639b6061afe2
790
py
Python
build/sources/hashing.py
AlexDev-py/CubIC
7932d2789c0b45ebc9ce631d21f6bed99d3a3a51
[ "MIT" ]
2
2022-02-05T13:06:28.000Z
2022-02-09T07:07:11.000Z
build/sources/hashing.py
AlexDev-py/CubIC
7932d2789c0b45ebc9ce631d21f6bed99d3a3a51
[ "MIT" ]
null
null
null
build/sources/hashing.py
AlexDev-py/CubIC
7932d2789c0b45ebc9ce631d21f6bed99d3a3a51
[ "MIT" ]
2
2022-01-24T13:42:45.000Z
2022-02-08T09:18:58.000Z
from __future__ import annotations import os if __name__ == "__main__": data_hash = generate_media_hash()[1] os.system(f"heroku config:set DATA_HASH={data_hash} -a dungeon-of-masters")
29.259259
80
0.665823
from __future__ import annotations import json import os from DOM.hashing import get_hash def generate_media_hash() -> tuple[dict, str]: target_file_path = "resources/files.json" data = {} for root, dirs, files in os.walk("resources"): for file_name in files: file_path = os.path.join...
0
0
0
0
0
524
0
1
69
e3a93ecb15d1e58e44a931302a4eb3b5be2d2826
7,707
py
Python
baseline.py
JuliousHurtado/Meta-Iteration
8edf09510c9c8c300c8ca42472e7e04bfd790938
[ "MIT" ]
null
null
null
baseline.py
JuliousHurtado/Meta-Iteration
8edf09510c9c8c300c8ca42472e7e04bfd790938
[ "MIT" ]
1
2021-09-08T03:25:12.000Z
2021-09-08T03:25:12.000Z
baseline.py
JuliousHurtado/Meta-Iteration
8edf09510c9c8c300c8ca42472e7e04bfd790938
[ "MIT" ]
null
null
null
import torch import random import numpy as np import torchvision.models as models from utils import getArguments if __name__ == '__main__': parser = getArguments() args = parser.parse_args() use_cuda = torch.cuda.is_available() random.seed(args.seed) np.random.seed(args.seed) torch.manua...
37.052885
169
0.638381
import torch import random import time import copy import numpy as np from torch import nn from torch import optim import torchvision import torchvision.models as models from model.models import TaskNormalization from utils import getArguments, getModel from dataset.multidataset import DatasetGen as multi_cls from d...
0
0
0
1,283
0
5,255
0
216
337
f7ca7c6028d40591dc9877fdad45f3a0e5b3bc15
11,922
py
Python
test.py
MartinNiederl/anki_kanji_auto_fill
e51239dddc5b383d34d9d580294edc2d4dc98caf
[ "MIT" ]
null
null
null
test.py
MartinNiederl/anki_kanji_auto_fill
e51239dddc5b383d34d9d580294edc2d4dc98caf
[ "MIT" ]
null
null
null
test.py
MartinNiederl/anki_kanji_auto_fill
e51239dddc5b383d34d9d580294edc2d4dc98caf
[ "MIT" ]
null
null
null
# coding=utf8 from typing import Dict, Set import unicodedata print(ord('alibaba')) ranges = [ # (ord(u"\u3300"), ord(u"\u33ff")), # compatibility ideographs # (ord(u"\ufe30"), ord(u"\ufe4f")), # compatibility ideographs # (ord(u"\uf900"), ord(u"\ufaff")), # compatibility ideographs # (ord(u"\U000...
131.010989
1,011
0.541184
# coding=utf8 import json from typing import Dict, List, Set import unicodedata print(ord('alibaba')) ranges = [ # (ord(u"\u3300"), ord(u"\u33ff")), # compatibility ideographs # (ord(u"\ufe30"), ord(u"\ufe4f")), # compatibility ideographs # (ord(u"\uf900"), ord(u"\ufaff")), # compatibility ideographs ...
18,848
0
0
0
0
62
0
-4
45
511736149de1ed981732f96324cc61206ed6f06e
9,144
py
Python
peerdid/core/peer_did_helper.py
andkononykhin/peer-did-python
bc56e7cb685cac15697a4b0c0d5ca0e12bdd1651
[ "Apache-2.0" ]
null
null
null
peerdid/core/peer_did_helper.py
andkononykhin/peer-did-python
bc56e7cb685cac15697a4b0c0d5ca0e12bdd1651
[ "Apache-2.0" ]
null
null
null
peerdid/core/peer_did_helper.py
andkononykhin/peer-did-python
bc56e7cb685cac15697a4b0c0d5ca0e12bdd1651
[ "Apache-2.0" ]
null
null
null
import hashlib import json import re from typing import Union, List, Optional import base58 import varint from peerdid.core.did_doc import (VerificationMaterial, PublicKeyField, JWK_OKP) from peerdid.core.utils import _urlsafe_b64encode, _urlsafe_b64decode from peerdid.types import (JSON, PublicKeyAgreement, PublicKe...
34.768061
110
0.714895
import hashlib import json import re from enum import Enum from typing import Union, List, Optional import base58 import varint from peerdid.core.did_doc import ( VerificationMaterial, PublicKeyField, VerificationMaterialTypeAgreement, VerificationMaterialTypeAuthentication, JWK_OKP, ) from peerdi...
0
0
0
97
0
1,857
0
133
183
0d92b5e007c5d6d0f17cf60bdf5989db9053fe6d
424
py
Python
examples/pix_create_immediate_charge.py
gerencianet/gn-api-sdk-python
09664fdcc7b9d99db6265c63b5c0efdfa413acd9
[ "MIT" ]
12
2016-10-14T15:56:59.000Z
2021-10-30T01:56:51.000Z
examples/pix_create_immediate_charge.py
gerencianet/gn-api-sdk-python
09664fdcc7b9d99db6265c63b5c0efdfa413acd9
[ "MIT" ]
7
2018-12-27T16:30:20.000Z
2021-06-30T12:26:04.000Z
examples/pix_create_immediate_charge.py
gerencianet/gn-api-sdk-python
09664fdcc7b9d99db6265c63b5c0efdfa413acd9
[ "MIT" ]
13
2016-07-13T14:28:47.000Z
2022-03-16T14:17:40.000Z
from gerencianet import Gerencianet from credentials import CREDENTIALS gn = Gerencianet(CREDENTIALS) body = { 'calendario': { 'expiracao': 3600 }, 'devedor': { 'cpf': '', 'nome': '' }, 'valor': { 'original': '' }, 'chave': '', 'solicitacaoPagador': 'Cob...
18.434783
60
0.591981
from gerencianet import Gerencianet from credentials import CREDENTIALS gn = Gerencianet(CREDENTIALS) body = { 'calendario': { 'expiracao': 3600 }, 'devedor': { 'cpf': '', 'nome': '' }, 'valor': { 'original': '' }, 'chave': '', 'solicitacaoPagador': 'Cob...
4
0
0
0
0
0
0
0
0
399518ebae7320b7a8368861e51010b913d3a1aa
2,239
py
Python
SpectrometersV2/example_code.py
ColdMatter/PhotonBEC
c6bcf9bdefd267c8adde0d299cf5920b010c5022
[ "MIT" ]
null
null
null
SpectrometersV2/example_code.py
ColdMatter/PhotonBEC
c6bcf9bdefd267c8adde0d299cf5920b010c5022
[ "MIT" ]
null
null
null
SpectrometersV2/example_code.py
ColdMatter/PhotonBEC
c6bcf9bdefd267c8adde0d299cf5920b010c5022
[ "MIT" ]
null
null
null
''' Written by: Joao Rodrigues Last Update: October 16th 2020 ''' import sys from socket import gethostname if gethostname().lower() == "ph-photonbec5": sys.path.append("D:/Control/PythonPackages/") import pbec_ipc import matplotlib.pyplot as plt from single_spec_IPC_module import set_spectrometer_mode, set_sp...
38.603448
186
0.820456
''' Written by: Joao Rodrigues Last Update: October 16th 2020 ''' import sys from socket import gethostname if gethostname().lower() == "ph-photonbec5": sys.path.append("D:/Control/PythonPackages/") import pbec_ipc from time import sleep from time import time import matplotlib.pyplot as plt from single_spec_IP...
0
0
0
0
0
0
0
1
44
8c62dfc48c7e80068f446336243ac76e72e649be
2,293
py
Python
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/cameras/apps.py
julialieberman/azure-intelligent-edge-patterns
1e04748d640730301edd2c6fb51a02f9b6d2ff41
[ "MIT" ]
1
2020-08-17T16:50:09.000Z
2020-08-17T16:50:09.000Z
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/cameras/apps.py
julialieberman/azure-intelligent-edge-patterns
1e04748d640730301edd2c6fb51a02f9b6d2ff41
[ "MIT" ]
null
null
null
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/cameras/apps.py
julialieberman/azure-intelligent-edge-patterns
1e04748d640730301edd2c6fb51a02f9b6d2ff41
[ "MIT" ]
null
null
null
""" Cameras App """ import logging logger = logging.getLogger(__name__) DEFAULT_SETTING_NAME = 'DEFAULT_SETTING'
29.779221
71
0.411688
""" Cameras App """ import logging import sys from django.apps import AppConfig logger = logging.getLogger(__name__) DEFAULT_SETTING_NAME = 'DEFAULT_SETTING' class CamerasConfig(AppConfig): """ Cameras App Config """ name = 'vision_on_edge.cameras' def ready(self): """ Cameras ...
0
0
0
2,108
0
0
0
1
68
72c67ce90edfb7400c6369cd615fde79fc8633f1
14,247
py
Python
collaborative_system/temperature_scaling_vit.py
drunkcoding/efficient-nlp
9509e0ef08016506280a7cfc600ea8e3778dea2d
[ "Apache-2.0" ]
null
null
null
collaborative_system/temperature_scaling_vit.py
drunkcoding/efficient-nlp
9509e0ef08016506280a7cfc600ea8e3778dea2d
[ "Apache-2.0" ]
null
null
null
collaborative_system/temperature_scaling_vit.py
drunkcoding/efficient-nlp
9509e0ef08016506280a7cfc600ea8e3778dea2d
[ "Apache-2.0" ]
null
null
null
import torch import logging import numpy as np import seaborn as sns import matplotlib.pyplot as plt from torchvision import datasets, transforms import torchvision.models as cv_models import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), "../")) from ecosys.models.temperature_scaling import Mo...
37.492105
209
0.639082
import torch import logging import numpy as np from outliers import smirnov_grubbs as grubbs import seaborn as sns import matplotlib import matplotlib.pyplot as plt from torch.utils.data.sampler import SubsetRandomSampler from torchvision import datasets, transforms import torchvision.models as cv_models import os imp...
0
0
0
0
0
2,124
0
335
268
bfc3bd37a4aa95cb8512234de7cfe550577160db
1,136
py
Python
setup.py
shufps/pdfforms
9e6eb9c63ab5c743580805942747a5445e79e9c7
[ "MIT" ]
1
2020-07-03T19:26:40.000Z
2020-07-03T19:26:40.000Z
setup.py
shufps/pdfforms
9e6eb9c63ab5c743580805942747a5445e79e9c7
[ "MIT" ]
null
null
null
setup.py
shufps/pdfforms
9e6eb9c63ab5c743580805942747a5445e79e9c7
[ "MIT" ]
null
null
null
from os.path import dirname from setuptools import setup package_name = "pdfforms" package_version = "1.2.1" base_dir = dirname(__file__) setup( name = package_name, version = package_version, description = "Populate fillable pdf forms from csv data file", long_description = read("README.rst") + '\n\n...
32.457143
76
0.636444
from os.path import join, dirname from setuptools import setup package_name = "pdfforms" package_version = "1.2.1" base_dir = dirname(__file__) def read(filename): f = open(join(base_dir, filename)) return f.read() setup( name = package_name, version = package_version, description = "Populate fil...
0
0
0
0
0
57
0
6
23
16e99ac5970e25e2230ef1f24565fa74e8d93890
31,772
py
Python
libs/itsdangerous.py
bbondy/brianbondy.gae
5c189e5d8f1ee0fdc77ab48c21f3da2c9e3f246c
[ "MIT" ]
null
null
null
libs/itsdangerous.py
bbondy/brianbondy.gae
5c189e5d8f1ee0fdc77ab48c21f3da2c9e3f246c
[ "MIT" ]
null
null
null
libs/itsdangerous.py
bbondy/brianbondy.gae
5c189e5d8f1ee0fdc77ab48c21f3da2c9e3f246c
[ "MIT" ]
1
2020-10-01T16:36:12.000Z
2020-10-01T16:36:12.000Z
# -*- coding: utf-8 -*- """ itsdangerous ~~~~~~~~~~~~ A module that implements various functions to deal with untrusted sources. Mainly useful for web applications. :copyright: (c) 2011 by Armin Ronacher and the Django Software Foundation. :license: BSD, see LICENSE for more details. """ imp...
36.51954
81
0.647237
# -*- coding: utf-8 -*- """ itsdangerous ~~~~~~~~~~~~ A module that implements various functions to deal with untrusted sources. Mainly useful for web applications. :copyright: (c) 2011 by Armin Ronacher and the Django Software Foundation. :license: BSD, see LICENSE for more details. """ imp...
0
0
0
28,349
0
331
0
-22
646
9a937dba4abe57172578dec1a722bd3633ce7c2d
3,583
py
Python
events.py
IanHarvey/bluepy.device
be3f5802b7229ce50876bd4bb68b958586731d1b
[ "MIT" ]
10
2017-09-29T00:18:21.000Z
2022-01-27T09:03:29.000Z
events.py
IanHarvey/bluepy.device
be3f5802b7229ce50876bd4bb68b958586731d1b
[ "MIT" ]
2
2017-09-11T11:07:35.000Z
2019-04-19T11:02:00.000Z
events.py
IanHarvey/bluepy.device
be3f5802b7229ce50876bd4bb68b958586731d1b
[ "MIT" ]
5
2017-10-10T18:01:02.000Z
2021-05-24T07:36:52.000Z
# HCI Events # Spec V4.0, Vol 2, sec 7.7 E_DISCONN_COMPLETE = 0x05 E_ENCRYPT_CHANGE = 0x08 E_CMD_RESPONSE = 0x0E E_CMD_STATUS = 0x0F E_LE_META_EVENT = 0x3E # LE Meta-event subcodes # Vol 2, 7.7.65 E_LE_CONN_COMPLETE = 0x01 E_LE_ADVERTISING_REPORT = 0x02 E_LE_CONN_UPDATE_COMPLETE = 0x03 DEFAULT_EVENT_MASK = eventMa...
33.801887
117
0.6235
import struct import binascii import gap # HCI Events # Spec V4.0, Vol 2, sec 7.7 E_DISCONN_COMPLETE = 0x05 E_ENCRYPT_CHANGE = 0x08 E_CMD_RESPONSE = 0x0E E_CMD_STATUS = 0x0F E_LE_META_EVENT = 0x3E # LE Meta-event subcodes # Vol 2, 7.7.65 E_LE_CONN_COMPLETE = 0x01 E_LE_ADVERTISING_REPORT = 0x02 E_LE_CONN_UPDATE_COMP...
0
0
0
2,885
0
93
0
-25
135
72645c0f047f889967cb8ede55344c574ef90c92
668
py
Python
harvest-images.py
BinaryDragonStudios/ArenaGame
0162568b64599a9fccab64e3cd08d8295885b32c
[ "MIT" ]
null
null
null
harvest-images.py
BinaryDragonStudios/ArenaGame
0162568b64599a9fccab64e3cd08d8295885b32c
[ "MIT" ]
null
null
null
harvest-images.py
BinaryDragonStudios/ArenaGame
0162568b64599a9fccab64e3cd08d8295885b32c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Use the built in json and sqlite library # Boilerplate python if __name__ == '__main__': main()
27.833333
98
0.652695
#!/usr/bin/env python # Use the built in json and sqlite library import sqlite3 def card_image_url(card_game_id): return "http://wow.zamimg.com/images/hearthstone/cards/enus/original/" + card_game_id + ".png" def main(): sql = "SELECT card_game_id, card_name_en FROM cards ORDER BY card_name_en" db = sql...
0
0
0
0
0
481
0
-7
68
47d5d5adce279fd60bc35ef87afa6132fa4ea625
6,124
py
Python
binmom.py
isseikz/StarTracker
01c1dfcf8c9a6886acfa18c038acc723f56cc94d
[ "MIT" ]
null
null
null
binmom.py
isseikz/StarTracker
01c1dfcf8c9a6886acfa18c038acc723f56cc94d
[ "MIT" ]
null
null
null
binmom.py
isseikz/StarTracker
01c1dfcf8c9a6886acfa18c038acc723f56cc94d
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """(binalize).""" import numpy as np import cv2 from matplotlib import pyplot as plt def binalize(img): """. 1. 2. [0, 255] # + img: cv2 # + img_binalized: 2 https://www.blog.umentu.work/python-opencv3%E3%81%A7%E7%94%BB%E5%83%8F%...
24.594378
183
0.566786
#!/usr/bin/python # -*- coding: utf-8 -*- """画像の2値化(binalize)とモーメント中心を見つけるモジュール.""" import numpy as np import cv2 from matplotlib import pyplot as plt def binalize(img): """画像の2値化を行う. 1. 画像をグレースケールに変換 2. しきい値[0, 255]を基準に2値化する # 入力: + img: cv2 モジュールで読み込んだ画像オブジェクト # 出力: + img_binalized:...
1,470
0
0
0
0
0
0
0
0
50b35723f20fea2aeacd0fff6f501a16b7939d1c
237
py
Python
tests/parser/bug.70.bk.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
tests/parser/bug.70.bk.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
tests/parser/bug.70.bk.test.py
veltri/DLV2
944aaef803aa75e7ec51d7e0c2b0d964687fdd0e
[ "Apache-2.0" ]
null
null
null
input = """ % Locations: loc(dropOff). loc(distCenter). loc(truck). %loc(dest). % Packages: pkg(pidVar). """ output = """ % Locations: loc(dropOff). loc(distCenter). loc(truck). %loc(dest). % Packages: pkg(pidVar). """
11.285714
17
0.586498
input = """ % Locations: loc(dropOff). loc(distCenter). loc(truck). %loc(dest). % Packages: pkg(pidVar). """ output = """ % Locations: loc(dropOff). loc(distCenter). loc(truck). %loc(dest). % Packages: pkg(pidVar). """
0
0
0
0
0
0
0
0
0
dd0e5f1f8170f9a8b0f7092a2ceddf95c3c34a1c
2,436
py
Python
analyze/generate_periscope_chart_embed_code.py
danieldiamond/gitlab-analytics
f99e02c95c3a964b01cb14617a43cd5f64ecd88d
[ "MIT" ]
3
2021-07-22T06:44:31.000Z
2022-01-29T05:35:12.000Z
analyze/generate_periscope_chart_embed_code.py
danieldiamond/gitlab-analytics
f99e02c95c3a964b01cb14617a43cd5f64ecd88d
[ "MIT" ]
null
null
null
analyze/generate_periscope_chart_embed_code.py
danieldiamond/gitlab-analytics
f99e02c95c3a964b01cb14617a43cd5f64ecd88d
[ "MIT" ]
null
null
null
from os import environ as env from urllib import parse as parse import logging API_KEY = env.get("PERISCOPE_API_KEY").encode("UTF-8") input_csv = "chart_slide_deck.csv" output_csv = "chart_links.csv" if __name__ == "__main__": logging.basicConfig(level=20) chart_dict_list = csv_to_chart_list(input_csv) ...
29.707317
80
0.65312
from os import environ as env from urllib import parse as parse import ast import base64 import csv import hashlib import hmac import json import logging API_KEY = env.get("PERISCOPE_API_KEY").encode("UTF-8") input_csv = "chart_slide_deck.csv" output_csv = "chart_links.csv" def csv_to_chart_list(input_csv): logg...
0
0
0
0
0
1,897
0
-57
178
1bdc339c76d8e57fa714efafdde1b7083a06d571
763
py
Python
Algos and notebooks/testMapWay.py
HehexOne/MapWay
714889ca97d4199a4cb9f66403fac5c45d791297
[ "MIT" ]
1
2021-10-18T15:46:27.000Z
2021-10-18T15:46:27.000Z
Algos and notebooks/testMapWay.py
HehexOne/MapWay
714889ca97d4199a4cb9f66403fac5c45d791297
[ "MIT" ]
null
null
null
Algos and notebooks/testMapWay.py
HehexOne/MapWay
714889ca97d4199a4cb9f66403fac5c45d791297
[ "MIT" ]
null
null
null
start = Place(name="Start", position=Position(latitude=20, longtitude=2)) ''' , ''' # p_in_1 = Place(name="p_in_1", position=Position(latitude=10, longtitude=50)) # p_in_2 = Place(name="p_in_2", position=Position(latitude=18, longtitude=70)) # p_out_1 = Place(name="p_out_1", position=Position(latitude=21...
29.346154
82
0.722149
from MapWay import * start = Place(name="Start", position=Position(latitude=20, longtitude=2)) ''' Уже точки не нужны, они в базе данных ''' # p_in_1 = Place(name="p_in_1", position=Position(latitude=10, longtitude=50)) # p_in_2 = Place(name="p_in_2", position=Position(latitude=18, longtitude=70)) # p_out_1 = P...
58
0
0
0
0
0
0
-1
22
8826ed8824a2aa17e3bb3cde009518af14b96186
3,701
py
Python
businessdate/businessrange.py
pbrisk/businessdate
36eb9df687f7f3a30d659f356f16a05d5f41b309
[ "Apache-2.0" ]
2
2019-07-30T13:07:00.000Z
2021-05-26T02:19:09.000Z
businessdate/businessrange.py
sonntagsgesicht/businessdate
36eb9df687f7f3a30d659f356f16a05d5f41b309
[ "Apache-2.0" ]
2
2019-05-14T16:06:54.000Z
2019-07-27T23:14:29.000Z
businessdate/businessrange.py
pbrisk/businessdate
36eb9df687f7f3a30d659f356f16a05d5f41b309
[ "Apache-2.0" ]
7
2017-04-10T13:19:47.000Z
2019-07-06T03:48:49.000Z
# -*- coding: utf-8 -*- # businessdate # ------------ # Python library for generating business dates for fast date operations # and rich functionality. # # Author: sonntagsgesicht, based on a fork of Deutsche Postbank [pbrisk] # Version: 0.5, copyright Wednesday, 18 September 2019 # Website: https://github.com/son...
35.586538
101
0.627398
# -*- coding: utf-8 -*- # businessdate # ------------ # Python library for generating business dates for fast date operations # and rich functionality. # # Author: sonntagsgesicht, based on a fork of Deutsche Postbank [pbrisk] # Version: 0.5, copyright Wednesday, 18 September 2019 # Website: https://github.com/son...
0
1,238
0
1,959
0
0
0
38
68
670546ec050434d9276a8108386da84f83c5dc42
180
py
Python
codigo_programa/database.py
matheusparrela/Fisica_game
7c6e1607c4786f1fa76f6be9abe51c0279754926
[ "MIT" ]
1
2022-02-06T18:33:50.000Z
2022-02-06T18:33:50.000Z
codigo_programa/database.py
matheusparrela/Fisica_game
7c6e1607c4786f1fa76f6be9abe51c0279754926
[ "MIT" ]
null
null
null
codigo_programa/database.py
matheusparrela/Fisica_game
7c6e1607c4786f1fa76f6be9abe51c0279754926
[ "MIT" ]
null
null
null
import pyodbc dados_conexao = ( "Driver={SQL Server};" "Server=omicron;" "Database=perguntas;" ) conexao = pyodbc.connect(dados_conexao) print('Conexo bem sucedida!')
20
39
0.7
import pyodbc dados_conexao = ( "Driver={SQL Server};" "Server=omicron;" "Database=perguntas;" ) conexao = pyodbc.connect(dados_conexao) print('Conexão bem sucedida!')
2
0
0
0
0
0
0
0
0
ed10a413930f081fc45944e232c2b7b86a1eac17
828
py
Python
visualization/model_report.py
mahetoodang/abm
b27c0616aed288902d2f28444c79cf0720513249
[ "MIT" ]
null
null
null
visualization/model_report.py
mahetoodang/abm
b27c0616aed288902d2f28444c79cf0720513249
[ "MIT" ]
null
null
null
visualization/model_report.py
mahetoodang/abm
b27c0616aed288902d2f28444c79cf0720513249
[ "MIT" ]
null
null
null
'''Automated generation of HTML data report to be opened inside webbrowser''' if __name__ == '__main__': create_model_report(True)
30.666667
61
0.695652
import pandas as pd import numpy as np import webbrowser import os import glob from pandas_profiling import ProfileReport '''Automated generation of HTML data report to be opened inside webbrowser''' def create_model_report(html_report=True): if html_report == True: file_list = glob.glob('data/stats/*') ...
0
0
0
0
0
546
0
-10
155
135ec19a63db6b926dd484003d11d8f4d8f345e4
492
py
Python
FizzBuzz/tests/test.py
n0n0a/python-dev-tutorial
565e2eaaaf4b8777295b83f8d8de425fe9f22bca
[ "MIT" ]
null
null
null
FizzBuzz/tests/test.py
n0n0a/python-dev-tutorial
565e2eaaaf4b8777295b83f8d8de425fe9f22bca
[ "MIT" ]
null
null
null
FizzBuzz/tests/test.py
n0n0a/python-dev-tutorial
565e2eaaaf4b8777295b83f8d8de425fe9f22bca
[ "MIT" ]
null
null
null
fizzbuzz_data = [(3, "Fizz"), (5, "Buzz"), (15, "FizzBuzz"), (2, "2")] fizzbuzz_7_11_data = [(7,"Fizz"),(11,"Buzz"),(77,"FizzBuzz"), (2, "2")]
32.8
71
0.697154
from unittest import TestCase import pytest from FizzBuzz.fizzbuzz import fizzbuzz fizzbuzz_data = [(3, "Fizz"), (5, "Buzz"), (15, "FizzBuzz"), (2, "2")] fizzbuzz_7_11_data = [(7,"Fizz"),(11,"Buzz"),(77,"FizzBuzz"), (2, "2")] @pytest.mark.parametrize(('n','expected'),fizzbuzz_data) def test_fizzbuzz(n,expected): ...
0
219
0
0
0
0
0
17
112
dbd24433096ce21f12bbf4d0bf81b1a43cc47d60
1,172
py
Python
applied_python/applied_python/lib/python2.7/site-packages/ncclient/devices/iosxe.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
applied_python/applied_python/lib/python2.7/site-packages/ncclient/devices/iosxe.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
applied_python/applied_python/lib/python2.7/site-packages/ncclient/devices/iosxe.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
""" Handler for Cisco IOS-XE device specific information. Note that for proper import, the classname has to be: "<Devicename>DeviceHandler" ...where <Devicename> is something like "Default", "Nexus", etc. All device-specific handlers derive from the DefaultDeviceHandler, which implements the generic information...
27.904762
87
0.715017
""" Handler for Cisco IOS-XE device specific information. Note that for proper import, the classname has to be: "<Devicename>DeviceHandler" ...where <Devicename> is something like "Default", "Nexus", etc. All device-specific handlers derive from the DefaultDeviceHandler, which implements the generic information...
0
0
0
586
0
124
0
20
69
0b75ad5a395e43a103ee317b5d794d2aa4f68b3a
525
py
Python
automation.py
FathiMahdi/TNB_Social_Distance
ab5c13652e57d827180b92e03983cda39def51e8
[ "MIT" ]
null
null
null
automation.py
FathiMahdi/TNB_Social_Distance
ab5c13652e57d827180b92e03983cda39def51e8
[ "MIT" ]
null
null
null
automation.py
FathiMahdi/TNB_Social_Distance
ab5c13652e57d827180b92e03983cda39def51e8
[ "MIT" ]
null
null
null
import os import time for i in range(0,10000000000): cctvDetect(i)# run cctv time.sleep(2) os.system('sudo python3 darknet_images.py --input /mnt/k/monitoring/204online_{}.png --batch_size 1 --weights /home/Social_Distance/darknet/backup/yolo-obj_last.weights --config_file /home/Social_Distance/darknet/cf...
40.384615
314
0.731429
import os import time from cctv import * for i in range(0,10000000000): cctvDetect(i)# run cctv time.sleep(2) os.system('sudo python3 darknet_images.py --input /mnt/k/monitoring/204online_{}.png --batch_size 1 --weights /home/Social_Distance/darknet/backup/yolo-obj_last.weights --config_file /home/Social_...
0
0
0
0
0
0
0
-3
22
5b106466dafaf888a5489b6369524357186de3c6
926
py
Python
accounts/migrations/0021_auto_20210902_2010.py
simplymarco/Sistema-de-Controle-de-Processos-Titulados
f4e3bc7260611b848096d5fbfb1f72be9d440f1f
[ "MIT" ]
null
null
null
accounts/migrations/0021_auto_20210902_2010.py
simplymarco/Sistema-de-Controle-de-Processos-Titulados
f4e3bc7260611b848096d5fbfb1f72be9d440f1f
[ "MIT" ]
null
null
null
accounts/migrations/0021_auto_20210902_2010.py
simplymarco/Sistema-de-Controle-de-Processos-Titulados
f4e3bc7260611b848096d5fbfb1f72be9d440f1f
[ "MIT" ]
null
null
null
# Generated by Django 3.0 on 2021-09-02 23:10
30.866667
114
0.564795
# Generated by Django 3.0 on 2021-09-02 23:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0020_auto_20210902_1708'), ] operations = [ migrations.CreateModel( name='Feedback', fields=[ ...
0
0
0
814
0
0
0
19
46
f244d9daab59011f48024a89527c2f4f9c8108e1
4,836
py
Python
flaskr/fetch_data.py
Amoghrd/StockPrediction
e33a2ec2209f24089b2b92739b82ec05414aa853
[ "MIT" ]
1
2020-10-27T03:31:29.000Z
2020-10-27T03:31:29.000Z
flaskr/fetch_data.py
Amoghrd/StockPrediction
e33a2ec2209f24089b2b92739b82ec05414aa853
[ "MIT" ]
32
2020-10-06T01:34:09.000Z
2020-11-17T01:31:30.000Z
flaskr/fetch_data.py
Amoghrd/StockPrediction
e33a2ec2209f24089b2b92739b82ec05414aa853
[ "MIT" ]
4
2020-10-19T20:10:49.000Z
2020-12-12T15:31:44.000Z
# Calculate slopes
33.351724
88
0.552316
import yfinance as yf import matplotlib.pyplot as plt import datetime import math import numpy as np from sklearn.model_selection import train_test_split from sklearn import preprocessing from sklearn.linear_model import LinearRegression import csv def get_stock(ticker_name, days_number): tick = yf.Ti...
0
0
0
0
0
4,450
0
51
305
97a137d77b023df62ea751088239bb68dcf34480
1,282
py
Python
api/controllers/trace_controller.py
bailobah/relevanc
1bb9bf895ca1b7bdc0553267c377f53472990d9b
[ "MIT" ]
null
null
null
api/controllers/trace_controller.py
bailobah/relevanc
1bb9bf895ca1b7bdc0553267c377f53472990d9b
[ "MIT" ]
null
null
null
api/controllers/trace_controller.py
bailobah/relevanc
1bb9bf895ca1b7bdc0553267c377f53472990d9b
[ "MIT" ]
null
null
null
from logger import Logger from api.restplus import api log = Logger.log ns = api.namespace('trace/kpis', description='kpis des datasets')
23.309091
118
0.730109
import datetime from flask import request from flask_restplus import Resource from flask_restplus import abort from sqlalchemy.orm import load_only from logger import Logger from api.serilizers import dataset_response_succes, get_trace from api.restplus import api from database.models import TbTrace log = Logger.log ...
0
846
0
0
0
0
0
92
200
3934659f21a9d149a3c887921ac80207b3058b4e
3,058
py
Python
android-runner/AndroidRunner/Plugins/perfume_js/AddJS.py
S2-group/Lacuna-evaluation
b982d54a7cb65050f1743d0a514ebcabce01f23c
[ "MIT" ]
null
null
null
android-runner/AndroidRunner/Plugins/perfume_js/AddJS.py
S2-group/Lacuna-evaluation
b982d54a7cb65050f1743d0a514ebcabce01f23c
[ "MIT" ]
null
null
null
android-runner/AndroidRunner/Plugins/perfume_js/AddJS.py
S2-group/Lacuna-evaluation
b982d54a7cb65050f1743d0a514ebcabce01f23c
[ "MIT" ]
1
2021-07-23T10:41:10.000Z
2021-07-23T10:41:10.000Z
import sys if __name__ == '__main__': #USAGE: (python3 AddJS.py path/To/Directory/With/All/WebApplication/ IPADRRESS) #NOTE: IPADDRESS should be in the form of http://IP:8080/ and IP is the ip address add_js(sys.argv[1], sys.argv[2])
51.830508
677
0.599411
import os, sys import subprocess from distutils.dir_util import copy_tree from bs4 import BeautifulSoup def bfs_dirs(root): paths = [root] while len(paths) > 0: children = [] for parent in paths: if parent.endswith(".gitignore"): continue ...
0
0
0
0
0
2,662
0
27
119
d207293da2f82b7baf5c06a2e00d92a54a8cf4dd
1,879
py
Python
las_test.py
paceholder/pylasdev
d63701d02d3a5f59de7f3ff33804d2f421f49402
[ "BSD-3-Clause" ]
2
2017-01-05T13:27:30.000Z
2018-03-26T11:49:28.000Z
las_test.py
paceholder/pylasdev
d63701d02d3a5f59de7f3ff33804d2f421f49402
[ "BSD-3-Clause" ]
null
null
null
las_test.py
paceholder/pylasdev
d63701d02d3a5f59de7f3ff33804d2f421f49402
[ "BSD-3-Clause" ]
null
null
null
#from mnem_base import * # Simple test with full LAS output for LAS reader test_files = [ # LAS 1.2 "test_data/sample.las", # 0 - OK "test_data/sample_minimal.las", # 1 - OK "test_data/sample_wrapped.las", # 2 - OK "test_data/sample_curve_api.las", # 3 - OK # "test_data/sample_big.las", # 2 ...
24.402597
75
0.624268
from pylasdev import * #from mnem_base import * # Simple test with full LAS output for LAS reader test_files = [ # LAS 1.2 "test_data/sample.las", # 0 - OK "test_data/sample_minimal.las", # 1 - OK "test_data/sample_wrapped.las", # 2 - OK "test_data/sample_curve_api.las", # 3 - OK # "test_dat...
0
0
0
0
0
0
0
1
23
b1666e2f97dc00556483a7e6a3be95c2b359059f
6,873
py
Python
Playable/full builds/0.1 movement build/Corak/Main_menu.py
LinearHaru/Corak
269f827131cbdaf15e6cd81bee792fbb6b9c7606
[ "MIT" ]
null
null
null
Playable/full builds/0.1 movement build/Corak/Main_menu.py
LinearHaru/Corak
269f827131cbdaf15e6cd81bee792fbb6b9c7606
[ "MIT" ]
null
null
null
Playable/full builds/0.1 movement build/Corak/Main_menu.py
LinearHaru/Corak
269f827131cbdaf15e6cd81bee792fbb6b9c7606
[ "MIT" ]
null
null
null
import pygame from Corak.mapread4 import mapread screen = pygame.display.set_mode((ScreenX, ScreenY)) txt = "LRUDhallX.txt" sala = openSala(txt) tiles = mapread(sala) tiles2 = pygame.sprite.Group() size = getSize(sala) offsets = getOffset(sala, size) player1 = Corak() print(tiles) left = False right = False b = 1...
29.753247
131
0.474465
import pygame from Corak.dicio import * from Corak.mapread4 import mapread class Corak(pygame.sprite.Sprite): def __init__(self): self.image = pygame.Surface([size, size]) self.image.fill(BLACK) self.rect = self.image.get_rect() self.at = [1, 11] self.pos = [size * self.at[0...
0
0
0
4,120
0
0
0
4
45
9ae35fd2f861db90faa296b2c3cb168bd8403548
6,842
py
Python
RasPi_Dev/ros_ws/build/vslam/rtabmap_ros/catkin_generated/pkg.installspace.context.pc.py
QianheYu/xtark_driver_dev
1708888161cf20c0d1f45c99d0da4467d69c26c8
[ "BSD-3-Clause" ]
1
2022-03-11T03:31:15.000Z
2022-03-11T03:31:15.000Z
RasPi_Dev/ros_ws/build/vslam/rtabmap_ros/catkin_generated/pkg.installspace.context.pc.py
bravetree/xtark_driver_dev
1708888161cf20c0d1f45c99d0da4467d69c26c8
[ "BSD-3-Clause" ]
null
null
null
RasPi_Dev/ros_ws/build/vslam/rtabmap_ros/catkin_generated/pkg.installspace.context.pc.py
bravetree/xtark_driver_dev
1708888161cf20c0d1f45c99d0da4467d69c26c8
[ "BSD-3-Clause" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/xtark/ros_ws/install/include;/home/xtark/ros_ws/devel/lib/rtabmap-0.19/../../include/rtabmap-0.19;/opt/ros/kinetic/include/opencv-3.3.1-dev;/opt/ros/kinetic/include/opencv-3.3.1-dev/opencv".split...
760.222222
5,828
0.80152
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/xtark/ros_ws/install/include;/home/xtark/ros_ws/devel/lib/rtabmap-0.19/../../include/rtabmap-0.19;/opt/ros/kinetic/include/opencv-3.3.1-dev;/opt/ros/kinetic/include/opencv-3.3.1-dev/opencv".split...
0
0
0
0
0
0
0
0
0
8a0630d38ab753c8a6ada60da69a9057613b5bc6
5,469
py
Python
rbac/acl.py
eldorplus/simple-rbac
c7ca8ce6edb64797bbe43a0dfb11d686c2f5acf1
[ "MIT" ]
219
2015-01-15T23:56:29.000Z
2022-03-27T19:56:47.000Z
rbac/acl.py
eldorplus/simple-rbac
c7ca8ce6edb64797bbe43a0dfb11d686c2f5acf1
[ "MIT" ]
6
2015-09-15T03:12:56.000Z
2020-09-01T13:39:51.000Z
rbac/acl.py
eldorplus/simple-rbac
c7ca8ce6edb64797bbe43a0dfb11d686c2f5acf1
[ "MIT" ]
63
2015-03-15T05:36:21.000Z
2021-07-22T12:40:49.000Z
from __future__ import absolute_import __all__ = ["Registry"]
36.46
77
0.619492
from __future__ import absolute_import import itertools __all__ = ["Registry"] class Registry(object): """The registry of access control list.""" def __init__(self): self._roles = {} self._resources = {} self._allowed = {} self._denied = {} # to allow additional sh...
0
0
0
4,901
414
0
0
-5
92
35ecdb8c51f52d9bb0708b4c0142ded1b98d2a57
23,704
py
Python
ceph_report/collectors.py
Mirantis/ceph-monitoring
2de4a90fb102337606732a46a382505047bfa1aa
[ "Apache-2.0" ]
5
2016-09-19T10:42:15.000Z
2018-09-05T11:18:03.000Z
ceph_report/collectors.py
Mirantis/ceph-monitoring
2de4a90fb102337606732a46a382505047bfa1aa
[ "Apache-2.0" ]
2
2016-10-18T09:15:19.000Z
2018-03-21T10:24:54.000Z
ceph_report/collectors.py
Mirantis/ceph-monitoring
2de4a90fb102337606732a46a382505047bfa1aa
[ "Apache-2.0" ]
9
2016-10-17T13:20:01.000Z
2019-01-09T14:33:48.000Z
from __future__ import annotations import array import logging import collections from typing import Any, List, Dict, TypeVar, Callable, Coroutine, Union logger = logging.getLogger('collect') T = TypeVar('T') VT = TypeVar('VT', str, bytes, array.array) CollectFunc = Callable[[Collector], Coroutine[Any, Any, ...
38.795417
120
0.610741
from __future__ import annotations import os import re import time import json import array import random import asyncio import logging import datetime import contextlib import collections from enum import IntEnum from dataclasses import dataclass, field from typing import Any, List, Dict, Optional, Tuple, TypeVar, Ca...
0
18,461
2,653
542
0
375
0
248
863
42677e1e3fc74b4db9834cf9ae727d99e53425d8
1,999
py
Python
plantcv/apply_mask.py
Atitsuda/plantcv
29932a0f0aa3573a74335425bccc394b2fb7b885
[ "MIT" ]
2
2017-12-05T12:07:47.000Z
2021-01-25T08:58:52.000Z
plantcv/apply_mask.py
Atitsuda/plantcv
29932a0f0aa3573a74335425bccc394b2fb7b885
[ "MIT" ]
null
null
null
plantcv/apply_mask.py
Atitsuda/plantcv
29932a0f0aa3573a74335425bccc394b2fb7b885
[ "MIT" ]
1
2020-08-13T17:44:53.000Z
2020-08-13T17:44:53.000Z
# Apply White or Black Background Mask import cv2 from . import print_image from . import plot_image from . import fatal_error def apply_mask(img, mask, mask_color, device, debug=None): """Apply white image mask to image, with bitwise AND operator bitwise NOT operator and ADD operator. Inputs: img ...
35.696429
104
0.643322
# Apply White or Black Background Mask import cv2 from . import print_image from . import plot_image from . import fatal_error def apply_mask(img, mask, mask_color, device, debug=None): """Apply white image mask to image, with bitwise AND operator bitwise NOT operator and ADD operator. Inputs: img ...
0
0
0
0
0
0
0
0
0
1b7ccd8aaf4d068975398a6662e5f16f5a3693e4
147,800
py
Python
all/emojitations/data/nb.py
idleberg/sublime-emojitations
b2b4e8ce2c33ed0f6b8d6db6085e21da4e8d895b
[ "MIT" ]
6
2016-08-31T14:42:36.000Z
2021-09-05T23:55:47.000Z
all/emojitations/data/nb.py
idleberg/sublime-emojitations
b2b4e8ce2c33ed0f6b8d6db6085e21da4e8d895b
[ "MIT" ]
1
2016-10-20T10:52:06.000Z
2016-10-20T18:47:19.000Z
all/emojitations/data/nb.py
idleberg/sublime-emojitations
b2b4e8ce2c33ed0f6b8d6db6085e21da4e8d895b
[ "MIT" ]
5
2016-08-31T14:48:11.000Z
2021-09-05T23:55:33.000Z
from emojitations.emojitypes import EmojiAnnotations emoji = [ EmojiAnnotations(emoji='', codepoints=(128512,), name='glisefjes', slug='glisefjes', annotations=frozenset({'fjes', 'lol', 'latter', 'morsomt', 'smilende fjes'})), EmojiAnnotations(emoji='', codepoints=(128513,), name='glisefjes med smilende yne', slug=...
146.772592
272
0.712882
from emojitations.emojitypes import EmojiAnnotations emoji = [ EmojiAnnotations(emoji='😀', codepoints=(128512,), name='glisefjes', slug='glisefjes', annotations=frozenset({'fjes', 'lol', 'latter', 'morsomt', 'smilende fjes'})), EmojiAnnotations(emoji='😁', codepoints=(128513,), name='glisefjes med smilende øyne', ...
5,228
0
0
0
0
0
0
0
0
2c589918bd089b9df29d1ef24cd732b1cc0b49ab
850
py
Python
JumpscaleCore/sal/tls/TLSFactory.py
gneumann333/jumpscaleX_core
777d249fa3668c6e802c2f765f4b82fb39c3e5fa
[ "Apache-2.0" ]
1
2020-06-21T11:18:52.000Z
2020-06-21T11:18:52.000Z
JumpscaleCore/sal/tls/TLSFactory.py
gneumann333/jumpscaleX_core
777d249fa3668c6e802c2f765f4b82fb39c3e5fa
[ "Apache-2.0" ]
644
2019-08-25T10:19:56.000Z
2020-12-23T09:41:04.000Z
JumpscaleCore/sal/tls/TLSFactory.py
gneumann333/jumpscaleX_core
777d249fa3668c6e802c2f765f4b82fb39c3e5fa
[ "Apache-2.0" ]
11
2019-08-29T21:38:50.000Z
2020-06-21T11:18:55.000Z
from Jumpscale import j JSBASE = j.baseclasses.object TESTTOOLS = j.baseclasses.testtools
27.419355
116
0.635294
from Jumpscale import j from .TLS import TLS JSBASE = j.baseclasses.object TESTTOOLS = j.baseclasses.testtools class TLSFactory(JSBASE, TESTTOOLS): """Factory class to deal with TLS, key and certificate generation""" __jslocation__ = "j.sal.tls" def get(self, path=None): """Get an instance of t...
0
0
0
714
0
0
0
-1
45
3eb68fc8603a458a23c9f596d4cd12e5aceca226
14,398
py
Python
rplugin/python3/deoplete/sources/deoplete-ruby-core.py
etordera/deoplete-ruby
57b85a5413d12e61478ff48917d2d708005e8110
[ "MIT" ]
3
2021-02-03T12:22:12.000Z
2021-06-27T01:31:35.000Z
rplugin/python3/deoplete/sources/deoplete-ruby-core.py
etordera/deoplete-ruby
57b85a5413d12e61478ff48917d2d708005e8110
[ "MIT" ]
null
null
null
rplugin/python3/deoplete/sources/deoplete-ruby-core.py
etordera/deoplete-ruby
57b85a5413d12e61478ff48917d2d708005e8110
[ "MIT" ]
null
null
null
# ------------------------------- KEYWORD ------------------------------------------------------------------------- ruby_core_keywords = [ '__callee__', '__dir__', '__enable', '__id__', '__method__', '__send__', '_id', 'abort', 'abort_on_exception', 'abs', 'absolute_path', 'acos', 'acosh', 'add', 'add_stress_t...
96.630872
142
0.631129
import re import traceback from deoplete.source.base import Base # ------------------------------- KEYWORD ------------------------------------------------------------------------- ruby_core_keywords = [ '__callee__', '__dir__', '__enable', '__id__', '__method__', '__send__', '_id', 'abort', 'abort_on_exception', ...
0
0
0
510
0
0
0
-1
89
88b9fb4e665f7210757b55549cc4282c8b38c598
432
py
Python
docs/src/conf.py
EpicWink/python-swf-typed
f630f5a1b6e31ad6f6260b7af77ba52212585105
[ "MIT" ]
null
null
null
docs/src/conf.py
EpicWink/python-swf-typed
f630f5a1b6e31ad6f6260b7af77ba52212585105
[ "MIT" ]
2
2021-11-09T07:22:37.000Z
2021-11-16T06:08:17.000Z
docs/src/conf.py
EpicWink/python-swf-typed
f630f5a1b6e31ad6f6260b7af77ba52212585105
[ "MIT" ]
null
null
null
"""Sphinx documentation generation configuration.""" import importlib.metadata project = "swf-typed" copyright = "2021, Laurie O" author = "Laurie O" release = importlib.metadata.version("swf-typed") # full version version = ".".join(release.split(".")[:2]) # short X.Y version extensions = [ "sphinx.ext.autodo...
22.736842
65
0.689815
"""Sphinx documentation generation configuration.""" import importlib.metadata project = "swf-typed" copyright = "2021, Laurie O" author = "Laurie O" release = importlib.metadata.version("swf-typed") # full version version = ".".join(release.split(".")[:2]) # short X.Y version extensions = [ "sphinx.ext.autodo...
0
0
0
0
0
0
0
0
0
f1b172985ca70587402973a703d4eceb2acea396
670
py
Python
Array/0189.RotateArray.3.py
joonion/leetcode-in-python
9d621be1d736d81445ef19eebb7921eb4c212f83
[ "Apache-2.0" ]
null
null
null
Array/0189.RotateArray.3.py
joonion/leetcode-in-python
9d621be1d736d81445ef19eebb7921eb4c212f83
[ "Apache-2.0" ]
null
null
null
Array/0189.RotateArray.3.py
joonion/leetcode-in-python
9d621be1d736d81445ef19eebb7921eb4c212f83
[ "Apache-2.0" ]
null
null
null
s = Solution() # L, k = [1, 2, 3, 4, 5, 6, 7], 3 L, k = [-1, -100, 3, 99], 2 s.rotate(L, k) print(L)
26.8
61
0.435821
from typing import List class Solution: def rotate(self, nums: List[int], k: int) -> None: """ Do not return anything, modify nums in-place instead. """ n, k = len(nums), k % len(nums) start = count = 0 while count < n: curr, prev = start, nums[start] ...
0
0
0
522
0
0
0
2
45
1161bacaa9f1743f84d4b231e15c83e73755dd30
3,002
py
Python
ds_linked_list/sorted_linked_list.py
dileepkr/datastructures
e20f853a1247c9c6ae065696247900727e415d8f
[ "MIT" ]
null
null
null
ds_linked_list/sorted_linked_list.py
dileepkr/datastructures
e20f853a1247c9c6ae065696247900727e415d8f
[ "MIT" ]
null
null
null
ds_linked_list/sorted_linked_list.py
dileepkr/datastructures
e20f853a1247c9c6ae065696247900727e415d8f
[ "MIT" ]
null
null
null
if __name__ == "__main__": ll = Unsorted_linked_list() for i in range(1,10): ll.add(i) print(ll)
26.333333
75
0.538641
from ds_linked_list.ll_node import Node class Unsorted_linked_list: def __init__(self): self.head = None def add(self, element): node_ = Node(element) if not self.head: self.head = node_ else: node_.next = self.head.next self.head = node_...
0
0
0
2,822
0
0
0
18
45
c9dda6b20451a34bd8a26cd49b9c5441acab86e2
1,779
py
Python
Curso Em Video-python/PYTHON (MUNDO 1, MUNDO 2 E MUNDO 3)/exercicios/ex0068_jogo_ParouImpar.py
AlamoVinicius/code-pratice
924a3ff782caf3695bbeeac39fa02fb23781cd75
[ "MIT" ]
null
null
null
Curso Em Video-python/PYTHON (MUNDO 1, MUNDO 2 E MUNDO 3)/exercicios/ex0068_jogo_ParouImpar.py
AlamoVinicius/code-pratice
924a3ff782caf3695bbeeac39fa02fb23781cd75
[ "MIT" ]
null
null
null
Curso Em Video-python/PYTHON (MUNDO 1, MUNDO 2 E MUNDO 3)/exercicios/ex0068_jogo_ParouImpar.py
AlamoVinicius/code-pratice
924a3ff782caf3695bbeeac39fa02fb23781cd75
[ "MIT" ]
null
null
null
"""FAa um programa que jogue par ou impar com o computadr. O jogo s ser interrompido quando o jogador PERDER, mostrando o total de vitrias consecutivas que conquistou no final do jogo""" from random import randint print(f'''{"-=" * 20} PAR OU IMPAR {"-=" * 20}''') contador = 0 while True: jogadapc = randint(0, 10)...
39.533333
117
0.613266
"""FAça um programa que jogue par ou impar com o computadr. O jogo só será interrompido quando o jogador PERDER, mostrando o total de vitórias consecutivas que conquistou no final do jogo""" from random import randint print(f'''{"-=" * 20} PAR OU IMPAR {"-=" * 20}''') contador = 0 while True: jogadapc = randint(0,...
60
0
0
0
0
0
0
0
0
bc4c93cb414d187ed9e63256b173998897ab935c
3,451
py
Python
main.py
vlntsolo/multiprocessing-webscraper
a3b43bb68ec0c3897c1a6294f9268b44a19ed457
[ "MIT" ]
null
null
null
main.py
vlntsolo/multiprocessing-webscraper
a3b43bb68ec0c3897c1a6294f9268b44a19ed457
[ "MIT" ]
null
null
null
main.py
vlntsolo/multiprocessing-webscraper
a3b43bb68ec0c3897c1a6294f9268b44a19ed457
[ "MIT" ]
1
2021-09-25T07:06:51.000Z
2021-09-25T07:06:51.000Z
from multiprocessing import cpu_count PROCESSES = cpu_count() #P parameter NUM_THREADS = 10 #T parameter TARGET_RESOURCES = [ 'https://example.org/', 'https://www.python.org/', 'https://www.djangoproject.com/', 'https://www.lipsum.com/', ] if __name__ == "__main__": run()
28.056911
100
0.630832
import asyncio import logging from multiprocessing import Queue, Process, cpu_count import queue from threading import Thread import time import aiohttp import aiosqlite from bs4 import BeautifulSoup PROCESSES = cpu_count() #P parameter NUM_THREADS = 10 #T parameter TARGET_RESOURCES = [ 'https://example.org/', ...
0
0
1,202
448
0
1,223
0
-14
291
c7d20615c4661ca6379e79c0a04f84ac1184fea2
1,202
py
Python
tests/backend/ini.py
edyan/python-anyconfig
d237909a6e4848737539b80951b710238c72052f
[ "MIT" ]
null
null
null
tests/backend/ini.py
edyan/python-anyconfig
d237909a6e4848737539b80951b710238c72052f
[ "MIT" ]
null
null
null
tests/backend/ini.py
edyan/python-anyconfig
d237909a6e4848737539b80951b710238c72052f
[ "MIT" ]
null
null
null
# # Copyright (C) 2012 - 2017 Satoru SATOH <ssato @ redhat.com> # License: MIT # # pylint: disable=missing-docstring,invalid-name,too-few-public-methods from __future__ import absolute_import # :seealso: `tests.backend.common.CNF_0` CNF_0_S = """\ [DEFAULT] a: 0 b: bbb c: 5 [sect0] d: x,y,z """ # vim:sw=4:ts=4:e...
23.115385
71
0.675541
# # Copyright (C) 2012 - 2017 Satoru SATOH <ssato @ redhat.com> # License: MIT # # pylint: disable=missing-docstring,invalid-name,too-few-public-methods from __future__ import absolute_import import anyconfig.backend.ini as TT import tests.backend.common as TBC # :seealso: `tests.backend.common.CNF_0` CNF_0_S = """\...
0
0
0
739
0
0
0
26
114
1ac8d5589ceca70f9e89f1d4ba9ffbf6e4b2d824
1,257
py
Python
yandex_algorithm2/home1c.py
erjan/coding_exercises
53ba035be85f1e7a12b4d4dbf546863324740467
[ "Apache-2.0" ]
null
null
null
yandex_algorithm2/home1c.py
erjan/coding_exercises
53ba035be85f1e7a12b4d4dbf546863324740467
[ "Apache-2.0" ]
null
null
null
yandex_algorithm2/home1c.py
erjan/coding_exercises
53ba035be85f1e7a12b4d4dbf546863324740467
[ "Apache-2.0" ]
null
null
null
''' , ( , , ) ( , , ). . , . ? , . , . x , y z ( 1 x 3 1 , 1 y 3 1 , 1 9 7 0 z 2 0 6 9 . , x y z . 1, , 0 . ''' if __name__ == "__main__": l = list(map(int, input().split())) result = helper(l) pri...
18.761194
374
0.686555
''' Как известно, два наиболее распространённых формата записи даты — это европейский (сначала день, потом месяц, потом год) и американски (сначала месяц, потом день, потом год). Системный администратор поменял дату на одном из бэкапов и сейчас хочет вернуть дату обратно. Но он не проверил, в каком формате дата использ...
1,292
0
0
0
0
261
0
0
23
dfee84d5a90ad6258f2c7a73186f191a93aded33
2,038
py
Python
myTreeView.py
hebingyedu/Hyperspetral-Image-segmentation
f5c89358cb57227eb88ed9e49597a548c083e0dc
[ "MIT" ]
1
2021-07-17T00:30:00.000Z
2021-07-17T00:30:00.000Z
myTreeView.py
hebingyedu/Hyperspetral-Image-segmentation
f5c89358cb57227eb88ed9e49597a548c083e0dc
[ "MIT" ]
null
null
null
myTreeView.py
hebingyedu/Hyperspetral-Image-segmentation
f5c89358cb57227eb88ed9e49597a548c083e0dc
[ "MIT" ]
null
null
null
#coding=utf-8 import os
35.137931
77
0.647694
#coding=utf-8 from PySide2 import QtWidgets, QtCore, QtGui import numpy as np import os import os.path import processRS class myTreeView(QtWidgets.QWidget): def __init__(self, treeList=[],parent=None): super().__init__(parent) self.treeWidget=QtWidgets.QTreeView(parent) self.fileModel=Qt...
24
0
0
1,883
0
0
0
8
112
cc5ea48635d7da4e40a03291da25afd53bb7a8d4
894
py
Python
02 - Curso Em Video/Aula 23/E - 113.py
GabrielTrentino/Python_Basico
f13f6448c275c14896337d2018b04cbf5a54efd3
[ "MIT" ]
null
null
null
02 - Curso Em Video/Aula 23/E - 113.py
GabrielTrentino/Python_Basico
f13f6448c275c14896337d2018b04cbf5a54efd3
[ "MIT" ]
null
null
null
02 - Curso Em Video/Aula 23/E - 113.py
GabrielTrentino/Python_Basico
f13f6448c275c14896337d2018b04cbf5a54efd3
[ "MIT" ]
null
null
null
nint = leiaInt('Digite um numero Inteiro: ') nfloat = leiaFloat('Digite um nmero Flutuante: ') print(f'Voc digitou um nmero Inteiro: {nint}\nE um nmero Flutuante: {nfloat}')
35.76
81
0.579418
def leiaInt(msg): while True: try: num = int(input(msg).replace(',','.').strip()) except(ValueError, TypeError, Exception) as erro: print('\033[0;31mERRO! Digite um número inteiro valido\033[m') print(f'Você digitou um erro: {erro.__class__}') else:...
16
0
0
0
0
657
0
0
48
b7d2c1ca306aa8bfac8f95fd02bac2ff9a17f2e2
6,255
py
Python
ipme/utils/functions.py
evdoxiataka/ipme
ed2aa5322bf719994237a743adff89547b18a142
[ "MIT" ]
22
2020-10-31T21:39:18.000Z
2021-12-05T02:21:15.000Z
ipme/utils/functions.py
evdoxiataka/ipme
ed2aa5322bf719994237a743adff89547b18a142
[ "MIT" ]
null
null
null
ipme/utils/functions.py
evdoxiataka/ipme
ed2aa5322bf719994237a743adff89547b18a142
[ "MIT" ]
2
2021-01-27T09:14:02.000Z
2021-03-05T02:47:20.000Z
import numpy as np from math import gcd, ceil # import itertools def lcm(list_of_int): """ Get the Least Common Multyply (lcm) of a list of integer numbers. Parameters: -------- list_of_int A List of integers Returns: -------- An integer (the lcm...
31.913265
91
0.53717
import numpy as np from math import gcd, ceil # import itertools def lcm(list_of_int): """ Get the Least Common Multyply (lcm) of a list of integer numbers. Parameters: -------- list_of_int A List of integers Returns: -------- An integer (the lcm...
0
0
0
0
0
2,876
0
0
138
1f19f13e91c75f3090fe3500b07c916348d4e0d3
317
py
Python
py/so/light_pixels.py
YodaEmbedding/experiments
567c6a1c18fac2d951fe2af54aaa4917b7d529d2
[ "MIT" ]
null
null
null
py/so/light_pixels.py
YodaEmbedding/experiments
567c6a1c18fac2d951fe2af54aaa4917b7d529d2
[ "MIT" ]
null
null
null
py/so/light_pixels.py
YodaEmbedding/experiments
567c6a1c18fac2d951fe2af54aaa4917b7d529d2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import cv2 # img = cv2.imread('4.png') # hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) # img[hsv[:,:,0] > 20] = 255 img = cv2.imread("4.png") gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) img[gray > 200] = 255 cv2.imwrite("4_.png", img) cv2.imshow("img", img) cv2.waitKey(0)
18.647059
44
0.659306
#!/usr/bin/env python3 import cv2 import numpy as np # img = cv2.imread('4.png') # hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) # img[hsv[:,:,0] > 20] = 255 img = cv2.imread("4.png") gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) img[gray > 200] = 255 cv2.imwrite("4_.png", img) cv2.imshow("img", img) cv2.waitKey(0)
0
0
0
0
0
0
0
-3
22
22c03d85273a3ae5d9bb0f4814acf96c016dc277
2,303
py
Python
cmdfunctools/types.py
Mr-Io/chtool
4d4337b016c53d7e19d3b9dcec161b3ad115b611
[ "MIT" ]
1
2019-04-23T16:49:42.000Z
2019-04-23T16:49:42.000Z
cmdfunctools/types.py
Mr-Io/chtool
4d4337b016c53d7e19d3b9dcec161b3ad115b611
[ "MIT" ]
null
null
null
cmdfunctools/types.py
Mr-Io/chtool
4d4337b016c53d7e19d3b9dcec161b3ad115b611
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ cmdfunctools.types ~~~~~~~~~~~~~~~~~~~~~~~ Module with the type checkers for the function/commandline args. """ import string # *********************************************************** # default functions used when type argument are not provided def default_true(*arg): """ Aux...
21.933333
81
0.569257
# -*- coding: utf-8 -*- """ cmdfunctools.types ~~~~~~~~~~~~~~~~~~~~~~~ Module with the type checkers for the function/commandline args. """ import string # *********************************************************** # default functions used when type argument are not provided def default_true(*arg): """ Aux...
0
0
0
0
0
63
0
0
22
5785cc952971cae8790212bea0f5458065c88ad7
291
py
Python
api/models.py
Rytiggy/osfPages-service-
06efc49c529f2a2623d03b9c790e931b84110d24
[ "Apache-2.0" ]
null
null
null
api/models.py
Rytiggy/osfPages-service-
06efc49c529f2a2623d03b9c790e931b84110d24
[ "Apache-2.0" ]
3
2020-02-12T00:11:57.000Z
2021-06-10T19:50:20.000Z
api/models.py
Rytiggy/osfPages-service-
06efc49c529f2a2623d03b9c790e931b84110d24
[ "Apache-2.0" ]
2
2017-08-28T18:58:11.000Z
2017-08-28T18:59:33.000Z
# Create your models here.
29.1
64
0.780069
from django.db import models # Create your models here. class Home(models.Model): guid = models.CharField(max_length=5, primary_key=True) page_data = models.TextField() unpublished_page_data = models.TextField(null=True, blank=True) meta_data = models.TextField(null=True, blank=True)
0
0
0
211
0
0
0
7
45
0226bec4d9ef01c8ee635854ea31a5261ea22df3
7,402
py
Python
shell-server.py
MathieuMorrissette/WebsocketShelling
d63e09216df10b2a38ee2d5cb9b2ee6531ff37c9
[ "Unlicense" ]
null
null
null
shell-server.py
MathieuMorrissette/WebsocketShelling
d63e09216df10b2a38ee2d5cb9b2ee6531ff37c9
[ "Unlicense" ]
null
null
null
shell-server.py
MathieuMorrissette/WebsocketShelling
d63e09216df10b2a38ee2d5cb9b2ee6531ff37c9
[ "Unlicense" ]
null
null
null
import asyncio import ssl import websockets import json import base64 server_password = "" with open("./config.txt", "r") as config: data = config.read() data = json.loads(data) server_password = base64.b64decode(data["server_password"]) print(generate_random(10)) cert_gen() pwneds = [] clients = [] ...
32.897778
110
0.586598
import asyncio import ssl import websockets import os import json import time import base64 import random import string import hashlib from OpenSSL import crypto, SSL from datetime import datetime server_password = "" with open("./config.txt", "r") as config: data = config.read() data = json.loads(data) s...
0
0
4,085
0
0
2,354
0
-27
292
1a4d3826fe05523d57fcaa16a40fcae86b60e476
7,334
py
Python
src/numcolorpy.py
dlanier/FlyingMachineFractal
3889bfb8b8005717de83954d4a705154e908273b
[ "MIT" ]
4
2017-03-27T19:50:37.000Z
2021-07-15T03:23:03.000Z
pyreimpic/zcolormap.py
dlanier/FlyingMachineFractal
3889bfb8b8005717de83954d4a705154e908273b
[ "MIT" ]
null
null
null
pyreimpic/zcolormap.py
dlanier/FlyingMachineFractal
3889bfb8b8005717de83954d4a705154e908273b
[ "MIT" ]
1
2017-03-27T19:50:54.000Z
2017-03-27T19:50:54.000Z
# -*- coding: utf-8 -*- """ numcolorpy.py Created Saturday April 22 2017 @author: del lanier4@illinois.edu mradmstr514226508@gmail.com import numcolorpy as ncp """ import numpy as np from PIL import Image as IP import colorsys def range_norm(Z, lo=0.0, hi=1.0): """ normaize input matrix Z within a lo - hi range...
27.062731
105
0.565858
# -*- coding: utf-8 -*- """ numcolorpy.py Created Saturday April 22 2017 @author: del lanier4@illinois.edu mradmstr514226508@gmail.com import numcolorpy as ncp """ import time import numpy as np from PIL import Image as IP from PIL import ImageColor as IC import colorsys def range_norm(Z, lo=0.0, hi=1.0): """ ...
0
0
0
0
0
1,949
0
1
206
36827512a9f1775495657b3d791cc3c2672adda4
12,952
py
Python
venv/lib/python3.8/site-packages/hgext/remotefilelog/contentstore.py
JesseDavids/mqtta
389eb4f06242d4473fe1bcff7fc6a22290e0d99c
[ "Apache-2.0" ]
4
2021-02-05T10:57:39.000Z
2022-02-25T04:43:23.000Z
venv/lib/python3.8/site-packages/hgext/remotefilelog/contentstore.py
JesseDavids/mqtta
389eb4f06242d4473fe1bcff7fc6a22290e0d99c
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/hgext/remotefilelog/contentstore.py
JesseDavids/mqtta
389eb4f06242d4473fe1bcff7fc6a22290e0d99c
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import
33.4677
80
0.602996
from __future__ import absolute_import import threading from mercurial.node import hex, nullid from mercurial.pycompat import getattr from mercurial import ( mdiff, pycompat, revlog, ) from . import ( basestore, constants, shallowutil, ) class ChainIndicies(object): """A static class for...
0
1,034
0
11,534
0
0
0
113
227
90b0bf7b1dba201331c6a48219374b9f0a593643
2,098
py
Python
backtracking/n-queens/Python/NQueen.py
CarbonDDR/al-go-rithms
8e65affbe812931b7dde0e2933eb06c0f44b4130
[ "CC0-1.0" ]
1,253
2017-06-06T07:19:25.000Z
2022-03-30T17:07:58.000Z
backtracking/n-queens/Python/NQueen.py
rishabh99-rc/al-go-rithms
4df20d7ef7598fda4bc89101f9a99aac94cdd794
[ "CC0-1.0" ]
554
2017-09-29T18:56:01.000Z
2022-02-21T15:48:13.000Z
backtracking/n-queens/Python/NQueen.py
rishabh99-rc/al-go-rithms
4df20d7ef7598fda4bc89101f9a99aac94cdd794
[ "CC0-1.0" ]
2,226
2017-09-29T19:59:59.000Z
2022-03-25T08:59:55.000Z
from __future__ import print_function # Python program to solve N Queen # Problem using backtracking global N N = 4 # A utility function to check if a queen can # be placed on board[row][col]. Note that this # function is called when "col" queens are # already placed in columns from 0 to col -1. # So we need to che...
22.804348
52
0.672069
from __future__ import print_function # Python program to solve N Queen # Problem using backtracking global N N = 4 def printSolution(board): for i in range(N): for j in range(N): print(board[i][j], end=' ') print() # A utility function to check if a queen can # be placed on board[row][col]. Note that this...
0
0
0
0
0
1,256
0
0
90
cf6dae97fca58029e3d487cb8e373c64b3a1b651
232
py
Python
Python Files/Helper Files/Spectogram_crop_test.py
brennanMosher/Music-Genre-Recognition-using-a-Machine-Learning-Appraoch
7834fe5d709e894322ad76ef118067febaa78bce
[ "MIT" ]
1
2021-04-13T16:22:27.000Z
2021-04-13T16:22:27.000Z
Python Files/Helper Files/Spectogram_crop_test.py
brennanMosher/Music-Genre-Recognition-using-a-Machine-Learning-Appraoch
7834fe5d709e894322ad76ef118067febaa78bce
[ "MIT" ]
null
null
null
Python Files/Helper Files/Spectogram_crop_test.py
brennanMosher/Music-Genre-Recognition-using-a-Machine-Learning-Appraoch
7834fe5d709e894322ad76ef118067febaa78bce
[ "MIT" ]
null
null
null
from PIL import Image ''' Test file for cropping images ''' file_loc = r'C:\Users\brenn\Desktop\Spectrogram/blues.00000.jpg' im = Image.open(file_loc) crop_box = (80, 58, 576, 427) img1 = im.crop(crop_box) img1.show()
15.466667
64
0.711207
import os from PIL import Image ''' Test file for cropping images ''' file_loc = r'C:\Users\brenn\Desktop\Spectrogram/blues.00000.jpg' im = Image.open(file_loc) crop_box = (80, 58, 576, 427) img1 = im.crop(crop_box) img1.show()
0
0
0
0
0
0
0
-12
22
01221d594e7e8a20c9a9d17c46c4a2281a62c2ae
982
py
Python
problems/15.3-sum.py
lucasheriques/leetcode-solutions
cd36b5df46a75a0cb17569faf9cf56186864f68a
[ "MIT" ]
null
null
null
problems/15.3-sum.py
lucasheriques/leetcode-solutions
cd36b5df46a75a0cb17569faf9cf56186864f68a
[ "MIT" ]
null
null
null
problems/15.3-sum.py
lucasheriques/leetcode-solutions
cd36b5df46a75a0cb17569faf9cf56186864f68a
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=15 lang=python3 # # [15] 3Sum # # O(n^2) time | O(n) space
27.277778
76
0.407332
# # @lc app=leetcode id=15 lang=python3 # # [15] 3Sum # # O(n^2) time | O(n) space class Solution: def threeSum(self, array, k=0): array.sort() ans = [] for i in range(len(array) - 1): left = i + 1 right = len(array) - 1 if i > 0 and array[i] == array[...
0
0
0
874
0
0
0
0
23
11705964d46a522a8400a13b9c02c8fb742ed68b
434
py
Python
2018/day1/first_repeat.py
forrestrice/advent
2451de84790e67c08676154bfa5167ee353d4e42
[ "MIT" ]
1
2019-12-03T07:41:10.000Z
2019-12-03T07:41:10.000Z
2018/day1/first_repeat.py
forrestrice/advent
2451de84790e67c08676154bfa5167ee353d4e42
[ "MIT" ]
null
null
null
2018/day1/first_repeat.py
forrestrice/advent
2451de84790e67c08676154bfa5167ee353d4e42
[ "MIT" ]
null
null
null
input_file_name = "time_machine_input.txt" sum = 0 seen_sums = {} for time_input in infinite_input(): sum += int(time_input) sum_frequency = seen_sums.get(sum, 0) + 1 seen_sums[sum] = sum_frequency if sum_frequency > 1: print(sum) break
24.111111
45
0.638249
input_file_name = "time_machine_input.txt" def infinite_input(): input_file = open(input_file_name, "r") while True: for line in input_file: yield line input_file.seek(0) sum = 0 seen_sums = {} for time_input in infinite_input(): sum += int(time_input) sum_frequency = seen_...
0
0
0
0
142
0
0
0
23
2fda7d56160fe8a774a3ce7da64ac6810295ef73
2,554
py
Python
refbee/platforms/wikidata.py
kmdn/RefBee
c45e5fa7a3f011b760284a7ee8dafec8e0884280
[ "MIT" ]
null
null
null
refbee/platforms/wikidata.py
kmdn/RefBee
c45e5fa7a3f011b760284a7ee8dafec8e0884280
[ "MIT" ]
null
null
null
refbee/platforms/wikidata.py
kmdn/RefBee
c45e5fa7a3f011b760284a7ee8dafec8e0884280
[ "MIT" ]
null
null
null
from refbee.util import get_sparql_query_results platform_properties_dict = { "ORCID": "wdt:P496", "Google Scholar": "wdt:P1960", "VIAF": "wdt:P214", "DBLP": "wdt:P2456", "Dimensions": "wdt:P6178", "Github": "wdt:P2037", "Microsoft Academic": "wdt:P6366", "Semantic Scholar": "wdt:P4012"...
38.69697
103
0.635082
from refbee.util import get_sparql_query_results platform_properties_dict = { "ORCID": "wdt:P496", "Google Scholar": "wdt:P1960", "VIAF": "wdt:P214", "DBLP": "wdt:P2456", "Dimensions": "wdt:P6178", "Github": "wdt:P2037", "Microsoft Academic": "wdt:P6366", "Semantic Scholar": "wdt:P4012"...
0
0
0
0
0
1,201
0
0
46
722c4c63b3fd5d59bca4f70da65c4babd7f2a270
2,814
py
Python
neptunecontrib/api/audio.py
piojanu/neptune-contrib
7793c325af1c225cbda972bc0f89fa45f8da6cf3
[ "MIT" ]
22
2020-02-23T21:25:34.000Z
2021-06-11T16:34:27.000Z
neptunecontrib/api/audio.py
piojanu/neptune-contrib
7793c325af1c225cbda972bc0f89fa45f8da6cf3
[ "MIT" ]
29
2020-02-11T11:10:22.000Z
2021-10-03T09:01:28.000Z
neptunecontrib/api/audio.py
piojanu/neptune-contrib
7793c325af1c225cbda972bc0f89fa45f8da6cf3
[ "MIT" ]
7
2020-05-10T06:59:53.000Z
2021-06-11T16:34:32.000Z
# # Copyright (c) 2020, Neptune Labs Sp. z o.o. # # 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 agr...
33.903614
120
0.662758
# # Copyright (c) 2020, Neptune Labs Sp. z o.o. # # 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 agr...
0
0
0
0
0
0
0
0
0
9d1b6d427be95ea45d7c26c3d929358589c3f356
52,569
py
Python
PUBGSearchbot.py
J-hoplin1/PUBG-player-search-bot
b3389cde41f4c3723b29885d355ac4491146934c
[ "MIT" ]
6
2020-06-09T06:45:17.000Z
2021-07-31T16:07:40.000Z
PUBGSearchbot.py
J-hoplin1/PUBG-player-search-bot
b3389cde41f4c3723b29885d355ac4491146934c
[ "MIT" ]
null
null
null
PUBGSearchbot.py
J-hoplin1/PUBG-player-search-bot
b3389cde41f4c3723b29885d355ac4491146934c
[ "MIT" ]
5
2020-05-23T01:27:43.000Z
2021-08-21T14:38:15.000Z
#This code and description is written by Hoplin #This code is written with API version 1.0.0(Rewirte-V) #No matter to use it as non-commercial. import discord from urllib.request import urlopen token = '' client = discord.Client() client.run(token)
65.793492
185
0.531739
#This code and description is written by Hoplin #This code is written with API version 1.0.0(Rewirte-V) #No matter to use it as non-commercial. import discord import asyncio import os from discord.ext import commands import urllib from urllib.request import URLError from urllib.request import HTTPError from urllib.req...
2,577
51,051
0
0
0
0
0
5
400
b8808619cc1183cfb2b684a8df56450fbbbcf6bc
1,913
py
Python
test_scripts/functional_tests/pool/close_pool_ledger_after_reopen_pool_test.py
hyperledger/indy-post-install-automation
a19cb3c66f0adea6bb4c1fc20e1509cc97bd3d5f
[ "Apache-2.0" ]
2
2021-08-23T15:20:22.000Z
2021-12-03T01:58:02.000Z
test_scripts/functional_tests/pool/close_pool_ledger_after_reopen_pool_test.py
hyperledger-archives/indy-post-install-automation
a19cb3c66f0adea6bb4c1fc20e1509cc97bd3d5f
[ "Apache-2.0" ]
1
2018-02-22T10:04:41.000Z
2018-02-22T10:04:41.000Z
test_scripts/functional_tests/pool/close_pool_ledger_after_reopen_pool_test.py
hyperledger/indy-post-install-automation
a19cb3c66f0adea6bb4c1fc20e1509cc97bd3d5f
[ "Apache-2.0" ]
7
2018-01-03T20:45:48.000Z
2019-08-12T11:02:31.000Z
""" Created on Dec 8, 2017 @author: nhan.nguyen Verify that user can close a reopened pool ledger. """
37.509804
79
0.590695
""" Created on Dec 8, 2017 @author: nhan.nguyen Verify that user can close a reopened pool ledger. """ from indy import pool from utilities import utils from utilities import common, constant from test_scripts.functional_tests.pool.pool_test_base import PoolTestBase import pytest class TestCloseReopenedPoolLedgerCo...
0
1,546
0
33
0
0
0
68
161
5302279d5e263be1aa5efb48ba63ba98f8a24bf7
13,981
py
Python
KerasMps.py
KanHarI/MatrixPowerSeries
d08f8761d32212f895a3cd0467c9a964015bc88e
[ "MIT" ]
null
null
null
KerasMps.py
KanHarI/MatrixPowerSeries
d08f8761d32212f895a3cd0467c9a964015bc88e
[ "MIT" ]
null
null
null
KerasMps.py
KanHarI/MatrixPowerSeries
d08f8761d32212f895a3cd0467c9a964015bc88e
[ "MIT" ]
null
null
null
# This layer represets a power series # a_0*I+a_1*X+a_2*X^2+...+a_n*X^n # Where X is a complex input matrix, and the coefficients a_n are complex. # The optimized weights of this layer are the coefficients. # Input shape: [?(batch_size), 2(0=real\1=imag), n, n] (n is the size of input matrices) # Output shape: same as...
38.621547
118
0.609685
from keras.engine.topology import Layer from keras import backend as K import tensorflow as tf import numpy as np import random import math import ComplexTensor as ct def factorial_decaying_random_init(shape): # Decay by one over factorial, inspired by the taylor expansion of the exponent function res = np.z...
0
0
0
10,343
0
1,689
0
13
380
b0be46f19793dfd79ded724164d81438c56fa5b5
6,790
py
Python
model_sandbox/model_nn_controller_service/train.py
surfertas/amr_core
100ebaf149558611e1b406392ffd49e71dad9b69
[ "MIT" ]
4
2018-02-28T15:36:45.000Z
2020-12-07T19:17:03.000Z
model_sandbox/model_nn_controller_service/train.py
surfertas/amr_core
100ebaf149558611e1b406392ffd49e71dad9b69
[ "MIT" ]
2
2018-02-26T06:24:12.000Z
2018-04-01T06:53:10.000Z
model_sandbox/model_nn_controller_service/train.py
surfertas/amr_core
100ebaf149558611e1b406392ffd49e71dad9b69
[ "MIT" ]
1
2021-09-07T11:04:39.000Z
2021-09-07T11:04:39.000Z
# @author Tasuku Miura # @brief Training for controller to output steering and throttle commands given # an image taken from a monocular camera. (Assumes CUDA enabled) # python train.py --root-dir /home/ubuntu/ws/amr_core/model_sandbox/model_nn_controller_service/data # put images and pickle file in ./data # TODO: save...
35.736842
100
0.665832
# @author Tasuku Miura # @brief Training for controller to output steering and throttle commands given # an image taken from a monocular camera. (Assumes CUDA enabled) # python train.py --root-dir /home/ubuntu/ws/amr_core/model_sandbox/model_nn_controller_service/data # put images and pickle file in ./data # TODO: save...
0
0
0
0
0
4,196
0
111
403
90bc1b1cdc5c031399541ab62ec7874f6ce72ff0
434
py
Python
obsim/config/observing_bands.py
fjfaggingerauer/obsim
a5a9a48841fc13e822fbbfbbd0fb0fd0953cdd5a
[ "MIT" ]
null
null
null
obsim/config/observing_bands.py
fjfaggingerauer/obsim
a5a9a48841fc13e822fbbfbbd0fb0fd0953cdd5a
[ "MIT" ]
null
null
null
obsim/config/observing_bands.py
fjfaggingerauer/obsim
a5a9a48841fc13e822fbbfbbd0fb0fd0953cdd5a
[ "MIT" ]
null
null
null
__all__ = ['observing_bands'] import astropy.units as u observing_bands = { 'U' : (365*u.nm, 66*u.nm), 'B' : (445*u.nm, 94*u.nm), 'G' : (464*u.nm, 128*u.nm), 'V' : (551*u.nm, 88*u.nm), 'R' : (658*u.nm, 138*u.nm), 'I' : (806*u.nm, 149*u.nm), 'Y' : (1020*u.nm, 120*u.nm), 'J' : (1220*u.nm...
24.111111
32
0.467742
__all__ = ['observing_bands'] import astropy.units as u observing_bands = { 'U' : (365*u.nm, 66*u.nm), 'B' : (445*u.nm, 94*u.nm), 'G' : (464*u.nm, 128*u.nm), 'V' : (551*u.nm, 88*u.nm), 'R' : (658*u.nm, 138*u.nm), 'I' : (806*u.nm, 149*u.nm), 'Y' : (1020*u.nm, 120*u.nm), 'J' : (1220*u.nm...
0
0
0
0
0
0
0
0
0
b52ab56e96428cb2e4a00578d5eae43fd5a5677f
3,159
py
Python
Adventure-Project/Main.py
MatthewGraber/Portfolio
333237de1efd7de4465614e15c1285a23cab0be7
[ "MIT" ]
null
null
null
Adventure-Project/Main.py
MatthewGraber/Portfolio
333237de1efd7de4465614e15c1285a23cab0be7
[ "MIT" ]
null
null
null
Adventure-Project/Main.py
MatthewGraber/Portfolio
333237de1efd7de4465614e15c1285a23cab0be7
[ "MIT" ]
null
null
null
# Will change to initialize to 'None' after more testing and whatnot is done # GlobalVariables.PC = Character.Rogue() # GlobalVariables.Enemy = Enemies.Chimera() # Resets the game # Each .py file should have a reset function that gets called here if (__name__ == "__main__"): main()
33.967742
145
0.716049
import GlobalVariables import Character, Enemies, Encounters import AdventureMap import Actions import gui import NPCs import tkinter import Conditions # Will change to initialize to 'None' after more testing and whatnot is done # GlobalVariables.PC = Character.Rogue() # GlobalVariables.Enemy = Enemies....
0
0
0
0
0
2,600
0
-24
283
868fb40951fb9bcc5e105ed27a289b96298fe4cb
2,171
py
Python
src/pysem/sense.py
lingpy/pysen
2b4cb66ed2d56f05a73ef4d4940cebf435e6e5a7
[ "MIT" ]
1
2020-08-17T06:52:04.000Z
2020-08-17T06:52:04.000Z
src/pysem/sense.py
lingpy/pysem
2b4cb66ed2d56f05a73ef4d4940cebf435e6e5a7
[ "MIT" ]
4
2021-06-02T18:31:23.000Z
2022-01-13T19:22:28.000Z
src/pysem/sense.py
lingpy/pysen
2b4cb66ed2d56f05a73ef4d4940cebf435e6e5a7
[ "MIT" ]
null
null
null
""" Sense manipulations following the framework of the STARLING package. """ # import networkx as nx
31.014286
79
0.436205
""" Sense manipulations following the framework of the STARLING package. """ # import networkx as nx from pysem.data import SENSE from collections import defaultdict class Sense(object): def __init__(self): """ Creates a sense graph upon initialization. """ G = {key: set() for key ...
0
0
0
1,981
0
0
0
21
67
dc0e21f2d63875c49aabacfc838f0045189a5fef
4,784
py
Python
src/pages/SetNames.py
linjorejoy/json-testcase-generator
872c5dd48e97746ee8f538c105611cb2395d7d22
[ "MIT" ]
1
2021-08-11T02:51:28.000Z
2021-08-11T02:51:28.000Z
src/pages/SetNames.py
linjorejoy/json-testcase-generator
872c5dd48e97746ee8f538c105611cb2395d7d22
[ "MIT" ]
null
null
null
src/pages/SetNames.py
linjorejoy/json-testcase-generator
872c5dd48e97746ee8f538c105611cb2395d7d22
[ "MIT" ]
null
null
null
import pages.ProcessVariables as ProcessVariables import pages.PreviewVariables as PreviewVariables
29.530864
101
0.57337
from tkinter import Frame, Label from tkinter import StringVar from tkinter import N, Y, SW, SE from widgetclasses.MyLabelFrame import MyLabelFrame from widgetclasses.MyOptionMenu import MyOptionMenu from widgetclasses.MyButton import MyButton from widgetclasses.MyLabel import MyLabel from widgetclasses.DoubleScrolle...
0
0
0
4,181
0
0
0
224
268
db5b3178214c83b369a1908d539a0187d4dfdc54
120
py
Python
exercises/CursoemVideo/ex007.py
arthurguerra/cursoemvideo-python
37f45ec25f422673fa9bbeee682e098f14d8ceab
[ "MIT" ]
null
null
null
exercises/CursoemVideo/ex007.py
arthurguerra/cursoemvideo-python
37f45ec25f422673fa9bbeee682e098f14d8ceab
[ "MIT" ]
null
null
null
exercises/CursoemVideo/ex007.py
arthurguerra/cursoemvideo-python
37f45ec25f422673fa9bbeee682e098f14d8ceab
[ "MIT" ]
null
null
null
n1 = float(input('Nota 1: ')) n2 = float(input('Nota 2: ')) m = (n1 + n2)/2 print('A mdia do aluno {:.2f}'.format(m))
30
44
0.566667
n1 = float(input('Nota 1: ')) n2 = float(input('Nota 2: ')) m = (n1 + n2)/2 print('A média do aluno é {:.2f}'.format(m))
4
0
0
0
0
0
0
0
0
6498d5fe8372397f7571e4984a1962dcb8798c9f
6,956
py
Python
test.py
yzyouzhang/AIR-ASVspoof
b26830d56d4baa6247a72955292ad9d2a336c6f6
[ "MIT" ]
40
2020-10-30T20:41:58.000Z
2022-03-14T05:36:47.000Z
test.py
AirLabUR/AIR-ASVspoof
b26830d56d4baa6247a72955292ad9d2a336c6f6
[ "MIT" ]
13
2020-11-01T16:58:12.000Z
2021-12-29T16:49:36.000Z
test.py
AirLabUR/AIR-ASVspoof
b26830d56d4baa6247a72955292ad9d2a336c6f6
[ "MIT" ]
18
2020-12-23T09:03:12.000Z
2022-03-30T10:20:33.000Z
import argparse import os import torch import torch.nn as nn if __name__ == "__main__": parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('-m', '--model_dir', type=str, help="path to the trained model", default="./models/ocsoftmax") parser.add_argument('-l', '--loss', type=str, def...
46.684564
133
0.636141
import argparse import os import torch from torch.utils.data import DataLoader import torch.nn as nn import torch.nn.functional as F from dataset import ASVspoof2019 from evaluate_tDCF_asvspoof19 import compute_eer_and_tdcf from tqdm import tqdm import eval_metrics as em import numpy as np def test_model(feat_model_pa...
0
0
0
0
0
5,779
0
76
223
308b220de68d603d9b2db4d133efa6beac43dfb6
2,578
py
Python
evaluation/utils.py
ETHmodlab/de_novo_design_RNN
622628317c2ee6545eea9643767216904a7d7415
[ "MIT" ]
6
2022-01-02T12:49:17.000Z
2022-02-27T17:10:48.000Z
evaluation/utils.py
molML/de_novo_design_RNN
e4e2dc1a791e0a7af92c8767cf6f12fb44f0f42c
[ "MIT" ]
null
null
null
evaluation/utils.py
molML/de_novo_design_RNN
e4e2dc1a791e0a7af92c8767cf6f12fb44f0f42c
[ "MIT" ]
3
2021-03-16T19:05:05.000Z
2021-11-11T07:24:42.000Z
# utilities to generate molecules with this repo. # v1. Dec 2020, F. Grisoni
40.920635
169
0.687742
# utilities to generate molecules with this repo. # v1. Dec 2020, F. Grisoni def make_config(model_type='BIMODAL', net_size=512, epochs=10, starting_point='random', fine_tuning='fine_tuning', n_sampling=1000, T_sampling=0.7,augmentation_level=1): # writes the configuration file for fine-tuning depending on user-de...
0
0
0
0
0
2,477
0
0
23
340c5b3222ddc720364f924508c5460c1a49982b
2,590
py
Python
event_chain/app/models/mobile.py
ArcBlock/event-chain
50a37c76ab094386fc66c985f4174f8dabc98ad5
[ "MIT" ]
null
null
null
event_chain/app/models/mobile.py
ArcBlock/event-chain
50a37c76ab094386fc66c985f4174f8dabc98ad5
[ "MIT" ]
null
null
null
event_chain/app/models/mobile.py
ArcBlock/event-chain
50a37c76ab094386fc66c985f4174f8dabc98ad5
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger('model-mobile')
31.585366
78
0.584942
import base64 import json import logging import base58 from forge_sdk import protos as forge_protos from forge_sdk import utils as forge_utils logger = logging.getLogger('model-mobile') class WalletResponse: def __init__(self, response): self.response = response self.user_info = response.get('u...
0
0
0
2,377
0
0
0
18
135
3075f003af9b01017b421ee8ca69f17356c3e8a2
18,001
py
Python
lampy/semantic.py
pyccel/lampy
696f65218f251095054003e87f8c05324be02a29
[ "MIT" ]
1
2019-04-12T21:41:32.000Z
2019-04-12T21:41:32.000Z
lampy/semantic.py
pyccel/lampy
696f65218f251095054003e87f8c05324be02a29
[ "MIT" ]
null
null
null
lampy/semantic.py
pyccel/lampy
696f65218f251095054003e87f8c05324be02a29
[ "MIT" ]
null
null
null
# coding: utf-8 #========================================================================= #========================================================================= # TODO add some verifications before starting annotating L
30.355818
96
0.598745
# coding: utf-8 import os from os.path import join, dirname from sympy import Symbol, Lambda, Function, Dummy from sympy import Tuple, IndexedBase from sympy.core.function import AppliedUndef from sympy.core.function import UndefinedFunction from sympy import Integer, Float from sympy import sympify from sympy import...
0
352
0
15,221
0
694
0
730
774
baa49fa64ab53b5b85149b7b0e2a33494d10098b
2,604
py
Python
process.py
ervbrian/GpxProcessor
4f15ea0548b6d601b4eaaa3d38888b20e9c9ae28
[ "MIT" ]
null
null
null
process.py
ervbrian/GpxProcessor
4f15ea0548b6d601b4eaaa3d38888b20e9c9ae28
[ "MIT" ]
null
null
null
process.py
ervbrian/GpxProcessor
4f15ea0548b6d601b4eaaa3d38888b20e9c9ae28
[ "MIT" ]
null
null
null
GPX = "GPX" if __name__ == "__main__": main()
37.2
124
0.682028
import argparse import os from multiprocessing.pool import ThreadPool from utils.backend import HikeDBClient, update_db from utils.combine_gpx import CombineGpx from utils.gpx_import import GpxImport from utils.plotting import plot_elevation, plot_coordinates, plot_heart_rate from utils.report import render_html GPX...
0
0
0
0
0
2,187
0
138
223
469ec131a089da59dfea02fbcbd86bac2621a4f7
8,534
py
Python
pipe-cli/src/utilities/pipe_shell.py
madmongoose/cloud-pipeline
e4e85faeee895373480f3bfa389eae1bed0db6e8
[ "Apache-2.0" ]
null
null
null
pipe-cli/src/utilities/pipe_shell.py
madmongoose/cloud-pipeline
e4e85faeee895373480f3bfa389eae1bed0db6e8
[ "Apache-2.0" ]
null
null
null
pipe-cli/src/utilities/pipe_shell.py
madmongoose/cloud-pipeline
e4e85faeee895373480f3bfa389eae1bed0db6e8
[ "Apache-2.0" ]
null
null
null
# Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.com/) # # 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 appli...
35.707113
117
0.620342
# Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.com/) # # 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 appli...
0
0
0
0
0
6,890
0
-61
390
e9faf4d2308d5743525c61401b5134006844edbd
171
py
Python
cgxsh_edit_config.py
ebob9/cgxsh
0682922bae4354d2e306147e314dd309da968059
[ "MIT" ]
null
null
null
cgxsh_edit_config.py
ebob9/cgxsh
0682922bae4354d2e306147e314dd309da968059
[ "MIT" ]
3
2020-02-10T00:01:18.000Z
2022-03-28T00:26:45.000Z
cgxsh_edit_config.py
ebob9/cgxsh
0682922bae4354d2e306147e314dd309da968059
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from cgxsh_lib.file_crypto import edit_config_file if __name__ == '__main__': sys.exit(edit_config_file())
19
50
0.71345
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from cgxsh_lib.file_crypto import edit_config_file if __name__ == '__main__': sys.exit(edit_config_file())
0
0
0
0
0
0
0
0
0
ce26d3a18a902cb650143b53d2f13fcece06ffe4
536
py
Python
node_manager/migrations/0005_auto_20190123_2041.py
Jennypies/catnet
8c715e1ad638c9843e116b3c3926163b7dde1618
[ "MIT" ]
null
null
null
node_manager/migrations/0005_auto_20190123_2041.py
Jennypies/catnet
8c715e1ad638c9843e116b3c3926163b7dde1618
[ "MIT" ]
null
null
null
node_manager/migrations/0005_auto_20190123_2041.py
Jennypies/catnet
8c715e1ad638c9843e116b3c3926163b7dde1618
[ "MIT" ]
null
null
null
# Generated by Django 2.1.4 on 2019-01-23 20:41
23.304348
71
0.585821
# Generated by Django 2.1.4 on 2019-01-23 20:41 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('node_manager', '0004_auto_20190123_2035'), ] operations = [ migrations.DeleteModel( ...
0
0
0
382
0
0
0
30
73