hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c3ddaae3fe121c87354bcd3992a74f10c1bbeb1
1,527
py
Python
winsspi/utils/ldap3_gssapi_patch.py
skelsec/winsspi
94ee686053908774069335e38ff4f39f27ada8dc
[ "MIT" ]
13
2019-03-07T14:50:23.000Z
2021-08-14T14:27:03.000Z
winsspi/utils/ldap3_gssapi_patch.py
skelsec/winsspi
94ee686053908774069335e38ff4f39f27ada8dc
[ "MIT" ]
1
2020-03-27T10:13:28.000Z
2020-03-27T10:13:28.000Z
winsspi/utils/ldap3_gssapi_patch.py
skelsec/winsspi
94ee686053908774069335e38ff4f39f27ada8dc
[ "MIT" ]
4
2019-02-23T18:33:09.000Z
2020-05-15T01:59:40.000Z
from minikerberos.sspi.kerberosspi import KerberosSSPI, SSPIResult from ldap3.protocol.sasl.sasl import send_sasl_negotiation, abort_sasl_negotiation import socket def sasl_gssapi(connection, controls): print('MONKEY!') print(connection) print(controls) target_name = None authz_id = b"" raw_creds = None cre...
32.489362
82
0.747872
from minikerberos.sspi.kerberosspi import KerberosSSPI, SSPIResult from ldap3.protocol.sasl.sasl import send_sasl_negotiation, abort_sasl_negotiation import socket def sasl_gssapi(connection, controls): print('MONKEY!') print(connection) print(controls) target_name = None authz_id = b"" raw_creds = None cre...
true
true
1c3ddb1960991927d108aa95bfbcf63e207d85f0
203
py
Python
gia_events/gia_events/doctype/speaker_form/speaker_form.py
the-bantoo/GIA-Global-Events
5b3da47fdb9778bb388d611c77e04ee8747db6f8
[ "MIT" ]
null
null
null
gia_events/gia_events/doctype/speaker_form/speaker_form.py
the-bantoo/GIA-Global-Events
5b3da47fdb9778bb388d611c77e04ee8747db6f8
[ "MIT" ]
null
null
null
gia_events/gia_events/doctype/speaker_form/speaker_form.py
the-bantoo/GIA-Global-Events
5b3da47fdb9778bb388d611c77e04ee8747db6f8
[ "MIT" ]
null
null
null
# Copyright (c) 2021, Bantoo Accounting and contributors # For license information, please see license.txt # import frappe from frappe.model.document import Document class SpeakerForm(Document): pass
22.555556
56
0.79803
from frappe.model.document import Document class SpeakerForm(Document): pass
true
true
1c3ddd9bc4360810fc5af17352303a8714378b5e
546
py
Python
test/python/visualization/__init__.py
lerongil/qiskit-terra
a25af2a2378bc3d4f5ec73b948d048d1b707454c
[ "Apache-2.0" ]
22
2019-08-15T04:39:15.000Z
2022-03-06T05:17:04.000Z
test/python/visualization/__init__.py
lerongil/qiskit-terra
a25af2a2378bc3d4f5ec73b948d048d1b707454c
[ "Apache-2.0" ]
4
2019-05-13T15:28:46.000Z
2019-12-19T20:47:02.000Z
test/python/visualization/__init__.py
lerongil/qiskit-terra
a25af2a2378bc3d4f5ec73b948d048d1b707454c
[ "Apache-2.0" ]
9
2019-09-05T05:33:00.000Z
2021-10-09T16:04:53.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
34.125
77
0.736264
true
true
1c3dde5532276b413dd243da3e87cec978e21524
18,803
py
Python
exact_solvers/acoustics_demos.py
katrinleinweber/riemann_book
0bd2320765a459249d938c6913cc39339cddb3fb
[ "BSD-3-Clause" ]
null
null
null
exact_solvers/acoustics_demos.py
katrinleinweber/riemann_book
0bd2320765a459249d938c6913cc39339cddb3fb
[ "BSD-3-Clause" ]
null
null
null
exact_solvers/acoustics_demos.py
katrinleinweber/riemann_book
0bd2320765a459249d938c6913cc39339cddb3fb
[ "BSD-3-Clause" ]
null
null
null
""" Additional functions and demos for acoustics equations. """ from clawpack import pyclaw from clawpack import riemann from matplotlib import animation import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import numpy as np from ipywidgets import widgets, interact from IPython.display import display...
40.349785
114
0.61453
from clawpack import pyclaw from clawpack import riemann from matplotlib import animation import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import numpy as np from ipywidgets import widgets, interact from IPython.display import display import sys sys.path.append('../utils') from utils import rieman...
true
true
1c3ddea1fdb0257b48f8bd38591ead6a99fa5151
5,600
py
Python
denoising.py
ozgurkara99/ISNAS-DIP
bfe3c41459f8803de552a2549266074b84fe1e17
[ "MIT" ]
6
2022-03-28T19:00:17.000Z
2022-03-31T19:30:52.000Z
denoising.py
ozgurkara99/ISNAS-DIP
bfe3c41459f8803de552a2549266074b84fe1e17
[ "MIT" ]
null
null
null
denoising.py
ozgurkara99/ISNAS-DIP
bfe3c41459f8803de552a2549266074b84fe1e17
[ "MIT" ]
null
null
null
import argparse import warnings warnings.filterwarnings("ignore") import torch import torch.optim as optim torch.backends.cudnn.enabled = True torch.backends.cudnn.benchmark = True torch.backends.cudnn.deterministic = True import utils.funcs as fn import utils.basic_utils as bu import utils.image_utils as i...
30.939227
88
0.650536
import argparse import warnings warnings.filterwarnings("ignore") import torch import torch.optim as optim torch.backends.cudnn.enabled = True torch.backends.cudnn.benchmark = True torch.backends.cudnn.deterministic = True import utils.funcs as fn import utils.basic_utils as bu import utils.image_utils as i...
true
true
1c3ddf686a055a85019d69299232396b150b648f
1,869
py
Python
K-Means Clustering in Python/friend-of-the-bank.py
debug314/coursework
beb732d0d06b5a338ba8115d59ed1c75edbb1bdb
[ "BSD-3-Clause" ]
null
null
null
K-Means Clustering in Python/friend-of-the-bank.py
debug314/coursework
beb732d0d06b5a338ba8115d59ed1c75edbb1bdb
[ "BSD-3-Clause" ]
null
null
null
K-Means Clustering in Python/friend-of-the-bank.py
debug314/coursework
beb732d0d06b5a338ba8115d59ed1c75edbb1bdb
[ "BSD-3-Clause" ]
null
null
null
# Foundations of Data Science: K-Means Clustering in Python # by University of London & Goldsmiths, Coursera # Week 5: A Data Clustering Project import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.patches as patch from sklearn.cluster import KMeans # V1. Variance of Wavelet Trans...
24.92
93
0.688068
import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.patches as patch from sklearn.cluster import KMeans df = pd.read_csv('files/banknote-authentication.csv') no_of_clusters = 2 clustered = KMeans(n_clusters=no_of_clusters).fit(df) k_means = clustered.cluster_centers_ k_label = ...
true
true
1c3ddfbfc34418740f119f97361c08eeda52cba6
3,759
py
Python
kobart/utils.py
sulungsLim/KoBART
9bb9ea3143ecd407428897e6a9b3d1e14042787c
[ "MIT" ]
null
null
null
kobart/utils.py
sulungsLim/KoBART
9bb9ea3143ecd407428897e6a9b3d1e14042787c
[ "MIT" ]
null
null
null
kobart/utils.py
sulungsLim/KoBART
9bb9ea3143ecd407428897e6a9b3d1e14042787c
[ "MIT" ]
1
2021-12-07T01:59:21.000Z
2021-12-07T01:59:21.000Z
# coding=utf-8 # Modified MIT License # Software Copyright (c) 2020 SK telecom # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and # associated documentation files (the "Software"), to deal in the Software without restriction, # including without limitation the rights t...
42.235955
106
0.649641
import os import sys import requests import hashlib from zipfile import ZipFile from transformers import PreTrainedTokenizerFast tokenizer = { 'url': 'https://kobert.blob.core.windows.net/models/kobart/kobart_base_tokenizer_cased_a432df8fec.zip', 'fname': 'kobart_base_tokenizer_cased_a432df8fec.zip', ...
true
true
1c3de08e891050fa23299ea86b3e843612abc738
610
py
Python
migrations/2017_06_07_133517_create_files_table.py
alanjimenez1/qualibrate-api
d005e35029303ac9dfd8e66cb09c79393a472cad
[ "MIT" ]
null
null
null
migrations/2017_06_07_133517_create_files_table.py
alanjimenez1/qualibrate-api
d005e35029303ac9dfd8e66cb09c79393a472cad
[ "MIT" ]
null
null
null
migrations/2017_06_07_133517_create_files_table.py
alanjimenez1/qualibrate-api
d005e35029303ac9dfd8e66cb09c79393a472cad
[ "MIT" ]
null
null
null
from orator.migrations import Migration class CreateFilesTable(Migration): def up(self): """ Run the migrations. """ with self.schema.create('files') as table: table.increments('id') table.string('uuid') table.string('name') table.st...
24.4
65
0.52459
from orator.migrations import Migration class CreateFilesTable(Migration): def up(self): with self.schema.create('files') as table: table.increments('id') table.string('uuid') table.string('name') table.string('path') table.string('mime') ...
true
true
1c3de0a8162572462a5485b734fecb83efc1c1c9
116
py
Python
run_dev.py
LandRegistry/property-frontend-alpha
bde928c802a7efd8a0e18c041341e54d4cc89bc1
[ "MIT" ]
null
null
null
run_dev.py
LandRegistry/property-frontend-alpha
bde928c802a7efd8a0e18c041341e54d4cc89bc1
[ "MIT" ]
null
null
null
run_dev.py
LandRegistry/property-frontend-alpha
bde928c802a7efd8a0e18c041341e54d4cc89bc1
[ "MIT" ]
1
2021-04-11T06:06:39.000Z
2021-04-11T06:06:39.000Z
from propertyfrontend.server import app import os app.run(host="0.0.0.0", port=int(os.environ['PORT']), debug=True)
29
65
0.741379
from propertyfrontend.server import app import os app.run(host="0.0.0.0", port=int(os.environ['PORT']), debug=True)
true
true
1c3de1efb89c939886af9238d6fd6108b6c5dfac
576
py
Python
Dynamic Programming/063. Unique Paths II.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
138
2020-02-08T05:25:26.000Z
2021-11-04T11:59:28.000Z
Dynamic Programming/063. Unique Paths II.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
null
null
null
Dynamic Programming/063. Unique Paths II.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
24
2021-01-02T07:18:43.000Z
2022-03-20T08:17:54.000Z
""" 63. Unique Paths II """ class Solution: def uniquePathsWithObstacles(self, obstacleGrid): if len(obstacleGrid) == 0 or obstacleGrid[0][0] == 1: return 0 n, m = len(obstacleGrid), len(obstacleGrid[0]) if obstacleGrid[n-1][m-1] == 1 : return 0 table = [0]*m ...
36
134
0.519097
class Solution: def uniquePathsWithObstacles(self, obstacleGrid): if len(obstacleGrid) == 0 or obstacleGrid[0][0] == 1: return 0 n, m = len(obstacleGrid), len(obstacleGrid[0]) if obstacleGrid[n-1][m-1] == 1 : return 0 table = [0]*m for i, x in enumerate(...
true
true
1c3de458a4aac0b5d0c70b86684f49d6c6db58f9
308
py
Python
vmraid/patches/v5_0/clear_website_group_and_notifications.py
sowrisurya/vmraid
f833e00978019dad87af80b41279c0146c063ed5
[ "MIT" ]
null
null
null
vmraid/patches/v5_0/clear_website_group_and_notifications.py
sowrisurya/vmraid
f833e00978019dad87af80b41279c0146c063ed5
[ "MIT" ]
null
null
null
vmraid/patches/v5_0/clear_website_group_and_notifications.py
sowrisurya/vmraid
f833e00978019dad87af80b41279c0146c063ed5
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import vmraid def execute(): vmraid.delete_doc("DocType", "Post") vmraid.delete_doc("DocType", "Website Group") vmraid.delete_doc("DocType", "Website Route Permission") vmraid.delete_doc("DocType", "User Vote") vmraid.delete_doc("DocType", "Notification Count")
30.8
57
0.766234
from __future__ import unicode_literals import vmraid def execute(): vmraid.delete_doc("DocType", "Post") vmraid.delete_doc("DocType", "Website Group") vmraid.delete_doc("DocType", "Website Route Permission") vmraid.delete_doc("DocType", "User Vote") vmraid.delete_doc("DocType", "Notification Count")
true
true
1c3de626512a29b75c62d014fa702750d999e9a6
3,395
py
Python
rigetti_result_analysis.py
filipmazurek/Quantum-Workspace
e2df6cfafa8664cd5fba8786ccf6e0540a0584fd
[ "MIT" ]
null
null
null
rigetti_result_analysis.py
filipmazurek/Quantum-Workspace
e2df6cfafa8664cd5fba8786ccf6e0540a0584fd
[ "MIT" ]
null
null
null
rigetti_result_analysis.py
filipmazurek/Quantum-Workspace
e2df6cfafa8664cd5fba8786ccf6e0540a0584fd
[ "MIT" ]
null
null
null
""" Filip Mazurek - 9/1/2019 Utility to make analyzing results from pyquil easier """ from collections import Counter import numpy as np import matplotlib.pyplot as plt def convert_result(measurements): # TODO: please note the endian-ness and how that affects everything else. Right now least significant bit is ...
36.505376
120
0.676878
from collections import Counter import numpy as np import matplotlib.pyplot as plt def convert_result(measurements): num_qubits = len(measurements) num_trials = len(measurements[0]) results_per_trial = [[-1 for y in range(num_qubits)] for x in range(num_trials)] for i in range(len(measureme...
true
true
1c3de6a7f2c7ec0bf1595cc539b4d1a6ab81a114
7,430
py
Python
IPython/testing/globalipapp.py
ivanov/ipython
62cc379d3b454923cb48e94663f385f54ec806cc
[ "BSD-3-Clause-Clear" ]
2
2015-04-21T12:12:43.000Z
2015-04-21T12:12:54.000Z
IPython/testing/globalipapp.py
ivanov/ipython
62cc379d3b454923cb48e94663f385f54ec806cc
[ "BSD-3-Clause-Clear" ]
1
2015-07-16T22:26:53.000Z
2015-07-16T22:26:53.000Z
IPython/testing/globalipapp.py
ivanov/ipython
62cc379d3b454923cb48e94663f385f54ec806cc
[ "BSD-3-Clause-Clear" ]
null
null
null
"""Global IPython app to support test running. We must start our own ipython object and heavily muck with it so that all the modifications IPython makes to system behavior don't send the doctest machinery into a fit. This code should be considered a gross hack, but it gets the job done. """ from __future__ import abs...
37.908163
79
0.637954
from __future__ import absolute_import from __future__ import print_function import __builtin__ import os import sys from types import MethodType from . import tools from IPython.frontend.terminal.interactiveshell import TerminalInteractiveShell # test globals. Once we move over to a clean magic system, this wi...
true
true
1c3de74bd608376894fa6007ef978539a4ad6235
1,632
py
Python
apps/zmq-app-template/setup.py
mattreduce/threatbus
95b1d13e87fbcd1b442458ba13349c4817d5990b
[ "BSD-3-Clause" ]
null
null
null
apps/zmq-app-template/setup.py
mattreduce/threatbus
95b1d13e87fbcd1b442458ba13349c4817d5990b
[ "BSD-3-Clause" ]
null
null
null
apps/zmq-app-template/setup.py
mattreduce/threatbus
95b1d13e87fbcd1b442458ba13349c4817d5990b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( author="Tenzir", author_email="engineering@tenzir.com", classifiers=[ # https://pypi.org/classifiers/ "Development Status :: 3 - Alpha", ...
30.222222
82
0.601103
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( author="Tenzir", author_email="engineering@tenzir.com", classifiers=[ "Development Status :: 3 - Alpha", "License :: OSI Approved :: BSD License", "Operating System :: M...
true
true
1c3de93ba96df4fa632533d25ab7b90e5bd16d6d
348
py
Python
Hackerrank_python/16.XML/97.XML 1 - Find the Score.py
manish1822510059/Hackerrank
7c6e4553f033f067e04dc6c756ef90cb43f3c4a8
[ "MIT" ]
39
2020-09-27T05:32:05.000Z
2022-01-08T18:04:05.000Z
Hackerrank_python/16.XML/97.XML 1 - Find the Score.py
manish1822510059/Hackerrank
7c6e4553f033f067e04dc6c756ef90cb43f3c4a8
[ "MIT" ]
5
2020-10-02T13:33:00.000Z
2021-03-01T14:06:08.000Z
Hackerrank_python/16.XML/97.XML 1 - Find the Score.py
manish1822510059/Hackerrank
7c6e4553f033f067e04dc6c756ef90cb43f3c4a8
[ "MIT" ]
6
2020-10-03T04:04:55.000Z
2021-10-18T04:07:53.000Z
import sys import xml.etree.ElementTree as etree def get_attr_number(node): # your code goes here return etree.tostring(node).count(b'=') if __name__ == '__main__': sys.stdin.readline() xml = sys.stdin.read() tree = etree.ElementTree(etree.fromstring(xml)) root = tree.getroot() p...
21.75
51
0.672414
import sys import xml.etree.ElementTree as etree def get_attr_number(node): return etree.tostring(node).count(b'=') if __name__ == '__main__': sys.stdin.readline() xml = sys.stdin.read() tree = etree.ElementTree(etree.fromstring(xml)) root = tree.getroot() print(get_attr_number(r...
true
true
1c3deb66177764b3d0e21e645719a7444b4a50cc
2,345
py
Python
files/strategies/cohort-1/level-2/riley_strategy_level_2.py
eurisko-us/eurisko-us.github.io
74d9d426bc7a965574fbbf76d6528d47b4286fa0
[ "MIT" ]
null
null
null
files/strategies/cohort-1/level-2/riley_strategy_level_2.py
eurisko-us/eurisko-us.github.io
74d9d426bc7a965574fbbf76d6528d47b4286fa0
[ "MIT" ]
null
null
null
files/strategies/cohort-1/level-2/riley_strategy_level_2.py
eurisko-us/eurisko-us.github.io
74d9d426bc7a965574fbbf76d6528d47b4286fa0
[ "MIT" ]
1
2020-08-19T17:27:44.000Z
2020-08-19T17:27:44.000Z
class RileyStrategyLevel2: def __init__(self, player_num): self.player_num = player_num def decide_ship_movement(self, unit_index, hidden_game_state): myself = hidden_game_state['players'][self.player_num] opponent_index = 1 - self.player_num opponent = hidden_game_state['play...
36.076923
80
0.604264
class RileyStrategyLevel2: def __init__(self, player_num): self.player_num = player_num def decide_ship_movement(self, unit_index, hidden_game_state): myself = hidden_game_state['players'][self.player_num] opponent_index = 1 - self.player_num opponent = hidden_game_state['play...
true
true
1c3dec0f609efe04d70c61e6046774ecc554680d
4,845
py
Python
pyflocker/ciphers/backends/cryptodome_/asymmetric.py
fossabot/pyflocker
293df31e32fb796df5c7fba803846c9872e67485
[ "MIT" ]
null
null
null
pyflocker/ciphers/backends/cryptodome_/asymmetric.py
fossabot/pyflocker
293df31e32fb796df5c7fba803846c9872e67485
[ "MIT" ]
null
null
null
pyflocker/ciphers/backends/cryptodome_/asymmetric.py
fossabot/pyflocker
293df31e32fb796df5c7fba803846c9872e67485
[ "MIT" ]
null
null
null
from __future__ import annotations from types import MappingProxyType from typing import TYPE_CHECKING from Cryptodome.Cipher import PKCS1_OAEP from Cryptodome.Signature import DSS, pss from .. import asymmetric if TYPE_CHECKING: # pragma: no cover from ... import base def get_OAEP(key, padding: base.BaseAsy...
24.974227
79
0.615686
from __future__ import annotations from types import MappingProxyType from typing import TYPE_CHECKING from Cryptodome.Cipher import PKCS1_OAEP from Cryptodome.Signature import DSS, pss from .. import asymmetric if TYPE_CHECKING: from ... import base def get_OAEP(key, padding: base.BaseAsymmetricPadding): ...
true
true
1c3dee6f69920e802052e38cde5bafb4a5698576
575
py
Python
app/cadastros/helpers.py
Leodma/sisAre
2d41528bdb457b5e6ca77d29df4d67b0a661d179
[ "bzip2-1.0.6" ]
null
null
null
app/cadastros/helpers.py
Leodma/sisAre
2d41528bdb457b5e6ca77d29df4d67b0a661d179
[ "bzip2-1.0.6" ]
null
null
null
app/cadastros/helpers.py
Leodma/sisAre
2d41528bdb457b5e6ca77d29df4d67b0a661d179
[ "bzip2-1.0.6" ]
null
null
null
def tira_paragrafo(texto): return texto.replace('\r\n',';') def cria_lista(texto): return texto.strip().replace('\r\n',';').split(';') def lista_para_texto(lista): texto = ';'.join(lista) return texto def cria_lista_db(texto): return texto.strip().split(';') def cria_texto_formulario(texto)...
20.535714
55
0.615652
def tira_paragrafo(texto): return texto.replace('\r\n',';') def cria_lista(texto): return texto.strip().replace('\r\n',';').split(';') def lista_para_texto(lista): texto = ';'.join(lista) return texto def cria_lista_db(texto): return texto.strip().split(';') def cria_texto_formulario(texto)...
true
true
1c3dee89e4e7a075047b3b7211c4bba5e5b0daf7
1,176
py
Python
var/spack/repos/builtin/packages/flit/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11
2015-10-04T02:17:46.000Z
2018-02-07T18:23:00.000Z
var/spack/repos/builtin/packages/flit/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
22
2017-08-01T22:45:10.000Z
2022-03-10T07:46:31.000Z
var/spack/repos/builtin/packages/flit/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
4
2016-06-10T17:57:39.000Z
2018-09-11T04:59:38.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Flit(MakefilePackage): """Floating-point Litmus Tests (FLiT) is a C++ test infrastructure...
33.6
95
0.669218
from spack import * class Flit(MakefilePackage): homepage = "https://pruners.github.io/flit" url = "https://github.com/PRUNERS/FLiT/archive/v2.1.0.tar.gz" git = "https://github.com/PRUNERS/FLiT.git" tags = ['e4s'] version('develop', branch='devel') version('2.1.0', sha256='b31ff...
true
true
1c3deec1aa2d40b6d2cb3e0da544725b1e510827
2,221
py
Python
prepare/prepare_3D_RS_dense_NN_rgb_3.py
KelvinTao/pointSIFT_Age2
b0684ee989b5f6f3dca25e9bbf15b3c5fd8cf1cf
[ "Apache-2.0" ]
null
null
null
prepare/prepare_3D_RS_dense_NN_rgb_3.py
KelvinTao/pointSIFT_Age2
b0684ee989b5f6f3dca25e9bbf15b3c5fd8cf1cf
[ "Apache-2.0" ]
null
null
null
prepare/prepare_3D_RS_dense_NN_rgb_3.py
KelvinTao/pointSIFT_Age2
b0684ee989b5f6f3dca25e9bbf15b3c5fd8cf1cf
[ "Apache-2.0" ]
null
null
null
import numpy as np import glob # train data ## collect points def mkdata(NUM_CLASS,ids,ageNN): #ids=np.loadtxt(filePath,dtype=str,skiprows=1,delimiter=',',usecols=0) points_set=[] rgb_set=[] for i,idi in enumerate(ids): points_set.append(np.loadtxt(path+'/points/21000_xyzrgb/'+idi+'.xyz.txt',de...
34.169231
139
0.703737
import numpy as np import glob def mkdata(NUM_CLASS,ids,ageNN): points_set=[] rgb_set=[] for i,idi in enumerate(ids): points_set.append(np.loadtxt(path+'/points/21000_xyzrgb/'+idi+'.xyz.txt',delimiter=' ')) rgb_set.append(np.loadtxt(path+'/points/21000_xyzrgb/'+idi+'.rgb.txt',delimiter=...
true
true
1c3defd2101b508f1a5eb460f42e097d74389927
1,217
py
Python
invites/forms.py
phildini/bockus
004508166f5b1a7c3c4d8accf32578a80379b385
[ "MIT" ]
3
2015-07-15T05:29:17.000Z
2021-06-23T21:50:25.000Z
invites/forms.py
phildini/bockus
004508166f5b1a7c3c4d8accf32578a80379b385
[ "MIT" ]
4
2020-02-11T22:15:04.000Z
2021-06-10T17:41:51.000Z
invites/forms.py
phildini/bockus
004508166f5b1a7c3c4d8accf32578a80379b385
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth.models import User from django.utils.crypto import get_random_string from .models import Invitation class InvitationForm(forms.ModelForm): class Meta: model = Invitation fields = ['email'] def clean(self): try: existing_u...
26.456522
74
0.644207
from django import forms from django.contrib.auth.models import User from django.utils.crypto import get_random_string from .models import Invitation class InvitationForm(forms.ModelForm): class Meta: model = Invitation fields = ['email'] def clean(self): try: existing_u...
true
true
1c3df03a42ca51c25dbdef75ed38729db3871c67
1,630
py
Python
tests/test_sklearn_label_encoder_converter.py
vumichien/hummingbird
8981e11ce2536167c329a5d9d20e81125a792fe4
[ "MIT" ]
2,772
2020-05-04T21:03:40.000Z
2022-03-30T11:00:03.000Z
tests/test_sklearn_label_encoder_converter.py
vumichien/hummingbird
8981e11ce2536167c329a5d9d20e81125a792fe4
[ "MIT" ]
486
2020-05-05T00:45:44.000Z
2022-03-15T01:02:31.000Z
tests/test_sklearn_label_encoder_converter.py
vumichien/hummingbird
8981e11ce2536167c329a5d9d20e81125a792fe4
[ "MIT" ]
232
2019-11-02T22:06:38.000Z
2022-03-25T07:36:17.000Z
""" Tests sklearn LabelEncoder converter """ import unittest import numpy as np import torch from sklearn.preprocessing import LabelEncoder import hummingbird.ml from onnxconverter_common.data_types import Int32TensorType class TestSklearnLabelEncoderConverter(unittest.TestCase): def test_model_label_encoder(sel...
28.103448
110
0.639264
import unittest import numpy as np import torch from sklearn.preprocessing import LabelEncoder import hummingbird.ml from onnxconverter_common.data_types import Int32TensorType class TestSklearnLabelEncoderConverter(unittest.TestCase): def test_model_label_encoder(self): model = LabelEncoder() da...
true
true
1c3df251962b43184bf8b5caa1dd0219ced3dfc3
86
py
Python
VOPP_web/VOPP_web/setup.py
kingeta/VOPP
2d1b80cf9be9f035cb9bda7f0b8f82fbda9bf226
[ "MIT" ]
4
2020-10-24T18:37:06.000Z
2020-10-25T19:48:17.000Z
VOPP_web/VOPP_web/setup.py
kingeta/VOPP
2d1b80cf9be9f035cb9bda7f0b8f82fbda9bf226
[ "MIT" ]
null
null
null
VOPP_web/VOPP_web/setup.py
kingeta/VOPP
2d1b80cf9be9f035cb9bda7f0b8f82fbda9bf226
[ "MIT" ]
null
null
null
#import subprocess #import pymongo #client = pymongo.MongoClient() #db = client.notes
17.2
31
0.767442
true
true
1c3df49e4607ba924b05a533daf763f35573c581
9,506
py
Python
src/bin/sintact.py
ohmono/analizador-lexico
7179a123987ad497c008dfc295482759eb238e5f
[ "MIT" ]
null
null
null
src/bin/sintact.py
ohmono/analizador-lexico
7179a123987ad497c008dfc295482759eb238e5f
[ "MIT" ]
null
null
null
src/bin/sintact.py
ohmono/analizador-lexico
7179a123987ad497c008dfc295482759eb238e5f
[ "MIT" ]
null
null
null
class grammar(): terminals = { "ELSE": "ELSE", "IF": "IF", "BOOL": "T", "INT": "T", "FLOAT": "T", "STRING": "T", "IDENTIFY": "V", "CHARCONST": "V", "FLOATCONST": "D", "INTCONST": "D", "PLUS": "O", "MINUS": "O", ...
40.623932
95
0.411004
class grammar(): terminals = { "ELSE": "ELSE", "IF": "IF", "BOOL": "T", "INT": "T", "FLOAT": "T", "STRING": "T", "IDENTIFY": "V", "CHARCONST": "V", "FLOATCONST": "D", "INTCONST": "D", "PLUS": "O", "MINUS": "O", ...
true
true
1c3df651ee2881b7471116529c801f4e1e132326
1,304
py
Python
tests/test_graph.py
SkamDart/codegrapher
b5191efcfadb933e846ae1d9e3136c07c4da6a8f
[ "MIT" ]
11
2015-01-07T02:54:31.000Z
2019-04-16T21:43:02.000Z
tests/test_graph.py
SkamDart/codegrapher
b5191efcfadb933e846ae1d9e3136c07c4da6a8f
[ "MIT" ]
2
2019-02-08T20:28:35.000Z
2020-12-15T05:29:16.000Z
tests/test_graph.py
SkamDart/codegrapher
b5191efcfadb933e846ae1d9e3136c07c4da6a8f
[ "MIT" ]
4
2015-01-06T07:39:05.000Z
2019-02-08T20:25:49.000Z
import os from click.testing import CliRunner from cli.script import cli def get_graph_code(): return ''' from copy import deepcopy as dc class StringCopier(object): def __init__(self): self.copied_strings = set() def copy(self): string1 = 'this' string2 = dc(string1) s...
26.08
92
0.633436
import os from click.testing import CliRunner from cli.script import cli def get_graph_code(): return ''' from copy import deepcopy as dc class StringCopier(object): def __init__(self): self.copied_strings = set() def copy(self): string1 = 'this' string2 = dc(string1) s...
true
true
1c3df7222086a65563b75ff7f70519dd7c3720fe
360
py
Python
setup.py
shlnz/poe_tempest_iteminfo
60acc4beec3e1856e738ccf2d26c918e91c863cc
[ "MIT" ]
null
null
null
setup.py
shlnz/poe_tempest_iteminfo
60acc4beec3e1856e738ccf2d26c918e91c863cc
[ "MIT" ]
1
2015-08-07T16:23:38.000Z
2015-08-07T16:23:38.000Z
setup.py
shlnz/poe_tempest_iteminfo
60acc4beec3e1856e738ccf2d26c918e91c863cc
[ "MIT" ]
null
null
null
from distutils.core import setup import py2exe setup( name="POE Tempests", author="Jens Thom", version="0.2.1", options={'py2exe': {'bundle_files': 1, 'compressed': True}}, zipfile=None, console=[{"script": "poe_tempest.py", "icon_resources": [(1, "icon.ico")], "dest...
25.714286
64
0.563889
from distutils.core import setup import py2exe setup( name="POE Tempests", author="Jens Thom", version="0.2.1", options={'py2exe': {'bundle_files': 1, 'compressed': True}}, zipfile=None, console=[{"script": "poe_tempest.py", "icon_resources": [(1, "icon.ico")], "dest...
true
true
1c3df7d38b0ca5eef734240429ccf4f6a7a6e064
11,117
py
Python
experiments/train_IRCR_spread.py
baicenxiao/Shaping-Advice
a5de626792dc691f301ae6c5c4384931318c0aba
[ "MIT" ]
null
null
null
experiments/train_IRCR_spread.py
baicenxiao/Shaping-Advice
a5de626792dc691f301ae6c5c4384931318c0aba
[ "MIT" ]
null
null
null
experiments/train_IRCR_spread.py
baicenxiao/Shaping-Advice
a5de626792dc691f301ae6c5c4384931318c0aba
[ "MIT" ]
null
null
null
import argparse import numpy as np import tensorflow as tf import time import pickle import os import maddpg.common.tf_util as U from maddpg.trainer.maddpg import MADDPGAgentTrainer import tensorflow.contrib.layers as layers def parse_args(): parser = argparse.ArgumentParser("Reinforcement Learning experiments fo...
49.190265
157
0.602321
import argparse import numpy as np import tensorflow as tf import time import pickle import os import maddpg.common.tf_util as U from maddpg.trainer.maddpg import MADDPGAgentTrainer import tensorflow.contrib.layers as layers def parse_args(): parser = argparse.ArgumentParser("Reinforcement Learning experiments fo...
true
true
1c3df8f0bc4a6c6784aa88020c984a8f205a872b
3,632
py
Python
app/scripts/management/commands/notify_pairwise.py
Sirius-social/TMTM
5b4d426e358fc9fd6cff7ec84861c0388d3785ce
[ "Apache-2.0" ]
null
null
null
app/scripts/management/commands/notify_pairwise.py
Sirius-social/TMTM
5b4d426e358fc9fd6cff7ec84861c0388d3785ce
[ "Apache-2.0" ]
null
null
null
app/scripts/management/commands/notify_pairwise.py
Sirius-social/TMTM
5b4d426e358fc9fd6cff7ec84861c0388d3785ce
[ "Apache-2.0" ]
null
null
null
import asyncio import logging from typing import List import sirius_sdk from sirius_sdk.agent.wallet import NYMRole from django.conf import settings from channels.db import database_sync_to_async from django.core.management.base import BaseCommand from ui.models import PairwiseRecord from wrapper.models import Ledger...
37.061224
115
0.591685
import asyncio import logging from typing import List import sirius_sdk from sirius_sdk.agent.wallet import NYMRole from django.conf import settings from channels.db import database_sync_to_async from django.core.management.base import BaseCommand from ui.models import PairwiseRecord from wrapper.models import Ledger...
true
true
1c3df9651bbbf8ab9a666c63c99033113a2e4ee7
14,917
py
Python
deepxde/model.py
ziyi-yang/deepxde
61af63c3eeb6ea625670b2886be1bf51fa1df554
[ "Apache-2.0" ]
null
null
null
deepxde/model.py
ziyi-yang/deepxde
61af63c3eeb6ea625670b2886be1bf51fa1df554
[ "Apache-2.0" ]
null
null
null
deepxde/model.py
ziyi-yang/deepxde
61af63c3eeb6ea625670b2886be1bf51fa1df554
[ "Apache-2.0" ]
1
2021-04-06T07:16:23.000Z
2021-04-06T07:16:23.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from . import display from . import losses as losses_module from . import metrics as metrics_module from . import train as train_module from .backend import tf from .callbacks import Callbac...
36.923267
165
0.609104
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from . import display from . import losses as losses_module from . import metrics as metrics_module from . import train as train_module from .backend import tf from .callbacks import Callbac...
true
true
1c3df9e5cb7a2ba8fc0b5c99848d68ddb59a0111
3,095
py
Python
pypureclient/flasharray/FA_2_5/models/alert_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flasharray/FA_2_5/models/alert_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flasharray/FA_2_5/models/alert_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.5 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ....
27.633929
105
0.53958
import pprint import re import six import typing from ....properties import Property if typing.TYPE_CHECKING: from pypureclient.flasharray.FA_2_5 import models class AlertResponse(object): swagger_types = { 'items': 'list[Alert]' } attribute_map = { 'items': 'items' } req...
true
true
1c3dfc60d521dd6aa652983f8187c2ac98919135
4,860
py
Python
allennlp/data/dataset_readers/coreference_resolution/preco.py
apmoore1/allennlp
bdb29a831ed68cb948b18b42fa61646b9ec11bf8
[ "Apache-2.0" ]
null
null
null
allennlp/data/dataset_readers/coreference_resolution/preco.py
apmoore1/allennlp
bdb29a831ed68cb948b18b42fa61646b9ec11bf8
[ "Apache-2.0" ]
null
null
null
allennlp/data/dataset_readers/coreference_resolution/preco.py
apmoore1/allennlp
bdb29a831ed68cb948b18b42fa61646b9ec11bf8
[ "Apache-2.0" ]
1
2020-02-19T11:34:32.000Z
2020-02-19T11:34:32.000Z
import json import logging from typing import Dict, List, Optional, Tuple from overrides import overrides from allennlp.common.file_utils import cached_path from allennlp.data.dataset_readers.coreference_resolution.util import make_coref_instance from allennlp.data.dataset_readers.dataset_reader import DatasetReader ...
45
106
0.69177
import json import logging from typing import Dict, List, Optional, Tuple from overrides import overrides from allennlp.common.file_utils import cached_path from allennlp.data.dataset_readers.coreference_resolution.util import make_coref_instance from allennlp.data.dataset_readers.dataset_reader import DatasetReader ...
true
true
1c3dfc8ade0f758b624c2912f8e557641f3525bb
883
py
Python
schemas/users.py
iliadmitriev/auth-fapi
a219efd5a8daa9d5f876355cde6b974021ca7890
[ "MIT" ]
null
null
null
schemas/users.py
iliadmitriev/auth-fapi
a219efd5a8daa9d5f876355cde6b974021ca7890
[ "MIT" ]
131
2021-09-29T06:07:18.000Z
2022-03-31T08:29:30.000Z
schemas/users.py
iliadmitriev/auth-fapi
a219efd5a8daa9d5f876355cde6b974021ca7890
[ "MIT" ]
null
null
null
from typing import Optional from datetime import datetime from pydantic import BaseModel, EmailStr # base shared properties class UserBase(BaseModel): email: Optional[EmailStr] = None is_active: Optional[bool] = True is_superuser: bool = False confirmed: bool = False # user create query class UserC...
19.195652
41
0.698754
from typing import Optional from datetime import datetime from pydantic import BaseModel, EmailStr class UserBase(BaseModel): email: Optional[EmailStr] = None is_active: Optional[bool] = True is_superuser: bool = False confirmed: bool = False class UserCreate(UserBase): email: EmailStr pass...
true
true
1c3dfcce6e7c7c8b0e519b4019603b5e00de96af
77
py
Python
problemtools/_version.py
mzuenni/problemtools
6e147959f237c3637f77103c2fa642096f862ae4
[ "MIT" ]
84
2015-03-25T19:13:38.000Z
2022-03-20T18:19:01.000Z
problemtools/_version.py
mzuenni/problemtools
6e147959f237c3637f77103c2fa642096f862ae4
[ "MIT" ]
151
2015-03-29T18:28:28.000Z
2021-12-10T21:35:04.000Z
problemtools/_version.py
mzuenni/problemtools
6e147959f237c3637f77103c2fa642096f862ae4
[ "MIT" ]
60
2015-01-20T21:50:46.000Z
2022-03-27T10:00:07.000Z
# Auto-generated from git changelog, do not edit! __version__ = '1.20210928'
25.666667
49
0.753247
__version__ = '1.20210928'
true
true
1c3dfd5ff463099a6195658c5168eb89b1302e89
387
py
Python
horas/wsgi.py
fabianabarca/horas
526c065803f1487a39644eb54f65b7b4f3a036ee
[ "MIT" ]
null
null
null
horas/wsgi.py
fabianabarca/horas
526c065803f1487a39644eb54f65b7b4f3a036ee
[ "MIT" ]
2
2022-03-14T17:29:15.000Z
2022-03-14T17:46:17.000Z
horas/wsgi.py
fabianabarca/horas
526c065803f1487a39644eb54f65b7b4f3a036ee
[ "MIT" ]
null
null
null
""" WSGI config for horas project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTING...
22.764706
78
0.782946
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'horas.settings') application = get_wsgi_application()
true
true
1c3dffbc46c058f6a60aeb5cb2b10a350cef6bc9
3,627
py
Python
homeassistant/generated/config_flows.py
chboland/homassistant-core
1df6eb124789213f7175a513729c4272e46736bd
[ "Apache-2.0" ]
null
null
null
homeassistant/generated/config_flows.py
chboland/homassistant-core
1df6eb124789213f7175a513729c4272e46736bd
[ "Apache-2.0" ]
1
2022-03-17T15:09:09.000Z
2022-03-17T15:09:09.000Z
homeassistant/generated/config_flows.py
chboland/homassistant-core
1df6eb124789213f7175a513729c4272e46736bd
[ "Apache-2.0" ]
null
null
null
"""Automatically generated by hassfest. To update, run python3 -m script.hassfest """ # fmt: off FLOWS = [ "abode", "accuweather", "acmeda", "adguard", "advantage_air", "agent_dvr", "airly", "airvisual", "alarmdecoder", "almond", "ambiclimate", "ambient_station", "...
15.566524
41
0.498484
FLOWS = [ "abode", "accuweather", "acmeda", "adguard", "advantage_air", "agent_dvr", "airly", "airvisual", "alarmdecoder", "almond", "ambiclimate", "ambient_station", "arcam_fmj", "atag", "august", "avri", "awair", "axis", "azure_devops", ...
true
true
1c3e000d20f4633684abe2743e374d7c75e798ce
1,668
py
Python
lib/naf.py
KelvinKan/CP-Flow
d01303cb4ebeb5a0bbfca638ffaf5b7a8ec22fb1
[ "MIT" ]
64
2021-02-22T21:24:39.000Z
2022-03-25T20:30:39.000Z
lib/naf.py
KelvinKan/CP-Flow
d01303cb4ebeb5a0bbfca638ffaf5b7a8ec22fb1
[ "MIT" ]
null
null
null
lib/naf.py
KelvinKan/CP-Flow
d01303cb4ebeb5a0bbfca638ffaf5b7a8ec22fb1
[ "MIT" ]
9
2021-02-24T15:12:40.000Z
2022-03-05T06:14:17.000Z
# noinspection PyPep8Naming from torch.nn import functional as F from lib.functional import * def sigmoid_flow(x, logdet=0, ndim=4, params=None, delta=DELTA, logit_end=True): """ element-wise sigmoidal flow described in `Neural Autoregressive Flows` (https://arxiv.org/pdf/1804.00779.pdf) :param x: input ...
39.714286
113
0.660671
from torch.nn import functional as F from lib.functional import * def sigmoid_flow(x, logdet=0, ndim=4, params=None, delta=DELTA, logit_end=True): assert params is not None, 'parameters not provided' assert params.size(2) == ndim*3, 'params shape[2] does not match ndim * 3' a = act_a(params[:, :, 0 * ndi...
true
true
1c3e0022c9597e37f4aceb94b28551f921fce1b4
2,048
py
Python
feather/constants.py
oluwaseunladeinde/yellowfeather
134783fdd90d6f4118eae1d1dad029a245773106
[ "MIT" ]
null
null
null
feather/constants.py
oluwaseunladeinde/yellowfeather
134783fdd90d6f4118eae1d1dad029a245773106
[ "MIT" ]
null
null
null
feather/constants.py
oluwaseunladeinde/yellowfeather
134783fdd90d6f4118eae1d1dad029a245773106
[ "MIT" ]
null
null
null
from django.utils.translation import ugettext_lazy as _ TYPES = ( ('house', _('Houses')), ('villa', _('Villas')), ('penthouse', _('Penthouses')), ('apartment', _('Apartments')), ('residencial-land', _('Residential Land')), ('corporate-office', _('Corporate Offices')), ('commercial-office', ...
31.030303
120
0.514648
from django.utils.translation import ugettext_lazy as _ TYPES = ( ('house', _('Houses')), ('villa', _('Villas')), ('penthouse', _('Penthouses')), ('apartment', _('Apartments')), ('residencial-land', _('Residential Land')), ('corporate-office', _('Corporate Offices')), ('commercial-office', ...
true
true
1c3e00789415d4f86dc0f0402e28330ecb03abe5
677
py
Python
Tree/SumofLeftLeaves.py
PK-100/Competitive_Programming
d0863feaaa99462b2999e85dcf115f7a6c08bb8d
[ "MIT" ]
70
2018-06-25T21:20:15.000Z
2022-03-24T03:55:17.000Z
Tree/Sum-of-Left-Leaves.py
An3sha/Competitive_Programming
ee7eadf51939a360d0b004d787ebabda583e92f0
[ "MIT" ]
4
2018-09-04T13:12:20.000Z
2021-06-20T08:29:12.000Z
Tree/Sum-of-Left-Leaves.py
An3sha/Competitive_Programming
ee7eadf51939a360d0b004d787ebabda583e92f0
[ "MIT" ]
24
2018-12-26T05:15:32.000Z
2022-01-23T23:04:54.000Z
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def sumOfLeftLeaves(self, root: TreeNode) -> int: result = 0 if root: if root.le...
39.823529
111
0.602659
class Solution: def sumOfLeftLeaves(self, root: TreeNode) -> int: result = 0 if root: if root.left and not root.left.left and not root.left.right: result += root.left.val else: result += self.sumOfLeftLeaves(root.left) result += sel...
true
true
1c3e011942f345472ff9a4ff308d85d8c4906208
13,815
py
Python
epistasis/pyplot/coefs.py
harmsm/epistasis
741b25b3e28015aeeba8d4efc94af1e1d811cd63
[ "Unlicense" ]
null
null
null
epistasis/pyplot/coefs.py
harmsm/epistasis
741b25b3e28015aeeba8d4efc94af1e1d811cd63
[ "Unlicense" ]
null
null
null
epistasis/pyplot/coefs.py
harmsm/epistasis
741b25b3e28015aeeba8d4efc94af1e1d811cd63
[ "Unlicense" ]
2
2020-04-02T00:58:24.000Z
2021-11-16T13:30:30.000Z
__description__ = \ """ Plot barplot with epistatic coefficients. """ __author__ = "Zach Sailer" import gpmap import matplotlib.pyplot as plt from matplotlib.path import Path import matplotlib.patches as patches import matplotlib as mpl import numpy as np from scipy.stats import norm as scipy_norm class Bunch: ...
31.541096
79
0.552081
__description__ = \ """ Plot barplot with epistatic coefficients. """ __author__ = "Zach Sailer" import gpmap import matplotlib.pyplot as plt from matplotlib.path import Path import matplotlib.patches as patches import matplotlib as mpl import numpy as np from scipy.stats import norm as scipy_norm class Bunch: ...
true
true
1c3e02269e6e2d82f9b5467c72c8bd2643a182c4
3,781
py
Python
pex/tools/commands/digraph.py
alexey-tereshenkov-oxb/pex
2e2d1e50e604fdee48b0d51aea482ca255521ff0
[ "Apache-2.0" ]
null
null
null
pex/tools/commands/digraph.py
alexey-tereshenkov-oxb/pex
2e2d1e50e604fdee48b0d51aea482ca255521ff0
[ "Apache-2.0" ]
null
null
null
pex/tools/commands/digraph.py
alexey-tereshenkov-oxb/pex
2e2d1e50e604fdee48b0d51aea482ca255521ff0
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import from pex.typing import TYPE_CHECKING if TYPE_CHECKING: from typing import IO, Dict, List, Mapping, Optional, Tuple Value = Optional[str] ...
32.316239
99
0.56493
from __future__ import absolute_import from pex.typing import TYPE_CHECKING if TYPE_CHECKING: from typing import IO, Dict, List, Mapping, Optional, Tuple Value = Optional[str] Attributes = Mapping[str, Value] class DiGraph(object): @staticmethod def _render_ID(value): ...
true
true
1c3e0255111886053eae804e26db41e82e52d72c
1,047
py
Python
.github/workflows/dev/codemeta2citation.py
jurysek/lstmcpipe-1
978143b60ef7d9851d91626666ca65113764c4d9
[ "MIT" ]
null
null
null
.github/workflows/dev/codemeta2citation.py
jurysek/lstmcpipe-1
978143b60ef7d9851d91626666ca65113764c4d9
[ "MIT" ]
null
null
null
.github/workflows/dev/codemeta2citation.py
jurysek/lstmcpipe-1
978143b60ef7d9851d91626666ca65113764c4d9
[ "MIT" ]
null
null
null
from pathlib import Path from ruamel.yaml import YAML import json def codemeta2citation(codemeta_path='codemeta.json', citation_path='CITATION.cff'): codemeta = json.load(open(codemeta_path)) citation = {'title': codemeta['name'], 'type': 'software', 'authors': [], ...
33.774194
127
0.601719
from pathlib import Path from ruamel.yaml import YAML import json def codemeta2citation(codemeta_path='codemeta.json', citation_path='CITATION.cff'): codemeta = json.load(open(codemeta_path)) citation = {'title': codemeta['name'], 'type': 'software', 'authors': [], ...
true
true
1c3e0257c6ac580b52b8817dfc6134af8071cfa3
5,287
py
Python
pulsar-client-cpp/python/pulsar/schema/definition.py
ganeshs/pulsar
4f43bdad798a74970489be450338078bc4684d72
[ "Apache-2.0" ]
null
null
null
pulsar-client-cpp/python/pulsar/schema/definition.py
ganeshs/pulsar
4f43bdad798a74970489be450338078bc4684d72
[ "Apache-2.0" ]
null
null
null
pulsar-client-cpp/python/pulsar/schema/definition.py
ganeshs/pulsar
4f43bdad798a74970489be450338078bc4684d72
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
25.541063
90
0.603367
from abc import abstractmethod, ABCMeta from enum import Enum, EnumMeta from collections import OrderedDict from six import with_metaclass def _check_record_or_field(x): if (type(x) is type and not issubclass(x, Record)) \ and not isinstance(x, Field): raise Exception('Argument ' + x + ' is n...
true
true
1c3e02814e38959fa7456f32b8249967ebd21bab
127
py
Python
src/battery.py
MITEVT/soc-modeling
8827c6b7c019ded63f1c12dfd4e599f95af11441
[ "MIT" ]
1
2019-02-04T14:32:18.000Z
2019-02-04T14:32:18.000Z
src/battery.py
MITEVT/soc-modeling
8827c6b7c019ded63f1c12dfd4e599f95af11441
[ "MIT" ]
null
null
null
src/battery.py
MITEVT/soc-modeling
8827c6b7c019ded63f1c12dfd4e599f95af11441
[ "MIT" ]
null
null
null
class Battery(object): def __init__(self, capacity_ah): self.capacity_ah = capacity_ah self.available_ah = capacity_ah
15.875
33
0.76378
class Battery(object): def __init__(self, capacity_ah): self.capacity_ah = capacity_ah self.available_ah = capacity_ah
true
true
1c3e02a05a300cac523962bae33502cc594c7744
238
py
Python
mmdet/models/backbones/__init__.py
greathope/NDL-image-detection-3rd-solution
0cb13e38be0a00d7ab4ceed60dac40d60a56a4dd
[ "MIT" ]
2
2020-03-21T06:47:32.000Z
2021-11-12T07:50:21.000Z
mmdet/models/backbones/__init__.py
greathope/NDL-image-detection-3rd-solution
0cb13e38be0a00d7ab4ceed60dac40d60a56a4dd
[ "MIT" ]
4
2021-03-19T11:32:25.000Z
2022-03-12T00:19:27.000Z
mmdet/models/backbones/__init__.py
greathope/NDL-image-detection-3rd-solution
0cb13e38be0a00d7ab4ceed60dac40d60a56a4dd
[ "MIT" ]
1
2020-03-25T02:29:36.000Z
2020-03-25T02:29:36.000Z
from .hrnet import HRNet from .resnet import ResNet, make_res_layer from .resnext import ResNeXt from .ssd_vgg import SSDVGG from .seresnet import SeResNet __all__ = ['ResNet', 'make_res_layer', 'ResNeXt', 'SSDVGG', 'HRNet', 'SeResNet']
29.75
80
0.764706
from .hrnet import HRNet from .resnet import ResNet, make_res_layer from .resnext import ResNeXt from .ssd_vgg import SSDVGG from .seresnet import SeResNet __all__ = ['ResNet', 'make_res_layer', 'ResNeXt', 'SSDVGG', 'HRNet', 'SeResNet']
true
true
1c3e02bccffcb2afb3f53a11942cc753b7afffb8
2,638
py
Python
tools/sosreport/tower.py
mhurron/awx
97a7eeb3c86ec4bc4b6303533207150cb1dbac9d
[ "Apache-2.0" ]
1
2019-01-30T20:38:53.000Z
2019-01-30T20:38:53.000Z
tools/sosreport/tower.py
mhurron/awx
97a7eeb3c86ec4bc4b6303533207150cb1dbac9d
[ "Apache-2.0" ]
2
2020-06-18T15:00:24.000Z
2022-03-02T04:00:36.000Z
tools/sosreport/tower.py
mhurron/awx
97a7eeb3c86ec4bc4b6303533207150cb1dbac9d
[ "Apache-2.0" ]
5
2020-12-14T20:43:58.000Z
2022-03-24T16:30:54.000Z
# Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. import sos from distutils.version import LooseVersion SOSREPORT_TOWER_COMMANDS = [ "ansible --version", # ansible core version "awx-manage --version", # tower version "awx-manage list_instances", # tower cluster configuration "awx-manage r...
30.321839
105
0.636846
import sos from distutils.version import LooseVersion SOSREPORT_TOWER_COMMANDS = [ "ansible --version", "awx-manage --version", "awx-manage list_instances", "awx-manage run_dispatcher --status", "supervisorctl status", "rabbitmqctl status", "rabbitmqctl cluster_status", "/var/li...
true
true
1c3e04c42e464fd07858dbd7a510a64ff6926daf
280
py
Python
src/django_dag_admin/formset.py
bva-icx/django-dag-admin
ab8e2df2ae93b3afff81e0cb70bd87f9d60644ee
[ "Apache-2.0" ]
null
null
null
src/django_dag_admin/formset.py
bva-icx/django-dag-admin
ab8e2df2ae93b3afff81e0cb70bd87f9d60644ee
[ "Apache-2.0" ]
null
null
null
src/django_dag_admin/formset.py
bva-icx/django-dag-admin
ab8e2df2ae93b3afff81e0cb70bd87f9d60644ee
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from django.forms.models import BaseInlineFormSet class DjangoDagAdminFormSet(BaseInlineFormSet): def get_form_kwargs(self, index): kwargs = super().get_form_kwargs(index) kwargs['parent_object'] = self.instance return kwargs
28
49
0.707143
from django.forms.models import BaseInlineFormSet class DjangoDagAdminFormSet(BaseInlineFormSet): def get_form_kwargs(self, index): kwargs = super().get_form_kwargs(index) kwargs['parent_object'] = self.instance return kwargs
true
true
1c3e05d2179e991c8fd1730a01795aa8e342575a
2,283
py
Python
cdips/lcproc/period_find_for_cluster.py
lgbouma/cdips
187e15e620cd44160372dbfa9da989d38722c3e5
[ "MIT" ]
1
2019-10-04T02:03:25.000Z
2019-10-04T02:03:25.000Z
cdips/lcproc/period_find_for_cluster.py
lgbouma/cdips
187e15e620cd44160372dbfa9da989d38722c3e5
[ "MIT" ]
3
2019-08-17T20:33:23.000Z
2021-08-18T17:55:10.000Z
cdips/lcproc/period_find_for_cluster.py
lgbouma/cdips
187e15e620cd44160372dbfa9da989d38722c3e5
[ "MIT" ]
null
null
null
""" after get_lightcurves_for_cluster_stars, you can run some period-finding routines """ import numpy as np, pandas as pd from astropy.io import fits from glob import glob import os from astrobase import periodbase, checkplot def do_period_finding_fitslc(lcpath, fluxap='TFA2', period_min=0.5, outdir=None): if n...
33.086957
81
0.549277
import numpy as np, pandas as pd from astropy.io import fits from glob import glob import os from astrobase import periodbase, checkplot def do_period_finding_fitslc(lcpath, fluxap='TFA2', period_min=0.5, outdir=None): if not outdir: outdir = os.path.dirname(lcpath) outfile = os.path.basename(lcpath)...
true
true
1c3e06d700fd8d978fa4cb832a94077e2ac73f9e
184
py
Python
fog/cli/reporting/__init__.py
Yomguithereal/fog
0b2defd7c413b55766c4368e17e1238dfc3c8b81
[ "MIT" ]
17
2018-04-26T15:37:45.000Z
2021-05-18T05:58:10.000Z
fog/cli/reporting/__init__.py
Yomguithereal/fog
0b2defd7c413b55766c4368e17e1238dfc3c8b81
[ "MIT" ]
29
2018-04-27T14:54:20.000Z
2021-05-27T15:30:14.000Z
fog/cli/reporting/__init__.py
Yomguithereal/fog
0b2defd7c413b55766c4368e17e1238dfc3c8b81
[ "MIT" ]
1
2019-11-27T18:14:49.000Z
2019-11-27T18:14:49.000Z
from fog.cli.reporting.html import print_html_report from fog.cli.reporting.toml import print_toml_report RENDERERS = { 'html': print_html_report, 'toml': print_toml_report }
23
52
0.777174
from fog.cli.reporting.html import print_html_report from fog.cli.reporting.toml import print_toml_report RENDERERS = { 'html': print_html_report, 'toml': print_toml_report }
true
true
1c3e06f946e218c016a2141becd3929738d428e9
15,736
py
Python
python/plot3d/face.py
nasa/Plot3D_utilities
f71d612ff1c6969059cc199b4b84c2d85fdf0a87
[ "MIT" ]
11
2021-08-12T06:40:43.000Z
2022-03-15T08:31:49.000Z
python/plot3d/face.py
nasa/Plot3D_utilities
f71d612ff1c6969059cc199b4b84c2d85fdf0a87
[ "MIT" ]
9
2021-09-30T05:39:25.000Z
2022-02-01T18:14:15.000Z
python/plot3d/face.py
nasa/Plot3D_utilities
f71d612ff1c6969059cc199b4b84c2d85fdf0a87
[ "MIT" ]
7
2021-08-11T18:54:02.000Z
2021-12-15T15:53:12.000Z
import itertools from typing import Dict, List, Tuple import numpy as np from numpy.lib import math from .block import Block class Face: """Defines a Face of a block for example IMIN,JMIN,JMIN to IMAX,JMIN,JMIN """ def __init__(self,nvertex:int=4): """ Defines a face using nvertex 4 = quad 3 = tria...
35.203579
151
0.540036
import itertools from typing import Dict, List, Tuple import numpy as np from numpy.lib import math from .block import Block class Face: def __init__(self,nvertex:int=4): self.x = np.zeros(4) self.y = np.zeros(4) self.z = np.zeros(4) self.I = np.zeros(4,dtype=np.int64) ...
true
true
1c3e0768350d6a99e4f2e5e7c9299a051bd00318
1,234
py
Python
piquipe/__init__.py
conn/python-piquipe
9a8046473af2ec4c6b9eaf1df875af10f910a364
[ "BSD-3-Clause" ]
null
null
null
piquipe/__init__.py
conn/python-piquipe
9a8046473af2ec4c6b9eaf1df875af10f910a364
[ "BSD-3-Clause" ]
null
null
null
piquipe/__init__.py
conn/python-piquipe
9a8046473af2ec4c6b9eaf1df875af10f910a364
[ "BSD-3-Clause" ]
null
null
null
import os import threading import queue VERSION = '0.0.0' def _forward_stream_to_queue(stream, queue_): for line in iter(stream.readline, b''): queue_.put(line) def _forward_queue_to_stream(queue_, stream): for line in iter(queue_.get, b''): stream.write(line) def _forward_p2q(read_fd, qu...
24.68
88
0.725284
import os import threading import queue VERSION = '0.0.0' def _forward_stream_to_queue(stream, queue_): for line in iter(stream.readline, b''): queue_.put(line) def _forward_queue_to_stream(queue_, stream): for line in iter(queue_.get, b''): stream.write(line) def _forward_p2q(read_fd, qu...
true
true
1c3e0827f9792364d112de37b17170787e658b1d
160
py
Python
opendata_parser/parser/tokyo_covid19_patients_parser.py
sandfishfactory/opendata_parser
fc382978f62fe08c4c571827a233082d87e5d552
[ "MIT" ]
null
null
null
opendata_parser/parser/tokyo_covid19_patients_parser.py
sandfishfactory/opendata_parser
fc382978f62fe08c4c571827a233082d87e5d552
[ "MIT" ]
null
null
null
opendata_parser/parser/tokyo_covid19_patients_parser.py
sandfishfactory/opendata_parser
fc382978f62fe08c4c571827a233082d87e5d552
[ "MIT" ]
null
null
null
from parser.base_parser import BaseParser class TokyoCovid19PatientsParser(BaseParser): def parse(self): print("echo TokyoCovid19PatientsParser")
22.857143
48
0.78125
from parser.base_parser import BaseParser class TokyoCovid19PatientsParser(BaseParser): def parse(self): print("echo TokyoCovid19PatientsParser")
true
true
1c3e091a255af12b065fb8335e7ec92451820295
2,794
py
Python
Image-Analysis/main.py
prashanth-acsq/Azure-Cognitive-Services
69fc4317561c2b7fc469945d7e6c175c539d6e16
[ "MIT" ]
1
2022-03-21T10:29:17.000Z
2022-03-21T10:29:17.000Z
Image-Analysis/main.py
prashanth-acsq/Azure-Cognitive-Services
69fc4317561c2b7fc469945d7e6c175c539d6e16
[ "MIT" ]
null
null
null
Image-Analysis/main.py
prashanth-acsq/Azure-Cognitive-Services
69fc4317561c2b7fc469945d7e6c175c539d6e16
[ "MIT" ]
1
2022-03-13T10:27:30.000Z
2022-03-13T10:27:30.000Z
""" Only Describing done in this script """ import os import sys import time from azure.cognitiveservices.vision.computervision import ComputerVisionClient from azure.cognitiveservices.vision.computervision.models import OperationStatusCodes from azure.cognitiveservices.vision.computervision.models import VisualF...
36.285714
156
0.705082
import os import sys import time from azure.cognitiveservices.vision.computervision import ComputerVisionClient from azure.cognitiveservices.vision.computervision.models import OperationStatusCodes from azure.cognitiveservices.vision.computervision.models import VisualFeatureTypes from msrest.authentication import Co...
true
true
1c3e0925cbef89bed35f6999c5f306e7ff61d067
22,630
py
Python
pyrs/proto/core_pb2.py
drbob/pyrs
9adc07ff3bda6c382e73c47cb61c5be2000715ba
[ "BSD-3-Clause" ]
3
2016-10-08T10:41:25.000Z
2021-11-30T00:12:28.000Z
pyrs/proto/core_pb2.py
drbob/pyrs
9adc07ff3bda6c382e73c47cb61c5be2000715ba
[ "BSD-3-Clause" ]
1
2016-02-07T21:19:33.000Z
2016-02-07T21:27:29.000Z
pyrs/proto/core_pb2.py
drbob/pyrs
9adc07ff3bda6c382e73c47cb61c5be2000715ba
[ "BSD-3-Clause" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='core.proto', p...
33.575668
2,514
0.715422
from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 DESCRIPTOR = descriptor.FileDescriptor( name='core.proto', package='rsctrl.core', serialized_pb='\n\ncore.proto\x12\x0brsctrl.core\"\xb0\x01\n\x06Status\...
true
true
1c3e09b70eb2285e5866f9dbf407ea948980790e
29,195
py
Python
kivy/uix/tabbedpanel.py
Galland/kivy
95a6bf279883d706f645e4629c16d5ee1038f0ec
[ "MIT" ]
6
2020-04-10T14:36:25.000Z
2021-04-25T13:11:32.000Z
kivy/uix/tabbedpanel.py
Galland/kivy
95a6bf279883d706f645e4629c16d5ee1038f0ec
[ "MIT" ]
6
2020-01-31T18:04:48.000Z
2021-06-05T10:53:55.000Z
kivy/uix/tabbedpanel.py
Galland/kivy
95a6bf279883d706f645e4629c16d5ee1038f0ec
[ "MIT" ]
1
2021-04-08T19:51:07.000Z
2021-04-08T19:51:07.000Z
''' TabbedPanel =========== .. image:: images/tabbed_panel.jpg :align: right .. versionadded:: 1.3.0 The `TabbedPanel` widget manages different widgets in tabs, with a header area for the actual tab buttons and a content area for showing the current tab content. The :class:`TabbedPanel` provides one default ta...
34.306698
79
0.623703
__all__ = ('StripLayout', 'TabbedPanel', 'TabbedPanelContent', 'TabbedPanelHeader', 'TabbedPanelItem', 'TabbedPanelStrip', 'TabbedPanelException') from functools import partial from kivy.clock import Clock from kivy.compat import string_types from kivy.factory import Factory from kivy.uix.toggle...
true
true
1c3e0b2b666c83d76275ef9410b970cce34e2b9b
28,588
py
Python
packages/python/yap_kernel/yap_ipython/lib/pretty.py
ryandesign/yap
9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214
[ "Artistic-1.0-Perl", "ClArtistic" ]
90
2015-03-09T01:24:15.000Z
2022-02-24T13:56:25.000Z
packages/python/yap_kernel/yap_ipython/lib/pretty.py
ryandesign/yap
9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214
[ "Artistic-1.0-Perl", "ClArtistic" ]
52
2016-02-14T08:59:37.000Z
2022-03-14T16:39:35.000Z
packages/python/yap_kernel/yap_ipython/lib/pretty.py
ryandesign/yap
9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214
[ "Artistic-1.0-Perl", "ClArtistic" ]
27
2015-11-19T02:45:49.000Z
2021-11-25T19:47:58.000Z
# -*- coding: utf-8 -*- """ Python advanced pretty printer. This pretty printer is intended to replace the old `pprint` python module which does not allow developers to provide their own pretty print callbacks. This module is based on ruby's `prettyprint.rb` library by `Tanaka Akira`. Example Usage ------------- T...
32.784404
107
0.592661
from contextlib import contextmanager import datetime import os import re import sys import types from collections import deque from io import StringIO from warnings import warn from yap_ipython.utils.decorators import undoc from yap_ipython.utils.py3compat import PYPY from yap_ipython.utils.signatures import signatu...
true
true
1c3e0c62fd5d4fd2b2c4c22ae84670c0a04b08a8
4,115
py
Python
UI/CommandTypeEdit.py
mjbogusz/BTSerial
141d37caaab860ba420c9584a2844c63bce401e3
[ "MIT" ]
null
null
null
UI/CommandTypeEdit.py
mjbogusz/BTSerial
141d37caaab860ba420c9584a2844c63bce401e3
[ "MIT" ]
null
null
null
UI/CommandTypeEdit.py
mjbogusz/BTSerial
141d37caaab860ba420c9584a2844c63bce401e3
[ "MIT" ]
null
null
null
from PyQt5.QtWidgets import QDialog, QInputDialog from Commands.CommandType import CommandType from Layouts.CommandTypeEditWidget import Ui_BTSerialCommandTypeEditDialog class CommandTypeEdit(QDialog): textType = True def __init__(self, parent = None, name = None, code = None, description = None, textType = True): ...
34.291667
138
0.730012
from PyQt5.QtWidgets import QDialog, QInputDialog from Commands.CommandType import CommandType from Layouts.CommandTypeEditWidget import Ui_BTSerialCommandTypeEditDialog class CommandTypeEdit(QDialog): textType = True def __init__(self, parent = None, name = None, code = None, description = None, textType = True): ...
true
true
1c3e0c75f4c827241f9bc863cb01c17d1d23dd11
1,271
py
Python
test/test_user_interface.py
t-keazirian/tic-tac-toe
df557aaa6f01e3bfaf68dea96f9994bc3815067b
[ "MIT" ]
null
null
null
test/test_user_interface.py
t-keazirian/tic-tac-toe
df557aaa6f01e3bfaf68dea96f9994bc3815067b
[ "MIT" ]
5
2022-03-18T19:07:56.000Z
2022-03-25T17:00:50.000Z
test/test_user_interface.py
t-keazirian/tic-tac-toe
df557aaa6f01e3bfaf68dea96f9994bc3815067b
[ "MIT" ]
null
null
null
import unittest from unittest.mock import patch from src.user_interface import UserInterface class TestUserInterface(unittest.TestCase): @patch("builtins.print") def test_display_message_prints_welcome_message_passed_in(self, mock_print): user_interface = UserInterface() message = "Welcome to...
38.515152
85
0.685287
import unittest from unittest.mock import patch from src.user_interface import UserInterface class TestUserInterface(unittest.TestCase): @patch("builtins.print") def test_display_message_prints_welcome_message_passed_in(self, mock_print): user_interface = UserInterface() message = "Welcome to...
true
true
1c3e0c870e78906f9031bc7fd02077d893973103
208
py
Python
arcade/sprite_list/__init__.py
Mr-Coxall/arcade
7767e9c7d7395c0dd35479744052f18ac8c86679
[ "MIT" ]
null
null
null
arcade/sprite_list/__init__.py
Mr-Coxall/arcade
7767e9c7d7395c0dd35479744052f18ac8c86679
[ "MIT" ]
null
null
null
arcade/sprite_list/__init__.py
Mr-Coxall/arcade
7767e9c7d7395c0dd35479744052f18ac8c86679
[ "MIT" ]
null
null
null
from .sprite_list import SpriteList from .spatial_hash import ( get_closest_sprite, check_for_collision, check_for_collision_with_list, get_sprites_at_point, get_sprites_at_exact_point, )
23.111111
35
0.793269
from .sprite_list import SpriteList from .spatial_hash import ( get_closest_sprite, check_for_collision, check_for_collision_with_list, get_sprites_at_point, get_sprites_at_exact_point, )
true
true
1c3e1011b841b916457c3c5d7830debe6c5af1cb
2,060
py
Python
setup.py
SynetoNet/graphite-api
97f48ba73f4e08296e6eb6edb357e4a83d229066
[ "Apache-2.0" ]
null
null
null
setup.py
SynetoNet/graphite-api
97f48ba73f4e08296e6eb6edb357e4a83d229066
[ "Apache-2.0" ]
null
null
null
setup.py
SynetoNet/graphite-api
97f48ba73f4e08296e6eb6edb357e4a83d229066
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import sys from setuptools import setup, find_packages install_requires = [ 'Flask', 'PyYAML', 'cairocffi', 'pyparsing', 'pytz', 'six', 'structlog', 'tzlocal', ] if sys.version_info < (2, 7): install_requires.append('importlib') install_requires.append('logutil...
30.294118
66
0.61068
import sys from setuptools import setup, find_packages install_requires = [ 'Flask', 'PyYAML', 'cairocffi', 'pyparsing', 'pytz', 'six', 'structlog', 'tzlocal', ] if sys.version_info < (2, 7): install_requires.append('importlib') install_requires.append('logutils') install_...
true
true
1c3e103d8d9475f8cb7885293553b2416f9c9bf0
6,097
py
Python
Lib/site-packages/PIL/SgiImagePlugin.py
F4Ruke/FF14FishingBot
53f73b9db8a95b2b718a36a9746471046c45117d
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/site-packages/PIL/SgiImagePlugin.py
F4Ruke/FF14FishingBot
53f73b9db8a95b2b718a36a9746471046c45117d
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/site-packages/PIL/SgiImagePlugin.py
F4Ruke/FF14FishingBot
53f73b9db8a95b2b718a36a9746471046c45117d
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
# # The Python Imaging Library. # $Id$ # # SGI image file handling # # See "The SGI Image File Format (Draft version 0.97)", Paul Haeberli. # <ftp://ftp.sgi.com/graphics/SGIIMAGESPEC> # # # History: # 2017-22-07 mb Add RLE decompression # 2016-16-10 mb Add save method without compression # 1995-09-10 fl Created #...
26.393939
87
0.567656
import os import struct from . import Image, ImageFile from ._binary import i16be as i16 from ._binary import o8 def _accept(prefix): return len(prefix) >= 2 and i16(prefix) == 474 MODES = { (1, 1, 1): "L", (1, 2, 1): "L", (2, 1, 1): "L;16B", (2, 2, 1): "L;16B", (1, 3, 3): "RGB", (2, ...
true
true
1c3e1095736ca8d72a8d9945a79daf052743ef96
4,760
py
Python
tests/test_validation.py
Pascal-Bliem/tox-block-api
31bde9a018a6efdd7c887bfd5ef5f04f0a14fd8f
[ "MIT" ]
null
null
null
tests/test_validation.py
Pascal-Bliem/tox-block-api
31bde9a018a6efdd7c887bfd5ef5f04f0a14fd8f
[ "MIT" ]
null
null
null
tests/test_validation.py
Pascal-Bliem/tox-block-api
31bde9a018a6efdd7c887bfd5ef5f04f0a14fd8f
[ "MIT" ]
null
null
null
import json def test_validate_multiple_inputs(flask_test_client): # setup no_list = 123 list_with_empty_string = ["a","","b"] list_with_no_string = ["a",1,"b"] empty_list = [] valid_list_of_strings = ["Hi","I'm","Pascal"] # action res_no_list = flask_test_client.post("/v1/make_pr...
45.769231
123
0.668908
import json def test_validate_multiple_inputs(flask_test_client): no_list = 123 list_with_empty_string = ["a","","b"] list_with_no_string = ["a",1,"b"] empty_list = [] valid_list_of_strings = ["Hi","I'm","Pascal"] # action res_no_list = flask_test_client.post("/v1/make_prediction...
true
true
1c3e119050a4066467abd713ce404ac251447abd
3,734
py
Python
unit_tests/shared_functions_unittests.py
NOAA-OWP/inundation-mapping
1820af99d91cede1de1b618fb5bca77bdd3e4b42
[ "Info-ZIP" ]
2
2022-02-11T21:34:47.000Z
2022-02-11T21:34:49.000Z
unit_tests/shared_functions_unittests.py
NOAA-OWP/inundation-mapping
1820af99d91cede1de1b618fb5bca77bdd3e4b42
[ "Info-ZIP" ]
35
2022-02-04T15:36:57.000Z
2022-03-30T21:13:11.000Z
unit_tests/shared_functions_unittests.py
NOAA-OWP/inundation-mapping
1820af99d91cede1de1b618fb5bca77bdd3e4b42
[ "Info-ZIP" ]
4
2022-02-11T21:46:49.000Z
2022-03-24T08:42:56.000Z
#!/usr/bin/env python3 import inspect import os import sys import argparse import json import warnings import unittest import unit_tests_utils as helpers # importing python folders in other directories sys.path.append('/foss_fim/src/utils') import shared_functions as src # NOTE: This goes directly to the function...
31.91453
112
0.616229
import inspect import os import sys import argparse import json import warnings import unittest import unit_tests_utils as helpers sys.path.append('/foss_fim/src/utils') import shared_functions as src class test_shared_functions(unittest.TestCase): @classmethod def setUpClass(self): warnings.sim...
true
true
1c3e12b5ec7e97e8a36c17cdf57ad8beb2b7828d
558
py
Python
problems/problem39.py
nolanwrightdev/blind-75-python
b92ef3449eb0143c760ddd339897a3f0a2972830
[ "MIT" ]
6
2020-02-01T23:29:51.000Z
2022-02-20T20:46:56.000Z
problems/problem39.py
nolanwrightdev/blind-75-python
b92ef3449eb0143c760ddd339897a3f0a2972830
[ "MIT" ]
null
null
null
problems/problem39.py
nolanwrightdev/blind-75-python
b92ef3449eb0143c760ddd339897a3f0a2972830
[ "MIT" ]
null
null
null
''' Blind Curated 75 - Problem 39 ============================= Find Minimum in Rotated Sorted Array ------------ Find the minimum element of an array sorted in ascending order but subsequently rotated at some unknown pivot. [→ LeetCode][1] [1]: https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/ ''...
19.241379
79
0.625448
def solution(nums): left, right = 0, len(nums) - 1 while left < right: mid = (left + right) // 2 if nums[mid] > nums[right]: left = mid + 1 else: right = mid return nums[left]
true
true
1c3e131d6b733d9550a9bf60e9bd68c91290d5f5
2,555
py
Python
fix-requirements.py
geekinutah/docker-openstack-keystone-mitaka
1b2ef17d916bd83bce36bd22a74dab9a2d1bef08
[ "MIT" ]
null
null
null
fix-requirements.py
geekinutah/docker-openstack-keystone-mitaka
1b2ef17d916bd83bce36bd22a74dab9a2d1bef08
[ "MIT" ]
null
null
null
fix-requirements.py
geekinutah/docker-openstack-keystone-mitaka
1b2ef17d916bd83bce36bd22a74dab9a2d1bef08
[ "MIT" ]
null
null
null
#!/usr/bin/env python import re import argparse import sys from os import unlink from shutil import copyfile def get_vers(lines=[]): version_map = {} #lines look like this: alabaster (0.7.6) r = re.compile('^(.+)\ \((.+)\)') for l in lines: m = r.match(l) version_map[m.group(1)] = m.group(2) re...
32.75641
79
0.642661
import re import argparse import sys from os import unlink from shutil import copyfile def get_vers(lines=[]): version_map = {} r = re.compile('^(.+)\ \((.+)\)') for l in lines: m = r.match(l) version_map[m.group(1)] = m.group(2) return version_map def fix_reqs(requirements, version_map, die_...
true
true
1c3e1651db307de81ae66cc41cae8fbdf44bba86
13,906
py
Python
tsdf/tsdf.py
changgyhub/semantic-tsdf
4767d92a768af577f75ab05229c9fc87dda9681e
[ "BSD-2-Clause" ]
9
2020-05-07T14:50:20.000Z
2021-12-03T16:20:34.000Z
tsdf/tsdf.py
irsisyphus/semantic-tsdf
4767d92a768af577f75ab05229c9fc87dda9681e
[ "BSD-2-Clause" ]
1
2020-11-16T02:10:30.000Z
2020-11-17T06:40:03.000Z
tsdf/tsdf.py
irsisyphus/semantic-tsdf
4767d92a768af577f75ab05229c9fc87dda9681e
[ "BSD-2-Clause" ]
1
2020-11-15T18:30:02.000Z
2020-11-15T18:30:02.000Z
''' TSDF fusion. ''' import numpy as np from skimage import measure try: import pycuda.driver as cuda import pycuda.autoinit from pycuda.compiler import SourceModule TSDF_GPU_MODE = 1 except Exception as err: print('Warning: %s'%(str(err))) print('Failed to import PyCUDA. Running tsdf fusion in...
56.299595
186
0.577161
import numpy as np from skimage import measure try: import pycuda.driver as cuda import pycuda.autoinit from pycuda.compiler import SourceModule TSDF_GPU_MODE = 1 except Exception as err: print('Warning: %s'%(str(err))) print('Failed to import PyCUDA. Running tsdf fusion in CPU mode.') TSDF...
true
true
1c3e169c43cdac142a1f05ac316cda7f81e2b59b
2,997
py
Python
YoloV3 SIMS/utils/bbox.py
bostankhan6/Object-Detection-YoloV3-RetinaNet-FasterRCNN
81b79063f6ec5a76960018bdc1c37b17ce12dc67
[ "MIT" ]
4
2020-05-23T21:56:11.000Z
2021-12-06T10:54:43.000Z
YoloV3 SIMS/utils/bbox.py
bostankhan6/Object-Detection-YoloV3-RetinaNet-FasterRCNN
81b79063f6ec5a76960018bdc1c37b17ce12dc67
[ "MIT" ]
5
2020-09-26T01:05:55.000Z
2022-02-10T01:31:21.000Z
YoloV3 SIMS/utils/bbox.py
bostankhan6/Object-Detection-YoloV3-RetinaNet-FasterRCNN
81b79063f6ec5a76960018bdc1c37b17ce12dc67
[ "MIT" ]
1
2021-03-10T10:58:00.000Z
2021-03-10T10:58:00.000Z
import numpy as np import os import cv2 from .colors import get_color class BoundBox: def __init__(self, xmin, ymin, xmax, ymax, c = None, classes = None): self.xmin = xmin self.ymin = ymin self.xmax = xmax self.ymax = ymax self.c = c self...
33.674157
124
0.495162
import numpy as np import os import cv2 from .colors import get_color class BoundBox: def __init__(self, xmin, ymin, xmax, ymax, c = None, classes = None): self.xmin = xmin self.ymin = ymin self.xmax = xmax self.ymax = ymax self.c = c self...
true
true
1c3e1708ed91858e89b23f3225922ba20d396cb2
418
py
Python
ray_tracer/tests/test_lights.py
jjason/RayTracerChallenge
ab3cea8968407426bddfa9e11319664fc0b595f6
[ "MIT" ]
1
2020-05-13T03:54:00.000Z
2020-05-13T03:54:00.000Z
ray_tracer/tests/test_lights.py
jjason/RayTracerChallenge
ab3cea8968407426bddfa9e11319664fc0b595f6
[ "MIT" ]
null
null
null
ray_tracer/tests/test_lights.py
jjason/RayTracerChallenge
ab3cea8968407426bddfa9e11319664fc0b595f6
[ "MIT" ]
null
null
null
import unittest from color import Color from lights import PointLight from point import Point class TestPointLight(unittest.TestCase): def test_create(self): p = Point(x=0, y=0, z=0) i = Color(red=1, green=1, blue=1) l = PointLight(position=p, intensity=i) self.assertEqual(p, l.po...
22
47
0.662679
import unittest from color import Color from lights import PointLight from point import Point class TestPointLight(unittest.TestCase): def test_create(self): p = Point(x=0, y=0, z=0) i = Color(red=1, green=1, blue=1) l = PointLight(position=p, intensity=i) self.assertEqual(p, l.po...
true
true
1c3e17e0fd18466449bd191129c98cee3777bac0
184
py
Python
configs/fp16/pspnet_r101-d8_512x1024_80k_fp16_cityscapes.py
vietawake/mmSegmentation
1f643d6d81708ebf5726c48f66d02c70fe99fe00
[ "Apache-2.0" ]
null
null
null
configs/fp16/pspnet_r101-d8_512x1024_80k_fp16_cityscapes.py
vietawake/mmSegmentation
1f643d6d81708ebf5726c48f66d02c70fe99fe00
[ "Apache-2.0" ]
null
null
null
configs/fp16/pspnet_r101-d8_512x1024_80k_fp16_cityscapes.py
vietawake/mmSegmentation
1f643d6d81708ebf5726c48f66d02c70fe99fe00
[ "Apache-2.0" ]
null
null
null
_base_ = '../pspnet/pspnet_r101-d8_512x1024_80k_cityscapes.py' # fp16 settings optimizer_config = dict(type='Fp16OptimizerHook', loss_scale=512.) # fp16 placeholder fp16 = dict()
30.666667
67
0.76087
_base_ = '../pspnet/pspnet_r101-d8_512x1024_80k_cityscapes.py' optimizer_config = dict(type='Fp16OptimizerHook', loss_scale=512.) fp16 = dict()
true
true
1c3e1874abca09d7b3e122e2d6b52a8efec05ea1
97,128
py
Python
mitogen/parent.py
percygrunwald/mitogen
99c5cece3a69381cb02cf861d53045c8ea7e5369
[ "BSD-3-Clause" ]
4
2019-12-04T06:02:18.000Z
2019-12-18T05:38:44.000Z
mitogen/parent.py
percygrunwald/mitogen
99c5cece3a69381cb02cf861d53045c8ea7e5369
[ "BSD-3-Clause" ]
12
2020-05-13T18:56:22.000Z
2021-12-21T17:51:11.000Z
mitogen/parent.py
eamanu/python-mitogen
e93c7aae83b130abe1ef2dcf829d32e40f9fe8b1
[ "BSD-3-Clause" ]
6
2020-05-13T12:08:41.000Z
2021-03-31T21:40:57.000Z
# Copyright 2019, David Wilson # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2....
35.06426
83
0.625309
import codecs import errno import fcntl import getpass import heapq import inspect import logging import os import re import signal import socket import struct import subprocess import sys import termios import textwrap import threading import zlib select = __import__('select') try: import thread except Import...
true
true
1c3e1ac1ffbcaae6a149c06bab5c2378e1b7ba27
5,010
py
Python
bitflow-script/generated/python2/BitflowLexer.py
bitflow-stream/bitflow-script
b8427c02f65820108ca08356f9483e400fcbcaee
[ "Apache-2.0" ]
null
null
null
bitflow-script/generated/python2/BitflowLexer.py
bitflow-stream/bitflow-script
b8427c02f65820108ca08356f9483e400fcbcaee
[ "Apache-2.0" ]
null
null
null
bitflow-script/generated/python2/BitflowLexer.py
bitflow-stream/bitflow-script
b8427c02f65820108ca08356f9483e400fcbcaee
[ "Apache-2.0" ]
null
null
null
# Generated from Bitflow.g4 by ANTLR 4.7.1 # encoding: utf-8 from __future__ import print_function from antlr4 import * from io import StringIO import sys def serializedATN(): with StringIO() as buf: buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2") buf.write(u"\23|\b\1\4\2\t\2\4\...
46.388889
103
0.530539
from __future__ import print_function from antlr4 import * from io import StringIO import sys def serializedATN(): with StringIO() as buf: buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2") buf.write(u"\23|\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7") buf.write(u"\t\7\...
true
true
1c3e1b0e4c49dc316f529abeabc20b804d687524
3,823
py
Python
python/plugins/MetaSearch/plugin.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
null
null
null
python/plugins/MetaSearch/plugin.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
null
null
null
python/plugins/MetaSearch/plugin.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
1
2021-12-25T08:40:30.000Z
2021-12-25T08:40:30.000Z
from builtins import object # -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2010 NextGIS (http://nextgis.org), # Alexander Bruy (alexander.bruy@gmail.com), # Maxim Dubinin (sim@gis-lab.info), # # Copyright (C...
37.116505
92
0.610777
from builtins import object import logging from qgis.PyQt.QtCore import QCoreApplication from qgis.PyQt.QtWidgets import QAction from qgis.PyQt.QtGui import QIcon from qgis.core import QgsApplication from MetaSearch.dialogs.maindialog import MetaSearchDialog from MetaSearch.util import get_help_url, open_url, Static...
true
true
1c3e1b338819a66c4564a56099067a4c84d04ee3
1,520
py
Python
rpi/sensors/APCUPS.py
brettonw/rpi_sensor
adb13e9b5c508fb31297cde2bc4d2c9fb156ce35
[ "MIT" ]
null
null
null
rpi/sensors/APCUPS.py
brettonw/rpi_sensor
adb13e9b5c508fb31297cde2bc4d2c9fb156ce35
[ "MIT" ]
null
null
null
rpi/sensors/APCUPS.py
brettonw/rpi_sensor
adb13e9b5c508fb31297cde2bc4d2c9fb156ce35
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 import subprocess # helper to print each field we care about separator = "" def printKeyValuePair (key, value): global separator print ("{}\"{}\":{}".format (separator, key, value), end='') separator = "," # the key names we want to report with reportNames = { "LINEV" : "li...
33.043478
104
0.640789
import subprocess separator = "" def printKeyValuePair (key, value): global separator print ("{}\"{}\":{}".format (separator, key, value), end='') separator = "," reportNames = { "LINEV" : "line/ Volts", "LOADPCT" : "load/ Percent", "BCHARGE" : "battery/ Percent", "TIMELEFT" : "remai...
true
true
1c3e1b3965b8a20c4961feaf13b451c9a0104ae2
1,150
py
Python
arp.py
victorpegoraro/net_scan_finder
b775f45f711c767c8447b9536cbb6aeaae68aede
[ "MIT" ]
1
2020-05-02T21:11:26.000Z
2020-05-02T21:11:26.000Z
arp.py
victorpegoraro/net_scan_finder
b775f45f711c767c8447b9536cbb6aeaae68aede
[ "MIT" ]
null
null
null
arp.py
victorpegoraro/net_scan_finder
b775f45f711c767c8447b9536cbb6aeaae68aede
[ "MIT" ]
null
null
null
#!/usr/bin/env python import scapy.all as scapy import optparse def get_args(): parser = optparse.OptionParser() parser.add_option("-t", "--target", dest="ipaddr", help="Enter IP address or IP range EX: 192.168.0.1/24") options, args = parser.parse_args() if not options.ipaddr: ...
20.175439
111
0.58087
import scapy.all as scapy import optparse def get_args(): parser = optparse.OptionParser() parser.add_option("-t", "--target", dest="ipaddr", help="Enter IP address or IP range EX: 192.168.0.1/24") options, args = parser.parse_args() if not options.ipaddr: parser.error("[-] ...
true
true
1c3e1bfd1ad36aeccf38bcff09387002aaceb2d4
3,011
py
Python
ilpyt/nets/base_net.py
mitre/ilpyt
6aecbe414f0032514ffb4206200596b8c3860b58
[ "Apache-2.0" ]
6
2021-09-20T20:25:11.000Z
2022-01-05T16:04:04.000Z
ilpyt/nets/base_net.py
mitre/ilpyt
6aecbe414f0032514ffb4206200596b8c3860b58
[ "Apache-2.0" ]
null
null
null
ilpyt/nets/base_net.py
mitre/ilpyt
6aecbe414f0032514ffb4206200596b8c3860b58
[ "Apache-2.0" ]
null
null
null
""" `BaseNetwork` is the abstract class for a network. Networks parameterize important functions during learning - most often, the agent policy. To create a custom network, simply extend `BaseNetwork`. The `BaseNetwork` API requires you to override the `initialize`, `get_action`, and `forward` methods. - `initalize...
27.126126
80
0.608436
from abc import abstractmethod from typing import Any, Tuple import torch from torch.distributions import Distribution class BaseNetwork(torch.nn.Module): def __init__(self, **kwargs: Any) -> None: super(BaseNetwork, self).__init__() self.initialize(**kwargs) @abstractmethod def initial...
true
true
1c3e1c869cdf07b28cae0a81ca5128160b7caace
3,983
py
Python
appweb/website/auth.py
francescofranzese004/fitness_progetto
fc9d2816b397348a7337e307e489ec8132827a8e
[ "Apache-2.0" ]
null
null
null
appweb/website/auth.py
francescofranzese004/fitness_progetto
fc9d2816b397348a7337e307e489ec8132827a8e
[ "Apache-2.0" ]
null
null
null
appweb/website/auth.py
francescofranzese004/fitness_progetto
fc9d2816b397348a7337e307e489ec8132827a8e
[ "Apache-2.0" ]
null
null
null
from flask import Blueprint, render_template, request, flash, redirect, url_for from . import db from .models import User, Prenotazione from werkzeug.security import generate_password_hash, check_password_hash from flask_login import login_user, current_user from datetime import datetime #Il seguente file esegu...
51.727273
187
0.657796
from flask import Blueprint, render_template, request, flash, redirect, url_for from . import db from .models import User, Prenotazione from werkzeug.security import generate_password_hash, check_password_hash from flask_login import login_user, current_user from datetime import datetime auth = Blueprint('a...
true
true
1c3e1cc3b9ce9d896e34e0783065966ba48012ce
1,494
py
Python
controllers/pwm_dimmer.py
stas-demydiuk/domoticz-h801-tasmota-plugin
f982d1a7a9aaec88b24d6537af1198e870564d65
[ "MIT" ]
8
2018-05-26T00:00:02.000Z
2019-11-17T06:23:18.000Z
controllers/pwm_dimmer.py
stas-demydiuk/domoticz-h801-tasmota-plugin
f982d1a7a9aaec88b24d6537af1198e870564d65
[ "MIT" ]
4
2018-10-22T14:44:35.000Z
2021-05-05T17:31:46.000Z
controllers/pwm_dimmer.py
stas-demydiuk/domoticz-h801-tasmota-plugin
f982d1a7a9aaec88b24d6537af1198e870564d65
[ "MIT" ]
2
2018-12-27T19:54:27.000Z
2019-09-28T09:05:16.000Z
import Domoticz from devices_manager import DevicesManager class PwmDimmer: def __init__(self, devices_manager, mode): self.mode = mode self.devices_manager = devices_manager def checkDevices(self): for unit in range(1, 6): if not self.devices_manager.has_device(unit): ...
37.35
129
0.599063
import Domoticz from devices_manager import DevicesManager class PwmDimmer: def __init__(self, devices_manager, mode): self.mode = mode self.devices_manager = devices_manager def checkDevices(self): for unit in range(1, 6): if not self.devices_manager.has_device(unit): ...
true
true
1c3e1d15c02db0b45bd299c37ca123d2d5d9b146
839
py
Python
model_vision/src/test.py
diffunity/kpmg-corona-blue
93c063933981009af8d661b9b91dda5e2ebf68ab
[ "MIT" ]
3
2021-10-05T07:47:03.000Z
2021-10-05T10:32:40.000Z
model_vision/src/test.py
diffunity/kpmg-corona-blue
93c063933981009af8d661b9b91dda5e2ebf68ab
[ "MIT" ]
6
2021-02-07T14:56:57.000Z
2021-02-20T05:07:35.000Z
model_vision/src/test.py
diffunity/kpmg-corona-blue
93c063933981009af8d661b9b91dda5e2ebf68ab
[ "MIT" ]
1
2021-02-20T05:59:27.000Z
2021-02-20T05:59:27.000Z
import sys import yaml import unittest import numpy as np from model import model class Test(unittest.TestCase): def setUp(self): configs = yaml.load(open("./conf/config.yml").read(), Loader=yaml.Loader) self.test_configs = configs["unittest_settings"] self.model = model() def test_c...
26.21875
124
0.628129
import sys import yaml import unittest import numpy as np from model import model class Test(unittest.TestCase): def setUp(self): configs = yaml.load(open("./conf/config.yml").read(), Loader=yaml.Loader) self.test_configs = configs["unittest_settings"] self.model = model() def test_c...
true
true
1c3e1d3cb4937a0f1594aea801006e01a1c0cd0e
11,882
py
Python
gui/host_manager/remote_file_dialog.py
anglebinbin/Barista-tool
2d51507fb3566881923f0b273127f59d23ed317f
[ "MIT" ]
1
2020-02-11T19:05:17.000Z
2020-02-11T19:05:17.000Z
gui/host_manager/remote_file_dialog.py
anglebinbin/Barista-tool
2d51507fb3566881923f0b273127f59d23ed317f
[ "MIT" ]
null
null
null
gui/host_manager/remote_file_dialog.py
anglebinbin/Barista-tool
2d51507fb3566881923f0b273127f59d23ed317f
[ "MIT" ]
null
null
null
from os.path import normpath from PyQt5.QtCore import QAbstractTableModel, Qt, QModelIndex, pyqtSignal from PyQt5.QtGui import QColor, QIcon from PyQt5.QtWidgets import QDialog, QGridLayout, QTableView, QAbstractItemView, QComboBox, QPushButton, QLineEdit, \ QStyle, qApp, QFileIconProvider, QLabel from backend.net...
39.214521
117
0.602087
from os.path import normpath from PyQt5.QtCore import QAbstractTableModel, Qt, QModelIndex, pyqtSignal from PyQt5.QtGui import QColor, QIcon from PyQt5.QtWidgets import QDialog, QGridLayout, QTableView, QAbstractItemView, QComboBox, QPushButton, QLineEdit, \ QStyle, qApp, QFileIconProvider, QLabel from backend.net...
true
true
1c3e1d8084f6cdd2fd41504684374440dda47dc1
595
py
Python
Basics/Loops.py
spirulinax/PyHub
ae92c249224013f86c06b4d6cec3c6caa2e18c4d
[ "MIT" ]
1
2020-11-09T14:13:45.000Z
2020-11-09T14:13:45.000Z
Basics/Loops.py
spirulinax/PyHub
ae92c249224013f86c06b4d6cec3c6caa2e18c4d
[ "MIT" ]
null
null
null
Basics/Loops.py
spirulinax/PyHub
ae92c249224013f86c06b4d6cec3c6caa2e18c4d
[ "MIT" ]
null
null
null
# While Loops : i = 1 while i<11: print(i) i += 1 print() # For Loops : #Looping through lists: greetings = ["Hello","World","!!!"] for x in greetings: #Loops through elements of the list. print(x) print() #Looping through a string: for x in "hello": #Loops through characters in...
18.030303
68
0.571429
i = 1 while i<11: print(i) i += 1 print() greetings = ["Hello","World","!!!"] for x in greetings: print(x) print() for x in "hello": print(x) print() for x in range(6): print(x) print() for x in range(1, 6): print(x) print() for x in range(0, 20, 2): ...
true
true
1c3e1dd507d94b1adb0eb7905ef870b84330df89
4,943
py
Python
elephantblog/models.py
sbaechler/feincms-elephantblog
d3d1824d1781cfa0f81d6cf16577f8e540fc1441
[ "BSD-3-Clause" ]
null
null
null
elephantblog/models.py
sbaechler/feincms-elephantblog
d3d1824d1781cfa0f81d6cf16577f8e540fc1441
[ "BSD-3-Clause" ]
null
null
null
elephantblog/models.py
sbaechler/feincms-elephantblog
d3d1824d1781cfa0f81d6cf16577f8e540fc1441
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, unicode_literals from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.db.models import Q from django.template.defaultfilters import slugify from django.utils import timezone from django.utils.encoding import pytho...
32.097403
75
0.680963
from __future__ import absolute_import, unicode_literals from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.db.models import Q from django.template.defaultfilters import slugify from django.utils import timezone from django.utils.encoding import pytho...
true
true
1c3e1e8e68d04871f96f80f4048970726b75f266
2,202
py
Python
unified_mem_benchmark.py
tcapelle/tf-metal-experiments
d296ba2656dd352947ed8f6f80bdb349c1ab9617
[ "MIT" ]
96
2021-10-29T20:43:03.000Z
2022-03-30T06:37:04.000Z
unified_mem_benchmark.py
tcapelle/tf-metal-experiments
d296ba2656dd352947ed8f6f80bdb349c1ab9617
[ "MIT" ]
10
2021-11-01T20:40:29.000Z
2022-03-08T19:32:30.000Z
unified_mem_benchmark.py
tcapelle/tf-metal-experiments
d296ba2656dd352947ed8f6f80bdb349c1ab9617
[ "MIT" ]
10
2021-10-30T10:38:33.000Z
2022-02-01T16:51:04.000Z
import argparse parser = argparse.ArgumentParser() parser.add_argument("--iterations", default=30, type=int, help="Number of iterations to run within each benchmark") parser.add_argument("--device1", default="/CPU:0", type=str) parser.add_argument("--device2", default="/GPU:0", type=str) args = pars...
27.525
82
0.624432
import argparse parser = argparse.ArgumentParser() parser.add_argument("--iterations", default=30, type=int, help="Number of iterations to run within each benchmark") parser.add_argument("--device1", default="/CPU:0", type=str) parser.add_argument("--device2", default="/GPU:0", type=str) args = pars...
true
true
1c3e1ef481efd0b6d4af937e7c92fac238269f9d
409
py
Python
tob-api/api_v2/models/Name.py
andrewwhitehead/TheOrgBook
5a3dcd27cdcda0a3e19a68597a49997c68143ddc
[ "Apache-2.0" ]
null
null
null
tob-api/api_v2/models/Name.py
andrewwhitehead/TheOrgBook
5a3dcd27cdcda0a3e19a68597a49997c68143ddc
[ "Apache-2.0" ]
37
2019-03-12T20:10:57.000Z
2020-11-26T18:39:51.000Z
tob-api/api_v2/models/Name.py
andrewwhitehead/TheOrgBook
5a3dcd27cdcda0a3e19a68597a49997c68143ddc
[ "Apache-2.0" ]
5
2019-02-26T17:38:37.000Z
2020-11-26T14:48:03.000Z
from django.db import models from .Auditable import Auditable from .Credential import Credential class Name(Auditable): reindex_related = ['credential'] credential = models.ForeignKey(Credential, related_name="names", on_delete=models.CASCADE) text = models.TextField(null=True) language = models.Te...
22.722222
94
0.706601
from django.db import models from .Auditable import Auditable from .Credential import Credential class Name(Auditable): reindex_related = ['credential'] credential = models.ForeignKey(Credential, related_name="names", on_delete=models.CASCADE) text = models.TextField(null=True) language = models.Te...
true
true
1c3e1f3af038eae1a91fa09018acf8d869c54d78
98
py
Python
32.operacoes_com_tuplas/13.update.py
robinson-1985/python-zero-dnc
df510d67e453611fcd320df1397cdb9ca47fecb8
[ "MIT" ]
null
null
null
32.operacoes_com_tuplas/13.update.py
robinson-1985/python-zero-dnc
df510d67e453611fcd320df1397cdb9ca47fecb8
[ "MIT" ]
null
null
null
32.operacoes_com_tuplas/13.update.py
robinson-1985/python-zero-dnc
df510d67e453611fcd320df1397cdb9ca47fecb8
[ "MIT" ]
null
null
null
set_5={1,2,3,4,5} set_3={1,2,3,4,7,0,9} print(set_5) print(set_3) set_5.update(set_3) print(set_5)
16.333333
21
0.693878
set_5={1,2,3,4,5} set_3={1,2,3,4,7,0,9} print(set_5) print(set_3) set_5.update(set_3) print(set_5)
true
true
1c3e1f48043047ffba0468863f386bf3937fe9a6
4,984
py
Python
example_ticker_and_miniticker.py
esquire900/unicorn-binance-websocket-api
0b519561cde4ed49a4aac039a996b188bfb4f521
[ "MIT" ]
404
2019-11-13T02:22:39.000Z
2021-12-31T08:48:10.000Z
example_ticker_and_miniticker.py
gladiopeace/unicorn-binance-websocket-api
5bddc943343766210e8635d551084e566ffe0c21
[ "MIT" ]
181
2019-11-02T21:10:17.000Z
2021-12-31T12:55:51.000Z
example_ticker_and_miniticker.py
gladiopeace/unicorn-binance-websocket-api
5bddc943343766210e8635d551084e566ffe0c21
[ "MIT" ]
103
2019-11-16T23:39:24.000Z
2021-12-28T05:15:05.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # File: example_ticker_and_miniticker.py # # Part of ‘UNICORN Binance WebSocket API’ # Project website: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api # Documentation: https://oliver-zehentleitner.github.io/unicorn-binance-websocket-api # PyPI: htt...
48.38835
120
0.675161
from unicorn_binance_websocket_api.unicorn_binance_websocket_api_manager import BinanceWebSocketApiManager import os import time import threading import logging from example_process_streams import BinanceWebSocketApiProcessStreams logging.basicConfig(level=logging.DEBUG, filename=os.path.basename...
true
true
1c3e1fc2ba319da7c82d26f480a4424902c460fc
24
py
Python
web/db/__init__.py
ArturSamvelyan/fastapi-sqlalchemy-postgresql-template
c6ed650bd3ffeda98ecc4cd4a0d44b3cae5c1bfb
[ "MIT" ]
null
null
null
web/db/__init__.py
ArturSamvelyan/fastapi-sqlalchemy-postgresql-template
c6ed650bd3ffeda98ecc4cd4a0d44b3cae5c1bfb
[ "MIT" ]
null
null
null
web/db/__init__.py
ArturSamvelyan/fastapi-sqlalchemy-postgresql-template
c6ed650bd3ffeda98ecc4cd4a0d44b3cae5c1bfb
[ "MIT" ]
null
null
null
from .users import users
24
24
0.833333
from .users import users
true
true
1c3e20b56db40a4968e01553fd867337cdcf67c5
25,818
py
Python
examples/identity-app/images/agents/agent.py
fabio97U/bevel
02909fec93b3256253279e43ebf0395f38c8eb7e
[ "Apache-2.0" ]
null
null
null
examples/identity-app/images/agents/agent.py
fabio97U/bevel
02909fec93b3256253279e43ebf0395f38c8eb7e
[ "Apache-2.0" ]
null
null
null
examples/identity-app/images/agents/agent.py
fabio97U/bevel
02909fec93b3256253279e43ebf0395f38c8eb7e
[ "Apache-2.0" ]
null
null
null
import asyncio import asyncpg import functools import json import logging import os import random import subprocess import hashlib import base58 from timeit import default_timer from aiohttp import ( web, ClientSession, ClientRequest, ClientResponse, ClientError, ClientTimeout...
37.580786
143
0.548609
import asyncio import asyncpg import functools import json import logging import os import random import subprocess import hashlib import base58 from timeit import default_timer from aiohttp import ( web, ClientSession, ClientRequest, ClientResponse, ClientError, ClientTimeout...
true
true
1c3e2159a603800c25810e4e53b4fd9f5f1e7568
1,323
py
Python
tools/src/blogs/api/interface.py
Symthy/blog-index-manager
d0c2e0b265b35be7cdb5aead1f1543f4b0306bdf
[ "MIT" ]
null
null
null
tools/src/blogs/api/interface.py
Symthy/blog-index-manager
d0c2e0b265b35be7cdb5aead1f1543f4b0306bdf
[ "MIT" ]
1
2022-01-29T08:28:36.000Z
2022-01-29T08:28:36.000Z
tools/src/blogs/api/interface.py
Symthy/blog-index-manager
d0c2e0b265b35be7cdb5aead1f1543f4b0306bdf
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from typing import Optional from domain.blog.blog_entry import BlogEntry, BlogEntries from domain.blog.photo_entry import PhotoEntry class IBlogApiExecutor(ABC): @abstractmethod def execute_get_blog_entry_api(self, entry_id: str) -> Optional[BlogEntry]: pass @...
31.5
116
0.687831
from abc import ABC, abstractmethod from typing import Optional from domain.blog.blog_entry import BlogEntry, BlogEntries from domain.blog.photo_entry import PhotoEntry class IBlogApiExecutor(ABC): @abstractmethod def execute_get_blog_entry_api(self, entry_id: str) -> Optional[BlogEntry]: pass @...
true
true
1c3e221f4953258252911fd3d67bb0c47fea6d65
5,420
py
Python
torchvision/datasets/sbd.py
MeepoAII/vision
6e10e3f88158f12b7a304d3c2f803d2bbdde0823
[ "BSD-3-Clause" ]
2
2021-05-06T16:13:00.000Z
2021-11-17T11:25:12.000Z
torchvision/datasets/sbd.py
MeepoAII/vision
6e10e3f88158f12b7a304d3c2f803d2bbdde0823
[ "BSD-3-Clause" ]
3
2021-11-20T09:20:18.000Z
2021-12-13T09:19:25.000Z
torchvision/datasets/sbd.py
MeepoAII/vision
6e10e3f88158f12b7a304d3c2f803d2bbdde0823
[ "BSD-3-Clause" ]
3
2020-12-17T22:32:06.000Z
2022-03-23T01:43:42.000Z
import os import shutil from .vision import VisionDataset from typing import Any, Callable, Optional, Tuple import numpy as np from PIL import Image from .utils import download_url, verify_str_arg from .voc import download_extract class SBDataset(VisionDataset): """`Semantic Boundaries Dataset <http://home.bhar...
42.34375
109
0.631365
import os import shutil from .vision import VisionDataset from typing import Any, Callable, Optional, Tuple import numpy as np from PIL import Image from .utils import download_url, verify_str_arg from .voc import download_extract class SBDataset(VisionDataset): url = "http://www.eecs.berkeley.edu/Research/Pro...
true
true
1c3e22847b16126dac089d6b163792fd9ed564a1
1,008
py
Python
src/ralph/deployment/management/commands/nexthostname.py
quamilek/ralph
bf7231ea096924332b874718b33cd1f43f9c783b
[ "Apache-2.0" ]
null
null
null
src/ralph/deployment/management/commands/nexthostname.py
quamilek/ralph
bf7231ea096924332b874718b33cd1f43f9c783b
[ "Apache-2.0" ]
null
null
null
src/ralph/deployment/management/commands/nexthostname.py
quamilek/ralph
bf7231ea096924332b874718b33cd1f43f9c783b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from django.core.management.base import BaseCommand, CommandError from ralph.deployment.util import get_next_free_hostname...
32.516129
72
0.705357
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from django.core.management.base import BaseCommand, CommandError from ralph.deployment.util import get_next_free_hostname from ralph.discovery.models import DataCenter...
true
true
1c3e2365392a03bd6d8df514d57874b8d06fce21
6,090
py
Python
packages/core/minos-microservice-common/tests/test_common/test_model/test_serializers/test_avro/test_schema/test_decoder.py
sorasful/minos-python
1189330eebf6444627a2af6b29f347670f95a4dd
[ "MIT" ]
247
2022-01-24T14:55:30.000Z
2022-03-25T12:06:17.000Z
packages/core/minos-microservice-common/tests/test_common/test_model/test_serializers/test_avro/test_schema/test_decoder.py
sorasful/minos-python
1189330eebf6444627a2af6b29f347670f95a4dd
[ "MIT" ]
400
2021-04-03T08:51:40.000Z
2022-01-28T11:51:22.000Z
packages/core/minos-microservice-common/tests/test_common/test_model/test_serializers/test_avro/test_schema/test_decoder.py
sorasful/minos-python
1189330eebf6444627a2af6b29f347670f95a4dd
[ "MIT" ]
21
2022-02-06T17:25:58.000Z
2022-03-27T04:50:29.000Z
import unittest from datetime import ( date, datetime, time, timedelta, ) from typing import ( Any, Union, ) from unittest.mock import ( patch, ) from uuid import ( UUID, ) from minos.common import ( AvroSchemaDecoder, MinosMalformedAttributeException, ModelType, classna...
34.40678
111
0.611823
import unittest from datetime import ( date, datetime, time, timedelta, ) from typing import ( Any, Union, ) from unittest.mock import ( patch, ) from uuid import ( UUID, ) from minos.common import ( AvroSchemaDecoder, MinosMalformedAttributeException, ModelType, classna...
true
true
1c3e236cbc8726fe2c849a5d7ff474a88063800c
14,070
py
Python
models.py
AliengirlLiv/dreamer-pytorch-1
33979d7c61d0406d27ea46b9dcbbd823f765a518
[ "MIT" ]
null
null
null
models.py
AliengirlLiv/dreamer-pytorch-1
33979d7c61d0406d27ea46b9dcbbd823f765a518
[ "MIT" ]
null
null
null
models.py
AliengirlLiv/dreamer-pytorch-1
33979d7c61d0406d27ea46b9dcbbd823f765a518
[ "MIT" ]
null
null
null
from typing import Optional, List import torch from torch import jit, nn from torch.nn import functional as F import torch.distributions from torch.distributions.normal import Normal from torch.distributions.transforms import Transform, TanhTransform from torch.distributions.transformed_distribution import TransformedD...
43.831776
264
0.703625
from typing import Optional, List import torch from torch import jit, nn from torch.nn import functional as F import torch.distributions from torch.distributions.normal import Normal from torch.distributions.transforms import Transform, TanhTransform from torch.distributions.transformed_distribution import TransformedD...
true
true
1c3e23a077709ee776901018e5e918adc3753882
5,253
py
Python
essmc2/hooks/checkpoint.py
huang-ziyuan/EssentialMC2
87141df94c1ac8e426ceec071720b97f5b9d3b88
[ "MIT" ]
null
null
null
essmc2/hooks/checkpoint.py
huang-ziyuan/EssentialMC2
87141df94c1ac8e426ceec071720b97f5b9d3b88
[ "MIT" ]
null
null
null
essmc2/hooks/checkpoint.py
huang-ziyuan/EssentialMC2
87141df94c1ac8e426ceec071720b97f5b9d3b88
[ "MIT" ]
null
null
null
# Copyright 2021 Alibaba Group Holding Limited. All Rights Reserved. import os.path as osp import sys import warnings import torch import torch.distributed as du from essmc2.utils.file_systems import FS from .hook import Hook from .registry import HOOKS _DEFAULT_CHECKPOINT_PRIORITY = 300 @HOOKS.register_class() cl...
46.078947
112
0.605559
import os.path as osp import sys import warnings import torch import torch.distributed as du from essmc2.utils.file_systems import FS from .hook import Hook from .registry import HOOKS _DEFAULT_CHECKPOINT_PRIORITY = 300 @HOOKS.register_class() class CheckpointHook(Hook): def __init__(self, in...
true
true
1c3e24b64b12c99d3c2a85aa3935636a6cba247d
1,799
py
Python
scripts/run_experiment_from_doodad.py
richardrl/rlkit
088dae169a8d5ba1430094eee66f27b2cb7c4998
[ "MIT" ]
null
null
null
scripts/run_experiment_from_doodad.py
richardrl/rlkit
088dae169a8d5ba1430094eee66f27b2cb7c4998
[ "MIT" ]
null
null
null
scripts/run_experiment_from_doodad.py
richardrl/rlkit
088dae169a8d5ba1430094eee66f27b2cb7c4998
[ "MIT" ]
null
null
null
import doodad as dd from rlkit.launchers.launcher_util import run_experiment_here import torch.multiprocessing as mp import faulthandler if __name__ == "__main__": faulthandler.enable() import matplotlib matplotlib.use('agg') print("set fork") mp.set_start_method('forkserver') args_dict = dd.g...
35.27451
77
0.625347
import doodad as dd from rlkit.launchers.launcher_util import run_experiment_here import torch.multiprocessing as mp import faulthandler if __name__ == "__main__": faulthandler.enable() import matplotlib matplotlib.use('agg') print("set fork") mp.set_start_method('forkserver') args_dict = dd.g...
true
true
1c3e252741d2610fad7636ac06b808e2e1d03668
108
py
Python
resume/views.py
AkinWilderman/myPort
3ddeea04ccffe3ed7b66d6dba2c1f2dc00c9eb6c
[ "Apache-2.0" ]
null
null
null
resume/views.py
AkinWilderman/myPort
3ddeea04ccffe3ed7b66d6dba2c1f2dc00c9eb6c
[ "Apache-2.0" ]
null
null
null
resume/views.py
AkinWilderman/myPort
3ddeea04ccffe3ed7b66d6dba2c1f2dc00c9eb6c
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render def resume(request): return render(request, 'resume/resume.html')
18
48
0.759259
from django.shortcuts import render def resume(request): return render(request, 'resume/resume.html')
true
true
1c3e264641306fb838bde0f6cd3792460c73a77c
16,387
py
Python
main.py
chiro2001/cumcm-a
6e8c11166c98b6683433423a595f346198cc4790
[ "MIT" ]
null
null
null
main.py
chiro2001/cumcm-a
6e8c11166c98b6683433423a595f346198cc4790
[ "MIT" ]
null
null
null
main.py
chiro2001/cumcm-a
6e8c11166c98b6683433423a595f346198cc4790
[ "MIT" ]
null
null
null
import os import argparse import pandas as pd import time import matplotlib.pyplot as plt import traceback import torch.optim as optim from tqdm import trange import threading from utils import * import cv2 from base_logger import logger from fast import FAST # 是否使用多线程显示图像 draw_threaded: bool = False # 一些全局变量 g_fig =...
39.968293
119
0.564045
import os import argparse import pandas as pd import time import matplotlib.pyplot as plt import traceback import torch.optim as optim from tqdm import trange import threading from utils import * import cv2 from base_logger import logger from fast import FAST draw_threaded: bool = False g_fig = None g_frame: np.ndarr...
true
true
1c3e2743ad3dfe6322f1b8f5dbbb80cc79502c6d
851
py
Python
dbupgrade/apply.py
srittau/dbupgrade
53472599c175768e2269d84ca7aed670d55c202b
[ "MIT" ]
1
2020-10-26T13:28:47.000Z
2020-10-26T13:28:47.000Z
dbupgrade/apply.py
srittau/dbupgrade
53472599c175768e2269d84ca7aed670d55c202b
[ "MIT" ]
83
2020-06-02T09:38:02.000Z
2022-02-01T07:56:05.000Z
dbupgrade/apply.py
srittau/dbupgrade
53472599c175768e2269d84ca7aed670d55c202b
[ "MIT" ]
null
null
null
import logging from typing import Sequence from sqlalchemy.exc import SQLAlchemyError from dbupgrade.db import update_sql from dbupgrade.files import FileInfo def apply_files(db_url: str, files: Sequence[FileInfo]) -> None: for file_info in files: try: apply_file(db_url, file_info) e...
25.787879
75
0.625147
import logging from typing import Sequence from sqlalchemy.exc import SQLAlchemyError from dbupgrade.db import update_sql from dbupgrade.files import FileInfo def apply_files(db_url: str, files: Sequence[FileInfo]) -> None: for file_info in files: try: apply_file(db_url, file_info) e...
true
true
1c3e2799e1257b8489558f2dbcfe4857fb38cb9b
1,507
py
Python
cci-book/ed6/stacks_and_queues.py
topliceanu/learn
6f4bb19fffb7b2baa88f047409075d5765ee6308
[ "MIT" ]
24
2016-03-21T07:53:54.000Z
2020-06-29T12:16:36.000Z
cci-book/ed6/stacks_and_queues.py
topliceanu/learn
6f4bb19fffb7b2baa88f047409075d5765ee6308
[ "MIT" ]
5
2015-09-29T17:12:36.000Z
2020-03-26T20:51:56.000Z
cci-book/ed6/stacks_and_queues.py
topliceanu/learn
6f4bb19fffb7b2baa88f047409075d5765ee6308
[ "MIT" ]
12
2016-05-24T16:48:32.000Z
2020-10-02T12:22:09.000Z
# -*- coding: utf-8 -*- class ThreeStacks(object): """ 3.1 Three in One: Describe how you could use a single array to implement three stacks. """ def __init__(self, size): self.arr = [None] * size self.stack1_ptr = 0 self.stack2_ptr = 1 self.stack3_ptr = 2 def pop(s...
30.14
74
0.554745
class ThreeStacks(object): def __init__(self, size): self.arr = [None] * size self.stack1_ptr = 0 self.stack2_ptr = 1 self.stack3_ptr = 2 def pop(self, stack_no): pass def push(self, stack_no, item): if stack_no == 1: self.stack1_ptr = self.stac...
true
true
1c3e27cf69c44694f8da63091c8cb9bdb2fde621
1,008
py
Python
lib/django-1.4/django/__init__.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
26
2015-01-20T08:02:38.000Z
2020-06-10T04:57:41.000Z
lib/django-1.4/django/__init__.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
4
2016-02-28T05:53:54.000Z
2017-01-03T07:39:50.000Z
lib/django-1.4/django/__init__.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
13
2016-02-28T00:14:23.000Z
2021-05-03T15:47:36.000Z
VERSION = (1, 4, 13, 'final', 0) def get_version(version=None): """Derives a PEP386-compliant version number from VERSION.""" if version is None: version = VERSION assert len(version) == 5 assert version[3] in ('alpha', 'beta', 'rc', 'final') # Now build the two parts of the version number...
32.516129
65
0.575397
VERSION = (1, 4, 13, 'final', 0) def get_version(version=None): if version is None: version = VERSION assert len(version) == 5 assert version[3] in ('alpha', 'beta', 'rc', 'final') parts = 2 if version[2] == 0 else 3 main = '.'.join(str(x) for x in version[:parts]) su...
true
true
1c3e283ff6e40fcdc1cc634891aebc01bad33f95
10,106
py
Python
contrib/spendfrom/spendfrom.py
IngenuityCoin/Ingenuity
475289926e435a9939358c695f4f10d1503bfa0c
[ "MIT" ]
4
2018-12-06T23:56:18.000Z
2021-03-06T10:15:33.000Z
contrib/spendfrom/spendfrom.py
IngenuityCoin/Ingenuity
475289926e435a9939358c695f4f10d1503bfa0c
[ "MIT" ]
null
null
null
contrib/spendfrom/spendfrom.py
IngenuityCoin/Ingenuity
475289926e435a9939358c695f4f10d1503bfa0c
[ "MIT" ]
5
2018-12-06T23:56:41.000Z
2021-05-10T06:35:51.000Z
#!/usr/bin/env python # # Use the raw transactions API to spend INGYs received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a ingenuityd or inge...
37.708955
111
0.635167
from decimal import * import getpass import math import os import os.path import platform import sys import time from jsonrpc import ServiceProxy, json BASE_FEE=Decimal("0.001") def check_json_precision(): n = Decimal("20000000.00000003") satoshis = int(json.loads(json.dumps(float(n)))*1.0e8) if satoshis...
true
true
1c3e285315e8e1bf8ff79b5fe6dafb98ae8c51fa
9,590
py
Python
mykits/gallery-dl-wrap.py
fakegit/mo-han-toolbox
9d5bbc1fe7f12040715d3a0d3f320a1ad617aed8
[ "MIT" ]
null
null
null
mykits/gallery-dl-wrap.py
fakegit/mo-han-toolbox
9d5bbc1fe7f12040715d3a0d3f320a1ad617aed8
[ "MIT" ]
null
null
null
mykits/gallery-dl-wrap.py
fakegit/mo-han-toolbox
9d5bbc1fe7f12040715d3a0d3f320a1ad617aed8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os import webbrowser from mylib.ext.console_app import * # if os.name != 'nt': # raise NotImplementedError('launch new console window') env_var = os.environ conf_path = fstk.make_path(env_var['gallery_dl_conf']).strip('"') base_dir = fstk.make_path(env_var['gallery_dl_base_directory...
39.303279
117
0.525339
import os import webbrowser from mylib.ext.console_app import * env_var = os.environ conf_path = fstk.make_path(env_var['gallery_dl_conf']).strip('"') base_dir = fstk.make_path(env_var['gallery_dl_base_directory']).strip('"') pause_on_error = os.environ.get('PAUSEONERROR', 'yes').lower() in {'yes', 'true', '1'} de...
true
true