hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
98a4e9c19b6c5c560be20357b8d179d1458d811b | 10,210 | py | Python | pymcxray/FileFormat/Results/DetectorParameters.py | drix00/pymcxray | bf650aa0f31c635040a6cb79fe1cb7ecf27b8990 | [
"Apache-2.0"
] | 1 | 2020-07-23T12:13:30.000Z | 2020-07-23T12:13:30.000Z | pymcxray/FileFormat/Results/DetectorParameters.py | drix00/pymcxray | bf650aa0f31c635040a6cb79fe1cb7ecf27b8990 | [
"Apache-2.0"
] | 3 | 2017-03-05T16:09:30.000Z | 2017-03-05T16:11:41.000Z | pymcxray/FileFormat/Results/DetectorParameters.py | drix00/pymcxray | bf650aa0f31c635040a6cb79fe1cb7ecf27b8990 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
.. py:currentmodule:: FileFormat.Results.DetectorParameters
.. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca>
MCXRay detector parameters from results file.
"""
# Script information for the file.
__author__ = "Hendrix Demers (hendrix.demers@mail.mcgill.ca)"
__version_... | 38.528302 | 114 | 0.729089 | #!/usr/bin/env python
"""
.. py:currentmodule:: FileFormat.Results.DetectorParameters
.. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca>
MCXRay detector parameters from results file.
"""
# Script information for the file.
__author__ = "Hendrix Demers (hendrix.demers@mail.mcgill.ca)"
__version_... | 0 | 4,832 | 0 | 3,469 | 0 | 0 | 0 | 0 | 24 |
f5ca30910d45a409b8ee908b3ae92948fcccb141 | 8,718 | py | Python | MEA_Network_Analysis.py | alanbalugu/MEA-Analysis | 2851ea437ddab243212e051fa043b4a8b34e9076 | [
"MIT"
] | null | null | null | MEA_Network_Analysis.py | alanbalugu/MEA-Analysis | 2851ea437ddab243212e051fa043b4a8b34e9076 | [
"MIT"
] | null | null | null | MEA_Network_Analysis.py | alanbalugu/MEA-Analysis | 2851ea437ddab243212e051fa043b4a8b34e9076 | [
"MIT"
] | null | null | null | #network of nodes
#Alan Balu
#import statements
import matplotlib.pyplot as plt
#function to examine the degree of nodes in the network and generate plots to see this
#function to complete general analysis of network and its connectivity and print those values to the console
#function to examine the centr... | 32.288889 | 190 | 0.685478 | #network of nodes
#Alan Balu
#import statements
import numpy as np, math
import matplotlib.pyplot as plt
import pandas as pd
from pprint import pprint
import networkx as nx
import matplotlib.pyplot as plt
import community
import glob
import statistics
#function to examine the degree of nodes in ... | 0 | 0 | 0 | 0 | 0 | 7,844 | 0 | -4 | 306 |
8cc7a5a5650e6d206b6a4f2056636fb1d9968487 | 2,846 | py | Python | camelot/core/resources.py | FrDeGraux/camelot | 56aa93f774edbb0c31a21109e187cf81f49a68d8 | [
"BSD-3-Clause"
] | 12 | 2020-08-02T17:00:37.000Z | 2022-01-22T17:49:23.000Z | camelot/core/resources.py | FrDeGraux/camelot | 56aa93f774edbb0c31a21109e187cf81f49a68d8 | [
"BSD-3-Clause"
] | 124 | 2020-08-19T15:03:54.000Z | 2022-03-31T07:12:16.000Z | camelot/core/resources.py | FrDeGraux/camelot | 56aa93f774edbb0c31a21109e187cf81f49a68d8 | [
"BSD-3-Clause"
] | 17 | 2020-04-25T19:22:20.000Z | 2022-01-25T08:46:19.000Z | # ============================================================================
#
# Copyright (C) 2007-2016 Conceptive Engineering bvba.
# www.conceptive.be / info@conceptive.be
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following condition... | 45.174603 | 82 | 0.725228 | # ============================================================================
#
# Copyright (C) 2007-2016 Conceptive Engineering bvba.
# www.conceptive.be / info@conceptive.be
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following condition... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ac1cbfe1106b10d27ccc3fbe02d6b6f70d874a66 | 51 | py | Python | enthought/traits/ui/key_bindings.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/traits/ui/key_bindings.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/traits/ui/key_bindings.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
| 17 | 35 | 0.803922 | # proxy module
from traitsui.key_bindings import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 22 |
d76ea4b411c0953fc184fb5f37e71434089f3530 | 101 | py | Python | src/core/cmp/cool/parser.py | 2kodevs/cool-compiler-2020 | 7b4e36706562d616c6bf900049edf52281ac2e2b | [
"MIT"
] | 3 | 2020-02-11T23:45:43.000Z | 2021-09-03T15:18:06.000Z | src/core/cmp/cool/parser.py | 2kodevs/cool-compiler-2020 | 7b4e36706562d616c6bf900049edf52281ac2e2b | [
"MIT"
] | null | null | null | src/core/cmp/cool/parser.py | 2kodevs/cool-compiler-2020 | 7b4e36706562d616c6bf900049edf52281ac2e2b | [
"MIT"
] | 3 | 2022-02-23T21:41:26.000Z | 2022-02-26T20:53:27.000Z | from ..parser import LR1Parser
from .grammar import CoolGrammar
CoolParser = LR1Parser(CoolGrammar)
| 20.2 | 35 | 0.821782 | from ..parser import LR1Parser
from .grammar import CoolGrammar
CoolParser = LR1Parser(CoolGrammar)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7a16b3d2592d834fcb01072722db07b06256d1f5 | 467 | py | Python | tests/test_make_dataset.py | ElisaRMA/mlops_project | 860c651db6fa93638fac38b2c9b9079a6e48d30e | [
"MIT"
] | 12 | 2022-01-16T18:40:07.000Z | 2022-02-19T20:08:51.000Z | tests/test_make_dataset.py | ElisaRMA/mlops_project | 860c651db6fa93638fac38b2c9b9079a6e48d30e | [
"MIT"
] | 35 | 2022-01-22T14:51:04.000Z | 2022-03-31T15:14:55.000Z | tests/test_make_dataset.py | ElisaRMA/mlops_project | 860c651db6fa93638fac38b2c9b9079a6e48d30e | [
"MIT"
] | 23 | 2022-01-17T14:23:11.000Z | 2022-03-25T19:51:22.000Z | """Test make_dataset.py."""
import configparser
import yaml
def test_download_data():
"""test if the output parameters of the make_dataset module are correct."""
config = configparser.ConfigParser()
config.read("configs.ini")
output_dir = config["datasets"]["raw_folder"]
with open("dvc.yaml", "r"... | 27.470588 | 79 | 0.683084 | """Test make_dataset.py."""
import configparser
import yaml
def test_download_data():
"""test if the output parameters of the make_dataset module are correct."""
config = configparser.ConfigParser()
config.read("configs.ini")
output_dir = config["datasets"]["raw_folder"]
with open("dvc.yaml", "r"... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d9cb50a444f94eb0cee47694b3bcf96567124dae | 451 | py | Python | reset.py | JBEI/prpr | 6492b3468be600c868abcb7d2fef2b364023217c | [
"BSD-3-Clause-LBNL"
] | 7 | 2015-06-16T17:45:36.000Z | 2020-05-15T19:08:26.000Z | reset.py | nstawski/prpr | 22a9d9d4d1b454aa530f77e9d705df864bb5d14a | [
"BSD-3-Clause-LBNL"
] | null | null | null | reset.py | nstawski/prpr | 22a9d9d4d1b454aa530f77e9d705df864bb5d14a | [
"BSD-3-Clause-LBNL"
] | 1 | 2019-08-12T07:20:53.000Z | 2019-08-12T07:20:53.000Z | __author__ = 'Nina Stawski'
__contact__ = 'me@ninastawski.com'
import os
def resetPrpr():
"""
Removes all files from working directories, invokes prpr setup.
"""
os.remove('prpr.db')
dirs = ['esc', 'incoming', 'logs', 'tables']
for dir in dirs:
files = os.listdir(dir)
for file ... | 22.55 | 67 | 0.600887 | __author__ = 'Nina Stawski'
__contact__ = 'me@ninastawski.com'
import os
def resetPrpr():
"""
Removes all files from working directories, invokes prpr setup.
"""
os.remove('prpr.db')
dirs = ['esc', 'incoming', 'logs', 'tables']
for dir in dirs:
files = os.listdir(dir)
for file ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
48a331e9fc7fd8d1f1f0d09be14d3fbe44d4db08 | 6,372 | py | Python | dojo/tools/ibm_app/parser.py | everable/django-DefectDojo | 1548982c1f197f3f702162846d314b16bb687c78 | [
"BSD-3-Clause"
] | 1 | 2020-03-27T06:58:40.000Z | 2020-03-27T06:58:40.000Z | dojo/tools/ibm_app/parser.py | viral-sangani/django-DefectDojo | e0fa585ee770bd0b15ba4a73bd81e6cc043650fd | [
"BSD-3-Clause"
] | 30 | 2020-08-11T21:29:57.000Z | 2022-03-17T19:02:50.000Z | dojo/tools/ibm_app/parser.py | viral-sangani/django-DefectDojo | e0fa585ee770bd0b15ba4a73bd81e6cc043650fd | [
"BSD-3-Clause"
] | 1 | 2020-09-30T13:01:50.000Z | 2020-09-30T13:01:50.000Z |
__author__ = 'propersam'
| 43.346939 | 113 | 0.47489 | from xml.dom import NamespaceErr
import hashlib
from urllib.parse import urlparse
from dojo.models import Endpoint, Finding
from defusedxml import ElementTree
__author__ = 'propersam'
class IbmAppScanDASTXMLParser(object):
def __init__(self, file, test):
self.items = ()
if file is None:
... | 0 | 0 | 0 | 6,163 | 0 | 0 | 0 | 49 | 133 |
5878ab5b8ab99dcd60b8b4b7efe10b8a5f719f58 | 427 | py | Python | 05_CovidProj/data_science/processer.py | QApolo/CS | 44e3c547544ac06da095641160b8d5956b31e149 | [
"MIT"
] | 2 | 2019-03-17T23:38:48.000Z | 2019-03-23T06:12:34.000Z | 05_CovidProj/data_science/processer.py | QApolo/CS | 44e3c547544ac06da095641160b8d5956b31e149 | [
"MIT"
] | null | null | null | 05_CovidProj/data_science/processer.py | QApolo/CS | 44e3c547544ac06da095641160b8d5956b31e149 | [
"MIT"
] | null | null | null |
pre_processData("Population.csv") | 26.6875 | 83 | 0.571429 |
def pre_processData(path):
csv_file = open(path, "r")
csv_processed = open(path.split(".")[0]+"_processed."+ path.split(".")[1], "w")
for line in csv_file:
spl = line.split(",")
#print(spl)
line2 = spl[0]+","+spl[1].replace(" ", "").rstrip("\n")+"\n"
print(line2)
c... | 0 | 0 | 0 | 0 | 0 | 368 | 0 | 0 | 23 |
8115763d9484254820ae78b3b17d3a2a339de0c2 | 3,982 | py | Python | jc/parsers/lsof.py | shaikustin/jc | b59e38cfd2c8a7f5868e05d5562557b1c27e5e56 | [
"MIT"
] | 3,215 | 2019-10-24T15:25:56.000Z | 2022-03-31T15:43:01.000Z | jc/parsers/lsof.py | shaikustin/jc | b59e38cfd2c8a7f5868e05d5562557b1c27e5e56 | [
"MIT"
] | 109 | 2019-11-02T16:22:29.000Z | 2022-03-30T17:32:17.000Z | jc/parsers/lsof.py | shaikustin/jc | b59e38cfd2c8a7f5868e05d5562557b1c27e5e56 | [
"MIT"
] | 75 | 2020-02-07T00:16:32.000Z | 2022-03-29T09:29:53.000Z | """jc - JSON CLI output utility `lsof` command output parser
Usage (cli):
$ lsof | jc --lsof
or
$ jc lsof
Usage (module):
import jc.parsers.lsof
result = jc.parsers.lsof.parse(lsof_command_output)
Schema:
[
{
"command": string,
"pid": integer,
"tid... | 20.957895 | 74 | 0.476143 | """jc - JSON CLI output utility `lsof` command output parser
Usage (cli):
$ lsof | jc --lsof
or
$ jc lsof
Usage (module):
import jc.parsers.lsof
result = jc.parsers.lsof.parse(lsof_command_output)
Schema:
[
{
"command": string,
"pid": integer,
"tid... | 0 | 0 | 0 | 314 | 0 | 0 | 0 | 0 | 23 |
786770ccde364a1ebe2c033eb0b658cde5cd34fd | 1,268 | py | Python | Question_91_100/myanswers/myans94.py | OverHall27/Gasyori100knock | 341c528eb4c0789034898ee1f7d0a4b2f8b23eff | [
"MIT"
] | null | null | null | Question_91_100/myanswers/myans94.py | OverHall27/Gasyori100knock | 341c528eb4c0789034898ee1f7d0a4b2f8b23eff | [
"MIT"
] | null | null | null | Question_91_100/myanswers/myans94.py | OverHall27/Gasyori100knock | 341c528eb4c0789034898ee1f7d0a4b2f8b23eff | [
"MIT"
] | null | null | null | import cv2
import numpy as np
img = cv2.imread("../imori_1.jpg")
gt = np.array((47, 41, 129, 103), dtype=np.float32)
result = RandomCropping(img, gt)
cv2.imshow("result", result)
cv2.waitKey(0)
cv2.imwrite("myans_94.jpg", result)
| 26.978723 | 79 | 0.535489 | import cv2
import numpy as np
import matplotlib.pyplot as plt
def RandomCropping(img, gt):
def CalcIOU(reg1, reg2):
area1 = (reg1[2] - reg1[0]) * (reg1[3] - reg1[1])
area2 = (reg2[2] - reg2[0]) * (reg2[3] - reg2[1])
reg12 = np.zeros(4, dtype=np.float32)
for i in range(2):
... | 0 | 0 | 0 | 0 | 0 | 979 | 0 | 10 | 45 |
b84349bdd4dce351c7835e56ef88ada343dde5ca | 1,526 | py | Python | aix360/algorithms/profwt/sample_weight_from_probes.py | Qingtian-Zou/AIX360 | cf25f58077ae002fb4542b680fd98db47758dae5 | [
"Apache-2.0"
] | 609 | 2019-08-02T17:55:18.000Z | 2020-07-11T18:11:09.000Z | aix360/algorithms/profwt/sample_weight_from_probes.py | Qingtian-Zou/AIX360 | cf25f58077ae002fb4542b680fd98db47758dae5 | [
"Apache-2.0"
] | 47 | 2019-08-05T15:00:35.000Z | 2020-07-13T20:35:57.000Z | aix360/algorithms/profwt/sample_weight_from_probes.py | Qingtian-Zou/AIX360 | cf25f58077ae002fb4542b680fd98db47758dae5 | [
"Apache-2.0"
] | 147 | 2019-07-12T11:30:31.000Z | 2020-07-04T19:18:49.000Z | import numpy as np
def prof_weight_compute(list_probe_filenames,start_layer,last_layer,y_train2):
"""
Key function that computes the per sample weights based on probe classifier confidences from various layers. It averages the probe
confidences of the layers.
Parmeters:
list_probe_filenames (List of strings):... | 44.882353 | 143 | 0.768676 | import numpy as np
def prof_weight_compute(list_probe_filenames,start_layer,last_layer,y_train2):
"""
Key function that computes the per sample weights based on probe classifier confidences from various layers. It averages the probe
confidences of the layers.
Parmeters:
list_probe_filenames (List of strings):... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3e7e7aa990bc39baea1e2ddef0e0d12f4f5c1d18 | 561 | py | Python | _site/cours/deep_ecn_2019/code_deep_ecn/lib/train_wgan.py | tvayer/tvayer.github.io | 742f7b20ab16aca4d442b5bb225bc3f6c8ed2890 | [
"MIT"
] | 1 | 2019-07-21T09:26:48.000Z | 2019-07-21T09:26:48.000Z | _site/cours/deep_ecn_2019/code_deep_ecn/lib/train_wgan.py | tvayer/tvayer.github.io | 742f7b20ab16aca4d442b5bb225bc3f6c8ed2890 | [
"MIT"
] | null | null | null | _site/cours/deep_ecn_2019/code_deep_ecn/lib/train_wgan.py | tvayer/tvayer.github.io | 742f7b20ab16aca4d442b5bb225bc3f6c8ed2890 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 2 15:02:44 2018
Train WGAN
@author: vayer
"""
#%%
import os, sys
#path='/home/vayer/wgw/gwtest-master/code_deep_ecn'
path='./code_deep_ecn/lib'
module_path = os.path.abspath(os.path.join(path))
sys.path.append(module_path)
from wgan import WGAN
f... | 17 | 65 | 0.729055 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 2 15:02:44 2018
Train WGAN
@author: vayer
"""
#%%
import os,sys
#path='/home/vayer/wgw/gwtest-master/code_deep_ecn'
path='./code_deep_ecn/lib'
module_path = os.path.abspath(os.path.join(path))
sys.path.append(module_path)
from wgan import WGAN
fr... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 22 |
5b0e6e31d9e07a9e3bd32cfd7b3950e5a06faebf | 2,706 | py | Python | derobertis_project_logo/logo.py | nickderobertis/derobertis-project-logo | 11fa791cc5a79be4c9b2907c2ff6aa946ea31306 | [
"MIT"
] | null | null | null | derobertis_project_logo/logo.py | nickderobertis/derobertis-project-logo | 11fa791cc5a79be4c9b2907c2ff6aa946ea31306 | [
"MIT"
] | 2 | 2021-12-20T00:10:09.000Z | 2021-12-20T00:10:11.000Z | derobertis_project_logo/logo.py | nickderobertis/derobertis-project-logo | 11fa791cc5a79be4c9b2907c2ff6aa946ea31306 | [
"MIT"
] | null | null | null | import pathlib
from jinja2 import Environment, FileSystemLoader
TEMPLATE_DIR = pathlib.Path(__file__).parent / 'templates'
jinja_env = Environment(loader=FileSystemLoader(str(TEMPLATE_DIR)))
| 32.60241 | 99 | 0.63969 | import pathlib
from typing import Sequence, Dict, Any, Optional
from jinja2 import Environment, FileSystemLoader, Template
from derobertis_project_logo.color import random_color_hex, Color
from derobertis_project_logo.shape import Shape
TEMPLATE_DIR = pathlib.Path(__file__).parent / 'templates'
jinja_env = Environme... | 0 | 472 | 0 | 1,843 | 0 | 0 | 0 | 107 | 90 |
b43861588456f873fc14fba6881fea114b68b19f | 8,272 | py | Python | recon/scraper/scraper.py | noraj/RTA | 1559ae0f0087ec2371264ed6dd562c17dabebb84 | [
"Apache-2.0"
] | 361 | 2018-04-18T23:00:16.000Z | 2022-03-29T20:07:25.000Z | recon/scraper/scraper.py | noraj/RTA | 1559ae0f0087ec2371264ed6dd562c17dabebb84 | [
"Apache-2.0"
] | 6 | 2018-04-24T08:03:21.000Z | 2020-02-03T11:48:05.000Z | recon/scraper/scraper.py | noraj/RTA | 1559ae0f0087ec2371264ed6dd562c17dabebb84 | [
"Apache-2.0"
] | 114 | 2018-04-18T21:03:40.000Z | 2022-03-22T18:38:43.000Z | import sys
sys.path.append('../..')
| 34.902954 | 127 | 0.501813 | import os
import sys
import yaml
import json
import requests
from twitter import OAuth
from twitter import Twitter
from datetime import datetime
from pymongo import ASCENDING
from pymongo import DESCENDING
from pymongo import MongoClient
from pymongo.errors import DuplicateKeyError
sys.path.append('../..')
from not... | 0 | 0 | 0 | 7,899 | 0 | 0 | 0 | 46 | 289 |
97967f6af6636c786a985b88c151e1ee6e0e68ba | 8,541 | py | Python | auto_run_uploader.py | lowandrew/AutoRunUploader | 41a46ba37edb891d26be18f0c883d71a6ab212b5 | [
"MIT"
] | null | null | null | auto_run_uploader.py | lowandrew/AutoRunUploader | 41a46ba37edb891d26be18f0c883d71a6ab212b5 | [
"MIT"
] | null | null | null | auto_run_uploader.py | lowandrew/AutoRunUploader | 41a46ba37edb891d26be18f0c883d71a6ab212b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import urllib3
API_ENDPOINT = 'https://olc.cloud.inspection.gc.ca/api/'
# SSL cert isn't quite right on portal. Use this to disable warning.
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
if __name__ == '__main__':
main()
| 46.167568 | 123 | 0.60473 | #!/usr/bin/env python
from gooey import Gooey, GooeyParser
import datetime
import requests
import urllib3
import time
import glob
import os
API_ENDPOINT = 'https://olc.cloud.inspection.gc.ca/api/'
# SSL cert isn't quite right on portal. Use this to disable warning.
urllib3.disable_warnings(urllib3.exceptions.Insecur... | 0 | 1,258 | 0 | 0 | 0 | 6,762 | 0 | -29 | 271 |
c39b002de36c829d48673c22c5b871e474a6540e | 65 | py | Python | viz.py | TylerYep/ai-toolk | 0342516556f8224ed10f60cf553f1d48b1e863bb | [
"MIT"
] | 7 | 2020-04-07T06:10:29.000Z | 2021-10-30T06:31:46.000Z | viz.py | TylerYep/ai-toolk | 0342516556f8224ed10f60cf553f1d48b1e863bb | [
"MIT"
] | 2 | 2021-09-08T01:48:49.000Z | 2022-01-16T19:31:35.000Z | viz.py | TylerYep/ai-toolk | 0342516556f8224ed10f60cf553f1d48b1e863bb | [
"MIT"
] | 2 | 2021-04-27T22:45:14.000Z | 2021-07-16T06:40:30.000Z | from ai_toolkit import viz
if __name__ == "__main__":
viz()
| 13 | 26 | 0.676923 | from ai_toolkit import viz
if __name__ == "__main__":
viz()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3010078fb97c70ead8d7c6a778013bdcfa7dd20f | 878 | py | Python | maps/migrations/0006_picmeta.py | agilman/django_maps2 | b7eb0d4e74d049922898ebc23833be522a16b07d | [
"MIT"
] | null | null | null | maps/migrations/0006_picmeta.py | agilman/django_maps2 | b7eb0d4e74d049922898ebc23833be522a16b07d | [
"MIT"
] | null | null | null | maps/migrations/0006_picmeta.py | agilman/django_maps2 | b7eb0d4e74d049922898ebc23833be522a16b07d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-05-14 10:00
from __future__ import unicode_literals
| 32.518519 | 114 | 0.613895 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-05-14 10:00
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('maps', '0005_auto_20170507_2254'),
]
operations = ... | 0 | 0 | 0 | 666 | 0 | 0 | 0 | 30 | 68 |
c3421a28ca9c66a14a501a32ad6b0a575d7c71f0 | 11,461 | py | Python | algo/seed/actor.py | xlnwel/grl | 7d42bb2e78bc3e7b7c3ebbcf356a4d1cf12abebf | [
"Apache-2.0"
] | 5 | 2021-09-04T14:50:39.000Z | 2022-03-13T09:53:09.000Z | algo/seed/actor.py | xlnwel/d2rl | 7d42bb2e78bc3e7b7c3ebbcf356a4d1cf12abebf | [
"Apache-2.0"
] | null | null | null | algo/seed/actor.py | xlnwel/d2rl | 7d42bb2e78bc3e7b7c3ebbcf356a4d1cf12abebf | [
"Apache-2.0"
] | 2 | 2022-01-25T09:32:01.000Z | 2022-03-13T09:53:14.000Z | from algo.apex.actor import get_worker_base_class, get_actor_base_class
def get_actor_class(AgentBase):
""" An Actor is responsible for inference only """
ActorBase = get_actor_base_class(AgentBase)
return Actor
def get_worker_class():
""" A Worker is only responsible for resetting&stepping environ... | 39.25 | 87 | 0.531716 | import functools
import itertools
import collections
import threading
import numpy as np
import psutil
import tensorflow as tf
import ray
from utility.ray_setup import cpu_affinity
from utility.utils import Every, config_attr, batch_dicts
from utility.timer import Timer
from utility.typing import EnvOutput
from utilit... | 0 | 0 | 0 | 10,510 | 0 | 0 | 0 | 151 | 405 |
ca9e2f9cc7773e2479dfeab5a93a17e1ad95a6b5 | 276 | py | Python | submissions/code-festival-2015-quala/b.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | 1 | 2021-05-10T01:16:28.000Z | 2021-05-10T01:16:28.000Z | submissions/code-festival-2015-quala/b.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | 3 | 2021-05-11T06:14:15.000Z | 2021-06-19T08:18:36.000Z | submissions/code-festival-2015-quala/b.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | null | null | null | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
n = int(readline())
a = list(map(int, readline().split()))
ans = a[0]
for i in range(1, n):
ans = a[i] + ans * 2
print(ans)
| 21.230769 | 38 | 0.677536 | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
n = int(readline())
a = list(map(int, readline().split()))
ans = a[0]
for i in range(1, n):
ans = a[i] + ans * 2
print(ans)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1dcb564adf978073587463c898d09072d93278b0 | 3,796 | py | Python | Project 2/lab2/script/bug2.py | monisjaved/ROSProjects | b3789416be4e151439421bdf2251f4369e5cc819 | [
"MIT"
] | null | null | null | Project 2/lab2/script/bug2.py | monisjaved/ROSProjects | b3789416be4e151439421bdf2251f4369e5cc819 | [
"MIT"
] | null | null | null | Project 2/lab2/script/bug2.py | monisjaved/ROSProjects | b3789416be4e151439421bdf2251f4369e5cc819 | [
"MIT"
] | 2 | 2018-10-02T16:18:17.000Z | 2020-10-23T15:29:21.000Z | #!/usr/bin/env python
__author__ = "Moonis Javed"
import roslib
import rospy
import numpy as np
from sensor_msgs.msg import LaserScan
roslib.load_manifest('lab2')
if __name__ == '__main__':
try:
rospy.init_node('bug2', anonymous=True)
orientation = 0
points = np.array([[-8, -2]... | 31.114754 | 96 | 0.546101 | #!/usr/bin/env python
__author__ = "Moonis Javed"
import roslib
import rospy
import math
import numpy as np
from geometry_msgs.msg import Twist
from sensor_msgs.msg import LaserScan
from nav_msgs.msg import Odometry
roslib.load_manifest('lab2')
def checkFrontAndLeftWall(data):
global front_wall, left_wall
r... | 0 | 0 | 0 | 0 | 0 | 2,946 | 0 | 16 | 220 |
441ed8b37d5f684f792d04a0b5a46654d794f50c | 106 | py | Python | configs/HDR/mantiuk/faster_rcnn_r50_fpn_1x_coco_mantiuk.py | ismailkocdemir/mmdetection | 4ac7e76dc66be7c97a8ca2c5f8a8e71434e3d823 | [
"Apache-2.0"
] | null | null | null | configs/HDR/mantiuk/faster_rcnn_r50_fpn_1x_coco_mantiuk.py | ismailkocdemir/mmdetection | 4ac7e76dc66be7c97a8ca2c5f8a8e71434e3d823 | [
"Apache-2.0"
] | null | null | null | configs/HDR/mantiuk/faster_rcnn_r50_fpn_1x_coco_mantiuk.py | ismailkocdemir/mmdetection | 4ac7e76dc66be7c97a8ca2c5f8a8e71434e3d823 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../faster_rcnn_r50_fpn_1x_coco.py',
'../../_base_/datasets/hdr_detection_mantiuk.py'
] | 26.5 | 52 | 0.679245 | _base_ = [
'../faster_rcnn_r50_fpn_1x_coco.py',
'../../_base_/datasets/hdr_detection_mantiuk.py'
] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fc49dfa722428c058b4af62e4138a26b27c26e04 | 2,794 | py | Python | analysis/scripts/project_functions.py | data301-2021-summer2/project-group38-project | a3145c1f9212d4d34c37c36b61757039431c6084 | [
"MIT"
] | null | null | null | analysis/scripts/project_functions.py | data301-2021-summer2/project-group38-project | a3145c1f9212d4d34c37c36b61757039431c6084 | [
"MIT"
] | null | null | null | analysis/scripts/project_functions.py | data301-2021-summer2/project-group38-project | a3145c1f9212d4d34c37c36b61757039431c6084 | [
"MIT"
] | null | null | null | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "76ba6b88-f162-4922-8a35-43828460a08f",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import seaborn as sns\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_... | 41.701493 | 194 | 0.624911 | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "76ba6b88-f162-4922-8a35-43828460a08f",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import seaborn as sns\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fb4f8c79159dcfd3c422d87eb127f0f697517b99 | 1,320 | py | Python | modelhub/tests_modelhub/functional/modelhub/test_model_hub_logistic_regression.py | objectiv/objectiv-analytics | 86ec1508f71c2d61ea7d67479800e4dc417a46e1 | [
"Apache-2.0"
] | 23 | 2021-11-10T21:37:42.000Z | 2022-03-30T11:46:19.000Z | modelhub/tests_modelhub/functional/modelhub/test_model_hub_logistic_regression.py | objectiv/objectiv-analytics | 86ec1508f71c2d61ea7d67479800e4dc417a46e1 | [
"Apache-2.0"
] | 163 | 2021-11-10T10:11:26.000Z | 2022-03-31T16:04:27.000Z | modelhub/tests_modelhub/functional/modelhub/test_model_hub_logistic_regression.py | objectiv/objectiv-analytics | 86ec1508f71c2d61ea7d67479800e4dc417a46e1 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2021 Objectiv B.V.
"""
# Any import from modelhub initializes all the types, do not remove
import pytest
pytestmark = [pytest.mark.skip_bigquery] # TODO: BigQuery
| 31.428571 | 84 | 0.72197 | """
Copyright 2021 Objectiv B.V.
"""
# Any import from modelhub initializes all the types, do not remove
import pytest
from tests.functional.bach.test_data_and_utils import get_df_with_test_data
from tests_modelhub.functional.modelhub.logistic_regression_test_utils import TestLR
from tests_modelhub.data_and_utils.ut... | 8 | 519 | 0 | 0 | 0 | 330 | 0 | 172 | 112 |
8d71f69eac11dfe63ad3edd2780d7d34c74a335b | 1,510 | py | Python | jarvis/settings/testing.py | Anubhav722/blahblah | 160698e06a02e671ac40de3113cd37d642e72e96 | [
"MIT"
] | 1 | 2019-01-03T06:10:04.000Z | 2019-01-03T06:10:04.000Z | jarvis/settings/testing.py | Anubhav722/blahblah | 160698e06a02e671ac40de3113cd37d642e72e96 | [
"MIT"
] | 1 | 2021-03-31T19:11:52.000Z | 2021-03-31T19:11:52.000Z | jarvis/settings/testing.py | Anubhav722/blahblah | 160698e06a02e671ac40de3113cd37d642e72e96 | [
"MIT"
] | null | null | null |
DEBUG = True
# Not using because of the conflicts with JSONField() in Visitor
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
# }
# }
DATABASES = {
'default': {
'ENGINE': get_env_variable('DATABASE_ENGINE'),... | 26.034483 | 80 | 0.645033 | from jarvis.settings.base import *
DEBUG = True
# Not using because of the conflicts with JSONField() in Visitor
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
# }
# }
DATABASES = {
'default': {
'ENGINE': g... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 22 |
d408ae1d967d3e9a411d320b70583645ea0357b7 | 2,041 | py | Python | 433 Minimum Genetic Mutation.py | krishna13052001/LeetCode | cd6ec626bea61f0bd9e8493622074f9e69a7a1c3 | [
"MIT"
] | 872 | 2015-06-15T12:02:41.000Z | 2022-03-30T08:44:35.000Z | 433 Minimum Genetic Mutation.py | nadeemshaikh-github/LeetCode | 3fb14aeea62a960442e47dfde9f964c7ffce32be | [
"MIT"
] | 8 | 2015-06-21T15:11:59.000Z | 2022-02-01T11:22:34.000Z | 433 Minimum Genetic Mutation.py | nadeemshaikh-github/LeetCode | 3fb14aeea62a960442e47dfde9f964c7ffce32be | [
"MIT"
] | 328 | 2015-06-28T03:10:35.000Z | 2022-03-29T11:05:28.000Z | #!/usr/bin/python3
"""
A gene string can be represented by an 8-character long string, with choices
from "A", "C", "G", "T".
Suppose we need to investigate about a mutation (mutation from "start" to
"end"), where ONE mutation is defined as ONE single character changed in the
gene string.
For example, "AACCGGTT" -> "A... | 28.746479 | 110 | 0.577658 | #!/usr/bin/python3
"""
A gene string can be represented by an 8-character long string, with choices
from "A", "C", "G", "T".
Suppose we need to investigate about a mutation (mutation from "start" to
"end"), where ONE mutation is defined as ONE single character changed in the
gene string.
For example, "AACCGGTT" -> "A... | 0 | 0 | 0 | 871 | 0 | 0 | 0 | 0 | 23 |
362ca326d22c516d52cf8989e2d437a22fbb778d | 615 | py | Python | tests/pyb/adc.py | learnforpractice/micropython-cpp | 004bc8382f74899e7b876cc29bfa6a9cc976ba10 | [
"MIT"
] | 692 | 2016-12-19T23:25:35.000Z | 2022-03-31T14:20:48.000Z | tests/pyb/adc.py | learnforpractice/micropython-cpp | 004bc8382f74899e7b876cc29bfa6a9cc976ba10 | [
"MIT"
] | 259 | 2016-12-25T06:38:22.000Z | 2022-03-13T16:38:36.000Z | tests/pyb/adc.py | learnforpractice/micropython-cpp | 004bc8382f74899e7b876cc29bfa6a9cc976ba10 | [
"MIT"
] | 228 | 2016-12-19T05:03:30.000Z | 2022-03-22T18:13:00.000Z | from pyb import ADC
from pyb import Pin
pin = Pin('X22', mode=Pin.IN, pull=Pin.PULL_DOWN)
adc = ADC('X22')
print(adc)
# read single sample
val = adc.read()
assert val < 500
# timer for read_timed
tim = pyb.Timer(5, freq=500)
# read into bytearray
buf = bytearray(50)
adc.read_timed(buf, tim)
print(len(buf))
for i in... | 18.088235 | 49 | 0.673171 | from pyb import ADC
from pyb import Pin
pin = Pin('X22', mode=Pin.IN, pull=Pin.PULL_DOWN)
adc = ADC('X22')
print(adc)
# read single sample
val = adc.read()
assert val < 500
# timer for read_timed
tim = pyb.Timer(5, freq=500)
# read into bytearray
buf = bytearray(50)
adc.read_timed(buf, tim)
print(len(buf))
for i in... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2fcaf9da57bc5abf24845b2e6b6114b3a380e808 | 5,518 | py | Python | diabolo_learn/scripts/diabolo_gym/diabolo_env.py | omron-sinicx/diabolo | a0258fdf634d27c7cf185b2e40c6b12699417d36 | [
"BSD-3-Clause"
] | 11 | 2021-10-15T15:51:24.000Z | 2021-12-26T16:43:17.000Z | diabolo_learn/scripts/diabolo_gym/diabolo_env.py | omron-sinicx/diabolo | a0258fdf634d27c7cf185b2e40c6b12699417d36 | [
"BSD-3-Clause"
] | null | null | null | diabolo_learn/scripts/diabolo_gym/diabolo_env.py | omron-sinicx/diabolo | a0258fdf634d27c7cf185b2e40c6b12699417d36 | [
"BSD-3-Clause"
] | 1 | 2022-02-01T01:58:37.000Z | 2022-02-01T01:58:37.000Z |
import gym
| 38.859155 | 183 | 0.602936 | import sys
import gym
import gym.spaces
import math
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
class DiaboloEnv(gym.Env):
def __init__(self, task_mode="position_control"):
# action
self.stick_pos_threshold = 2
stick_pos_threshold = np.array... | 0 | 0 | 0 | 5,349 | 0 | 0 | 0 | 0 | 157 |
06114e73bf6a246c62a4d176218b294e53fdd880 | 679 | py | Python | remove_accents.py | fhardison/greek-read-text-maker | 37a0f55ab4462b72b2aad8b554ac451a0ea188f9 | [
"MIT"
] | null | null | null | remove_accents.py | fhardison/greek-read-text-maker | 37a0f55ab4462b72b2aad8b554ac451a0ea188f9 | [
"MIT"
] | null | null | null | remove_accents.py | fhardison/greek-read-text-maker | 37a0f55ab4462b72b2aad8b554ac451a0ea188f9 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
import sys
args = sys.argv[1:]
remover = Remover()
raw = ''
with open(args[0], 'r', encoding='utf-8') as f:
raw = f.read()
with open(args[1], 'w', encoding='utf-8') as f:
f.write(remover.transformWord(raw))
| 28.291667 | 85 | 0.65243 | from greek_accentuation.characters import base
import betacode.conv
import string
def removeNoAscii(w):
return ''.join(filter(lambda x: not(x in "*abcdefghijklmnopqrstuvwxyz"), w))
class Remover:
def transformWord(self, w):
return "".join(map(lambda x: base(x), w))
def removeWithBeta(self, w):
... | 0 | 0 | 0 | 194 | 0 | 81 | 0 | 16 | 113 |
056783f4a978327889ca241cf755a4c1ea1a9c0b | 672 | py | Python | src/migrations/0008_auto_20211026_0945.py | coosoti/ret-trip | cc689877131fe8e1c820827ceae72c878be4f4b6 | [
"MIT"
] | null | null | null | src/migrations/0008_auto_20211026_0945.py | coosoti/ret-trip | cc689877131fe8e1c820827ceae72c878be4f4b6 | [
"MIT"
] | null | null | null | src/migrations/0008_auto_20211026_0945.py | coosoti/ret-trip | cc689877131fe8e1c820827ceae72c878be4f4b6 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2021-10-26 09:45
| 23.172414 | 49 | 0.546131 | # Generated by Django 3.1.3 on 2021-10-26 09:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('src', '0007_auto_20211026_0752'),
]
operations = [
migrations.AddField(
model_name='task',
name='distance',
... | 0 | 0 | 0 | 558 | 0 | 0 | 0 | 19 | 46 |
22091a201500d17cc931e592a5d1ba6766830b29 | 7,315 | py | Python | msm.py | johncollinsedhec/markov-switching-multifractal | 76737071faf26236439a2fbffc2f7d2068077b33 | [
"MIT"
] | 6 | 2021-04-12T14:25:44.000Z | 2021-12-15T18:40:36.000Z | msm.py | johncollinsedhec/markov-switching-multifractal | 76737071faf26236439a2fbffc2f7d2068077b33 | [
"MIT"
] | null | null | null | msm.py | johncollinsedhec/markov-switching-multifractal | 76737071faf26236439a2fbffc2f7d2068077b33 | [
"MIT"
] | 3 | 2021-06-22T21:06:20.000Z | 2021-11-04T12:17:33.000Z | import numpy as np
import scipy.optimize as opt
def glo_min(kbar, data, niter, temperature, stepsize):
"""2-step basin-hopping method combines global stepping algorithm
with local minimization at each step.
"""
"""step 1: local minimizations
"""
theta, theta_LLs, theta_out, ierr, numfunc = ... | 22.717391 | 80 | 0.562816 | import numpy as np
import pandas as pd
import scipy.optimize as opt
from statsmodels import regression
import statsmodels.formula.api as sm
from numba import jit, njit, prange, float64, int64
def glo_min(kbar, data, niter, temperature, stepsize):
"""2-step basin-hopping method combines global stepping algorithm
... | 0 | 2,154 | 0 | 315 | 0 | 0 | 0 | 56 | 203 |
b62ddbd8a32b8071be7cef2937fb83aead21a619 | 2,016 | py | Python | scrape_schema_recipe/example_output.py | cydanil/scrape-schema-recipe | b5657d2c7b3ba745221051e4b96db60fef6fabbe | [
"Apache-2.0"
] | null | null | null | scrape_schema_recipe/example_output.py | cydanil/scrape-schema-recipe | b5657d2c7b3ba745221051e4b96db60fef6fabbe | [
"Apache-2.0"
] | null | null | null | scrape_schema_recipe/example_output.py | cydanil/scrape-schema-recipe | b5657d2c7b3ba745221051e4b96db60fef6fabbe | [
"Apache-2.0"
] | null | null | null | from .scrape import load
from sys import version_info
if version_info < (3, 9):
from importlib_resources import files
else:
from importlib.resources import files # type: ignore
from typing import Dict, List, Tuple, Union
example_names = ('irish-coffee', 'google', 'taco-salad', 'tart', 'tea-cake', 'truffl... | 34.169492 | 88 | 0.631448 | from .scrape import load
from sys import version_info
if version_info < (3, 9):
from importlib_resources import files
else:
from importlib.resources import files # type: ignore
from pathlib import Path
from typing import Dict, List, Tuple, Union
example_names = ('irish-coffee', 'google', 'taco-salad', '... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 23 |
b473961f4893bf45dbb649f40ca2f710fbacc18d | 2,012 | py | Python | utils/boilerplate/test_bus.py | cfginn/sap-simulation-package | 73314e5380cec5c61a9fe5ff5fbafa25b9e2beac | [
"MIT"
] | null | null | null | utils/boilerplate/test_bus.py | cfginn/sap-simulation-package | 73314e5380cec5c61a9fe5ff5fbafa25b9e2beac | [
"MIT"
] | null | null | null | utils/boilerplate/test_bus.py | cfginn/sap-simulation-package | 73314e5380cec5c61a9fe5ff5fbafa25b9e2beac | [
"MIT"
] | null | null | null | import pysapets.constants as constants
| 30.029851 | 92 | 0.727634 |
import unittest
from pysapets.bus import Bus
from pysapets.animal import Animal
import pysapets.constants as constants
from unittest.mock import patch
from io import StringIO
from copy import deepcopy
class BusTest(unittest.TestCase):
def setUp(self):
self.bus = Bus()
self.friends = [self.bus, Animal(2, 2)... | 0 | 0 | 0 | 1,771 | 0 | 0 | 0 | 30 | 156 |
0db99303796805a3d4df7113fbb15b9c40eb36bd | 423 | py | Python | bookstore/src/cart/dummy.py | mehulk99/Online-Book-Store | 27c64b31e6fd33ae3db0bde351f889518de41eb1 | [
"Apache-2.0"
] | 1 | 2021-01-28T13:30:09.000Z | 2021-01-28T13:30:09.000Z | bookstore/src/cart/dummy.py | webguru071/Django-Online-Book-Store | ac4c864b732c9774e0aca1352045c124f5c4ca42 | [
"CC0-1.0"
] | null | null | null | bookstore/src/cart/dummy.py | webguru071/Django-Online-Book-Store | ac4c864b732c9774e0aca1352045c124f5c4ca42 | [
"CC0-1.0"
] | null | null | null |
if __name__== "__main__":
s = SomeSingleton("343","43443")
| 23.5 | 60 | 0.619385 | class SomeSingleton(object):
__instance__ = None
def __new__(cls, *args,**kwargs):
if SomeSingleton.__instance__ is None:
SomeSingleton.__instance__ = object.__new__(cls)
return SomeSingleton.__instance__
def __init__(self,f=0,y=0):
self.f = f
self.y= y
def ... | 0 | 0 | 0 | 332 | 0 | 0 | 0 | 0 | 22 |
5589e7695b34d6e717eb6592c5c10102ff29f7e1 | 1,605 | py | Python | mqlab/power_meters.py | riwoodward/mqlab | 01914f9530cdeef9691040b65d666c9102603a07 | [
"MIT"
] | 1 | 2019-05-04T13:59:27.000Z | 2019-05-04T13:59:27.000Z | mqlab/power_meters.py | riwoodward/mqlab | 01914f9530cdeef9691040b65d666c9102603a07 | [
"MIT"
] | null | null | null | mqlab/power_meters.py | riwoodward/mqlab | 01914f9530cdeef9691040b65d666c9102603a07 | [
"MIT"
] | null | null | null | """ Definition of power meter interfacing commands. """
| 32.755102 | 134 | 0.627414 | """ Definition of power meter interfacing commands. """
import numpy as np
from mqlab.connections import Instrument
class PowerMeter(Instrument):
pass
class ThorlabsPM100(PowerMeter):
""" Interface for communication with ThorLabs Power Meters over USB.
Notes:
Drivers must be inst... | 0 | 0 | 0 | 1,403 | 0 | 0 | 0 | 16 | 123 |
1c2ca9762c3d53a7dac08a120f7e7e60f5b4c3d4 | 1,783 | py | Python | ejercicios_basicos/trabajo_bd/capa_datos/conexion.py | JuanDuran85/ejemplos_python | 47aa49c65384ab89654f362f3da6cd2b0ef386e5 | [
"Apache-2.0"
] | null | null | null | ejercicios_basicos/trabajo_bd/capa_datos/conexion.py | JuanDuran85/ejemplos_python | 47aa49c65384ab89654f362f3da6cd2b0ef386e5 | [
"Apache-2.0"
] | null | null | null | ejercicios_basicos/trabajo_bd/capa_datos/conexion.py | JuanDuran85/ejemplos_python | 47aa49c65384ab89654f362f3da6cd2b0ef386e5 | [
"Apache-2.0"
] | null | null | null | from dotenv import load_dotenv
load_dotenv()
if __name__ == '__main__':
conexion = Conexion.obtener_conexion()
cursor = Conexion.obtener_cursor()
cursor.execute("SELECT * FROM persona")
print(cursor.fetchall())
Conexion.cerrar() | 28.758065 | 74 | 0.55244 | import os
from dotenv import load_dotenv
import psycopg2 as db
from logger_base import log
import sys
load_dotenv()
class Conexion:
__DATABASE = os.getenv("DATABASE")
__USER = os.getenv("USER")
__PASSWORD = os.getenv("PASSWORD")
__HOST = os.getenv("HOST")
__PORT = os.getenv("PORT")
__conexion ... | 2 | 1,150 | 0 | 288 | 0 | 0 | 0 | -17 | 111 |
92c61cd3ebf32c72f81cb12f320b4c80d27176a4 | 2,992 | py | Python | device/actuator/_modules/utils/exceptions.py | seanbrhn3/openc2-oif-device | 805c55e44f59f7c86c5bf347a6fc3787e6903df4 | [
"Apache-2.0"
] | null | null | null | device/actuator/_modules/utils/exceptions.py | seanbrhn3/openc2-oif-device | 805c55e44f59f7c86c5bf347a6fc3787e6903df4 | [
"Apache-2.0"
] | null | null | null | device/actuator/_modules/utils/exceptions.py | seanbrhn3/openc2-oif-device | 805c55e44f59f7c86c5bf347a6fc3787e6903df4 | [
"Apache-2.0"
] | null | null | null | """
Actuator Error/Exception Functions
"""
def action_not_implemented(*args: tuple, **kwargs: dict) -> dict:
"""
Default function if no action function is found
:return: OpenC2 response message - dict
"""
return dict(
status=501,
status_text=f"Action not implemented"
)
def ta... | 31.494737 | 178 | 0.663436 | """
Actuator Error/Exception Functions
"""
def action_not_implemented(*args: tuple, **kwargs: dict) -> dict:
"""
Default function if no action function is found
:return: OpenC2 response message - dict
"""
return dict(
status=501,
status_text=f"Action not implemented"
)
def ta... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dcb0f067df27a8019779e3053c3aaefd61cb4105 | 88 | py | Python | foundation/__init__.py | tbone255/foundation | ca76fdd9b5345fead2d200f829eb67ba77bc865e | [
"MIT"
] | null | null | null | foundation/__init__.py | tbone255/foundation | ca76fdd9b5345fead2d200f829eb67ba77bc865e | [
"MIT"
] | null | null | null | foundation/__init__.py | tbone255/foundation | ca76fdd9b5345fead2d200f829eb67ba77bc865e | [
"MIT"
] | null | null | null | __version__ = '0.1.0a0.dev2'
default_app_config = 'foundation.config.FoundationConfig'
| 22 | 57 | 0.795455 | __version__ = '0.1.0a0.dev2'
default_app_config = 'foundation.config.FoundationConfig'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
62cf858609a2915ee6751d23958863120e3fa881 | 656 | py | Python | python/RaspberryPi/uFire_ORP.py | u-fire/Isolated_ISE | 55bd421e1eca81ea44b172118fabb29b405ae298 | [
"MIT"
] | 4 | 2020-01-25T03:35:03.000Z | 2022-01-28T00:24:51.000Z | python/RaspberryPi/uFire_ORP.py | u-fire/Isolated_ISE | 55bd421e1eca81ea44b172118fabb29b405ae298 | [
"MIT"
] | null | null | null | python/RaspberryPi/uFire_ORP.py | u-fire/Isolated_ISE | 55bd421e1eca81ea44b172118fabb29b405ae298 | [
"MIT"
] | 4 | 2020-01-25T03:42:41.000Z | 2021-05-31T08:54:30.000Z | POTENTIAL_REGISTER_ADDRESS = 100
| 22.62069 | 63 | 0.614329 | from uFire_ISE import uFire_ISE
import math
POTENTIAL_REGISTER_ADDRESS = 100
class ufire_orp(uFire_ISE):
ORP = 0
Eh = 0
def measureORP(self):
self.measuremV()
self.ORP = self.mV
self.Eh = self.mV + self.getProbePotential()
if math.isnan(self.ORP):
self.ORP = -... | 0 | 0 | 0 | 555 | 0 | 0 | 0 | 0 | 67 |
9aace1a15c07abb98ac0df6870f220446b875c71 | 270 | py | Python | 2231.py | WaiNaat/BOJ-Python | 3365ef090c7dcf6e6a598fea0b25c416a5a3e01b | [
"MIT"
] | null | null | null | 2231.py | WaiNaat/BOJ-Python | 3365ef090c7dcf6e6a598fea0b25c416a5a3e01b | [
"MIT"
] | null | null | null | 2231.py | WaiNaat/BOJ-Python | 3365ef090c7dcf6e6a598fea0b25c416a5a3e01b | [
"MIT"
] | null | null | null | # input
N = int(input())
# process
'''
max(N)=1,000,000 2 O(n)
'''
found = False
for i in range(N):
digits = tuple(map(int, list(str(i))))
digitSum = i + sum(digits)
if digitSum == N:
found = i
break
# output
print(found) if found else print(0) | 18 | 42 | 0.633333 | # input
N = int(input())
# process
'''
max(N)=1,000,000이고 시간제한 2초이므로 O(n) 완전탐색 가능
'''
found = False
for i in range(N):
digits = tuple(map(int, list(str(i))))
digitSum = i + sum(digits)
if digitSum == N:
found = i
break
# output
print(found) if found else print(0) | 48 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
62a2e5606822ff4bca19674738a78383a6f37be9 | 3,369 | py | Python | main.py | Doomcow500/sudoku_solver | 147d9aa1ddf06b196a485d72a127369cd726dfef | [
"Apache-2.0"
] | 1 | 2021-07-23T14:22:39.000Z | 2021-07-23T14:22:39.000Z | main.py | Doomcow500/sudoku_solver | 147d9aa1ddf06b196a485d72a127369cd726dfef | [
"Apache-2.0"
] | 1 | 2021-07-23T17:51:18.000Z | 2021-09-03T16:40:17.000Z | main.py | Doomcow500/sudoku_solver | 147d9aa1ddf06b196a485d72a127369cd726dfef | [
"Apache-2.0"
] | null | null | null | print("enter your config for the sudoku grid, 0 equals empty")
A1 = int(input("A1"))
A2 = int(input("A2"))
A3 = int(input("A3"))
A4 = int(input("A4"))
A5 = int(input("A5"))
A6 = int(input("A6"))
A7 = int(input("A7"))
A8 = int(input("A8"))
A9 = int(input("A9"))
B1 = int(input("B1"))
B2 = int(input("B2"))
B3 = int(i... | 23.559441 | 62 | 0.50935 | print("enter your config for the sudoku grid, 0 equals empty")
A1 = int(input("A1"))
A2 = int(input("A2"))
A3 = int(input("A3"))
A4 = int(input("A4"))
A5 = int(input("A5"))
A6 = int(input("A6"))
A7 = int(input("A7"))
A8 = int(input("A8"))
A9 = int(input("A9"))
B1 = int(input("B1"))
B2 = int(input("B2"))
B3 = int(i... | 0 | 0 | 0 | 0 | 0 | 915 | 0 | 0 | 68 |
efdbf5b81b318e88a5be770f834bb4bf93a04605 | 2,158 | py | Python | lib/tsdesktop/bottman/views/dockman_test.py | tsadm/desktop | f1a9fbbc4069dfd991ca7a529831dcc0e1b61459 | [
"BSD-3-Clause"
] | null | null | null | lib/tsdesktop/bottman/views/dockman_test.py | tsadm/desktop | f1a9fbbc4069dfd991ca7a529831dcc0e1b61459 | [
"BSD-3-Clause"
] | null | null | null | lib/tsdesktop/bottman/views/dockman_test.py | tsadm/desktop | f1a9fbbc4069dfd991ca7a529831dcc0e1b61459 | [
"BSD-3-Clause"
] | null | null | null |
images = [{}]
containers = [{'Status': None}]
| 30.828571 | 62 | 0.611677 | from tsdesktop.testing import TSDesktopTest
from .dockman import view
from tsdesktop import dockman
from bottle import HTTPResponse, HTTPError
images = [{}]
containers = [{'Status': None}]
class Views(TSDesktopTest):
cli = None
def setUp(self):
self.cli = dockman._mockClient()
def test_dockman(s... | 0 | 0 | 0 | 1,945 | 0 | 0 | 0 | 55 | 111 |
feeb28b865af50961a993e743ef9854efc67e8d6 | 4,229 | py | Python | remove_duplicates_rename_exams_to_student_name_mec_md5.py | BjornFJohansson/molbio_test_generator | ee96873b2c4c4930834729a82d1d4097e2f54943 | [
"BSD-2-Clause"
] | null | null | null | remove_duplicates_rename_exams_to_student_name_mec_md5.py | BjornFJohansson/molbio_test_generator | ee96873b2c4c4930834729a82d1d4097e2f54943 | [
"BSD-2-Clause"
] | null | null | null | remove_duplicates_rename_exams_to_student_name_mec_md5.py | BjornFJohansson/molbio_test_generator | ee96873b2c4c4930834729a82d1d4097e2f54943 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
cw = os.getcwd()
os.chdir("./returned_exams")
import re, sys, string, codecs, zipfile
import stat
import md5
import hashlib
from pyparsing import Word, alphanums, Literal, LineEnd, LineStart, SkipTo, Optional
filesBySize = {}
os.path.walk(".", walker, filesBySi... | 25.786585 | 84 | 0.580043 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
cw = os.getcwd()
os.chdir("./returned_exams")
import re, sys, string, codecs, zipfile
import stat
import md5
import hashlib
from pyparsing import Word, alphanums, Literal, LineEnd, LineStart, SkipTo, Optional
filesBySize = {}
def walker(arg, dirname, fnames):
... | 0 | 0 | 0 | 0 | 0 | 489 | 0 | 0 | 23 |
832c361a3151065268c5190313463ea52803bd9e | 64 | py | Python | run.py | PremiereGlobal/bbmigrate | c7968e1e7a34fa482516766a12d70bba24b316c6 | [
"MIT"
] | 1 | 2021-04-23T23:47:41.000Z | 2021-04-23T23:47:41.000Z | run.py | PremiereGlobal/bbmigrate | c7968e1e7a34fa482516766a12d70bba24b316c6 | [
"MIT"
] | null | null | null | run.py | PremiereGlobal/bbmigrate | c7968e1e7a34fa482516766a12d70bba24b316c6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from bbmigrate import main
main.main()
| 10.666667 | 26 | 0.734375 | #!/usr/bin/env python3
from bbmigrate import main
main.main()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9858d43c3cf9abfd83836638f65f4fda49b199de | 8,815 | py | Python | res_specific_rmsd.py | Miro-Astore/mdanalysis_scripts | faf59c7b3b63ab103a709941e5cc2e5d7c1d0b23 | [
"MIT"
] | 1 | 2021-06-16T11:34:29.000Z | 2021-06-16T11:34:29.000Z | res_specific_rmsd.py | Miro-Astore/mdanalysis_scripts | faf59c7b3b63ab103a709941e5cc2e5d7c1d0b23 | [
"MIT"
] | null | null | null | res_specific_rmsd.py | Miro-Astore/mdanalysis_scripts | faf59c7b3b63ab103a709941e5cc2e5d7c1d0b23 | [
"MIT"
] | 1 | 2021-06-16T11:34:31.000Z | 2021-06-16T11:34:31.000Z | import numpy as np
import os
import MDAnalysis as mda
import MDAnalysis.analysis.rms
import sys
#system_list=np.loadtxt("system_list",dtype=str)
cwd=os.getcwd()
#f=open('system_list','r')
#f1=f.readlines()
#os.chdir ('..')
#print (i)
#files=i.split()
#psf=files[0]
#xtc=files[1]
psf=sys.argv[1]
xtc=sys.argv[2]
ref=s... | 87.277228 | 2,648 | 0.531254 | import numpy as np
import os
import MDAnalysis as mda
import MDAnalysis.analysis.rms
import sys
#system_list=np.loadtxt("system_list",dtype=str)
cwd=os.getcwd()
#f=open('system_list','r')
#f1=f.readlines()
#os.chdir ('..')
#print (i)
#files=i.split()
#psf=files[0]
#xtc=files[1]
psf=sys.argv[1]
xtc=sys.argv[2]
ref=s... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1b9eed04603f9d0058ff10cc1f655dea28292544 | 14,658 | py | Python | sockeye/loss.py | tholiao/sockeye | f33b600dc77ae9f295c05015e2af9045f3a74088 | [
"Apache-2.0"
] | 1 | 2021-06-22T20:33:53.000Z | 2021-06-22T20:33:53.000Z | sockeye/loss.py | tholiao/sockeye | f33b600dc77ae9f295c05015e2af9045f3a74088 | [
"Apache-2.0"
] | 1 | 2018-06-13T17:17:02.000Z | 2018-06-13T17:17:02.000Z | sockeye/loss.py | tholiao/sockeye | f33b600dc77ae9f295c05015e2af9045f3a74088 | [
"Apache-2.0"
] | 3 | 2021-03-12T04:39:07.000Z | 2021-03-12T04:39:25.000Z | # Copyright 2017, 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not
# use this file except in compliance with the License. A copy of the License
# is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fi... | 39.088 | 105 | 0.622595 | # Copyright 2017, 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not
# use this file except in compliance with the License. A copy of the License
# is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fi... | 0 | 750 | 0 | 11,551 | 0 | 0 | 0 | 42 | 296 |
a441828d0274ec2119a7056d6d4253851b4fa47f | 9,066 | py | Python | fsleyes/displaycontext/canvasopts.py | pauldmccarthy/fsleyes | 453a6b91ec7763c39195814d635257e3766acf83 | [
"Apache-2.0"
] | 12 | 2018-05-05T01:36:25.000Z | 2021-09-23T20:44:08.000Z | fsleyes/displaycontext/canvasopts.py | pauldmccarthy/fsleyes | 453a6b91ec7763c39195814d635257e3766acf83 | [
"Apache-2.0"
] | 97 | 2018-05-05T02:17:23.000Z | 2022-03-29T14:58:42.000Z | fsleyes/displaycontext/canvasopts.py | pauldmccarthy/fsleyes | 453a6b91ec7763c39195814d635257e3766acf83 | [
"Apache-2.0"
] | 6 | 2017-12-09T09:02:00.000Z | 2021-03-05T18:55:13.000Z | #!/usr/bin/env python
#
# canvasopts.py - The SliceCanvasOpts and LightBoxCanvasOpts classes.
#
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
#
"""This module provides the following classes:
- :class:`SliceCanvasOpts` (for the :class:`.SliceCanvas`)
- :class:`LightBoxCanvasOpts` (for the :class:`.LightBoxCanva... | 30.422819 | 79 | 0.647695 | #!/usr/bin/env python
#
# canvasopts.py - The SliceCanvasOpts and LightBoxCanvasOpts classes.
#
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
#
"""This module provides the following classes:
- :class:`SliceCanvasOpts` (for the :class:`.SliceCanvas`)
- :class:`LightBoxCanvasOpts` (for the :class:`.LightBoxCanva... | 0 | 288 | 0 | 7,912 | 0 | 0 | 0 | -5 | 138 |
387b3c70917ec91b01d834e92d5d54b9ec4d4f73 | 347,939 | py | Python | ui/resources.py | Planheat/Planheat-Tool | 9764fcb86d3898b232c4cc333dab75ebe41cd421 | [
"MIT"
] | 2 | 2020-04-07T03:43:33.000Z | 2021-03-23T13:17:42.000Z | ui/resources.py | Planheat/Planheat-Tool | 9764fcb86d3898b232c4cc333dab75ebe41cd421 | [
"MIT"
] | 1 | 2020-07-20T09:56:13.000Z | 2020-07-22T10:26:06.000Z | ui/resources.py | Planheat/Planheat-Tool | 9764fcb86d3898b232c4cc333dab75ebe41cd421 | [
"MIT"
] | 1 | 2020-07-20T09:40:15.000Z | 2020-07-20T09:40:15.000Z | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.13.0)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x28\x16\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x61\x... | 64.79311 | 129 | 0.726998 | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.13.0)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x28\x16\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x61\x... | 0 | 0 | 0 | 0 | 0 | 209 | 0 | 0 | 46 |
674b1b9addd4e53dec89f745b3c33b8ea91ed547 | 2,516 | py | Python | gera_cartela_alesp.py | pmarkun/guess_who | c3ddaf5726706a01dbe76da3fd95a0016b6ff1c7 | [
"MIT"
] | null | null | null | gera_cartela_alesp.py | pmarkun/guess_who | c3ddaf5726706a01dbe76da3fd95a0016b6ff1c7 | [
"MIT"
] | null | null | null | gera_cartela_alesp.py | pmarkun/guess_who | c3ddaf5726706a01dbe76da3fd95a0016b6ff1c7 | [
"MIT"
] | null | null | null | # -*- coding: future_fstrings -*-
from xml.dom import minidom
import xpath
import json
with open("templates/cartela_template_1.svg", 'r', encoding='utf-8') as f:
_cartela1 = minidom.parse(f)
with open("templates/cartela_template_2.svg", 'r', encoding='utf-8') as f:
_cartela2 = minidom.parse(f)
with op... | 35.43662 | 100 | 0.680048 | # -*- coding: future_fstrings -*-
from xml.dom import minidom
import xpath
import os
import json
import base64
import mimetypes
with open("templates/cartela_template_1.svg", 'r', encoding='utf-8') as f:
_cartela1 = minidom.parse(f)
with open("templates/cartela_template_2.svg", 'r', encoding='utf-8') as f... | 0 | 0 | 0 | 0 | 0 | 1,464 | 0 | -25 | 117 |
e1c008631246a931b3a5f95eb36c66d749f4af63 | 1,069 | py | Python | medium/python3/c0246_494_target-sum/00_leetcode_0246.py | drunkwater/leetcode | 8cc4a07763e71efbaedb523015f0c1eff2927f60 | [
"Ruby"
] | null | null | null | medium/python3/c0246_494_target-sum/00_leetcode_0246.py | drunkwater/leetcode | 8cc4a07763e71efbaedb523015f0c1eff2927f60 | [
"Ruby"
] | null | null | null | medium/python3/c0246_494_target-sum/00_leetcode_0246.py | drunkwater/leetcode | 8cc4a07763e71efbaedb523015f0c1eff2927f60 | [
"Ruby"
] | 3 | 2018-02-09T02:46:48.000Z | 2021-02-20T08:32:03.000Z | # DRUNKWATER TEMPLATE(add description and prototypes)
# Question Title and Description on leetcode.com
# Function Declaration and Function Prototypes on leetcode.com
#494. Target Sum
#You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you s... | 34.483871 | 185 | 0.669785 | # DRUNKWATER TEMPLATE(add description and prototypes)
# Question Title and Description on leetcode.com
# Function Declaration and Function Prototypes on leetcode.com
#494. Target Sum
#You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you s... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
18a6a5cfa440fc62639d60c88c1a365c51b7f9cd | 9,160 | py | Python | coordinates/sat.py | ilya-e/coordinates | 328ef6f07450592524b49c71a0859c3b1d1fd489 | [
"MIT"
] | null | null | null | coordinates/sat.py | ilya-e/coordinates | 328ef6f07450592524b49c71a0859c3b1d1fd489 | [
"MIT"
] | null | null | null | coordinates/sat.py | ilya-e/coordinates | 328ef6f07450592524b49c71a0859c3b1d1fd489 | [
"MIT"
] | null | null | null | import datetime
from math import sqrt, sin, cos, atan2
from coordinates import datum
from coordinates.exceptions import SatSystemError, NavMessageNotFoundError
# GPS, BDS, Galileo, and IRNSS
GPS_WAY = {'G', 'C', 'E', 'I'}
# GLONASS, SBAS, and QZSS
GLO_WAY = {'R', 'S', 'J'}
KNOWN_SYSTEMS = GPS_WAY | GLO_WAY
EPOCH_S... | 24.623656 | 78 | 0.550109 | import datetime
from collections import defaultdict
from functools import lru_cache
from math import sqrt, sin, cos, atan2
from operator import itemgetter
from coordinates import datum
from coordinates.broadcast import rnx_nav
from coordinates.exceptions import SatSystemError, NavMessageNotFoundError
# GPS, BDS, Gali... | 196 | 839 | 0 | 0 | 0 | 0 | 0 | 54 | 134 |
aab38758fa535a6c7247add2c86056e806a35464 | 3,202 | py | Python | 1vana/env.py | 8vana/8vana | 519142bd74d627d8556a58928329edd757cc36fa | [
"Apache-2.0"
] | 12 | 2019-09-22T02:12:15.000Z | 2020-05-17T13:05:51.000Z | 1vana/env.py | 8vana/8vana | 519142bd74d627d8556a58928329edd757cc36fa | [
"Apache-2.0"
] | null | null | null | 1vana/env.py | 8vana/8vana | 519142bd74d627d8556a58928329edd757cc36fa | [
"Apache-2.0"
] | 1 | 2019-12-12T16:05:21.000Z | 2019-12-12T16:05:21.000Z | # default setting
INPUT_LOG = "../converted_logs/8vana_input.json"
LOG_POLLING_TIME = 5
LOG_HASH_ALGO = 'md5'
#
LOG_AREA_X = 52
LOG_AREA_Y = 184
LOG_FRAME_X1 = 48
LOG_FRAME_Y1 = 175
LOG_FRAME_X2 = 246
LOG_FRAME_Y2 = 232
LOG_MAX_LINE = 7
#
MONOLITH_X1 ... | 19.644172 | 63 | 0.579325 | # default setting
INPUT_LOG = "../converted_logs/8vana_input.json"
LOG_POLLING_TIME = 5
LOG_HASH_ALGO = 'md5'
# ログウィンドウ向けセッティング(各種表示位置を設定)
LOG_AREA_X = 52
LOG_AREA_Y = 184
LOG_FRAME_X1 = 48
LOG_FRAME_Y1 = 175
LOG_FRAME_X2 = 246
LOG_FRAME_Y2 = 232
LOG_MAX_LINE = 7... | 1,011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d8842394665545741b6355f7534823c74b43bcbc | 1,430 | py | Python | tests/pdfs/test_pdfs.py | ktaranov/HPI | 3aa21107465b19b8b09884fbda8326617d3324ae | [
"MIT"
] | 1 | 2021-08-04T18:54:53.000Z | 2021-08-04T18:54:53.000Z | tests/pdfs/test_pdfs.py | ktaranov/HPI | 3aa21107465b19b8b09884fbda8326617d3324ae | [
"MIT"
] | null | null | null | tests/pdfs/test_pdfs.py | ktaranov/HPI | 3aa21107465b19b8b09884fbda8326617d3324ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import inspect
from pathlib import Path
from my.pdfs import get_annots, annotated_pdfs
ROOT = Path(__file__).parent.absolute()
EXPECTED_HIGHLIGHTS = set(
[
"Since 1994, when we first began organizing web sites, we have enjoyed a rare opportunity to participate in the birth of a ne... | 29.791667 | 149 | 0.714685 | #!/usr/bin/env python3
import inspect
from pathlib import Path
from my.pdfs import get_annots, annotated_pdfs
ROOT = Path(__file__).parent.absolute()
EXPECTED_HIGHLIGHTS = set(
[
"Since 1994, when we first began organizing web sites, we have enjoyed a rare opportunity to participate in the birth of a ne... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9cf97ed2a845e6af6ad9b7e5e1cf039fa823eb3c | 7,181 | py | Python | clustering/radfriendsregion.py | JohannesBuchner/massivedatans | bf13e90048a3a1bb945e25e0a8848c08fa8a80f8 | [
"BSD-2-Clause"
] | 10 | 2017-07-17T20:59:29.000Z | 2019-09-09T01:57:05.000Z | clustering/radfriendsregion.py | JohannesBuchner/massivedatans | bf13e90048a3a1bb945e25e0a8848c08fa8a80f8 | [
"BSD-2-Clause"
] | 1 | 2020-04-23T13:59:35.000Z | 2020-04-23T13:59:35.000Z | clustering/radfriendsregion.py | JohannesBuchner/massivedatans | bf13e90048a3a1bb945e25e0a8848c08fa8a80f8 | [
"BSD-2-Clause"
] | 3 | 2017-07-18T01:41:04.000Z | 2018-06-05T16:42:10.000Z | from __future__ import print_function, division
"""
RadFriends region with transforms
----------------------------------
Copyright (c) 2017 Johannes Buchner
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributio... | 39.027174 | 755 | 0.710904 | from __future__ import print_function, division
"""
RadFriends region with transforms
----------------------------------
Copyright (c) 2017 Johannes Buchner
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributio... | 0 | 0 | 0 | 5,536 | 0 | 0 | 0 | 109 | 113 |
371c6d11411a06fc2fbb682183546598ccd8a649 | 879 | py | Python | 03_BatchPredictionPipeline_AML/publish_scored_data.py | nickwiecien/AzureML-LocalModel_BatchPipeline | c3f0f09c6373aaf56041322637e731bc93e50158 | [
"MIT"
] | null | null | null | 03_BatchPredictionPipeline_AML/publish_scored_data.py | nickwiecien/AzureML-LocalModel_BatchPipeline | c3f0f09c6373aaf56041322637e731bc93e50158 | [
"MIT"
] | null | null | null | 03_BatchPredictionPipeline_AML/publish_scored_data.py | nickwiecien/AzureML-LocalModel_BatchPipeline | c3f0f09c6373aaf56041322637e731bc93e50158 | [
"MIT"
] | null | null | null | from azureml.core import Run
import os
# Get current run
current_run = Run.get_context()
# Get associated AML workspace
ws = current_run.experiment.workspace
# Get default datastore
ds = ws.get_default_datastore()
# Get inferencing dataset
scored_dataset = current_run.input_datasets['scored_data']
scored_data_df = ... | 32.555556 | 152 | 0.807736 | from azureml.core import Run, Workspace, Datastore, Dataset
from azureml.data.datapath import DataPath
import pandas as pd
import os
import argparse
from sklearn.datasets import load_iris
import snowflake.connector
# Get current run
current_run = Run.get_context()
# Get associated AML workspace
ws = current_run.exper... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 110 |
1c291255fedfca00359848d73b100a77825fd0f1 | 6,517 | py | Python | python/websphere/wasadmin_2.1.py | sgmoratilla/utilities | 629fd39f7fe120969d0a910f70494e821baf3ef0 | [
"Apache-2.0"
] | null | null | null | python/websphere/wasadmin_2.1.py | sgmoratilla/utilities | 629fd39f7fe120969d0a910f70494e821baf3ef0 | [
"Apache-2.0"
] | null | null | null | python/websphere/wasadmin_2.1.py | sgmoratilla/utilities | 629fd39f7fe120969d0a910f70494e821baf3ef0 | [
"Apache-2.0"
] | null | null | null |
run()
| 36.819209 | 177 | 0.635108 | import time
import os
import sys
from supported_apps import SupportedApps
class AutoDetectWasApplicationVersion:
EXTRACT_VERSION_RE = '^[a-zA-Z-]+-([0-9]+.[0-9]+.[0-9]+.[0-9]+.[0-9]+(-SNAPSHOT)?).ear$'
def __init__(self, app_codename, app_directory, abort_if_several=True):
self.app_codename = app_code... | 0 | 0 | 0 | 4,571 | 0 | 1,674 | 0 | -14 | 272 |
d37e805d5c6782b854fda23c0f1cb70c0b0321a5 | 1,050 | py | Python | final_project/machinetranslation/tests/tests.py | pri123yam/xzceb-flask_eng_fr | 2ca013292e77d8f666841f6b1219fb6aaa1e9bbe | [
"Apache-2.0"
] | null | null | null | final_project/machinetranslation/tests/tests.py | pri123yam/xzceb-flask_eng_fr | 2ca013292e77d8f666841f6b1219fb6aaa1e9bbe | [
"Apache-2.0"
] | null | null | null | final_project/machinetranslation/tests/tests.py | pri123yam/xzceb-flask_eng_fr | 2ca013292e77d8f666841f6b1219fb6aaa1e9bbe | [
"Apache-2.0"
] | null | null | null | """ this modules tests the functionality of language translation methods """
import unittest
unittest.main()
| 45.652174 | 94 | 0.737143 | """ this modules tests the functionality of language translation methods """
import unittest
from machinetranslation.translator import englishToFrench, frenchToEnglish
class TestEnglishToFrench(unittest.TestCase):
""" this class contains method to test the english to french translation functionality """
def t... | 0 | 0 | 0 | 818 | 0 | 0 | 0 | 53 | 69 |
df4a6826c529feb859763b29d5ad67459f12981b | 1,584 | py | Python | c/gev/src/gen_run_8.py | timtyree/bgmc | 891e003a9594be9e40c53822879421c2b8c44eed | [
"MIT"
] | null | null | null | c/gev/src/gen_run_8.py | timtyree/bgmc | 891e003a9594be9e40c53822879421c2b8c44eed | [
"MIT"
] | null | null | null | c/gev/src/gen_run_8.py | timtyree/bgmc | 891e003a9594be9e40c53822879421c2b8c44eed | [
"MIT"
] | null | null | null | import numpy as np
#mle fit to lr model: source: /home/timothytyree/Documents/GitHub/care/notebooks/Data/initial-conditions-lr-600x600/param_qu_tmax_30/Log/ic600x600.0.1_traj_sr_1200_mem_0.csv
shape=-0.338#74#-0.3383994872096594;
location=0.186#2#0.18616306715070396; #//cm
scale=0.139#86#5657625455955; #//cm
niter=250... | 44 | 173 | 0.609848 | import numpy as np
#mle fit to lr model: source: /home/timothytyree/Documents/GitHub/care/notebooks/Data/initial-conditions-lr-600x600/param_qu_tmax_30/Log/ic600x600.0.1_traj_sr_1200_mem_0.csv
shape=-0.338#74#-0.3383994872096594;
location=0.186#2#0.18616306715070396; #//cm
scale=0.139#86#5657625455955; #//cm
niter=250... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a3a264802e695c1427dc35ececfdabbc611f29fe | 3,053 | py | Python | jumpstart/installs/snap.py | imochoa/dotfiles | 3de9b8ff5a277575d6f5000e5cec8c47403cd55e | [
"MIT"
] | null | null | null | jumpstart/installs/snap.py | imochoa/dotfiles | 3de9b8ff5a277575d6f5000e5cec8c47403cd55e | [
"MIT"
] | 114 | 2019-07-12T07:35:35.000Z | 2021-04-20T14:44:15.000Z | jumpstart/installs/snap.py | imochoa/dotfiles | 3de9b8ff5a277575d6f5000e5cec8c47403cd55e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# std imports
from typing import Sequence, Optional, Dict, Tuple
# local imports
from jumpstart.utils import echo, bcolors
from jumpstart.installs.cmd_builders import snap_install, snap_remove
TRIVIAL_PGKS = [
"slack",
"inkscape",
"pycharm-community",
"pycharm-professional",
]
... | 29.355769 | 105 | 0.551916 | #!/usr/bin/env python3
# std imports
from typing import Union, Sequence, Optional, List, Dict, Tuple
import pdb
# local imports
from jumpstart.utils import echo, bcolors
from jumpstart.installs.cmd_builders import snap_install, snap_remove
TRIVIAL_PGKS = [
"slack",
"inkscape",
"pycharm-community",
"p... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 22 |
024b46bf2656af126fb33e24521efcabfbcc5dd6 | 1,003 | py | Python | python3/src/filters.py | zhudanfei/json-schema-dsl | 26323e8440a404610998a67912ecefb243bf788c | [
"MIT"
] | null | null | null | python3/src/filters.py | zhudanfei/json-schema-dsl | 26323e8440a404610998a67912ecefb243bf788c | [
"MIT"
] | null | null | null | python3/src/filters.py | zhudanfei/json-schema-dsl | 26323e8440a404610998a67912ecefb243bf788c | [
"MIT"
] | null | null | null |
JSON_TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'
ToTimestamp = SchemaFilter('filter', 'ToTimestamp', to_timestamp)
Trim = SchemaFilter('filter', 'Trim', trim)
ToString = SchemaFilter('filter', 'ToString', to_string)
| 23.325581 | 66 | 0.67996 | import datetime
import time
from .schema_dsl_common import *
JSON_TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'
def to_datetime(value, path):
if value is None:
return None
try:
return datetime.datetime.strptime(value, JSON_TIME_FORMAT)
except ValueError as e:
raise ValueError(get_message... | 0 | 0 | 0 | 0 | 0 | 632 | 0 | -5 | 159 |
7423b2f17d848ae0b6046110a78fd89bc154f0c8 | 1,339 | py | Python | coronacheck_tools/verification/verifier.py | solorunner/coronacheck-tools | 4a48d696a05b328b47cbdd8249d64a0f064ebb59 | [
"MIT"
] | 39 | 2021-06-25T22:39:46.000Z | 2022-02-16T03:12:32.000Z | coronacheck_tools/verification/verifier.py | solorunner/coronacheck-tools | 4a48d696a05b328b47cbdd8249d64a0f064ebb59 | [
"MIT"
] | 13 | 2021-06-25T19:39:31.000Z | 2022-01-31T15:01:57.000Z | coronacheck_tools/verification/verifier.py | solorunner/coronacheck-tools | 4a48d696a05b328b47cbdd8249d64a0f064ebb59 | [
"MIT"
] | 13 | 2021-07-03T17:25:56.000Z | 2022-02-06T15:13:09.000Z | from coronacheck_tools.verification.mobilecore import validate as mobilecore_validate, clearconfig as mobilecore_clearconfig, readconfig as mobilecore_readconfig
# there's only one strategy at the moment
# mobilecore: a thin wrapper around the mobilecore validator from the coronacheck.nl app
strategies = ('mobilecore'... | 29.755556 | 127 | 0.712472 | from coronacheck_tools.verification.mobilecore import validate as mobilecore_validate, clearconfig as mobilecore_clearconfig, \
readconfig as mobilecore_readconfig
# there's only one strategy at the moment
# mobilecore: a thin wrapper around the mobilecore validator from the coronacheck.nl app
strategies = ('mobil... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 |
2c06d757543ba01b6c7f909d589aa6438e0b04f1 | 6,523 | py | Python | AnimeList/views.py | habelash/AnimeView | 893620c318b25a549479c781f002e6eed326705c | [
"CC0-1.0"
] | null | null | null | AnimeList/views.py | habelash/AnimeView | 893620c318b25a549479c781f002e6eed326705c | [
"CC0-1.0"
] | 7 | 2021-03-30T14:17:35.000Z | 2022-01-13T02:55:42.000Z | AnimeList/views.py | habelash/AnimeView | 893620c318b25a549479c781f002e6eed326705c | [
"CC0-1.0"
] | null | null | null |
# Create your views here.
| 28.609649 | 119 | 0.63759 | from django.shortcuts import render
from django.http import Http404
from .models import onepiece, naruto, haikyu, aot, onepunchman, bnha, afrosamurai, bleach, deathnote, kny, fairytail, \
fmab, hxh, tokyoghoul, boruto
from list.models import animelist, topanime
# Create your views here.
def index(request):
r... | 0 | 0 | 0 | 0 | 0 | 5,729 | 0 | 178 | 571 |
0f3b23a2fcba20e9abd0c4b58ad9673908703395 | 7,665 | py | Python | tfsnippet/examples/auto_encoders/vae.py | 897615138/tfsnippet-jill | 2fc898a4def866c8d3c685168df1fa22083bb143 | [
"MIT"
] | null | null | null | tfsnippet/examples/auto_encoders/vae.py | 897615138/tfsnippet-jill | 2fc898a4def866c8d3c685168df1fa22083bb143 | [
"MIT"
] | null | null | null | tfsnippet/examples/auto_encoders/vae.py | 897615138/tfsnippet-jill | 2fc898a4def866c8d3c685168df1fa22083bb143 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
if __name__ == '__main__':
main()
| 36.5 | 80 | 0.616438 | # -*- coding: utf-8 -*-
import functools
import click
import tensorflow as tf
from tensorflow.contrib.framework import arg_scope, add_arg_scope
from tfsnippet.bayes import BayesianNet
from tfsnippet.distributions import Normal, Bernoulli
from tfsnippet.examples.datasets import load_mnist, bernoulli_flow
from tfsnippe... | 0 | 6,118 | 0 | 380 | 0 | 0 | 0 | 741 | 358 |
f0744130fd118fb9ad76773478f903699b1bf600 | 133 | py | Python | cp_light_control/cp_task_1.py | nlam23/control-algorithms | 8e83104e0ee52962a3f11edff1a91000d41228ab | [
"MIT"
] | null | null | null | cp_light_control/cp_task_1.py | nlam23/control-algorithms | 8e83104e0ee52962a3f11edff1a91000d41228ab | [
"MIT"
] | null | null | null | cp_light_control/cp_task_1.py | nlam23/control-algorithms | 8e83104e0ee52962a3f11edff1a91000d41228ab | [
"MIT"
] | 1 | 2022-02-07T03:23:30.000Z | 2022-02-07T03:23:30.000Z | import time
import board
from analogio import AnalogIn
input = AnalogIn(board.A1)
while True:
print(input)
time.sleep(0.5)
| 13.3 | 29 | 0.729323 | import time
import board
from analogio import AnalogIn
input = AnalogIn(board.A1)
while True:
print(input)
time.sleep(0.5)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b1432139e5e3f3ac26eb0644793549cf37bec597 | 9,758 | py | Python | modelmanager/plugins/browser/__init__.py | mwort/modelmanager | f079d5aa09165fcd43a2bef3cb1cfc2ab36cb47a | [
"BSD-3-Clause"
] | 1 | 2020-06-11T17:29:49.000Z | 2020-06-11T17:29:49.000Z | modelmanager/plugins/browser/__init__.py | mwort/modelmanager | f079d5aa09165fcd43a2bef3cb1cfc2ab36cb47a | [
"BSD-3-Clause"
] | 1 | 2020-02-12T01:15:46.000Z | 2020-02-12T01:15:46.000Z | modelmanager/plugins/browser/__init__.py | mwort/modelmanager | f079d5aa09165fcd43a2bef3cb1cfc2ab36cb47a | [
"BSD-3-Clause"
] | 1 | 2021-04-05T13:33:31.000Z | 2021-04-05T13:33:31.000Z | """
This is a modelmanager plugin for a django server app that gives you a
browser interface and a database backend for your model.
The plugin is made up of two custom Django apps, one residing in the
modelmanager package and one in the project/resourcedir/browser directory.
While the first is fully importable (i.e. i... | 36.822642 | 78 | 0.585776 | """
This is a modelmanager plugin for a django server app that gives you a
browser interface and a database backend for your model.
The plugin is made up of two custom Django apps, one residing in the
modelmanager package and one in the project/resourcedir/browser directory.
While the first is fully importable (i.e. i... | 0 | 287 | 0 | 8,741 | 0 | 0 | 0 | -19 | 228 |
0aa7937ba1af87ff3515aed35ad7cf93e60fd356 | 8,276 | py | Python | supermega/protocol.py | lmb/Supermega | 4cfd60bd3d031b0214b732dfc89cab0ad7c62cf1 | [
"BSD-3-Clause"
] | 1 | 2018-05-08T09:40:46.000Z | 2018-05-08T09:40:46.000Z | supermega/protocol.py | lmb/Supermega | 4cfd60bd3d031b0214b732dfc89cab0ad7c62cf1 | [
"BSD-3-Clause"
] | null | null | null | supermega/protocol.py | lmb/Supermega | 4cfd60bd3d031b0214b732dfc89cab0ad7c62cf1 | [
"BSD-3-Clause"
] | null | null | null | import requests.exceptions
from . import transport
from . import errors
from . import utils
from . import schemata
service_error = utils.registry(errors.ServiceError, 'ERRORS')
TRANSACTION_SCHEMA = schemata.Schema.from_file('transaction.json')
RETRY_CONDITIONS = (requests.exceptions.Timeout, RetryRequest,
transp... | 27.586667 | 76 | 0.659014 | import os.path
import json
import copy
import itertools
import requests.exceptions
from . import transport
from . import errors
from . import utils
from . import schemata
service_error = utils.registry(errors.ServiceError, 'ERRORS')
@service_error(-1)
class InternalError(errors.ServiceError):
"""An internal servi... | 0 | 1,826 | 0 | 5,321 | 0 | 0 | 0 | -32 | 823 |
3beecfd645d1b164d1a4dd9a373b227e4d07a53a | 2,955 | py | Python | routerGen/mftlib.py | mft3000/routerGen | 8f2406d5145084f44bd072935c3207c2762bc0e5 | [
"MIT"
] | 4 | 2016-10-09T20:05:35.000Z | 2021-07-09T11:08:15.000Z | routerGen/mftlib.py | mft3000/routerGen | 8f2406d5145084f44bd072935c3207c2762bc0e5 | [
"MIT"
] | null | null | null | routerGen/mftlib.py | mft3000/routerGen | 8f2406d5145084f44bd072935c3207c2762bc0e5 | [
"MIT"
] | 1 | 2020-02-26T14:37:20.000Z | 2020-02-26T14:37:20.000Z | #!/usr/bin/env python
###### ver 0.2
#
# 0.1 init
# 0.2 add whois
# | 20.664336 | 59 | 0.483926 | #!/usr/bin/env python
###### ver 0.2
#
# 0.1 init
# 0.2 add whois
#
import socket, select, string
def minMax(varA,varB):
if int(varA) < int(varB):
return varA, varB
elif int(varA) > int(varB):
return varB, varA
def isisRID(var):
if int(var) < 10:
var = "000" + var + "." + "000" + var + "." + "000" ... | 0 | 0 | 0 | 0 | 0 | 2,707 | 0 | 8 | 166 |
0bc012e39f735d737776f5dd8d40e7893008d327 | 6,710 | py | Python | ossapi/utils.py | roansong/ossapi | 023cd79c22aafb6f51b88f38ae2881c30416930f | [
"MIT"
] | null | null | null | ossapi/utils.py | roansong/ossapi | 023cd79c22aafb6f51b88f38ae2881c30416930f | [
"MIT"
] | null | null | null | ossapi/utils.py | roansong/ossapi | 023cd79c22aafb6f51b88f38ae2881c30416930f | [
"MIT"
] | null | null | null | from typing import get_args, get_origin, Union
def is_high_model_type(type_):
"""
Whether ``type_`` is both a model type and not a base model type.
"high" here is meant to indicate that it is not at the bottom of the model
hierarchy, ie not a "base" model.
"""
return is_model_type(type_) and ... | 37.277778 | 80 | 0.644858 | from enum import EnumMeta, Enum, IntFlag
from datetime import datetime, timezone
from typing import get_args, get_origin, Union
def is_high_model_type(type_):
"""
Whether ``type_`` is both a model type and not a base model type.
"high" here is meant to indicate that it is not at the bottom of the model
... | 0 | 909 | 0 | 4,130 | 0 | 465 | 0 | 37 | 228 |
93fe482031033c64ab1ba55dc7fcfe85f2eae3ef | 3,512 | py | Python | Competitive Programming/Binary Trees/Find all Duplicate subtrees in a Binary tree.py | shreejitverma/GeeksforGeeks | d7bcb166369fffa9a031a258e925b6aff8d44e6c | [
"MIT"
] | 2 | 2022-02-18T05:14:28.000Z | 2022-03-08T07:00:08.000Z | Competitive Programming/Binary Trees/Find all Duplicate subtrees in a Binary tree.py | shivaniverma1/Competitive-Programming-1 | d7bcb166369fffa9a031a258e925b6aff8d44e6c | [
"MIT"
] | 6 | 2022-01-13T04:31:04.000Z | 2022-03-12T01:06:16.000Z | Competitive Programming/Binary Trees/Find all Duplicate subtrees in a Binary tree.py | shivaniverma1/Competitive-Programming-1 | d7bcb166369fffa9a031a258e925b6aff8d44e6c | [
"MIT"
] | 2 | 2022-02-14T19:53:53.000Z | 2022-02-18T05:14:30.000Z | '''https://practice.geeksforgeeks.org/problems/duplicate-subtrees/1
Duplicate Subtrees
Medium Accuracy: 43.37% Submissions: 15751 Points: 4
Given a binary tree of size N, your task is to that find all duplicate subtrees from the given binary tree.
Example:
Input :
Output : 2 4
4
Explanation: Above Trees a... | 22.805195 | 184 | 0.558371 | '''https://practice.geeksforgeeks.org/problems/duplicate-subtrees/1
Duplicate Subtrees
Medium Accuracy: 43.37% Submissions: 15751 Points: 4
Given a binary tree of size N, your task is to that find all duplicate subtrees from the given binary tree.
Example:
Input :
Output : 2 4
4
Explanation: Above Trees a... | 0 | 0 | 0 | 710 | 0 | 1,426 | 0 | 8 | 114 |
11962767e4b816a7119a1648e5fed38cd42b16f7 | 8,954 | py | Python | third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_go_generator.py | hefen1/chromium | 52f0b6830e000ca7c5e9aa19488af85be792cc88 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_go_generator.py | hefen1/chromium | 52f0b6830e000ca7c5e9aa19488af85be792cc88 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | third_party/mojo/src/mojo/public/tools/bindings/generators/mojom_go_generator.py | hefen1/chromium | 52f0b6830e000ca7c5e9aa19488af85be792cc88 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2020-04-04T13:34:56.000Z | 2020-11-04T07:17:52.000Z | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Generates Go source files from a mojom.Module.'''
import mojom.generate.generator as generator
import mojom.generate.module as mojom
import mojom.generat... | 37.464435 | 79 | 0.677239 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Generates Go source files from a mojom.Module.'''
from itertools import chain
import os
import re
from mojom.generate.template_expander import UseJinja
... | 0 | 96 | 0 | 1,812 | 0 | 4,197 | 0 | 14 | 481 |
58775083791a34ae045ed0a8046626ef62ff66ba | 6,197 | py | Python | athena/layers/resnet_block.py | shuaijiang/athena-2 | 5d4d6d13075b8ee9fd824ce6258cb8f55dd157eb | [
"Apache-2.0"
] | 1 | 2020-08-26T08:56:49.000Z | 2020-08-26T08:56:49.000Z | athena/layers/resnet_block.py | shuaijiang/athena-2 | 5d4d6d13075b8ee9fd824ce6258cb8f55dd157eb | [
"Apache-2.0"
] | null | null | null | athena/layers/resnet_block.py | shuaijiang/athena-2 | 5d4d6d13075b8ee9fd824ce6258cb8f55dd157eb | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright (C) 2020 ATHENA AUTHORS; Ne Luo
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | 37.107784 | 104 | 0.595127 | # coding=utf-8
# Copyright (C) 2020 ATHENA AUTHORS; Ne Luo
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | 0 | 0 | 0 | 1,870 | 0 | 354 | 0 | 0 | 69 |
00b31eb7992c1d22e0d341b4a6169fe7b3d310e9 | 5,169 | py | Python | aiocogeo/tag.py | jferencik/aiocogeo | fc3594682357b5625d91c096fc48f63d7e548846 | [
"MIT"
] | 48 | 2020-06-13T05:20:35.000Z | 2022-03-10T19:26:30.000Z | aiocogeo/tag.py | jferencik/aiocogeo | fc3594682357b5625d91c096fc48f63d7e548846 | [
"MIT"
] | 81 | 2020-05-27T13:44:24.000Z | 2022-03-31T11:36:46.000Z | aiocogeo/tag.py | jferencik/aiocogeo | fc3594682357b5625d91c096fc48f63d7e548846 | [
"MIT"
] | 6 | 2020-10-29T01:10:27.000Z | 2021-08-11T12:51:20.000Z | """aiocogeo.tag"""
import logging
from . import config
logger = logging.getLogger(__name__)
logger.setLevel(config.LOG_LEVEL)
TAG_TYPES = {
1: TagType(format="B", size=1), # TIFFByte
2: TagType(format="c", size=1), # TIFFascii
3: TagType(format="H", size=2), # TIFFshort
4: TagType(format="L", si... | 30.585799 | 119 | 0.592184 | """aiocogeo.tag"""
import logging
import struct
from dataclasses import dataclass
from typing import Any, Optional, Tuple, Union
from . import config
from .constants import GEO_KEYS, TIFF_TAGS
from .filesystems import Filesystem
logger = logging.getLogger(__name__)
logger.setLevel(config.LOG_LEVEL)
@dataclass
class... | 0 | 4,333 | 0 | 0 | 0 | 0 | 0 | 64 | 225 |
c401ca2627c0fd32b34b9a72899699f291c2b898 | 2,582 | py | Python | ehive/runnable/jobfactory/SamplesheetFlowcellFactory.py | imperial-genomics-facility/data-management-python | 7b867d8d4562a49173d0b823bdc4bf374a3688f0 | [
"Apache-2.0"
] | 7 | 2018-05-08T07:28:08.000Z | 2022-02-21T14:56:49.000Z | ehive/runnable/jobfactory/SamplesheetFlowcellFactory.py | imperial-genomics-facility/data-management-python | 7b867d8d4562a49173d0b823bdc4bf374a3688f0 | [
"Apache-2.0"
] | 15 | 2021-08-19T12:32:20.000Z | 2022-02-09T19:52:51.000Z | ehive/runnable/jobfactory/SamplesheetFlowcellFactory.py | imperial-genomics-facility/data-management-python | 7b867d8d4562a49173d0b823bdc4bf374a3688f0 | [
"Apache-2.0"
] | 2 | 2017-05-12T15:20:10.000Z | 2020-05-07T16:25:11.000Z | #!/usr/bin/env python | 46.107143 | 126 | 0.603021 | #!/usr/bin/env python
import os
from ehive.runnable.IGFBaseJobFactory import IGFBaseJobFactory
from igf_data.illumina.samplesheet import SampleSheet
class SampleSheetFlowcellFactory(IGFBaseJobFactory):
'''
A class for finding all the projects mentioned in the SampleSheet
'''
def param_defaults(self):
param... | 0 | 0 | 0 | 2,411 | 0 | 0 | 0 | 61 | 89 |
f441e561c39f3faefbea092000f0e5ccc72baa00 | 526 | py | Python | src/utils/hugo/hugoCommands.py | Bruno-GD/mongodb-to-hugo | d2bd527b7f40296d890891c0805e984d6cdfe1f5 | [
"MIT"
] | null | null | null | src/utils/hugo/hugoCommands.py | Bruno-GD/mongodb-to-hugo | d2bd527b7f40296d890891c0805e984d6cdfe1f5 | [
"MIT"
] | null | null | null | src/utils/hugo/hugoCommands.py | Bruno-GD/mongodb-to-hugo | d2bd527b7f40296d890891c0805e984d6cdfe1f5 | [
"MIT"
] | 2 | 2022-02-07T18:50:56.000Z | 2022-02-08T22:20:17.000Z | from .checkHugoCommand import isHugoAvailable
from os import system as runCommand
from logging import getLogger as gL
LOGGER = gL(__name__)
def startHugoSite(hugoFolder: str) -> None:
"""
Run Hugo command to create a new site folder
"""
# precondition
assert isinstance(hugoFolder, str), "hugoFol... | 25.047619 | 84 | 0.690114 | from .checkHugoCommand import isHugoAvailable
from os import system as runCommand
from logging import getLogger as gL
LOGGER = gL(__name__)
def startHugoSite(hugoFolder: str) -> None:
"""
Run Hugo command to create a new site folder
"""
# precondition
assert isinstance(hugoFolder, str), "hugoFol... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a511f56b21b49bb331c3a55bd4a14e25ed2cce9f | 2,190 | py | Python | kleister/models/__init__.py | kleister/kleister-python | 321120b96db59e20b30853b44af3bec6b667db05 | [
"Apache-2.0"
] | null | null | null | kleister/models/__init__.py | kleister/kleister-python | 321120b96db59e20b30853b44af3bec6b667db05 | [
"Apache-2.0"
] | 1 | 2018-03-31T12:33:37.000Z | 2018-03-31T12:33:37.000Z | kleister/models/__init__.py | kleister/kleister-python | 321120b96db59e20b30853b44af3bec6b667db05 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
# import all models into this package
# if you have many models here with many references from one model to another this may
# raise a RecursionError
# to avoid this, import only the models that you directly need like:
# from from kleister.model.pet import Pet
# or import this package, but before doing ... | 46.595745 | 86 | 0.864384 | # flake8: noqa
# import all models into this package
# if you have many models here with many references from one model to another this may
# raise a RecursionError
# to avoid this, import only the models that you directly need like:
# from from kleister.model.pet import Pet
# or import this package, but before doing ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,050 | 771 |
8402981488f6bc6709d19e7c23b8c1a436b6975c | 12,292 | py | Python | SWIG/test/testElementaryModesUsingSBML.py | sys-bio/Libstructural | fb698bcaeaef95f0d07c010f80c84d2cb6e93793 | [
"BSD-2-Clause"
] | 3 | 2018-06-01T17:43:03.000Z | 2019-06-20T11:37:53.000Z | SWIG/test/testElementaryModesUsingSBML.py | sys-bio/Libstructural | fb698bcaeaef95f0d07c010f80c84d2cb6e93793 | [
"BSD-2-Clause"
] | 29 | 2017-12-20T04:47:47.000Z | 2018-05-16T17:20:09.000Z | SWIG/test/testElementaryModesUsingSBML.py | sys-bio/Libstructural | fb698bcaeaef95f0d07c010f80c84d2cb6e93793 | [
"BSD-2-Clause"
] | 1 | 2018-08-27T08:28:28.000Z | 2018-08-27T08:28:28.000Z | # Test Script for checking elementary modes
# Dec 2017
| 30.577114 | 107 | 0.520013 | # Test Script for checking elementary modes
# Dec 2017
import structural
import numpy as np
import pkg_resources
import os
import tempfile
def nullspace(A, atol=1e-13, rtol=0):
A = np.atleast_2d(A)
u, s, vh = np.linalg.svd(A)
tol = max(atol, rtol * s[0])
nnz = (s >= tol).sum()
ns = vh[nnz:].conj(... | 0 | 0 | 0 | 0 | 0 | 11,984 | 0 | -26 | 272 |
2e152b681f0dc88a2fd2553f978f55e20221077b | 1,829 | py | Python | WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/Overflow/Beginners-Python-Examples-master/shell_games/number_guessing_game.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 5 | 2021-06-02T23:44:25.000Z | 2021-12-27T16:21:57.000Z | WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/Overflow/Beginners-Python-Examples-master/shell_games/number_guessing_game.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 22 | 2021-05-31T01:33:25.000Z | 2021-10-18T18:32:39.000Z | WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/Overflow/Beginners-Python-Examples-master/shell_games/number_guessing_game.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 3 | 2021-06-19T03:37:47.000Z | 2021-08-31T00:49:51.000Z | #!/usr/bin/python3
from random import randint
MAX_ = 500 # Specify biggest possible value from random number generation
# Asks user for a guess and returns this when successful
num_to_guess = randint(0, MAX_) # Generates a random number between 0 and value of MAX_
print(
"Welcome to my random number guessing ... | 30.483333 | 94 | 0.621651 | #!/usr/bin/python3
from random import randint
MAX_ = 500 # Specify biggest possible value from random number generation
# Asks user for a guess and returns this when successful
def get_guess():
while True: # Run forever, until broken
try: # Try the following, if fails, run the except statment
... | 0 | 0 | 0 | 0 | 0 | 584 | 0 | 0 | 22 |
88b86d55820f5affdb9bfdb3461e9be92d0b2630 | 3,352 | py | Python | recipes/recipe_modules/third_party_packages/examples/git.py | xinghun61/infra | b5d4783f99461438ca9e6a477535617fadab6ba3 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | recipes/recipe_modules/third_party_packages/examples/git.py | asdfghjjklllllaaa/infra | 8f63af54e46194cd29291813f2790ff6e986804d | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | recipes/recipe_modules/third_party_packages/examples/git.py | xinghun61/infra | b5d4783f99461438ca9e6a477535617fadab6ba3 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Recipe for 'git' building.
During testing, it may be useful to focus on building Git. This can be done by
running this recipe module directly.
"""
from ... | 25.014925 | 78 | 0.627983 | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Recipe for 'git' building.
During testing, it may be useful to focus on building Git. This can be done by
running this recipe module directly.
"""
from ... | 0 | 0 | 0 | 0 | 1,739 | 215 | 0 | 0 | 46 |
60b9830135f1e1bd970002aaf3241cdb287a08ab | 7,797 | py | Python | plugins/modules/get_sudo_policy_for_unix_host.py | llnagy76/ansible-privilege-manager | ca4fb68b58b1817a051c12ef06d759b2c4c1d63d | [
"Apache-2.0"
] | 1 | 2020-10-26T19:34:04.000Z | 2020-10-26T19:34:04.000Z | plugins/modules/get_sudo_policy_for_unix_host.py | llnagy76/ansible-privilege-manager | ca4fb68b58b1817a051c12ef06d759b2c4c1d63d | [
"Apache-2.0"
] | 1 | 2022-02-08T16:15:56.000Z | 2022-02-13T19:52:43.000Z | plugins/modules/get_sudo_policy_for_unix_host.py | llnagy76/ansible-privilege-manager | ca4fb68b58b1817a051c12ef06d759b2c4c1d63d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# Copyright (c) 2021, One Identity LLC
# File: get_sudo_policy_for_unix_host.py
# Desc: Ansible module for sudo_policy_for_unix_host role that runs pmsrvinfo
# and returns its results.
# Aut... | 27.454225 | 115 | 0.524945 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# Copyright (c) 2021, One Identity LLC
# File: get_sudo_policy_for_unix_host.py
# Desc: Ansible module for sudo_policy_for_unix_host role that runs pmsrvinfo
# and returns its results.
# Aut... | 0 | 0 | 0 | 0 | 0 | 931 | 0 | 97 | 132 |
1b45fdd0938a4bc3e5a6d7ef356505296738403d | 491 | py | Python | pythonavancado/exercicios/secao05/ex014.py | mrqssjeff/project-python | b3b08f2acfe825640a5ee92cf9d6fa45ab580384 | [
"MIT"
] | null | null | null | pythonavancado/exercicios/secao05/ex014.py | mrqssjeff/project-python | b3b08f2acfe825640a5ee92cf9d6fa45ab580384 | [
"MIT"
] | null | null | null | pythonavancado/exercicios/secao05/ex014.py | mrqssjeff/project-python | b3b08f2acfe825640a5ee92cf9d6fa45ab580384 | [
"MIT"
] | null | null | null | nota1 = float(input('Informe sua nota do Trabalho de Laboratrio: '))
nota2 = float(input('Informe sua nota da Avaliao semestral: '))
nota3 = float(input('Informe sua nota do Exame Final: '))
media = ((nota1 * 2) + (nota2 * 3) + (nota3 * 5)) / 10
if media <= 2.9:
print(f'Sua mdia foi de {media:2f}. Voc foi REPROVAD... | 44.636364 | 69 | 0.655804 | nota1 = float(input('Informe sua nota do Trabalho de Laboratório: '))
nota2 = float(input('Informe sua nota da Avaliação semestral: '))
nota3 = float(input('Informe sua nota do Exame Final: '))
media = ((nota1 * 2) + (nota2 * 3) + (nota3 * 5)) / 10
if media <= 2.9:
print(f'Sua média foi de {media:2f}. Você foi REP... | 24 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
443abc4c652a63c500ab3421dc2de26e79498f6b | 2,120 | py | Python | Scripts/UploadItch.py | arbonagw/Nova | a09331a903f4a2da1c5398f870d57b2b96dc194b | [
"BSD-3-Clause"
] | 59 | 2021-11-29T22:20:03.000Z | 2022-03-17T00:07:48.000Z | Scripts/UploadItch.py | Frank1eJohnson/ShipBuilder | 4610c16701ccb85d6f1e0de77f914e58bcf4de7e | [
"BSD-3-Clause"
] | null | null | null | Scripts/UploadItch.py | Frank1eJohnson/ShipBuilder | 4610c16701ccb85d6f1e0de77f914e58bcf4de7e | [
"BSD-3-Clause"
] | 4 | 2022-01-05T09:44:12.000Z | 2022-02-21T02:02:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Upload the game for distribution - make sure to configure Build.json
# Usage : UploadItch.py <absolute-output-dir>
#
# Gwennal Arbona 2021
#-----------------------------------------... | 31.176471 | 88 | 0.457075 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Upload the game for distribution - make sure to configure Build.json
# Usage : UploadItch.py <absolute-output-dir>
#
# Gwennaël Arbona 2021
#----------------------------------------... | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
abd7e572d45bc6d0f80c7136e538925384a8d118 | 965 | py | Python | portal/migrations/0001_initial.py | mezidia/django_labs | 8e9a4d57b1feb3b54e666c6583d14b978f230129 | [
"MIT"
] | null | null | null | portal/migrations/0001_initial.py | mezidia/django_labs | 8e9a4d57b1feb3b54e666c6583d14b978f230129 | [
"MIT"
] | 26 | 2021-09-21T09:29:25.000Z | 2022-03-02T15:27:16.000Z | portal/migrations/0001_initial.py | mezidia/django_labs | 8e9a4d57b1feb3b54e666c6583d14b978f230129 | [
"MIT"
] | 1 | 2021-11-14T16:40:52.000Z | 2021-11-14T16:40:52.000Z | # Generated by Django 3.2.9 on 2021-11-30 09:20
| 33.275862 | 93 | 0.579275 | # Generated by Django 3.2.9 on 2021-11-30 09:20
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Flight',
fields=[
('id', models.IntegerFiel... | 36 | 0 | 0 | 833 | 0 | 0 | 0 | 19 | 46 |
37464cc53fa0d8794accfdd0b24a6bfe8ed50610 | 12,175 | py | Python | waymo_open_dataset/utils/range_image_utils_test.py | kprohith/waymo-open-dataset | 9c519584cb95c6e2d3c909722298978668075542 | [
"Apache-2.0"
] | 3 | 2019-09-19T02:09:09.000Z | 2019-10-05T11:50:47.000Z | waymo_open_dataset/utils/range_image_utils_test.py | kprohith/waymo-open-dataset | 9c519584cb95c6e2d3c909722298978668075542 | [
"Apache-2.0"
] | null | null | null | waymo_open_dataset/utils/range_image_utils_test.py | kprohith/waymo-open-dataset | 9c519584cb95c6e2d3c909722298978668075542 | [
"Apache-2.0"
] | 1 | 2019-10-10T05:13:47.000Z | 2019-10-10T05:13:47.000Z | # Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 37.810559 | 80 | 0.581848 | # Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 0 | 0 | 0 | 10,435 | 0 | 0 | 0 | 46 | 113 |
11d66d5bf3cc48780c0466e79be8ef3fce0db7de | 3,527 | py | Python | python/cma_multiplt.py | LeniLeGoff/libcmaes | 7fe832a603ec4b5d2b04f5f84e6213d9fe46f839 | [
"Apache-2.0"
] | null | null | null | python/cma_multiplt.py | LeniLeGoff/libcmaes | 7fe832a603ec4b5d2b04f5f84e6213d9fe46f839 | [
"Apache-2.0"
] | null | null | null | python/cma_multiplt.py | LeniLeGoff/libcmaes | 7fe832a603ec4b5d2b04f5f84e6213d9fe46f839 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""In a OS shell::
python cma_multiplt.py data_file_name
or in a python shell::
import cma_multiplt as lcmaplt
lcmaplt.plot(data_file_name)
"""
# CMA-ES, Covariance Matrix Adaptation Evolution Strategy
# Copyright (c) 2014 Inria
# Author: Emmanuel Benazera <emmanuel.benazer... | 29.638655 | 121 | 0.649561 | #!/usr/bin/env python
"""In a OS shell::
python cma_multiplt.py data_file_name
or in a python shell::
import cma_multiplt as lcmaplt
lcmaplt.plot(data_file_name)
"""
# CMA-ES, Covariance Matrix Adaptation Evolution Strategy
# Copyright (c) 2014 Inria
# Author: Emmanuel Benazera <emmanuel.benazer... | 0 | 0 | 0 | 0 | 0 | 1,925 | 0 | 47 | 67 |
f2944498080aeafc7971c449e2630fb0fea94ff8 | 1,184 | py | Python | vertica_python/vertica/messages/backend_messages/__init__.py | jakubjedelsky/vertica-python | f379576b6949638c90908f5ebded321dce9330e5 | [
"MIT"
] | 1 | 2019-06-17T19:05:10.000Z | 2019-06-17T19:05:10.000Z | vertica_python/vertica/messages/backend_messages/__init__.py | jakubjedelsky/vertica-python | f379576b6949638c90908f5ebded321dce9330e5 | [
"MIT"
] | null | null | null | vertica_python/vertica/messages/backend_messages/__init__.py | jakubjedelsky/vertica-python | f379576b6949638c90908f5ebded321dce9330e5 | [
"MIT"
] | 2 | 2020-06-20T21:26:31.000Z | 2021-04-03T10:44:40.000Z | from __future__ import print_function, division, absolute_import
from .authentication import Authentication
from .backend_key_data import BackendKeyData
from .bind_complete import BindComplete
from .close_complete import CloseComplete
from .command_complete import CommandComplete
from .copy_in_response import CopyInRe... | 45.538462 | 100 | 0.82348 | from __future__ import print_function, division, absolute_import
from .authentication import Authentication
from .backend_key_data import BackendKeyData
from .bind_complete import BindComplete
from .close_complete import CloseComplete
from .command_complete import CommandComplete
from .copy_in_response import CopyInRe... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0e1f8b08d118388e292cbfab6405a53c75c851eb | 631 | py | Python | Tuplas/ex072.py | TacilioRodriguez/Python | 0b98dc8336e014046c579b387013b2871024e3d0 | [
"Unlicense"
] | null | null | null | Tuplas/ex072.py | TacilioRodriguez/Python | 0b98dc8336e014046c579b387013b2871024e3d0 | [
"Unlicense"
] | null | null | null | Tuplas/ex072.py | TacilioRodriguez/Python | 0b98dc8336e014046c579b387013b2871024e3d0 | [
"Unlicense"
] | null | null | null | """
Crie um programa que tenha uma Tupla totalmente preenchida com uma contagem por extenso,
de zero at vinte.
Seu programa devera ler um numero pelo teclado(entre 0 e 20) e mostra-lo por extenso.
"""
numeros = ('Zero', 'Um', 'Dois', 'Tres', 'Quatro', 'Cinco', 'Seis',
'Sete', 'Oito', 'Nove', 'Dez', 'Onze', ... | 48.538462 | 145 | 0.659271 | """
Crie um programa que tenha uma Tupla totalmente preenchida com uma contagem por extenso,
de zero até vinte.
Seu programa devera ler um numero pelo teclado(entre 0 e 20) e mostra-lo por extenso.
"""
numeros = ('Zero', 'Um', 'Dois', 'Tres', 'Quatro', 'Cinco', 'Seis',
'Sete', 'Oito', 'Nove', 'Dez', 'Onze',... | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f52f3d9d16814675ca5df0a2781f7ece79dc9a6e | 527 | py | Python | taivision/__init__.py | guohaoyu110/taivision | eb78bd079d98a58dcbc4995e9f04198bc6592e2b | [
"BSD-2-Clause"
] | null | null | null | taivision/__init__.py | guohaoyu110/taivision | eb78bd079d98a58dcbc4995e9f04198bc6592e2b | [
"BSD-2-Clause"
] | null | null | null | taivision/__init__.py | guohaoyu110/taivision | eb78bd079d98a58dcbc4995e9f04198bc6592e2b | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""taivision: a deep learning vision toolkit powered by pytorch."""
from __future__ import absolute_import
pytorch_version = '1.7.1'
__version__ = '0.0.0'
# from . import data
# from . import model_zoo
# from . import nn
# from . import utils
# from . import loss
| 18.821429 | 67 | 0.743833 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""taivision: a deep learning vision toolkit powered by pytorch."""
from __future__ import absolute_import
pytorch_version = '1.7.1'
__version__ = '0.0.0'
import warnings
import os
import torch
# from . import data
# from . import model_zoo
# from . import nn
# fro... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 204 |
d73f0b310f51f795d76c708b5fbf681c607cb5d8 | 233 | py | Python | run_tests.py | Hunte3r/recipe-scrapers | 03abd57ba8cae80fd2e0c011f34d1f1e693026c1 | [
"MIT"
] | null | null | null | run_tests.py | Hunte3r/recipe-scrapers | 03abd57ba8cae80fd2e0c011f34d1f1e693026c1 | [
"MIT"
] | 1 | 2022-03-26T13:01:56.000Z | 2022-03-26T13:01:56.000Z | run_tests.py | Hunte3r/recipe-scrapers | 03abd57ba8cae80fd2e0c011f34d1f1e693026c1 | [
"MIT"
] | null | null | null | import subprocess
if __name__ == "__main__":
run_tests_command = (
"unittest-parallel -t . -s tests --coverage --coverage-rcfile .coveragerc"
)
subprocess.run(run_tests_command.split(" "), check=True, text=True)
| 29.125 | 82 | 0.678112 | import subprocess
if __name__ == "__main__":
run_tests_command = (
"unittest-parallel -t . -s tests --coverage --coverage-rcfile .coveragerc"
)
subprocess.run(run_tests_command.split(" "), check=True, text=True)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
51f775d6cfd96ebda9a804c048797274b0362c06 | 6,559 | py | Python | animations.py | maximecb/ledburn | 97bac4aa336fd28ded2f3be100f95e6117116056 | [
"Apache-2.0"
] | null | null | null | animations.py | maximecb/ledburn | 97bac4aa336fd28ded2f3be100f95e6117116056 | [
"Apache-2.0"
] | null | null | null | animations.py | maximecb/ledburn | 97bac4aa336fd28ded2f3be100f95e6117116056 | [
"Apache-2.0"
] | null | null | null | import numpy as np
# Frequency at which animations are updated
UPDATE_RATE = 30
# Time between each update (in seconds)
UPDATE_TIME = 1 / UPDATE_RATE
# Colors
GREEN = np.array([0,1,0])
BLUE = np.array([0,0,1])
RED = np.array([1,0,0])
YELLOW = np.array([1,1,0])
CYAN = np.array([0,1,1])
MAGENTA = np.array([1,0,1])
# ... | 24.473881 | 77 | 0.590029 | import math
import random
import numpy as np
from util import rot_matrix
# Frequency at which animations are updated
UPDATE_RATE = 30
# Time between each update (in seconds)
UPDATE_TIME = 1 / UPDATE_RATE
# Colors
GREEN = np.array([0,1,0])
BLUE = np.array([0,0,1])
RED = np.array([1,0,0])
YELLOW = np.array([1,1,0])
CY... | 0 | 0 | 0 | 4,952 | 0 | 577 | 0 | -12 | 296 |
9f03aaeb5af6d4c2da4e7306f2a2b1d36df6bbaf | 2,303 | py | Python | tools/ops/script_runner/lib/conversion_runner.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | tools/ops/script_runner/lib/conversion_runner.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | tools/ops/script_runner/lib/conversion_runner.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | # Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file ex... | 33.867647 | 176 | 0.717759 | # Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file ex... | 0 | 0 | 0 | 1,346 | 0 | 0 | 0 | 45 | 90 |
eb039ad466ef7558e1f8f73a98ee7b3c5c5dc0a2 | 3,304 | py | Python | IAA/main.py | PlanTL-GOB-ES/SPACCC_MEDDOCAN | 783a6df385c975b328c99bcffb54196a9ba4078a | [
"CC-BY-4.0"
] | 2 | 2020-10-08T14:46:27.000Z | 2020-11-18T07:29:57.000Z | IAA/main.py | PlanTL-SANIDAD/SPACCC_MEDDOCAN | 783a6df385c975b328c99bcffb54196a9ba4078a | [
"CC-BY-4.0"
] | null | null | null | IAA/main.py | PlanTL-SANIDAD/SPACCC_MEDDOCAN | 783a6df385c975b328c99bcffb54196a9ba4078a | [
"CC-BY-4.0"
] | 1 | 2022-03-15T16:05:25.000Z | 2022-03-15T16:05:25.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*
import os
import sys
from collections import Counter
def prepararSalida(fichero):
""" Preparamos el fichero de salida escribiendo los headers. """
f= open(fichero,"w+")
f.write("texto; disc. token (%); disc. split (%); disc. etiquetas (%); numero de tokens para... | 38.870588 | 382 | 0.625605 | #!/usr/bin/env python
# -*- coding: utf-8 -*
import os
import script
import sys
from script import *
from collections import Counter
def prepararSalida(fichero):
""" Preparamos el fichero de salida escribiendo los headers. """
f= open(fichero,"w+")
f.write("texto; disc. token (%); disc. split (%); disc. ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -9 | 45 |
ac85c2ff34b4e402362efaa4c55771cfa8537004 | 1,216 | py | Python | load_model/tensorflow_loader.py | Revanee/FaceMaskDetection | 759d9dd6acb16f2602845e75dfbd931dff6ec6df | [
"MIT"
] | null | null | null | load_model/tensorflow_loader.py | Revanee/FaceMaskDetection | 759d9dd6acb16f2602845e75dfbd931dff6ec6df | [
"MIT"
] | null | null | null | load_model/tensorflow_loader.py | Revanee/FaceMaskDetection | 759d9dd6acb16f2602845e75dfbd931dff6ec6df | [
"MIT"
] | null | null | null | # -*- encoding=utf-8 -*-
# import tensorflow as tf
PATH_TO_TENSORFLOW_MODEL = 'models/face_mask_detection.pb'
EDGETPU_SHARED_LIB = "libedgetpu.so.1"
| 30.4 | 91 | 0.706414 | # -*- encoding=utf-8 -*-
# import tensorflow as tf
import tflite_runtime.interpreter as tflite
import numpy as np
PATH_TO_TENSORFLOW_MODEL = 'models/face_mask_detection.pb'
EDGETPU_SHARED_LIB = "libedgetpu.so.1"
def load_tf_model(tf_model_path):
# Load the TFLite model and allocate tensors.
model_file, *devi... | 0 | 0 | 0 | 0 | 0 | 954 | 0 | 19 | 91 |
b2c4d1e16a77faae38e0b84254b81d8981866740 | 1,948 | py | Python | docs/conf.py | Pandinosaurus/flask-jsonrpc | 3897575fcb7106c665e2217a5762f1131a7dd536 | [
"BSD-3-Clause"
] | 1 | 2019-05-31T14:04:18.000Z | 2019-05-31T14:04:18.000Z | docs/conf.py | Pandinosaurus/flask-jsonrpc | 3897575fcb7106c665e2217a5762f1131a7dd536 | [
"BSD-3-Clause"
] | 90 | 2021-07-21T15:54:24.000Z | 2022-03-30T00:45:40.000Z | docs/conf.py | Pandinosaurus/flask-jsonrpc | 3897575fcb7106c665e2217a5762f1131a7dd536 | [
"BSD-3-Clause"
] | null | null | null | from pallets_sphinx_themes import ProjectLink
# -- Project information -----------------------------------------------------
project = 'Flask-JSONRPC'
copyright = '2021, Nycholas de Oliveira e Oliveira' # pylint: disable=W0622
author = 'Nycholas de Oliveira e Oliveira'
release = '2.1.0'
version = '2.1.0'
# -- Gener... | 36.754717 | 94 | 0.62423 | from pallets_sphinx_themes import ProjectLink
# -- Project information -----------------------------------------------------
project = 'Flask-JSONRPC'
copyright = '2021, Nycholas de Oliveira e Oliveira' # pylint: disable=W0622
author = 'Nycholas de Oliveira e Oliveira'
release = '2.1.0'
version = '2.1.0'
# -- Gener... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
968b92eb60d98b7311a56851994868b6181c1bcb | 3,585 | py | Python | scripts/refeed_data.py | SchlachterSchmidt/precognitive-octo-engine | 24c5adbaba5f4e3902bdf7f16e8efcc3eef53db5 | [
"MIT"
] | 1 | 2018-01-05T15:33:22.000Z | 2018-01-05T15:33:22.000Z | scripts/refeed_data.py | SchlachterSchmidt/precognitive-octo-engine | 24c5adbaba5f4e3902bdf7f16e8efcc3eef53db5 | [
"MIT"
] | null | null | null | scripts/refeed_data.py | SchlachterSchmidt/precognitive-octo-engine | 24c5adbaba5f4e3902bdf7f16e8efcc3eef53db5 | [
"MIT"
] | null | null | null | """Refeed manually captured data to the classifier."""
if __name__ == "__main__":
init()
| 33.194444 | 67 | 0.494282 | """Refeed manually captured data to the classifier."""
import argparse
from base64 import b64encode
import json
import os
from pathlib import Path
import requests
def init():
parser = argparse.ArgumentParser()
host_group = parser.add_mutually_exclusive_group(required=True)
host_group.add_argument('-l',
... | 0 | 0 | 0 | 0 | 0 | 3,360 | 0 | -24 | 155 |
2a70697598b1312d3d8cb26a3f1a3137fd015b0a | 1,661 | py | Python | dependencies/panda/Panda3D-1.10.0-x64/direct/directtools/DirectGlobals.py | CrankySupertoon01/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 3 | 2018-03-09T12:07:29.000Z | 2021-02-25T06:50:25.000Z | direct/src/directtools/DirectGlobals.py | Sinkay/panda3d | 16bfd3750f726a8831771b81649d18d087917fd5 | [
"PHP-3.01",
"PHP-3.0"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | direct/src/directtools/DirectGlobals.py | Sinkay/panda3d | 16bfd3750f726a8831771b81649d18d087917fd5 | [
"PHP-3.01",
"PHP-3.0"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | from panda3d.core import Vec3, Point3, BitMask32
UNPICKABLE = ['x-disc-visible', 'y-disc-visible', 'z-disc-visible',
'GridBack', 'unpickable']
# For linmath operations
X_AXIS = Vec3(1, 0, 0)
Y_AXIS = Vec3(0, 1, 0)
Z_AXIS = Vec3(0, 0, 1)
NEG_X_AXIS = Vec3(-1, 0, 0)
NEG_Y_AXIS = Vec3(0, -1, 0)
NEG_Z_AXIS ... | 26.365079 | 89 | 0.718242 | from panda3d.core import Vec3, Point3, BitMask32
UNPICKABLE = ['x-disc-visible', 'y-disc-visible', 'z-disc-visible',
'GridBack', 'unpickable']
# For linmath operations
X_AXIS = Vec3(1, 0, 0)
Y_AXIS = Vec3(0, 1, 0)
Z_AXIS = Vec3(0, 0, 1)
NEG_X_AXIS = Vec3(-1, 0, 0)
NEG_Y_AXIS = Vec3(0, -1, 0)
NEG_Z_AXIS ... | 0 | 0 | 0 | 0 | 0 | 270 | 0 | 0 | 46 |
09c12901cee750401787dc1f991b6c2692b4fe5b | 4,423 | py | Python | notebooks/41_0_L_Create_DD_Graph.py | luiservela/AstraZeneca | 071e23f0111ece0a414ee4c4dc5dfca25c089979 | [
"Unlicense"
] | 3 | 2019-06-27T22:29:05.000Z | 2021-10-05T14:35:51.000Z | notebooks/41_0_L_Create_DD_Graph.py | cchamber/AstraZenecaMar19 | 7e6573a3c5e1f9c362a9e6f0abbaf9e5e40f78d7 | [
"Unlicense"
] | null | null | null | notebooks/41_0_L_Create_DD_Graph.py | cchamber/AstraZenecaMar19 | 7e6573a3c5e1f9c362a9e6f0abbaf9e5e40f78d7 | [
"Unlicense"
] | 1 | 2021-01-05T18:06:21.000Z | 2021-01-05T18:06:21.000Z | """
This script constructs the Disease and the Drug Graph
"""
# Assuming usual suspects are already imported
import pandas as pd
import networkx as nx
# Paths for input geo and mesh files
GEO_PATH = '../../data/final/geo.pkl'
MESH_PATH = '../../data/final/mesh.pkl'
# Paths for output Gephi files
GEPHI_NODES = 'Gephi... | 29.486667 | 100 | 0.688899 | """
This script constructs the Disease and the Drug Graph
"""
# Assuming usual suspects are already imported
import pandas as pd
import networkx as nx
# Paths for input geo and mesh files
GEO_PATH = '../../data/final/geo.pkl'
MESH_PATH = '../../data/final/mesh.pkl'
# Paths for output Gephi files
GEPHI_NODES = 'Gephi... | 0 | 0 | 0 | 0 | 0 | 532 | 0 | 0 | 22 |
a384ddf1d03570fcc865e080eb23f1ef2ae41121 | 354 | py | Python | website/config/google_config.py | patrykwenz/flask_google_auth_voting | d32818d80dcb4ad9d49ba8a193e63e92df2abc86 | [
"MIT"
] | null | null | null | website/config/google_config.py | patrykwenz/flask_google_auth_voting | d32818d80dcb4ad9d49ba8a193e63e92df2abc86 | [
"MIT"
] | null | null | null | website/config/google_config.py | patrykwenz/flask_google_auth_voting | d32818d80dcb4ad9d49ba8a193e63e92df2abc86 | [
"MIT"
] | null | null | null | import os
from oauthlib.oauth2 import WebApplicationClient
GOOGLE_CLIENT_ID = os.environ.get('GOOGLE_CLIENT_ID', None)
GOOGLE_CLIENT_SECRET = os.environ.get('GOOGLE_CLIENT_SECRET', None)
GOOGLE_DISCOVERY_URL = (
"https://accounts.google.com/.well-known/openid-configuration"
)
# OAuth 2 client setup
client = WebAp... | 29.5 | 67 | 0.805085 | import os
from oauthlib.oauth2 import WebApplicationClient
GOOGLE_CLIENT_ID = os.environ.get('GOOGLE_CLIENT_ID', None)
GOOGLE_CLIENT_SECRET = os.environ.get('GOOGLE_CLIENT_SECRET', None)
GOOGLE_DISCOVERY_URL = (
"https://accounts.google.com/.well-known/openid-configuration"
)
# OAuth 2 client setup
client = WebAp... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
73434629f994347ef9a99c5d8220e24fa317d1c1 | 8,453 | py | Python | src/HectorHardware.py | alesti/Hector9000 | 004bef61dbbc2e6b097df9b8af780a2823832702 | [
"MIT"
] | null | null | null | src/HectorHardware.py | alesti/Hector9000 | 004bef61dbbc2e6b097df9b8af780a2823832702 | [
"MIT"
] | null | null | null | src/HectorHardware.py | alesti/Hector9000 | 004bef61dbbc2e6b097df9b8af780a2823832702 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf8
##
# HectorHardware.py API class for Hector9000 hardware
#
# imports
from __future__ import division
devEnvironment = True
import sys
from HectorConfig import config
# Uncomment to enable debug output.
import logging
if not devEnvironment:
import RPi.GPIO as GPIO
logging.b... | 32.140684 | 93 | 0.554123 | #!/usr/bin/env python3
# coding: utf8
##
# HectorHardware.py API class for Hector9000 hardware
#
# imports
from __future__ import division
devEnvironment = True
import time
import sys
import Adafruit_PCA9685
from HectorConfig import config
# Uncomment to enable debug output.
import logging
if not devEnvironment:
... | 0 | 0 | 0 | 7,145 | 0 | 0 | 0 | -6 | 94 |
0ce74bf5c1bd323b0673610a2ebf89124890049f | 243 | py | Python | game/test_suite/tests/__init__.py | HagenSR/byte_le_engine | 5895d8559627594dd3c222b4c4754caad2817841 | [
"MIT"
] | 1 | 2020-04-05T05:06:32.000Z | 2020-04-05T05:06:32.000Z | game/test_suite/tests/__init__.py | HagenSR/byte_le_engine | 5895d8559627594dd3c222b4c4754caad2817841 | [
"MIT"
] | 2 | 2021-01-27T03:54:41.000Z | 2021-05-17T05:11:16.000Z | game/test_suite/tests/__init__.py | HagenSR/byte_le_engine | 5895d8559627594dd3c222b4c4754caad2817841 | [
"MIT"
] | 5 | 2021-01-27T02:43:27.000Z | 2022-03-04T04:34:57.000Z | # When you create a new test file, make sure to add it here.
# Simply import the class from your file, and then add that class to the '__all__' array.
from game.test_suite.tests.test_example import TestExample
__all__ = [
'TestExample'
] | 30.375 | 89 | 0.748971 | # When you create a new test file, make sure to add it here.
# Simply import the class from your file, and then add that class to the '__all__' array.
from game.test_suite.tests.test_example import TestExample
__all__ = [
'TestExample'
] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
12c475127eb58a54b6975bc40bc9067cc783b184 | 2,216 | py | Python | collectors/convert_parcels.py | pengler/TravelTime | 674909724a55fb87bae5b37ccda9e20b71fba680 | [
"Unlicense"
] | null | null | null | collectors/convert_parcels.py | pengler/TravelTime | 674909724a55fb87bae5b37ccda9e20b71fba680 | [
"Unlicense"
] | null | null | null | collectors/convert_parcels.py | pengler/TravelTime | 674909724a55fb87bae5b37ccda9e20b71fba680 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python3
import pandas as pd
import pickle
import sys
# Simple script that takes in the Canada Post .add file
# and outputs a pickled data frame.
#
# Input/Output files must be specified on the command line
# convert_canada_add.py input_file output_file
#
# File must conform to specification located at:
... | 48.173913 | 106 | 0.642148 | #!/usr/bin/python3
import pandas as pd
import pickle
import sys
# Simple script that takes in the Canada Post .add file
# and outputs a pickled data frame.
#
# Input/Output files must be specified on the command line
# convert_canada_add.py input_file output_file
#
# File must conform to specification located at:
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |