hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
86af98dc14416c568a27f7290fe556de05e4f04c | 3,914 | py | Python | chibi_dl/site/tmofans/serie.py | dem4ply/chibi_dl | c6783315460580e784b7ff7479c668e1097ae293 | [
"WTFPL"
] | 1 | 2020-01-30T03:59:08.000Z | 2020-01-30T03:59:08.000Z | chibi_dl/site/tmofans/serie.py | dem4ply/chibi_dl | c6783315460580e784b7ff7479c668e1097ae293 | [
"WTFPL"
] | null | null | null | chibi_dl/site/tmofans/serie.py | dem4ply/chibi_dl | c6783315460580e784b7ff7479c668e1097ae293 | [
"WTFPL"
] | null | null | null | import itertools
import logging
from bs4 import BeautifulSoup
from chibi.file.temp import Chibi_temp_path
from .episode import Episode
from chibi_dl.site.base.site import Site
logger = logging.getLogger( "chibi_dl.sites.tmo_fans.serie" )
| 34.333333 | 79 | 0.52836 | import itertools
import logging
from bs4 import BeautifulSoup
from chibi.file.temp import Chibi_temp_path
from .episode import Episode
from chibi_dl.site.base.site import Site
logger = logging.getLogger( "chibi_dl.sites.tmo_fans.serie" )
class Serie( Site ):
def __init__( self, url, *args, **kw ):
sup... | 3,433 | 215 | 23 |
1226810da4c831a5bac14ecf6984cc89d0fa5278 | 5,802 | py | Python | anneal.py | wasyro/sim_ann | 4625b6f976a8291803f9352a8d1e105b68290ed7 | [
"Apache-2.0"
] | null | null | null | anneal.py | wasyro/sim_ann | 4625b6f976a8291803f9352a8d1e105b68290ed7 | [
"Apache-2.0"
] | null | null | null | anneal.py | wasyro/sim_ann | 4625b6f976a8291803f9352a8d1e105b68290ed7 | [
"Apache-2.0"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import math
import time
import sys
if __name__ == '__main__':
# this random seed provides better result
np.random.seed(1000384)
X, Y = input_coordinates("prefs.out")
#init_path = greedy_tsp(X, Y)
init_path = random_path(X, Y)
plt.title('Anneali... | 29.602041 | 78 | 0.597208 | import matplotlib.pyplot as plt
import numpy as np
import math
import time
import sys
def input_coordinates(filename, showmap=False):
with open(filename, 'r') as fin:
X = []
Y = []
while True:
line = fin.readline()
if not line:
break
x, y ... | 4,691 | 0 | 207 |
0a31f5d0bd217335349fea27c82f94f7063c01fe | 2,862 | py | Python | test/1.1.0/07/CodemetaObjectTest07.py | monperrus/cff-converter-python | b7b789a80415c6020e864782b601f21188a149f4 | [
"Apache-2.0"
] | null | null | null | test/1.1.0/07/CodemetaObjectTest07.py | monperrus/cff-converter-python | b7b789a80415c6020e864782b601f21188a149f4 | [
"Apache-2.0"
] | null | null | null | test/1.1.0/07/CodemetaObjectTest07.py | monperrus/cff-converter-python | b7b789a80415c6020e864782b601f21188a149f4 | [
"Apache-2.0"
] | null | null | null | from cffconvert import CodemetaObject
import unittest
import os
import ruamel.yaml as yaml
| 32.522727 | 113 | 0.59399 | from cffconvert import CodemetaObject
import unittest
import os
import ruamel.yaml as yaml
class CodemetaObjectTest(unittest.TestCase):
def setUp(self):
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "r") as f:
cffstr = f.read()
cff_ob... | 2,399 | 23 | 347 |
a9c4a0973a7435a9f958b03019953b0fa25e3984 | 12,130 | py | Python | verily/bigquery_wrapper/bq_test.py | deflaux/analysis-py-utils | 7dd9b6c466b5f9794ef2e07cdaba5f88c1dd783a | [
"Apache-2.0"
] | null | null | null | verily/bigquery_wrapper/bq_test.py | deflaux/analysis-py-utils | 7dd9b6c466b5f9794ef2e07cdaba5f88c1dd783a | [
"Apache-2.0"
] | null | null | null | verily/bigquery_wrapper/bq_test.py | deflaux/analysis-py-utils | 7dd9b6c466b5f9794ef2e07cdaba5f88c1dd783a | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Verily Life Sciences Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 46.833977 | 118 | 0.5831 | # Copyright 2019 Verily Life Sciences Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 1,314 | 9,634 | 22 |
0a41e89767da26e96eae696cb0f95c84301f0025 | 590 | py | Python | tests/test_problemak.py | ssebastianj/tap-2016 | 5935008a15fb2ff969e0ee8b865ffec1b751c5cc | [
"MIT"
] | null | null | null | tests/test_problemak.py | ssebastianj/tap-2016 | 5935008a15fb2ff969e0ee8b865ffec1b751c5cc | [
"MIT"
] | null | null | null | tests/test_problemak.py | ssebastianj/tap-2016 | 5935008a15fb2ff969e0ee8b865ffec1b751c5cc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from tap.problemak.solucion import diferencia_hojas
| 20.344828 | 51 | 0.359322 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from tap.problemak.solucion import diferencia_hojas
class TestProblemaK:
def test_diferencia_de_hojas(self):
assert diferencia_hojas(
[
(2, 1, 2),
(5, 3),
(1, 2)
]
... | 424 | -1 | 49 |
02ae8a3b9b43f4b5a5d42d4528981a49dd184336 | 2,570 | py | Python | cwmud/core/npcs.py | whutch/cwmud | bee8b126a5e70edd0593dae9753a6be8d52357cf | [
"MIT"
] | 11 | 2016-03-03T03:56:59.000Z | 2021-11-19T15:38:51.000Z | cwmud/core/npcs.py | whutch/atria | bee8b126a5e70edd0593dae9753a6be8d52357cf | [
"MIT"
] | 26 | 2016-08-31T23:19:45.000Z | 2019-10-19T21:50:33.000Z | cwmud/core/npcs.py | whutch/atria | bee8b126a5e70edd0593dae9753a6be8d52357cf | [
"MIT"
] | 2 | 2016-01-22T21:22:34.000Z | 2016-02-09T06:03:57.000Z | # -*- coding: utf-8 -*-
"""Non-player characters."""
# Part of Clockwork MUD Server (https://github.com/whutch/cwmud)
# :copyright: (c) 2008 - 2017 Will Hutcheson
# :license: MIT (https://github.com/whutch/cwmud/blob/master/LICENSE.txt)
import re
from .attributes import Attribute
from .characters import Character
fro... | 25.7 | 78 | 0.620233 | # -*- coding: utf-8 -*-
"""Non-player characters."""
# Part of Clockwork MUD Server (https://github.com/whutch/cwmud)
# :copyright: (c) 2008 - 2017 Will Hutcheson
# :license: MIT (https://github.com/whutch/cwmud/blob/master/LICENSE.txt)
import re
from .attributes import Attribute
from .characters import Character
fro... | 666 | 0 | 53 |
d608ac81fe1d71da33df96625864ffd23d0396c4 | 475 | py | Python | rackattack/virtual/kvm/imagecommands.py | shlomimatichin/rackattack-virtual | c800646c6f07dd04493dc313a3770f192a542d4c | [
"Apache-2.0"
] | null | null | null | rackattack/virtual/kvm/imagecommands.py | shlomimatichin/rackattack-virtual | c800646c6f07dd04493dc313a3770f192a542d4c | [
"Apache-2.0"
] | null | null | null | rackattack/virtual/kvm/imagecommands.py | shlomimatichin/rackattack-virtual | c800646c6f07dd04493dc313a3770f192a542d4c | [
"Apache-2.0"
] | 1 | 2020-01-29T08:05:00.000Z | 2020-01-29T08:05:00.000Z | import os
from rackattack.virtual import sh
| 29.6875 | 97 | 0.650526 | import os
from rackattack.virtual import sh
def create(image, sizeGB):
dirname = os.path.dirname(image)
if not os.path.isdir(dirname):
os.makedirs(dirname, 0777)
sh.run(['qemu-img', 'create', '-f', 'qcow2', image, '%dG' % sizeGB])
os.chmod(image, 0666)
def deriveCopyOnWrite(original, newImag... | 383 | 0 | 46 |
da6cd497442bea5e8dbae26bf46ce1e1392dc9c7 | 1,012 | py | Python | azure_functions_devops_build/project/models/project_details.py | coolgeeck/delwar1 | 5d3b2b5dc4933974ff26b0f0a869061129259046 | [
"MIT"
] | 16 | 2019-02-17T22:01:32.000Z | 2022-03-31T22:59:46.000Z | azure_functions_devops_build/project/models/project_details.py | coolgeeck/delwar1 | 5d3b2b5dc4933974ff26b0f0a869061129259046 | [
"MIT"
] | 19 | 2019-02-11T23:31:51.000Z | 2021-06-01T23:20:35.000Z | azure_functions_devops_build/project/models/project_details.py | coolgeeck/delwar1 | 5d3b2b5dc4933974ff26b0f0a869061129259046 | [
"MIT"
] | 21 | 2019-01-28T21:01:12.000Z | 2022-03-07T16:18:29.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 42.166667 | 97 | 0.472332 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 238 | 367 | 23 |
04094d8aeffd7b0ad0db38a06de1250440ba1f2e | 230 | py | Python | occiput_suite/occiput/DataSources/FileSources/Physiology.py | mscipio/occiput-suite | 9b7dc59ad615d46d811eab965a86ec9efe292a7d | [
"BSD-2-Clause"
] | 7 | 2018-02-22T13:50:21.000Z | 2020-11-16T01:28:22.000Z | occiput_suite/occiput/DataSources/FileSources/Physiology.py | mscipio/occiput-suite | 9b7dc59ad615d46d811eab965a86ec9efe292a7d | [
"BSD-2-Clause"
] | null | null | null | occiput_suite/occiput/DataSources/FileSources/Physiology.py | mscipio/occiput-suite | 9b7dc59ad615d46d811eab965a86ec9efe292a7d | [
"BSD-2-Clause"
] | 2 | 2018-02-22T13:50:31.000Z | 2020-01-14T02:17:32.000Z | try:
from Occiput_Interface_Biograph_mMR import Biograph_mMR_Physiology
except:
Biograph_mMR_Physiology = None
try:
from Occiput_Interface_Brain_PET import Brain_PET_Physiology
except:
Brain_PET_Physiology = None
| 23 | 70 | 0.821739 | try:
from Occiput_Interface_Biograph_mMR import Biograph_mMR_Physiology
except:
Biograph_mMR_Physiology = None
try:
from Occiput_Interface_Brain_PET import Brain_PET_Physiology
except:
Brain_PET_Physiology = None
| 0 | 0 | 0 |
8cc6b8b30a356a95641ebec0cd7e522b05d652b8 | 1,042 | py | Python | Arduino_Serial_Python_Feb_18.py | ryan710/greenhouse | d666e4390c474376435f786630a6dc0be5f093aa | [
"MIT"
] | null | null | null | Arduino_Serial_Python_Feb_18.py | ryan710/greenhouse | d666e4390c474376435f786630a6dc0be5f093aa | [
"MIT"
] | null | null | null | Arduino_Serial_Python_Feb_18.py | ryan710/greenhouse | d666e4390c474376435f786630a6dc0be5f093aa | [
"MIT"
] | null | null | null | #sep8a: RH 65
#sep8b: rh65
#sep15: temp22
import serial
from datetime import datetime
import datetime
import time
import csv
import sys
start = time.time()
runtime = 310
serial_port = 'com3'
baud_rate = 9600
print(datetime.datetime.now())
ser = serial.Serial(serial_port, baud_rate)
with open(r"... | 22.170213 | 72 | 0.497121 | #sep8a: RH 65
#sep8b: rh65
#sep15: temp22
import serial
from datetime import datetime
import datetime
import time
import csv
import sys
start = time.time()
runtime = 310
serial_port = 'com3'
baud_rate = 9600
print(datetime.datetime.now())
ser = serial.Serial(serial_port, baud_rate)
with open(r"... | 0 | 0 | 0 |
8fda6092e75da4682424deb67075461487245c21 | 2,812 | py | Python | TAO/Firewall/EXPLOITS/ELCO/fosho/requests/packages/urllib3/_collections.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 46 | 2017-05-15T11:15:08.000Z | 2018-07-02T03:32:52.000Z | TAO/Firewall/EXPLOITS/ELCO/fosho/requests/packages/urllib3/_collections.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | null | null | null | TAO/Firewall/EXPLOITS/ELCO/fosho/requests/packages/urllib3/_collections.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 24 | 2017-05-17T03:26:17.000Z | 2018-07-09T07:00:50.000Z | # urllib3/_collections.py
##
##
##
##
from collections import deque
from threading import RLock
__all__ = ['RecentlyUsedContainer']
class RecentlyUsedContainer(dict):
''''''
##
##
##
CLEANUP_FACTOR = 10
def _invalidate_entry(self, key):
''''''
old_entry = self.ac... | 18.25974 | 73 | 0.556188 | # urllib3/_collections.py
##
##
##
##
from collections import deque
from threading import RLock
__all__ = ['RecentlyUsedContainer']
class AccessEntry(object):
__slots__ = ('key', 'is_valid')
def __init__(self, key, is_valid=True):
self.key = key
self.is_valid = is_valid
class Recentl... | 1,073 | 68 | 158 |
23c68a978523a7109e15a68ac384090d96344164 | 953 | py | Python | source-code/pyspark/pyspark-job.py | bcthis2020/ci-cd-for-data-processing-workflow | 67f7963b9b4b36fc7994399f1ef3abd6bf840bc0 | [
"Apache-2.0"
] | null | null | null | source-code/pyspark/pyspark-job.py | bcthis2020/ci-cd-for-data-processing-workflow | 67f7963b9b4b36fc7994399f1ef3abd6bf840bc0 | [
"Apache-2.0"
] | null | null | null | source-code/pyspark/pyspark-job.py | bcthis2020/ci-cd-for-data-processing-workflow | 67f7963b9b4b36fc7994399f1ef3abd6bf840bc0 | [
"Apache-2.0"
] | 1 | 2020-04-09T12:34:18.000Z | 2020-04-09T12:34:18.000Z | from pyspark.sql import SparkSession,SQLContext
from pyspark.sql.types import *
from pyspark import SparkConf
from pyspark.context import SparkContext
from pyspark.sql.functions import asc
from pyspark.sql.functions import col
from functools import reduce # For Python 3.x
from pyspark.sql import DataFrame
from pyspark... | 24.435897 | 90 | 0.751312 | from pyspark.sql import SparkSession,SQLContext
from pyspark.sql.types import *
from pyspark import SparkConf
from pyspark.context import SparkContext
from pyspark.sql.functions import asc
from pyspark.sql.functions import col
from functools import reduce # For Python 3.x
from pyspark.sql import DataFrame
from pyspark... | 0 | 0 | 0 |
ef0d09d317ea192309029f3c994fe3123938cf0f | 1,652 | py | Python | sjtwo-c/site_scons/site_tools/unittest/unit_test_summary.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 2 | 2020-04-04T21:09:56.000Z | 2020-04-08T17:00:58.000Z | sjtwo-c/site_scons/site_tools/unittest/unit_test_summary.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 13 | 2020-04-11T21:50:57.000Z | 2020-04-19T03:19:48.000Z | sjtwo-c/site_scons/site_tools/unittest/unit_test_summary.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | null | null | null | from collections import OrderedDict
from color import ColorString
from prettytable import PrettyTable
| 27.081967 | 96 | 0.636199 | from collections import OrderedDict
from color import ColorString
from prettytable import PrettyTable
class UnitTestSummary(object):
COLUMNS = ["Name", "Result"]
RESULT_PASSED = "PASSED"
RESULT_FAILED = "FAILED"
def __init__(self):
self._unit_test_result_map = OrderedDict()
def __len__... | 762 | 763 | 23 |
3a7d623eca8e2e236331fab0e8e73fadcca01cf6 | 6,663 | py | Python | algorithm/main.py | kubkon/efsm | 3d516ba6f1782eb20d5c82987697fa08264ada89 | [
"MIT"
] | null | null | null | algorithm/main.py | kubkon/efsm | 3d516ba6f1782eb20d5c82987697fa08264ada89 | [
"MIT"
] | null | null | null | algorithm/main.py | kubkon/efsm | 3d516ba6f1782eb20d5c82987697fa08264ada89 | [
"MIT"
] | null | null | null | import os
import sys
import numpy as np
from algorithm.errors import *
try:
import algorithm.internal as internal
from algorithm.dists import *
except ImportError:
raise EFSMCompilationError()
| 37.857955 | 100 | 0.531292 | import os
import sys
import numpy as np
from algorithm.errors import *
try:
import algorithm.internal as internal
from algorithm.dists import *
except ImportError:
raise EFSMCompilationError()
class Params:
def __init__(self, loc, scale, a, b, dist):
self.loc = loc
self.scale = scale
... | 5,582 | 767 | 99 |
6093e3a4f1e9bdcbe6fc8a6446c8188da2d679a7 | 28,348 | py | Python | Agents/platformMonitorAgent.py | ajfar-bem/wisebldg | 0cb8ef7c5984cbb5cc86e40780fdf4e14e5bda05 | [
"Unlicense"
] | null | null | null | Agents/platformMonitorAgent.py | ajfar-bem/wisebldg | 0cb8ef7c5984cbb5cc86e40780fdf4e14e5bda05 | [
"Unlicense"
] | null | null | null | Agents/platformMonitorAgent.py | ajfar-bem/wisebldg | 0cb8ef7c5984cbb5cc86e40780fdf4e14e5bda05 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Copyright (c) 2016, Virginia Tech
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of condi... | 52.593692 | 362 | 0.629674 | # -*- coding: utf-8 -*-
'''
Copyright (c) 2016, Virginia Tech
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of condi... | 21,894 | 0 | 206 |
19751c21401e8e6f705ded45d287aa9baa43d6b9 | 1,345 | py | Python | resources/psychologist_evaluation.py | mindsy/mindsy-microservice-evaluation | 22f4314e2da8ac50094bdf7419c38b5a598fc955 | [
"MIT"
] | null | null | null | resources/psychologist_evaluation.py | mindsy/mindsy-microservice-evaluation | 22f4314e2da8ac50094bdf7419c38b5a598fc955 | [
"MIT"
] | null | null | null | resources/psychologist_evaluation.py | mindsy/mindsy-microservice-evaluation | 22f4314e2da8ac50094bdf7419c38b5a598fc955 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask_restful import Resource
from static.imports import *
from db import db
| 42.03125 | 109 | 0.60223 | # -*- coding: utf-8 -*-
from flask_restful import Resource
from static.imports import *
from db import db
class PsychologistEvaluationPatient(Resource):
def get(self, crp, id_patient):
if PsychologistModel.find_by_crp(crp) and PatientModel.find_by_id(id_patient):
evaluations = (db.session.q... | 1,163 | 25 | 49 |
d720150cbd164eef898d07afbd11a70d2c530d28 | 1,198 | py | Python | test/randomwalk_adv.py | Larook/DRL_LUDO | 93e81b45d69de369efd199095bb891aef2c390e7 | [
"MIT"
] | null | null | null | test/randomwalk_adv.py | Larook/DRL_LUDO | 93e81b45d69de369efd199095bb891aef2c390e7 | [
"MIT"
] | null | null | null | test/randomwalk_adv.py | Larook/DRL_LUDO | 93e81b45d69de369efd199095bb891aef2c390e7 | [
"MIT"
] | null | null | null | import unittest
import sys
import numpy as np
sys.path.append("../")
if __name__ == '__main__':
unittest.main()
| 27.227273 | 83 | 0.634391 | import unittest
import sys
import numpy as np
sys.path.append("../")
def randwalk():
import ludopy
import numpy as np
player_0_won = False
games_played = 0
while not player_0_won:
g = ludopy.Game()
there_is_a_winner = False
while not there_is_a_winner:
(dice, m... | 993 | 15 | 72 |
eca61ff00365c7746c9c6ace6363f6bbd6adf808 | 226 | py | Python | main/SteppableDemos/ReactionDiffusionSolverFE/ReactionDiffusion_2D_FN/Simulation/ReactionDiffusion_2D_FN.py | JulianoGianlupi/nh-cc3d-4x-base-tool | c0f4aceebd4c5bf3ec39e831ef851e419b161259 | [
"CC0-1.0"
] | null | null | null | main/SteppableDemos/ReactionDiffusionSolverFE/ReactionDiffusion_2D_FN/Simulation/ReactionDiffusion_2D_FN.py | JulianoGianlupi/nh-cc3d-4x-base-tool | c0f4aceebd4c5bf3ec39e831ef851e419b161259 | [
"CC0-1.0"
] | null | null | null | main/SteppableDemos/ReactionDiffusionSolverFE/ReactionDiffusion_2D_FN/Simulation/ReactionDiffusion_2D_FN.py | JulianoGianlupi/nh-cc3d-4x-base-tool | c0f4aceebd4c5bf3ec39e831ef851e419b161259 | [
"CC0-1.0"
] | 1 | 2021-02-26T21:50:29.000Z | 2021-02-26T21:50:29.000Z | from cc3d import CompuCellSetup
from ReactionDiffusion_2D_FNSteppables import ReactionDiffusion_2D_FNSteppable
CompuCellSetup.register_steppable(steppable=ReactionDiffusion_2D_FNSteppable(frequency=1))
CompuCellSetup.run()
| 28.25 | 90 | 0.89823 | from cc3d import CompuCellSetup
from ReactionDiffusion_2D_FNSteppables import ReactionDiffusion_2D_FNSteppable
CompuCellSetup.register_steppable(steppable=ReactionDiffusion_2D_FNSteppable(frequency=1))
CompuCellSetup.run()
| 0 | 0 | 0 |
57a0dad511edc93e72ed5eae6bb113446a20c2aa | 2,451 | py | Python | auth/admin_views.py | robcast/iiif-image-auth | 0d3ec7bf2b7ff6723d6f7c47f2e3c28de0034d13 | [
"MIT"
] | 4 | 2019-09-05T07:33:16.000Z | 2021-11-04T07:19:57.000Z | auth/admin_views.py | robcast/iiif-image-auth | 0d3ec7bf2b7ff6723d6f7c47f2e3c28de0034d13 | [
"MIT"
] | 2 | 2019-07-01T18:54:55.000Z | 2019-07-03T11:50:17.000Z | auth/admin_views.py | robcast/iiif-image-auth | 0d3ec7bf2b7ff6723d6f7c47f2e3c28de0034d13 | [
"MIT"
] | null | null | null | from flask_admin.contrib import sqla
from flask_security import current_user, utils
from wtforms.fields import PasswordField
##
## view models
##
# Customized User model for SQL-Admin
# Customized Role model for SQL-Admin
# Prevent administration of Roles unless the currently logged-in user has the "admin" rol... | 43 | 116 | 0.716034 | from flask_admin.contrib import sqla
from flask_security import current_user, utils
from wtforms.fields import PasswordField
##
## view models
##
# Customized User model for SQL-Admin
class UserAdmin(sqla.ModelView):
# Don't display the password on the list of Users
column_exclude_list = ('password',)
#... | 858 | 1,201 | 70 |
f4f1ec87d2bc34d36b7c8ad5921610f639473c4c | 993 | py | Python | graph_generator.py | masoodbayati/software-graph-analysis | 36e85b99bab276733d3d61ac79103db4a2d05342 | [
"MIT"
] | null | null | null | graph_generator.py | masoodbayati/software-graph-analysis | 36e85b99bab276733d3d61ac79103db4a2d05342 | [
"MIT"
] | null | null | null | graph_generator.py | masoodbayati/software-graph-analysis | 36e85b99bab276733d3d61ac79103db4a2d05342 | [
"MIT"
] | 1 | 2020-06-14T21:26:59.000Z | 2020-06-14T21:26:59.000Z | from xml.etree import ElementTree as ET
from graph_analyzer import create_graph_from_connection
if __name__ == '__main__':
main()
| 29.205882 | 72 | 0.680765 | from xml.etree import ElementTree as ET
from graph_analyzer import create_graph_from_connection
class Connection:
def __init__(self,source,target,connection_type):
self.source = source
self.target = target
self.connection_type = connection_type
def generate_graph_from_code(xmi_path):
... | 762 | -4 | 95 |
dd72fc528c05385b12ffa6fc4a325b5928226a1d | 1,592 | py | Python | cling/reactor.py | binaryflesh/cling | 3b86633c3ebee4b85bcd2a1f77ecb6935181d2b9 | [
"BSD-3-Clause"
] | 24 | 2015-11-04T09:29:29.000Z | 2018-04-02T06:33:43.000Z | cling/reactor.py | binaryflesh/cling | 3b86633c3ebee4b85bcd2a1f77ecb6935181d2b9 | [
"BSD-3-Clause"
] | 4 | 2016-01-21T09:28:29.000Z | 2018-04-16T10:08:20.000Z | cling/reactor.py | binaryflesh/cling | 3b86633c3ebee4b85bcd2a1f77ecb6935181d2b9 | [
"BSD-3-Clause"
] | 5 | 2016-05-02T18:20:43.000Z | 2018-05-30T15:05:49.000Z | #-*- coding: utf-8 -*-
import multiprocessing
import logging
try: # Python 2.7+
from logging import NullHandler
except ImportError:
LOG = logging.getLogger(__name__)
LOG.addHandler(NullHandler())
| 25.269841 | 80 | 0.573492 | #-*- coding: utf-8 -*-
import multiprocessing
import logging
try: # Python 2.7+
from logging import NullHandler
except ImportError:
class NullHandler(logging.Handler):
def emit(self, record):
pass
LOG = logging.getLogger(__name__)
LOG.addHandler(NullHandler())
class Reactor(object):
... | 1,214 | 15 | 160 |
e2a21b3592757c610ae1c33c446e63558934f682 | 8,721 | py | Python | task_common/src/task_common/motion_interface/arm.py | FUJISOFT-Robotics/scenario_app | 47271fdffc73f11134586c7481b06994fd041e14 | [
"BSD-3-Clause"
] | null | null | null | task_common/src/task_common/motion_interface/arm.py | FUJISOFT-Robotics/scenario_app | 47271fdffc73f11134586c7481b06994fd041e14 | [
"BSD-3-Clause"
] | null | null | null | task_common/src/task_common/motion_interface/arm.py | FUJISOFT-Robotics/scenario_app | 47271fdffc73f11134586c7481b06994fd041e14 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# FSRobo-R Package BSDL
# ---------
# Copyright (C) 2019 FUJISOFT. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
# 1. Redistributions of source code... | 40.375 | 178 | 0.757253 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# FSRobo-R Package BSDL
# ---------
# Copyright (C) 2019 FUJISOFT. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
# 1. Redistributions of source code... | 0 | 0 | 0 |
de941c3a827f6cc46c4e9c5e50cf95560a768468 | 137 | py | Python | tests/test_spaces.py | quantmind/metablock-py | 4e90e545513f3679271920d9a5a6af5a14803fe8 | [
"BSD-3-Clause"
] | null | null | null | tests/test_spaces.py | quantmind/metablock-py | 4e90e545513f3679271920d9a5a6af5a14803fe8 | [
"BSD-3-Clause"
] | 4 | 2021-08-07T22:26:20.000Z | 2022-03-18T06:09:06.000Z | tests/test_spaces.py | quantmind/metablock-py | 4e90e545513f3679271920d9a5a6af5a14803fe8 | [
"BSD-3-Clause"
] | null | null | null | from metablock import Metablock
| 19.571429 | 43 | 0.759124 | from metablock import Metablock
async def test_list_spaces(cli: Metablock):
spaces = await cli.spaces.get_list()
assert spaces
| 81 | 0 | 23 |
203ffc6adbe8e007bbd740d9e56167680b7bf4a2 | 3,300 | py | Python | test_handlers.py | adamnew123456/lnsd | 29192efc9970004d5a63f469efb9eb6259d26c5c | [
"BSD-2-Clause"
] | null | null | null | test_handlers.py | adamnew123456/lnsd | 29192efc9970004d5a63f469efb9eb6259d26c5c | [
"BSD-2-Clause"
] | null | null | null | test_handlers.py | adamnew123456/lnsd | 29192efc9970004d5a63f469efb9eb6259d26c5c | [
"BSD-2-Clause"
] | null | null | null | """
Ensures that the protocol handlers for the control protocol and the network
protocol work as expected.
"""
from collections import defaultdict
import socket
import threading
import traceback
import unittest
from lns import control_proto, reactor
# Change this to some port that is available on your machine, so tha... | 33.333333 | 86 | 0.647879 | """
Ensures that the protocol handlers for the control protocol and the network
protocol work as expected.
"""
from collections import defaultdict
import socket
import threading
import traceback
import unittest
from lns import control_proto, reactor
# Change this to some port that is available on your machine, so tha... | 1,116 | 1,083 | 130 |
ef10cd15a79620350ffb7465a72e19681f8b6b91 | 9,837 | py | Python | ogn_lib/client.py | akolar/ogn-lib | 6b307cad9bf82316a69bb8c82ebfa734040e2689 | [
"MIT"
] | null | null | null | ogn_lib/client.py | akolar/ogn-lib | 6b307cad9bf82316a69bb8c82ebfa734040e2689 | [
"MIT"
] | 17 | 2017-12-16T12:49:18.000Z | 2018-05-21T10:12:29.000Z | ogn_lib/client.py | akolar/ogn-lib | 6b307cad9bf82316a69bb8c82ebfa734040e2689 | [
"MIT"
] | null | null | null | """
ogn_lib.client
--------------
This module contains methods and classes related to opening and managing a
connection to OGN's APRS servers.
"""
import logging
import socket
import time
import ogn_lib
logger = logging.getLogger(__name__)
class OgnClient:
"""
Holds an APRS session.
Provides methods... | 34.637324 | 79 | 0.576192 | """
ogn_lib.client
--------------
This module contains methods and classes related to opening and managing a
connection to OGN's APRS servers.
"""
import logging
import socket
import time
import ogn_lib
logger = logging.getLogger(__name__)
class OgnClient:
"""
Holds an APRS session.
Provides methods... | 140 | 0 | 27 |
fe3843665c0d86320f5966e1812aeb081e3aca5c | 2,171 | py | Python | src/hyperloop/Python/OldMagnePlaneCode/pointwise.py | jcchin/Hyperloop_v2 | 73861d2207af8738425c1d484909ed0433b9653f | [
"Apache-2.0"
] | 1 | 2021-04-29T00:23:03.000Z | 2021-04-29T00:23:03.000Z | src/hyperloop/Python/OldMagnePlaneCode/pointwise.py | jcchin/Hyperloop_v2 | 73861d2207af8738425c1d484909ed0433b9653f | [
"Apache-2.0"
] | 9 | 2016-11-23T09:10:34.000Z | 2016-12-06T01:10:09.000Z | src/hyperloop/Python/OldMagnePlaneCode/pointwise.py | jcchin/Hyperloop_v2 | 73861d2207af8738425c1d484909ed0433b9653f | [
"Apache-2.0"
] | 11 | 2016-01-19T20:26:35.000Z | 2021-02-13T11:16:20.000Z | ''' Pointwise wrapper '''
import os
# --- Python/system level imports
from subprocess import call
from string import Template
# --- OpenMDAO main and library imports
from openmdao.api import Problem, Group, ExternalCode, IndepVarComp
class Pointwise(ExternalCode):
''' OpenMDAO component for executing Pointwise ... | 33.4 | 100 | 0.460617 | ''' Pointwise wrapper '''
import os
# --- Python/system level imports
from subprocess import call
from string import Template
# --- OpenMDAO main and library imports
from openmdao.api import Problem, Group, ExternalCode, IndepVarComp
class Pointwise(ExternalCode):
''' OpenMDAO component for executing Pointwise ... | 1,420 | 0 | 53 |
1aa8fae98191b44560b49131bb35654547b70907 | 7,252 | py | Python | simulator/results/parse_summary.py | yrrah/cs6620-fall21-intelligent-assignment-of-data-to-dedup-nodes | 9b08941c05f5af862b5dafe9d8dc289a98c393a6 | [
"MIT"
] | 1 | 2021-10-03T18:22:58.000Z | 2021-10-03T18:22:58.000Z | simulator/results/parse_summary.py | yrrah/cs6620-fall21-intelligent-assignment-of-data-to-dedup-nodes | 9b08941c05f5af862b5dafe9d8dc289a98c393a6 | [
"MIT"
] | null | null | null | simulator/results/parse_summary.py | yrrah/cs6620-fall21-intelligent-assignment-of-data-to-dedup-nodes | 9b08941c05f5af862b5dafe9d8dc289a98c393a6 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
if __name__ == "__main__":
main()
| 43.951515 | 123 | 0.632929 | import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
def plot_reversed(ax, save, show, title):
# ax.set_xticklabels(df.run_combo, rotation = 90)
ax.yaxis.tick_right()
ax.yaxis.set_label_position("right")
ax.invert_xaxis()
plt.gcf().subplots_adjust(right=0.5)
# plt.tight_... | 6,848 | 0 | 276 |
7956dd2d67cc23b3e4168199ecf51890e6f12e18 | 47,465 | py | Python | model/models.py | irenetrampoline/clustering-interval-censored | f6ab06a6cf3098ffe006d1b95d1b4f1d158b0bc4 | [
"MIT"
] | 1 | 2022-02-03T08:47:45.000Z | 2022-02-03T08:47:45.000Z | model/models.py | irenetrampoline/clustering-interval-censored | f6ab06a6cf3098ffe006d1b95d1b4f1d158b0bc4 | [
"MIT"
] | null | null | null | model/models.py | irenetrampoline/clustering-interval-censored | f6ab06a6cf3098ffe006d1b95d1b4f1d158b0bc4 | [
"MIT"
] | null | null | null | import logging
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
# torch.manual_seed(0)
# torch.backends.cudnn.deterministic = True
# torch.backends.cudnn.benchmark = False
from pyro.distributions import MultivariateNormal, Normal, Independent
from sklearn.cluster import KMeans, ... | 41.893204 | 243 | 0.558601 | import logging
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
# torch.manual_seed(0)
# torch.backends.cudnn.deterministic = True
# torch.backends.cudnn.benchmark = False
from pyro.distributions import MultivariateNormal, Normal, Independent
from sklearn.cluster import KMeans, ... | 30,963 | 14,916 | 377 |
6c1a9dad931a5492cb2f03282e74d6da7be79aaa | 105 | py | Python | api/content_analysis/apps.py | gpiechnik2/senter | 6f64f5410fe02a5215ba148553dec45feaadcc09 | [
"CC0-1.0"
] | 2 | 2021-12-08T19:38:33.000Z | 2022-01-26T15:02:57.000Z | api/content_analysis/apps.py | gpiechnik2/senter | 6f64f5410fe02a5215ba148553dec45feaadcc09 | [
"CC0-1.0"
] | null | null | null | api/content_analysis/apps.py | gpiechnik2/senter | 6f64f5410fe02a5215ba148553dec45feaadcc09 | [
"CC0-1.0"
] | 1 | 2021-12-08T19:38:39.000Z | 2021-12-08T19:38:39.000Z | from django.apps import AppConfig
| 21 | 39 | 0.8 | from django.apps import AppConfig
class ContentAnalysisConfig(AppConfig):
name = 'content_analysis'
| 0 | 48 | 23 |
b79225ade75abaa533e53bd620f9738f44fdded3 | 1,125 | py | Python | config/oktoberkite/control/crosswind_airspeed_controller.py | leozz37/makani | c94d5c2b600b98002f932e80a313a06b9285cc1b | [
"Apache-2.0"
] | 1,178 | 2020-09-10T17:15:42.000Z | 2022-03-31T14:59:35.000Z | config/oktoberkite/control/crosswind_airspeed_controller.py | leozz37/makani | c94d5c2b600b98002f932e80a313a06b9285cc1b | [
"Apache-2.0"
] | 1 | 2020-05-22T05:22:35.000Z | 2020-05-22T05:22:35.000Z | config/oktoberkite/control/crosswind_airspeed_controller.py | leozz37/makani | c94d5c2b600b98002f932e80a313a06b9285cc1b | [
"Apache-2.0"
] | 107 | 2020-09-10T17:29:30.000Z | 2022-03-18T09:00:14.000Z | # Copyright 2020 Makani Technologies LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 30.405405 | 78 | 0.725333 | # Copyright 2020 Makani Technologies LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 0 | 0 | 0 |
d09457b9285e35437132bc4f29ef68fd238b6e18 | 195 | py | Python | python/8kyu/who_is_going_to_pay_for_the_wall.py | Sigmanificient/codewars | b34df4bf55460d312b7ddf121b46a707b549387a | [
"MIT"
] | 3 | 2021-06-08T01:57:13.000Z | 2021-06-26T10:52:47.000Z | python/8kyu/who_is_going_to_pay_for_the_wall.py | Sigmanificient/codewars | b34df4bf55460d312b7ddf121b46a707b549387a | [
"MIT"
] | null | null | null | python/8kyu/who_is_going_to_pay_for_the_wall.py | Sigmanificient/codewars | b34df4bf55460d312b7ddf121b46a707b549387a | [
"MIT"
] | 2 | 2021-06-10T21:20:13.000Z | 2021-06-30T10:13:26.000Z | # Kata url: https://www.codewars.com/kata/58bf9bd943fadb2a980000a7.
from typing import List
| 24.375 | 67 | 0.702564 | # Kata url: https://www.codewars.com/kata/58bf9bd943fadb2a980000a7.
from typing import List
def who_is_paying(name: str) -> List[str]:
return [name, name[:2]] if len(name) > 2 else [name]
| 78 | 0 | 23 |
54968f4c3b7e0224439c11c3d3a0f91b1f6678ab | 1,995 | py | Python | src/cellsolver/utilities.py | hsorby/cellsolver | 333a6d7e9130eb9cb15eb5c72dd12041cf221981 | [
"Apache-2.0"
] | null | null | null | src/cellsolver/utilities.py | hsorby/cellsolver | 333a6d7e9130eb9cb15eb5c72dd12041cf221981 | [
"Apache-2.0"
] | null | null | null | src/cellsolver/utilities.py | hsorby/cellsolver | 333a6d7e9130eb9cb15eb5c72dd12041cf221981 | [
"Apache-2.0"
] | 1 | 2019-11-29T12:47:47.000Z | 2019-11-29T12:47:47.000Z | import json
import time
| 28.913043 | 181 | 0.654135 | import json
import time
class TimeExecution(object):
number = 10
run_timeit = False
def __init__(self, f):
self._f = f
def __call__(self, *args, **kwargs):
if TimeExecution.run_timeit:
ts = time.time()
for _ in range(TimeExecution.number):
sel... | 1,703 | 100 | 161 |
30869f0823276c568dc8fbfba7863e5ef57f3d73 | 13,875 | py | Python | testfiles/client/client.py | jjuicecup/Model-Blockchain | 7b6d7eba06de699d88f2865c129159619993a3cf | [
"MIT"
] | null | null | null | testfiles/client/client.py | jjuicecup/Model-Blockchain | 7b6d7eba06de699d88f2865c129159619993a3cf | [
"MIT"
] | null | null | null | testfiles/client/client.py | jjuicecup/Model-Blockchain | 7b6d7eba06de699d88f2865c129159619993a3cf | [
"MIT"
] | null | null | null | """
This file is meant to be a fully working mining client to interact with the REST api defined in the node-files
directory. Other client software can be written to mine and transact with the API however.
"""
import json
import sys
import os
import requests
import time
import ecdsa
from hashlib import sha256
from ppri... | 32.118056 | 119 | 0.645982 | """
This file is meant to be a fully working mining client to interact with the REST api defined in the node-files
directory. Other client software can be written to mine and transact with the API however.
"""
import json
import sys
import os
import requests
import time
import ecdsa
from hashlib import sha256
from ppri... | 9,183 | 0 | 177 |
002f53900f4bfe1eaae3e791b434763f34ac4083 | 2,785 | py | Python | pade.py | jjgoings/pade | a34a6723ee15eb0e02e498854aac4e8433995f9f | [
"MIT"
] | 13 | 2019-11-18T17:09:54.000Z | 2022-03-09T23:25:15.000Z | pade.py | jjgoings/pade | a34a6723ee15eb0e02e498854aac4e8433995f9f | [
"MIT"
] | 1 | 2021-07-02T23:25:43.000Z | 2021-07-03T05:55:36.000Z | pade.py | jjgoings/pade | a34a6723ee15eb0e02e498854aac4e8433995f9f | [
"MIT"
] | 3 | 2020-12-26T10:21:24.000Z | 2022-03-08T10:47:40.000Z | import numpy as np
def pade(time,signal,sigma=100.0,max_len=None,w_min=0.0,w_max=10.0,w_step=0.01,read_freq=None):
""" Routine to take the Fourier transform of a time signal using the method
of Pade approximants.
Inputs:
time: (list or Numpy NDArray) signal sampling times
... | 32.383721 | 95 | 0.589228 | import numpy as np
def pade(time,signal,sigma=100.0,max_len=None,w_min=0.0,w_max=10.0,w_step=0.01,read_freq=None):
""" Routine to take the Fourier transform of a time signal using the method
of Pade approximants.
Inputs:
time: (list or Numpy NDArray) signal sampling times
... | 0 | 0 | 0 |
ba42719d16e9616434f9a1fd406758d5f5ef5fe2 | 2,724 | py | Python | enaml/wx/wx_combo_box.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | 11 | 2015-03-14T14:30:51.000Z | 2022-03-15T13:01:44.000Z | enaml/wx/wx_combo_box.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | 3 | 2015-01-31T11:12:56.000Z | 2022-03-14T00:53:25.000Z | enaml/wx/wx_combo_box.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | 4 | 2015-01-27T01:56:14.000Z | 2021-02-23T07:21:20.000Z | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | 30.266667 | 79 | 0.490088 | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | 0 | 0 | 0 |
fb19e10a78bf8ba09f7ec34a3b85e15d9a57f568 | 3,521 | py | Python | elcaro-contract.py | Splyse/neo-smart-iot | ed9bb4dd4506c94e97c96a9f2b5faf792352c082 | [
"MIT"
] | 42 | 2017-11-17T10:26:35.000Z | 2021-04-25T05:09:37.000Z | elcaro-contract.py | Splyse/neo-smart-iot | ed9bb4dd4506c94e97c96a9f2b5faf792352c082 | [
"MIT"
] | null | null | null | elcaro-contract.py | Splyse/neo-smart-iot | ed9bb4dd4506c94e97c96a9f2b5faf792352c082 | [
"MIT"
] | 13 | 2017-12-10T02:52:47.000Z | 2021-04-25T05:09:44.000Z | """
elcaro-contract.py
MIT License
Copyright 2017 Splyse Inc.
"""
from boa.blockchain.vm.System.ExecutionEngine import GetScriptContainer,GetExecutingScriptHash
from boa.blockchain.vm.Neo.Transaction import *
from boa.blockchain.vm.Neo.Runtime import GetTrigger,CheckWitness,Notify,Log
from boa.blockchain.vm.Neo.Trig... | 33.216981 | 147 | 0.518887 | """
elcaro-contract.py
MIT License
Copyright 2017 Splyse Inc.
"""
from boa.blockchain.vm.System.ExecutionEngine import GetScriptContainer,GetExecutingScriptHash
from boa.blockchain.vm.Neo.Transaction import *
from boa.blockchain.vm.Neo.Runtime import GetTrigger,CheckWitness,Notify,Log
from boa.blockchain.vm.Neo.Trig... | 2,699 | 0 | 23 |
8ff342f17430f43fd91dd98cb7fabd70069fbff1 | 1,104 | py | Python | freelancefinder/remotes/migrations/0007_auto_20170430_1830.py | ScorpionResponse/freelancefinder | 7882aa8ed42afe689e594a3e10c9fc6369f70bf5 | [
"BSD-3-Clause"
] | 2 | 2017-03-18T04:28:58.000Z | 2017-04-25T10:01:28.000Z | freelancefinder/remotes/migrations/0007_auto_20170430_1830.py | ScorpionResponse/freelancefinder | 7882aa8ed42afe689e594a3e10c9fc6369f70bf5 | [
"BSD-3-Clause"
] | 20 | 2017-03-18T04:29:33.000Z | 2017-06-13T22:37:42.000Z | freelancefinder/remotes/migrations/0007_auto_20170430_1830.py | ScorpionResponse/freelancefinder | 7882aa8ed42afe689e594a3e10c9fc6369f70bf5 | [
"BSD-3-Clause"
] | 1 | 2019-01-14T19:02:06.000Z | 2019-01-14T19:02:06.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-30 18:30
from __future__ import unicode_literals
from django.db import migrations
NEW_SOURCES = [
{'code': 'trabajospython', 'name': 'Trabajos Python', 'url': 'http://www.trabajospython.com/'},
{'code': 'workinstartups', 'name': 'Work In Startups',... | 29.052632 | 99 | 0.657609 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-30 18:30
from __future__ import unicode_literals
from django.db import migrations
NEW_SOURCES = [
{'code': 'trabajospython', 'name': 'Trabajos Python', 'url': 'http://www.trabajospython.com/'},
{'code': 'workinstartups', 'name': 'Work In Startups',... | 0 | 192 | 23 |
afb9b5ad0ee004f1fd09aa9e6edbc793575b02ac | 1,548 | py | Python | intragram/posts/models.py | shoukou-lee/intragram | 7fbafcd9fa4b430170a6a4fde1b7e2b919284b04 | [
"MIT"
] | 1 | 2021-12-01T15:32:02.000Z | 2021-12-01T15:32:02.000Z | intragram/posts/models.py | shoukou-lee/intragram | 7fbafcd9fa4b430170a6a4fde1b7e2b919284b04 | [
"MIT"
] | null | null | null | intragram/posts/models.py | shoukou-lee/intragram | 7fbafcd9fa4b430170a6a4fde1b7e2b919284b04 | [
"MIT"
] | null | null | null | from django.db import models
from intragram.users import models as user_model
# post를 표현하기 위한 모델 posts - 터미널에서 'django-admin startapp posts'를 입력
# Django data model을 만들 때 게시물 생성 날짜/업데이트 날짜를 Post/Comment마다 만들지 말고,
# TimeStampedModel에 상속 시켜주자
| 30.96 | 67 | 0.627261 | from django.db import models
from intragram.users import models as user_model
# post를 표현하기 위한 모델 posts - 터미널에서 'django-admin startapp posts'를 입력
# Django data model을 만들 때 게시물 생성 날짜/업데이트 날짜를 Post/Comment마다 만들지 말고,
# TimeStampedModel에 상속 시켜주자
class TimeStampedModel(models.Model):
created_at = models.DateTimeField(au... | 0 | 1,485 | 68 |
348fdfce075236167392a69a20153ecaf931f46e | 1,826 | py | Python | cool/modules/ASA/asa_1_create_obj.py | snowtrain/cool | 29532aae905122d28578e16e6c63f0745b353608 | [
"MIT"
] | 2 | 2019-12-26T17:20:00.000Z | 2022-01-09T01:43:11.000Z | cool/modules/ASA/asa_1_create_obj.py | snowtrain/cool | 29532aae905122d28578e16e6c63f0745b353608 | [
"MIT"
] | null | null | null | cool/modules/ASA/asa_1_create_obj.py | snowtrain/cool | 29532aae905122d28578e16e6c63f0745b353608 | [
"MIT"
] | 1 | 2020-08-10T00:41:40.000Z | 2020-08-10T00:41:40.000Z | from cool.modules.ASA.asa_0_login_info import ip, my_headers, auth_header
import requests
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# 创建内部Object
# rest-api image flash:/asa-restapi-131-lfbff-k8.SPA
# rest-api agent
# 文档:https://192.168.20.4/doc/#
# 创建外部Object
if __name__ =... | 29.451613 | 122 | 0.573384 | from cool.modules.ASA.asa_0_login_info import ip, my_headers, auth_header
import requests
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# 创建内部Object
# rest-api image flash:/asa-restapi-131-lfbff-k8.SPA
# rest-api agent
# 文档:https://192.168.20.4/doc/#
def create_in_obj(vid, ip):
... | 1,594 | 0 | 44 |
6adf3f44dcfa8015845b0744785a8ce56373fed5 | 1,484 | py | Python | Sorting/merge_sort.py | warman69/USI_Algo_Bible | f7e62aff0093224c0f9c5d480d69e1275fb56fab | [
"MIT"
] | 7 | 2020-08-02T20:45:20.000Z | 2021-03-31T23:01:49.000Z | Sorting/merge_sort.py | warman69/USI_Algo_Bible | f7e62aff0093224c0f9c5d480d69e1275fb56fab | [
"MIT"
] | 1 | 2020-08-02T20:56:52.000Z | 2021-01-18T13:13:40.000Z | Sorting/merge_sort.py | warman69/USI_Algo_Bible | f7e62aff0093224c0f9c5d480d69e1275fb56fab | [
"MIT"
] | 3 | 2020-08-04T12:00:19.000Z | 2021-05-10T13:30:34.000Z | import sys
import math
import random
A = [7,6,5,4,3,2,1]
merge_sort(A)
print(A)
# TESTING
START = -99
STOP = 99
LIMIT = 1000
RANDOM1 = [random.randint(START, STOP) for iter in range(LIMIT)]
#print(RANDOM1)
RANDOM2 = [random.randint(START, STOP) for iter in range(LIMIT)]
#print(RANDOM2)
RANDOM3 = [random.randint(STAR... | 21.823529 | 64 | 0.578841 | import sys
import math
import random
def merge(A, l, m, r):
left_length = m - l + 1
right_length = r - m
L = [0]*(left_length+1)
R = [0]*(right_length+1)
for i in range(left_length):
L[i] = A[l + i]
for i in range(right_length):
R[i] = A[m + i + 1]
L[left_length] = R[righ... | 689 | 0 | 92 |
443e79e315c021d59ccce654b4ce250f189eb8a0 | 17,358 | py | Python | resnet_dnr.py | caidonkey/dnr | 011058000014dc0f76868acf8b05edc456e5cd47 | [
"MIT"
] | null | null | null | resnet_dnr.py | caidonkey/dnr | 011058000014dc0f76868acf8b05edc456e5cd47 | [
"MIT"
] | 1 | 2022-03-28T14:53:46.000Z | 2022-03-28T14:53:46.000Z | resnet_dnr.py | caidonkey/dnr | 011058000014dc0f76868acf8b05edc456e5cd47 | [
"MIT"
] | null | null | null | import logging
import torch
import torch.nn as nn
import torch.utils.checkpoint as cp
from mmcv.cnn import constant_init, kaiming_init
from mmcv.runner import load_checkpoint
from ...registry import BACKBONES
import torch.nn.functional as F
from torch.nn.modules.batchnorm import _BatchNorm
import numpy as np
def ... | 34.995968 | 117 | 0.544418 | import logging
import torch
import torch.nn as nn
import torch.utils.checkpoint as cp
from mmcv.cnn import constant_init, kaiming_init
from mmcv.runner import load_checkpoint
from ...registry import BACKBONES
import torch.nn.functional as F
from torch.nn.modules.batchnorm import _BatchNorm
import numpy as np
class b... | 11,236 | 3,594 | 549 |
d17c962053e7cdd5db0b83d19dd5cb65cb034036 | 494 | py | Python | web/app/lib/ee/tests/computedobject_test.py | geary/claslite | 83c49cf98eceae633034b82d35ed7991d943b857 | [
"Unlicense"
] | null | null | null | web/app/lib/ee/tests/computedobject_test.py | geary/claslite | 83c49cf98eceae633034b82d35ed7991d943b857 | [
"Unlicense"
] | null | null | null | web/app/lib/ee/tests/computedobject_test.py | geary/claslite | 83c49cf98eceae633034b82d35ed7991d943b857 | [
"Unlicense"
] | null | null | null | """Tests for the ee.computedobject module."""
import unittest
import ee
from ee import apitestcase
if __name__ == '__main__':
unittest.main()
| 20.583333 | 74 | 0.726721 | """Tests for the ee.computedobject module."""
import unittest
import ee
from ee import apitestcase
class ComputedObjectTest(apitestcase.ApiTestCase):
def testComputedObject(self):
"""Verifies that untyped calls wrap the result in a ComputedObject."""
result = ee.ApiFunction.call_('DateRange', 1, 2)
... | 0 | 319 | 23 |
4c7604feafa179b9f04b43d1a6411e79e21be525 | 922 | py | Python | src/olympia/applications/management/commands/import_prod_versions.py | covariant/addons-server | 41e6ee9e426facb19a1e1ca8d40277cb6f94a7da | [
"BSD-3-Clause"
] | 843 | 2016-02-09T13:00:37.000Z | 2022-03-20T19:17:06.000Z | src/olympia/applications/management/commands/import_prod_versions.py | covariant/addons-server | 41e6ee9e426facb19a1e1ca8d40277cb6f94a7da | [
"BSD-3-Clause"
] | 10,187 | 2016-02-05T23:51:05.000Z | 2022-03-31T15:24:44.000Z | src/olympia/applications/management/commands/import_prod_versions.py | covariant/addons-server | 41e6ee9e426facb19a1e1ca8d40277cb6f94a7da | [
"BSD-3-Clause"
] | 551 | 2016-02-08T20:32:16.000Z | 2022-03-15T16:49:24.000Z | from django.core.management.base import BaseCommand
from pyquery import PyQuery
from olympia.applications.models import AppVersion
from olympia.constants.applications import APP_GUIDS
| 35.461538 | 88 | 0.631236 | from django.core.management.base import BaseCommand
from pyquery import PyQuery
from olympia.applications.models import AppVersion
from olympia.constants.applications import APP_GUIDS
class Command(BaseCommand):
help = 'Import the application versions created on addons.mozilla.org.'
def handle(self, *args,... | 603 | 109 | 23 |
1e415335dfa3018e270dc92fdd57c543310a9065 | 1,381 | py | Python | NoChannelBot/core/cmds/messages.py | tolbiluha/NoChannelBot | b27cdc82facfc9a9b80ab4b3bc846f3bc592f5eb | [
"MIT"
] | null | null | null | NoChannelBot/core/cmds/messages.py | tolbiluha/NoChannelBot | b27cdc82facfc9a9b80ab4b3bc846f3bc592f5eb | [
"MIT"
] | null | null | null | NoChannelBot/core/cmds/messages.py | tolbiluha/NoChannelBot | b27cdc82facfc9a9b80ab4b3bc846f3bc592f5eb | [
"MIT"
] | null | null | null | import asyncio
import json
import aiosqlite
from aiogram.types import Message
from config import DB_URL, dp, CHANNEL_BOT_ID
from core.db.utils import dict_factory
from core.models.group import GroupSettings
@dp.throttled(rate=2)
| 30.021739 | 100 | 0.632151 | import asyncio
import json
import aiosqlite
from aiogram.types import Message
from config import DB_URL, dp, CHANNEL_BOT_ID
from core.db.utils import dict_factory
from core.models.group import GroupSettings
@dp.throttled(rate=2)
async def messages(msg: Message):
if not msg.sender_chat:
return
if ms... | 1,178 | 0 | 22 |
b8f2556375fbf528c594be28681235986f27f62d | 167 | py | Python | Quizes/Quiz5.py | bgrose/CSCE-206-Scientific-Programming | 2b308f77fd9e98ba1edb671e40ae4fdf7ac6aea3 | [
"MIT"
] | null | null | null | Quizes/Quiz5.py | bgrose/CSCE-206-Scientific-Programming | 2b308f77fd9e98ba1edb671e40ae4fdf7ac6aea3 | [
"MIT"
] | null | null | null | Quizes/Quiz5.py | bgrose/CSCE-206-Scientific-Programming | 2b308f77fd9e98ba1edb671e40ae4fdf7ac6aea3 | [
"MIT"
] | null | null | null |
#Tester
n = Numbers(2, 5)
n.add() | 13.916667 | 29 | 0.51497 |
class Numbers:
def __init__(self, x, y):
self.x = x
self.y = y
def add(self):
print(self.x+self.y)
#Tester
n = Numbers(2, 5)
n.add() | 64 | -7 | 76 |
4106e0b4127a2df544e5f0eb70ef9b4812912f23 | 13,550 | py | Python | msgraph-cli-extensions/beta/crossdeviceexperiences_beta/azext_crossdeviceexperiences_beta/generated/_help.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/beta/crossdeviceexperiences_beta/azext_crossdeviceexperiences_beta/generated/_help.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/beta/crossdeviceexperiences_beta/azext_crossdeviceexperiences_beta/generated/_help.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause... | 44.42623 | 121 | 0.678745 | # --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause... | 0 | 0 | 0 |
20923395bb5434b7c47f9fb524481c350b2410fd | 588 | py | Python | RabbitMQ/2-WorkQueues/new_task.py | Py-Himanshu-Patel/Learn-Python | 47a50a934cabcce3b1cbdd4c88141a51f21d3a05 | [
"MIT"
] | null | null | null | RabbitMQ/2-WorkQueues/new_task.py | Py-Himanshu-Patel/Learn-Python | 47a50a934cabcce3b1cbdd4c88141a51f21d3a05 | [
"MIT"
] | null | null | null | RabbitMQ/2-WorkQueues/new_task.py | Py-Himanshu-Patel/Learn-Python | 47a50a934cabcce3b1cbdd4c88141a51f21d3a05 | [
"MIT"
] | null | null | null | import pika
import sys
connection = pika.BlockingConnection(pika.ConnectionParameters("localhost"))
channel = connection.channel()
# channel.queue_declare(queue="hello")
channel.queue_declare(queue="task_queue", durable=True)
message = " ".join(sys.argv[1:]) or "Hello World!"
# channel.basic_publish(exchange="", rou... | 25.565217 | 76 | 0.72619 | import pika
import sys
connection = pika.BlockingConnection(pika.ConnectionParameters("localhost"))
channel = connection.channel()
# channel.queue_declare(queue="hello")
channel.queue_declare(queue="task_queue", durable=True)
message = " ".join(sys.argv[1:]) or "Hello World!"
# channel.basic_publish(exchange="", rou... | 0 | 0 | 0 |
b28ced7c92b3752793dd18f09abe602e9b9121d2 | 1,145 | py | Python | graviteeio_cli/graviteeio/apim/apis/apis.py | YoranSys/graviteeio-cli | 9a5f90658e6e376682c26ea07e26fb8ebe8338f3 | [
"Apache-2.0"
] | null | null | null | graviteeio_cli/graviteeio/apim/apis/apis.py | YoranSys/graviteeio-cli | 9a5f90658e6e376682c26ea07e26fb8ebe8338f3 | [
"Apache-2.0"
] | null | null | null | graviteeio_cli/graviteeio/apim/apis/apis.py | YoranSys/graviteeio-cli | 9a5f90658e6e376682c26ea07e26fb8ebe8338f3 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import click
from ..client.api import api_client
from .plugins import COMMANDS
# cmd_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), 'plugins'))
add_command = ["ps", "init", "start", "stop", "deploy", "update", "create", "status", "health", "fetch"]
@click.command(cls=PluginCo... | 27.261905 | 111 | 0.606114 | import os
import sys
import click
from ..client.api import api_client
from .plugins import COMMANDS
# cmd_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), 'plugins'))
add_command = ["ps", "init", "start", "stop", "deploy", "update", "create", "status", "health", "fetch"]
class PluginCommand(click.Mu... | 680 | 19 | 99 |
549a60ef3121d1f45c960c59c4a6ff1b9d39d654 | 4,030 | py | Python | controller/rover.py | csauer42/rover | 0e90a6c4086feea8cd34464a629dc517ca53e848 | [
"MIT"
] | null | null | null | controller/rover.py | csauer42/rover | 0e90a6c4086feea8cd34464a629dc517ca53e848 | [
"MIT"
] | null | null | null | controller/rover.py | csauer42/rover | 0e90a6c4086feea8cd34464a629dc517ca53e848 | [
"MIT"
] | null | null | null | import pygame
from pygame.locals import *
from threading import Lock
from videoreceiver import VideoReceiver
from controlio import ControlIO
import sys
class Rover(object):
"""Primary control interface for Rover"""
FPS = 15
MLIMITLOW = 32
LLIMITLOW = 96
WIDTH = 1280
HEIGHT = 960
BLACK = (0,... | 34.741379 | 89 | 0.569231 | import pygame
from pygame.locals import *
from threading import Lock
from videoreceiver import VideoReceiver
from controlio import ControlIO
import sys
class Rover(object):
"""Primary control interface for Rover"""
FPS = 15
MLIMITLOW = 32
LLIMITLOW = 96
WIDTH = 1280
HEIGHT = 960
BLACK = (0,... | 49 | 0 | 27 |
4ad6c6eb52eae93f0848534a08ba03b383e4096a | 13,083 | py | Python | venv/lib/python2.7/site-packages/ansible/modules/network/aos/_aos_blueprint_param.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | venv/lib/python2.7/site-packages/ansible/modules/network/aos/_aos_blueprint_param.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | venv/lib/python2.7/site-packages/ansible/modules/network/aos/_aos_blueprint_param.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | #!/usr/bin/python
#
# (c) 2017 Apstra Inc, <community@apstra.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opt... | 33.893782 | 105 | 0.611175 | #!/usr/bin/python
#
# (c) 2017 Apstra Inc, <community@apstra.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opt... | 6,720 | 0 | 115 |
adc24710801293adc586e332d4618d78b24e4ef4 | 829 | py | Python | asgi_correlation_id/extensions/sentry.py | lakshaythareja/asgi-correlation-id | c8febfdc04191087fb96b8d1843ad80e6f5cd080 | [
"BSD-4-Clause"
] | null | null | null | asgi_correlation_id/extensions/sentry.py | lakshaythareja/asgi-correlation-id | c8febfdc04191087fb96b8d1843ad80e6f5cd080 | [
"BSD-4-Clause"
] | null | null | null | asgi_correlation_id/extensions/sentry.py | lakshaythareja/asgi-correlation-id | c8febfdc04191087fb96b8d1843ad80e6f5cd080 | [
"BSD-4-Clause"
] | null | null | null | from typing import Callable
def get_sentry_extension() -> Callable[[str], None]:
"""
Return set_transaction_id, if the Sentry-sdk is installed.
"""
try:
import sentry_sdk # noqa: F401, TC002
from asgi_correlation_id.extensions.sentry import set_transaction_id
return set_tran... | 28.586207 | 76 | 0.708082 | from typing import Callable
def get_sentry_extension() -> Callable[[str], None]:
"""
Return set_transaction_id, if the Sentry-sdk is installed.
"""
try:
import sentry_sdk # noqa: F401, TC002
from asgi_correlation_id.extensions.sentry import set_transaction_id
return set_tran... | 0 | 0 | 0 |
5b2a2b06090cf00ce66092cc991d7c16dd32c60f | 1,765 | py | Python | test/disabled/test_utils/test_utils.py | eapearson/kbase-skd-module-job-browser-bff | 426445f90569adac16632ef4921f174e51abd42f | [
"MIT"
] | null | null | null | test/disabled/test_utils/test_utils.py | eapearson/kbase-skd-module-job-browser-bff | 426445f90569adac16632ef4921f174e51abd42f | [
"MIT"
] | 6 | 2020-05-26T17:40:07.000Z | 2022-03-11T16:33:11.000Z | test/disabled/test_utils/test_utils.py | eapearson/kbase-skd-module-job-browser-bff | 426445f90569adac16632ef4921f174e51abd42f | [
"MIT"
] | 1 | 2020-05-26T17:12:59.000Z | 2020-05-26T17:12:59.000Z | from JobBrowserBFF.TestBase import TestBase
import JobBrowserBFF.Utils as utils
UPSTREAM_SERVICE = 'ee2'
ENV = 'ci'
USER_CLASS = 'user'
| 28.015873 | 59 | 0.349575 | from JobBrowserBFF.TestBase import TestBase
import JobBrowserBFF.Utils as utils
UPSTREAM_SERVICE = 'ee2'
ENV = 'ci'
USER_CLASS = 'user'
class UtilsTest(TestBase):
def test_parse_app_id(self):
cases = [
{
'input': ['foo/bar', None],
'output': {
... | 1,573 | 5 | 49 |
ec3b50867827e52349efa836f1331fe49ea95fb2 | 2,613 | py | Python | tests/query/processors/test_tags_expander.py | fpacifici/snuba | cf732b71383c948f9387fbe64e9404ca71f8e9c5 | [
"Apache-2.0"
] | null | null | null | tests/query/processors/test_tags_expander.py | fpacifici/snuba | cf732b71383c948f9387fbe64e9404ca71f8e9c5 | [
"Apache-2.0"
] | null | null | null | tests/query/processors/test_tags_expander.py | fpacifici/snuba | cf732b71383c948f9387fbe64e9404ca71f8e9c5 | [
"Apache-2.0"
] | null | null | null | from snuba.datasets.factory import get_dataset
from snuba.query import SelectedExpression
from snuba.query.conditions import OPERATOR_TO_FUNCTION, binary_condition, in_condition
from snuba.query.expressions import Column, FunctionCall, Literal
from snuba.query.parser import parse_query
from snuba.query.processors.tags_... | 33.935065 | 88 | 0.546498 | from snuba.datasets.factory import get_dataset
from snuba.query import SelectedExpression
from snuba.query.conditions import OPERATOR_TO_FUNCTION, binary_condition, in_condition
from snuba.query.expressions import Column, FunctionCall, Literal
from snuba.query.parser import parse_query
from snuba.query.processors.tags_... | 2,168 | 0 | 23 |
24b37ffad9cf5b4e38d0d092e7b3746130094d77 | 1,302 | py | Python | apex/views/contacts.py | drezr/apex_dev_backend | 473c46f69a50e9306fc959f8e6d4efd18afc7b6c | [
"MIT"
] | 3 | 2021-05-26T09:52:59.000Z | 2021-11-12T10:34:33.000Z | apex/views/contacts.py | drezr/apex_dev_backend | 473c46f69a50e9306fc959f8e6d4efd18afc7b6c | [
"MIT"
] | null | null | null | apex/views/contacts.py | drezr/apex_dev_backend | 473c46f69a50e9306fc959f8e6d4efd18afc7b6c | [
"MIT"
] | null | null | null | from rest_framework import status
from rest_framework.views import APIView
from rest_framework.response import Response
from ..models import *
from ..serializers import *
| 27.125 | 77 | 0.538402 | from rest_framework import status
from rest_framework.views import APIView
from rest_framework.response import Response
from ..models import *
from ..serializers import *
class ContactsView(APIView):
def get(self, request):
app_id = request.query_params['app_id']
day = request.query_params['day'... | 1,073 | 7 | 50 |
b8971fac0732fdab5222cf0045c1dc4c9cbcae54 | 2,403 | py | Python | trees_and_tree_algorithms/numeric_parse_tree.py | jianweiSun/algorithms-in-python | c316b8df6d058b46158d950a1347f5dbd1c6b055 | [
"MIT"
] | null | null | null | trees_and_tree_algorithms/numeric_parse_tree.py | jianweiSun/algorithms-in-python | c316b8df6d058b46158d950a1347f5dbd1c6b055 | [
"MIT"
] | null | null | null | trees_and_tree_algorithms/numeric_parse_tree.py | jianweiSun/algorithms-in-python | c316b8df6d058b46158d950a1347f5dbd1c6b055 | [
"MIT"
] | null | null | null | from data_structures.stack import Stack
from trees_and_tree_algorithms.binary_tree import BinaryTree
import operator
| 34.328571 | 101 | 0.659592 | from data_structures.stack import Stack
from trees_and_tree_algorithms.binary_tree import BinaryTree
import operator
def build_numeric_parse_tree(numeric_expression):
trace_stack = Stack()
tree = BinaryTree(None)
trace_stack.push(tree) # the last ) will return the origin tree
current_tree = tree
... | 2,189 | 0 | 92 |
d97aa2ce745883a9ee6554844c742772fd037df7 | 4,604 | py | Python | droplogger/outputs/feed.py | goodevilgenius/droplogger | 4e5462db52fa174a2fdec491553ea6286a377539 | [
"MIT"
] | 3 | 2017-03-07T21:46:52.000Z | 2020-05-02T07:46:20.000Z | droplogger/outputs/feed.py | goodevilgenius/droplogger | 4e5462db52fa174a2fdec491553ea6286a377539 | [
"MIT"
] | 38 | 2015-02-24T19:17:36.000Z | 2020-09-28T11:12:40.000Z | droplogger/outputs/feed.py | goodevilgenius/droplogger | 4e5462db52fa174a2fdec491553ea6286a377539 | [
"MIT"
] | 1 | 2018-02-22T20:14:26.000Z | 2018-02-22T20:14:26.000Z | #!/usr/bin/python
import os, codecs, datetime
import jinja2, markdown
from email.utils import formatdate
from xml.sax.saxutils import escape
from ..utils.misc import json_dumps
__all__ = ["add_entries"]
config = {"__Instructions_filename_":"In the filename, 0 is the extension, specified by ext, 1 is the format name,... | 46.505051 | 186 | 0.607515 | #!/usr/bin/python
import os, codecs, datetime
import jinja2, markdown
from email.utils import formatdate
from xml.sax.saxutils import escape
from ..utils.misc import json_dumps
__all__ = ["add_entries"]
config = {"__Instructions_filename_":"In the filename, 0 is the extension, specified by ext, 1 is the format name,... | 3,330 | 0 | 23 |
b4e27162bfc85f13357b856c0bae4712de0b1ab0 | 1,765 | py | Python | test/unit/test_runner.py | mindartur/contessa | 45a93e9bf308891ada3ec9bccae825c9f62172a5 | [
"MIT"
] | null | null | null | test/unit/test_runner.py | mindartur/contessa | 45a93e9bf308891ada3ec9bccae825c9f62172a5 | [
"MIT"
] | null | null | null | test/unit/test_runner.py | mindartur/contessa | 45a93e9bf308891ada3ec9bccae825c9f62172a5 | [
"MIT"
] | null | null | null | import pytest
from contessa.models import ResultTable, QualityCheck
from contessa.rules import GtRule, NotNullRule
@pytest.mark.parametrize(
"rule_def, rule_cls",
[({"type": "not_null"}, NotNullRule), ({"type": "gt"}, GtRule)],
)
| 29.915254 | 80 | 0.660057 | import pytest
from contessa.models import ResultTable, QualityCheck
from contessa.rules import GtRule, NotNullRule
def test_build_rules(dummy_contessa):
rules = [
{
"name": "not_null_name",
"type": "not_null",
"columns": ["a", "b", "c"],
"time_filter": "cre... | 1,406 | 0 | 114 |
b47c2268fe1d086a3df3df6b0aa6f9549ddca8ef | 2,823 | py | Python | test/client/test_signals.py | nielsavonds/python-dbus-next | 129feadb14f0707c9692c041e712ec6d0fd45a74 | [
"MIT"
] | 1 | 2021-02-28T15:51:52.000Z | 2021-02-28T15:51:52.000Z | test/client/test_signals.py | nielsavonds/python-dbus-next | 129feadb14f0707c9692c041e712ec6d0fd45a74 | [
"MIT"
] | null | null | null | test/client/test_signals.py | nielsavonds/python-dbus-next | 129feadb14f0707c9692c041e712ec6d0fd45a74 | [
"MIT"
] | null | null | null | from dbus_next.service import ServiceInterface, signal
from dbus_next.aio import MessageBus
from dbus_next import Message
import pytest
@pytest.mark.asyncio
| 28.23 | 76 | 0.639036 | from dbus_next.service import ServiceInterface, signal
from dbus_next.aio import MessageBus
from dbus_next import Message
import pytest
class ExampleInterface(ServiceInterface):
def __init__(self):
super().__init__('test.interface')
@signal()
def SomeSignal(self) -> 's':
return 'hello'
... | 2,489 | 128 | 45 |
29b2e754617514c98fd7650574fd58215a2e044a | 608 | py | Python | solutions/0094.binary-tree-inorder-traversal/binary-tree-inorder-traversal.py | CarlKing5019/Leetcode | ec887a3cf93eb9952fb6bf8233d3cc374a5e32a0 | [
"MIT"
] | null | null | null | solutions/0094.binary-tree-inorder-traversal/binary-tree-inorder-traversal.py | CarlKing5019/Leetcode | ec887a3cf93eb9952fb6bf8233d3cc374a5e32a0 | [
"MIT"
] | null | null | null | solutions/0094.binary-tree-inorder-traversal/binary-tree-inorder-traversal.py | CarlKing5019/Leetcode | ec887a3cf93eb9952fb6bf8233d3cc374a5e32a0 | [
"MIT"
] | null | null | null | '''
* Solution for Binary Tree Inorder Traversal (Leetcode 94)
* https://leetcode.com/problems/binary-tree-inorder-traversal/
* Time Complexity: O(n)
* Space Complexity: O(h)
* Idea: Recursion
'''
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# ... | 24.32 | 100 | 0.625 | '''
* Solution for Binary Tree Inorder Traversal (Leetcode 94)
* https://leetcode.com/problems/binary-tree-inorder-traversal/
* Time Complexity: O(n)
* Space Complexity: O(h)
* Idea: Recursion
'''
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# ... | 197 | -6 | 49 |
e0404c28286dfb5cfab96b5e412a7fcd22152cba | 1,579 | py | Python | kiwiii/loader.py | mojaie/kiwiii-server | 2f550d58bfc9876b9153a2899610e8ca256c294e | [
"MIT"
] | null | null | null | kiwiii/loader.py | mojaie/kiwiii-server | 2f550d58bfc9876b9153a2899610e8ca256c294e | [
"MIT"
] | 3 | 2017-09-08T02:00:30.000Z | 2017-10-05T08:14:59.000Z | kiwiii/loader.py | mojaie/kiwiii-server | 2f550d58bfc9876b9153a2899610e8ca256c294e | [
"MIT"
] | null | null | null |
import glob
import os
import yaml
with open("server_config.yaml") as f:
config = yaml.load(f.read())
| 26.762712 | 75 | 0.668144 |
import glob
import os
import yaml
with open("server_config.yaml") as f:
config = yaml.load(f.read())
def web_home_path():
return config["web_home"]
def basic_auth_realm():
return config["basic_auth_realm"]
def user_passwd_matched(user, passwd):
users = config["user"]
return user in users an... | 1,255 | 0 | 207 |
b9290c05148c759440d316e434d280241a415c00 | 1,643 | py | Python | Network/VGGLike/VGG_tiny_nBn192.py | MuAuan/dlShogi-kai | cac02997ff816bba085c872fe02b099a92b08ba4 | [
"MIT"
] | null | null | null | Network/VGGLike/VGG_tiny_nBn192.py | MuAuan/dlShogi-kai | cac02997ff816bba085c872fe02b099a92b08ba4 | [
"MIT"
] | null | null | null | Network/VGGLike/VGG_tiny_nBn192.py | MuAuan/dlShogi-kai | cac02997ff816bba085c872fe02b099a92b08ba4 | [
"MIT"
] | null | null | null | from chainer import Chain
import chainer.functions as F
import chainer.links as L
from pydlshogi.common import *
ch=192
| 35.717391 | 123 | 0.572733 | from chainer import Chain
import chainer.functions as F
import chainer.links as L
from pydlshogi.common import *
ch=192
class PolicyNetwork(Chain):
def __init__(self):
super(PolicyNetwork, self).__init__()
with self.init_scope():
self.conv1_1 = L.Convolution2D(104, ch, 3, pad=1)
... | 1,437 | 6 | 76 |
3d3c983a11e0ac7b41a2cb592f8e92136a32d4a4 | 1,024 | py | Python | src/waldur_mastermind/marketplace/migrations/0043_category_default_tenant_category.py | geant-multicloud/MCMS-mastermind | 81333180f5e56a0bc88d7dad448505448e01f24e | [
"MIT"
] | 26 | 2017-10-18T13:49:58.000Z | 2021-09-19T04:44:09.000Z | src/waldur_mastermind/marketplace/migrations/0043_category_default_tenant_category.py | geant-multicloud/MCMS-mastermind | 81333180f5e56a0bc88d7dad448505448e01f24e | [
"MIT"
] | 14 | 2018-12-10T14:14:51.000Z | 2021-06-07T10:33:39.000Z | src/waldur_mastermind/marketplace/migrations/0043_category_default_tenant_category.py | geant-multicloud/MCMS-mastermind | 81333180f5e56a0bc88d7dad448505448e01f24e | [
"MIT"
] | 32 | 2017-09-24T03:10:45.000Z | 2021-10-16T16:41:09.000Z | # Generated by Django 2.2.13 on 2021-02-26 11:42
from django.core.exceptions import ObjectDoesNotExist
from django.db import migrations, models
| 28.444444 | 123 | 0.663086 | # Generated by Django 2.2.13 on 2021-02-26 11:42
from django.core.exceptions import ObjectDoesNotExist
from django.db import migrations, models
def set_default_tenant_flag_to_categories(apps, schema_editor):
Category = apps.get_model('marketplace', 'Category')
try:
vm_category = Category.objects.get... | 297 | 534 | 46 |
016d912fba928b5c539d28066bfd7012210abf5e | 6,554 | py | Python | src/ops.py | alperyeg/spiking_GANs | 9249093db043c0b41eb1e935dd09f5d415307ca5 | [
"MIT"
] | null | null | null | src/ops.py | alperyeg/spiking_GANs | 9249093db043c0b41eb1e935dd09f5d415307ca5 | [
"MIT"
] | null | null | null | src/ops.py | alperyeg/spiking_GANs | 9249093db043c0b41eb1e935dd09f5d415307ca5 | [
"MIT"
] | null | null | null | import math
import numpy as np
import tensorflow as tf
from tensorflow.python.framework import ops
class BatchNorm(object):
"""Code modification of http://stackoverflow.com/a/33950177"""
def linear(inpt, output_dim, scope=None, stddev=1.0, with_w=False):
"""
Linear transformation
:param inpt: data... | 33.269036 | 81 | 0.579646 | import math
import numpy as np
import tensorflow as tf
from tensorflow.python.framework import ops
class BatchNorm(object):
"""Code modification of http://stackoverflow.com/a/33950177"""
def __init__(self, epsilon=1e-5, momentum=0.9, name="batch_norm"):
with tf.variable_scope(name):
self... | 546 | 0 | 54 |
5f6e523e5dd92ac0b1ae517551b31b3859253625 | 326 | py | Python | src/test/mi/sample/__init__.py | luisribeirogomes/medical-image-downloader | 4e1649acd47c3b0a8864e3cb7b4169c5a0cc3848 | [
"MIT"
] | 6 | 2019-09-09T14:21:35.000Z | 2020-10-01T07:45:59.000Z | src/test/mi/sample/__init__.py | luisrgpt/medical-image-downloader | 4e1649acd47c3b0a8864e3cb7b4169c5a0cc3848 | [
"MIT"
] | 12 | 2019-10-24T13:02:22.000Z | 2021-03-14T15:59:15.000Z | src/test/mi/sample/__init__.py | luisrgpt/medical-image-downloader | 4e1649acd47c3b0a8864e3cb7b4169c5a0cc3848 | [
"MIT"
] | 2 | 2019-10-22T10:01:53.000Z | 2020-03-10T19:14:44.000Z | from .studiesIndex_whenDownloaded import studiesIndex_whenDownloaded
from .studiesIndex_whenDownloaded_withEmptyStudyList import studiesIndex_whenDownloaded_withEmptyStudyList
from .study_whenDownloaded import study_whenDownloaded
from .study_whenDownloaded_withEmptySeriesList import study_whenDownloaded_withEmptySerie... | 65.2 | 106 | 0.93865 | from .studiesIndex_whenDownloaded import studiesIndex_whenDownloaded
from .studiesIndex_whenDownloaded_withEmptyStudyList import studiesIndex_whenDownloaded_withEmptyStudyList
from .study_whenDownloaded import study_whenDownloaded
from .study_whenDownloaded_withEmptySeriesList import study_whenDownloaded_withEmptySerie... | 0 | 0 | 0 |
fbb022212ff0d3c1b286ef027a166087022929c9 | 9,693 | py | Python | emulation_system/emulation_system/commands/emulation_command_creator.py | Opentrons/ot3-emulator | 90fad37b54dc3b003732220e630185de1a1d5dfd | [
"Apache-2.0"
] | null | null | null | emulation_system/emulation_system/commands/emulation_command_creator.py | Opentrons/ot3-emulator | 90fad37b54dc3b003732220e630185de1a1d5dfd | [
"Apache-2.0"
] | 3 | 2021-08-31T14:59:41.000Z | 2021-10-04T16:10:25.000Z | emulation_system/emulation_system/commands/emulation_command_creator.py | Opentrons/ot3-emulator | 90fad37b54dc3b003732220e630185de1a1d5dfd | [
"Apache-2.0"
] | null | null | null | """Builds command for emulator."""
from __future__ import annotations
import abc
import argparse
import os
from dataclasses import dataclass
from enum import Enum
from typing import Dict
from emulation_system.consts import (
PRODUCTION_MODE_NAME,
DEVELOPMENT_MODE_NAME,
LATEST_KEYWORD,
ROOT_DIR,
)
fro... | 32.41806 | 85 | 0.657691 | """Builds command for emulator."""
from __future__ import annotations
import abc
import argparse
import os
from dataclasses import dataclass
from enum import Enum
from typing import Dict
from emulation_system.consts import (
PRODUCTION_MODE_NAME,
DEVELOPMENT_MODE_NAME,
LATEST_KEYWORD,
ROOT_DIR,
)
fro... | 0 | 0 | 0 |
08b9122888821e2ca3e07dd65afd9695ef752424 | 922 | py | Python | app.py | j-000/todoAPI | 27d8bbe680368a4ad72adf174776551b7bf219c6 | [
"bzip2-1.0.6"
] | 2 | 2019-04-20T18:28:04.000Z | 2019-07-31T06:04:12.000Z | app.py | j-000/todoAPI | 27d8bbe680368a4ad72adf174776551b7bf219c6 | [
"bzip2-1.0.6"
] | null | null | null | app.py | j-000/todoAPI | 27d8bbe680368a4ad72adf174776551b7bf219c6 | [
"bzip2-1.0.6"
] | null | null | null | from flask import render_template
from flask_restful import Api, reqparse
from models import app
from resources import UserAuthentication, UserRefreshToken, UserRegistration, UserLogout, Todos, Todo
from flask_moment import Moment
moment = Moment(app)
api = Api(app)
api.add_resource(UserRegistration, '/registration')... | 28.8125 | 101 | 0.759219 | from flask import render_template
from flask_restful import Api, reqparse
from models import app
from resources import UserAuthentication, UserRefreshToken, UserRegistration, UserLogout, Todos, Todo
from flask_moment import Moment
moment = Moment(app)
api = Api(app)
api.add_resource(UserRegistration, '/registration')... | 116 | 0 | 66 |
2fb1bdd7e88f0d2c1b5764cee74a9a2b9519fce8 | 1,282 | py | Python | backend/LocalTesting/compute_weights.py | brandontjd/BinancePortfolioManager | e1d81f641336c6dfc97f8181171d2814f72e0ee7 | [
"MIT"
] | 5 | 2021-04-20T05:35:49.000Z | 2021-08-09T08:51:16.000Z | backend/LocalTesting/compute_weights.py | brandontjd/BinancePortfolioManager | e1d81f641336c6dfc97f8181171d2814f72e0ee7 | [
"MIT"
] | 2 | 2021-05-09T17:27:03.000Z | 2021-05-18T13:12:29.000Z | backend/LocalTesting/compute_weights.py | brandontjd/BinancePortfolioManager | e1d81f641336c6dfc97f8181171d2814f72e0ee7 | [
"MIT"
] | null | null | null | from flask import Flask, jsonify, request
from flask_cors import CORS
from os import environ
import pandas as pd
# To do : Filter away very small amounts
app = Flask(__name__)
CORS(app, resources={r"/*": {"origins": "*"}})
@app.route('/compute_weights',methods=['POST'])
if __name__ == "__main__":
app.run(host="... | 32.05 | 76 | 0.627145 | from flask import Flask, jsonify, request
from flask_cors import CORS
from os import environ
import pandas as pd
# To do : Filter away very small amounts
app = Flask(__name__)
CORS(app, resources={r"/*": {"origins": "*"}})
@app.route('/compute_weights',methods=['POST'])
def compute_weights():
assets = request.ge... | 882 | 0 | 22 |
b6183d93d141c950c30926b0e6a0bf799a89eff0 | 4,743 | py | Python | examples/SimpleTrap/SimpleTrap.py | nist-ionstorage/bem | b87737f4f5e32351576885cd5f453013cb731f93 | [
"Unlicense"
] | 16 | 2018-01-31T22:45:37.000Z | 2022-02-06T07:33:42.000Z | examples/SimpleTrap/SimpleTrap.py | nist-ionstorage/bem | b87737f4f5e32351576885cd5f453013cb731f93 | [
"Unlicense"
] | 1 | 2018-03-27T16:03:57.000Z | 2018-03-27T16:03:57.000Z | examples/SimpleTrap/SimpleTrap.py | nist-ionstorage/bem | b87737f4f5e32351576885cd5f453013cb731f93 | [
"Unlicense"
] | 11 | 2017-08-29T20:50:55.000Z | 2021-05-26T12:43:52.000Z | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
# bem: triangulation and fmm/bem electrostatics tools
#
# Copyright (C) 2011-2012 Robert Jordens <jordens@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | 28.920732 | 82 | 0.683534 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
# bem: triangulation and fmm/bem electrostatics tools
#
# Copyright (C) 2011-2012 Robert Jordens <jordens@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | 467 | 0 | 23 |
6560358e89f43f241a6a913a3a42338e78afda8e | 1,734 | py | Python | examples/muv/muv_datasets.py | ozgurozkan123/deepchem | 7b6248db5f7172ff2a833a1c7c99f48565befe67 | [
"MIT"
] | 40 | 2019-04-27T01:20:00.000Z | 2022-01-08T07:35:14.000Z | examples/muv/muv_datasets.py | ozgurozkan123/deepchem | 7b6248db5f7172ff2a833a1c7c99f48565befe67 | [
"MIT"
] | 2 | 2017-08-02T20:35:13.000Z | 2017-08-10T21:17:31.000Z | examples/muv/muv_datasets.py | ozgurozkan123/deepchem | 7b6248db5f7172ff2a833a1c7c99f48565befe67 | [
"MIT"
] | 15 | 2019-06-05T02:53:28.000Z | 2021-11-05T00:54:38.000Z | """
MUV dataset loader.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import os
import numpy as np
import shutil
import deepchem as dc
def load_muv(featurizer='ECFP', split='index'):
"""Load MUV datasets. Does not do train/test split"""
# Load MU... | 32.716981 | 76 | 0.671857 | """
MUV dataset loader.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import os
import numpy as np
import shutil
import deepchem as dc
def load_muv(featurizer='ECFP', split='index'):
"""Load MUV datasets. Does not do train/test split"""
# Load MU... | 0 | 0 | 0 |
604cc8b7793bb84989a19dc4373f522dc0854717 | 385 | py | Python | LeetCode/python/151-180/171-excel-sheet-column-number/solution.py | shootsoft/practice | 49f28c2e0240de61d00e4e0291b3c5edd930e345 | [
"Apache-2.0"
] | null | null | null | LeetCode/python/151-180/171-excel-sheet-column-number/solution.py | shootsoft/practice | 49f28c2e0240de61d00e4e0291b3c5edd930e345 | [
"Apache-2.0"
] | null | null | null | LeetCode/python/151-180/171-excel-sheet-column-number/solution.py | shootsoft/practice | 49f28c2e0240de61d00e4e0291b3c5edd930e345 | [
"Apache-2.0"
] | null | null | null | __author__ = 'yinjun'
# @param s, a string
# @return an integer
| 16.041667 | 31 | 0.392208 | __author__ = 'yinjun'
class Solution:
# @param s, a string
# @return an integer
def titleToNumber(self, s):
lst = list(s)
l = len(lst)
r = l - 1
num = 0
pos = 0
while pos < l:
c = lst[pos]
cn = ord(c) - 64
num += cn * 26... | 268 | -6 | 49 |
707ab8ca9ec592f077da340206e9ff910e85ed5d | 591 | py | Python | inmuebles/models/registro_inmuebles.py | judhenaoma/c4-p27-g3 | 53feed982ef1954a0347e94487fec2f8cd20e971 | [
"CC0-1.0"
] | null | null | null | inmuebles/models/registro_inmuebles.py | judhenaoma/c4-p27-g3 | 53feed982ef1954a0347e94487fec2f8cd20e971 | [
"CC0-1.0"
] | null | null | null | inmuebles/models/registro_inmuebles.py | judhenaoma/c4-p27-g3 | 53feed982ef1954a0347e94487fec2f8cd20e971 | [
"CC0-1.0"
] | null | null | null | from django.db import models
from django.db.models.fields import BooleanField, CharField, FloatField, IntegerField, SmallIntegerField
from django.db.models.fields.files import ImageField
from .user import User
from .inmueble import Inmueble
| 42.214286 | 104 | 0.795262 | from django.db import models
from django.db.models.fields import BooleanField, CharField, FloatField, IntegerField, SmallIntegerField
from django.db.models.fields.files import ImageField
from .user import User
from .inmueble import Inmueble
class RegistroInmueble(models.Model):
id = models.BigAutoField(primary_k... | 0 | 327 | 23 |
6a55e3835cc4c47eb4c56f555f02a3466775cb56 | 1,678 | py | Python | chargebee/models/invoice_estimate.py | cloudtruth/chargebee-python | d72c45f0ff32170fd7d03fcfbc7c4f2b3a379324 | [
"MIT"
] | null | null | null | chargebee/models/invoice_estimate.py | cloudtruth/chargebee-python | d72c45f0ff32170fd7d03fcfbc7c4f2b3a379324 | [
"MIT"
] | null | null | null | chargebee/models/invoice_estimate.py | cloudtruth/chargebee-python | d72c45f0ff32170fd7d03fcfbc7c4f2b3a379324 | [
"MIT"
] | 1 | 2021-06-18T17:21:37.000Z | 2021-06-18T17:21:37.000Z | import json
from chargebee.model import Model
from chargebee import request
from chargebee import APIError
| 55.933333 | 376 | 0.714541 | import json
from chargebee.model import Model
from chargebee import request
from chargebee import APIError
class InvoiceEstimate(Model):
class LineItem(Model):
fields = ["id", "subscription_id", "date_from", "date_to", "unit_amount", "quantity", "amount", "pricing_model", "is_taxed", "tax_amount", "tax_rate"... | 0 | 1,547 | 23 |
b1c96e1cc7cf1b9136af7e35db07070681cb99e5 | 3,088 | py | Python | Backend/pesMethod.py | GaryZ700/CatLab_CompChem | 4a3dee5a3778eb8b69b53b9d0e9ed6321cadedea | [
"MIT"
] | 1 | 2021-11-13T12:21:52.000Z | 2021-11-13T12:21:52.000Z | Backend/pesMethod.py | GaryZ700/CatLab_CompChem | 4a3dee5a3778eb8b69b53b9d0e9ed6321cadedea | [
"MIT"
] | null | null | null | Backend/pesMethod.py | GaryZ700/CatLab_CompChem | 4a3dee5a3778eb8b69b53b9d0e9ed6321cadedea | [
"MIT"
] | null | null | null | #Written by Gary Zeri
#Computer Science Major at Chapman University, Member of Dr. LaRue's CatLab
#Abstract Class to define the properties of all methods used to generate a Potential Energy Surface
from compChemGlobal import *
from graphableData import *
########################################################... | 33.204301 | 110 | 0.488342 | #Written by Gary Zeri
#Computer Science Major at Chapman University, Member of Dr. LaRue's CatLab
#Abstract Class to define the properties of all methods used to generate a Potential Energy Surface
from compChemGlobal import *
from graphableData import *
class PESMethod(GraphableData):
#Declare all global... | 1,317 | 673 | 157 |
72e29db2d9eb9d9778ec01beb1cdff703288bc98 | 41,733 | py | Python | pypy/objspace/std/intobject.py | pymtl/pypy-pymtl3 | d2f66f87686e48aeb1eecabeaa3de1381a149f2c | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2021-06-02T23:02:09.000Z | 2021-06-02T23:02:09.000Z | pypy/objspace/std/intobject.py | pymtl/pypy-pymtl3 | d2f66f87686e48aeb1eecabeaa3de1381a149f2c | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2021-03-30T18:08:41.000Z | 2021-03-30T18:08:41.000Z | pypy/objspace/std/intobject.py | pymtl/pypy-pymtl3 | d2f66f87686e48aeb1eecabeaa3de1381a149f2c | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | """The builtin int type (W_AbstractInt) and the base impl (W_IntObject)
based on rpython ints.
In order to have the same behavior running on CPython, and after RPython
translation this module uses rarithmetic.ovfcheck to explicitly check
for overflows, something CPython does not do anymore.
"""
import operator
import ... | 38.182068 | 88 | 0.635205 | """The builtin int type (W_AbstractInt) and the base impl (W_IntObject)
based on rpython ints.
In order to have the same behavior running on CPython, and after RPython
translation this module uses rarithmetic.ovfcheck to explicitly check
for overflows, something CPython does not do anymore.
"""
import operator
import ... | 22,717 | 10,604 | 525 |
6b720c23f71a96bcab1ab21bfe228eeadab8a860 | 1,418 | py | Python | 10.delete.py | MohanSha/EAMS | bf43a855c0a44da8e5aa76a30f6ac3f1e899bd00 | [
"MIT"
] | null | null | null | 10.delete.py | MohanSha/EAMS | bf43a855c0a44da8e5aa76a30f6ac3f1e899bd00 | [
"MIT"
] | null | null | null | 10.delete.py | MohanSha/EAMS | bf43a855c0a44da8e5aa76a30f6ac3f1e899bd00 | [
"MIT"
] | null | null | null | #import libraries
import MySQLdb
import ConfigParser
from Tkinter import *
from tkMessageBox import *
emain = Tk()
emain.title('Input')
Label(emain, text="Enter table name to delete : ").grid(row=1,column=2,sticky=W,pady=4)
inp_tbl = Entry(emain)
inp_tbl.grid(row=1,column=4,padx=12)
inp_tbl.bind('<Retur... | 24.877193 | 142 | 0.643865 | #import libraries
import MySQLdb
import ConfigParser
from Tkinter import *
from tkMessageBox import *
def exec_delete(*event):
#reading config file
Config = ConfigParser.ConfigParser()
Config.read("config.ini")
# Establish a MySQL connection
database = MySQLdb.connect (host=Config.get(... | 995 | 0 | 50 |
43041b08f9fdcbe5fbf3abf89d839c8afc356563 | 5,354 | py | Python | satori/tunnel.py | mgeisler/satori | dea382bae1cd043189589c0f7d4c20b4b6725ab5 | [
"Apache-2.0"
] | 1 | 2015-01-18T19:56:28.000Z | 2015-01-18T19:56:28.000Z | satori/tunnel.py | samstav/satori | 239fa1e3c7aac78599145c670576f0ac76a41a89 | [
"Apache-2.0"
] | null | null | null | satori/tunnel.py | samstav/satori | 239fa1e3c7aac78599145c670576f0ac76a41a89 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 31.869048 | 78 | 0.607023 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 0 | 0 | 0 |
96e32c6849ed32951d318479fec6d9eb5b793114 | 1,639 | py | Python | tools/views.py | yyyyyyyan/esquer.dev | eb43dc3a8e2db2bba42f3d487c721a69d55ff361 | [
"MIT"
] | 9 | 2020-03-02T17:31:07.000Z | 2022-01-03T03:36:02.000Z | tools/views.py | yyyyyyyan/esquer.dev | eb43dc3a8e2db2bba42f3d487c721a69d55ff361 | [
"MIT"
] | 6 | 2021-04-03T21:45:57.000Z | 2022-02-10T08:13:13.000Z | tools/views.py | yyyyyyyan/esquer.dev | eb43dc3a8e2db2bba42f3d487c721a69d55ff361 | [
"MIT"
] | 1 | 2020-06-08T10:53:35.000Z | 2020-06-08T10:53:35.000Z | import subprocess
from pathlib import Path
from uuid import uuid4
from django.conf import settings
from django.http import FileResponse
from django.shortcuts import render
from ratelimit import UNSAFE as UNSAFE_METHODS
from ratelimit.decorators import ratelimit
from .forms import MetadataRemovalForm
@ratelimit(key=... | 38.116279 | 88 | 0.621721 | import subprocess
from pathlib import Path
from uuid import uuid4
from django.conf import settings
from django.http import FileResponse
from django.shortcuts import render
from ratelimit import UNSAFE as UNSAFE_METHODS
from ratelimit.decorators import ratelimit
from .forms import MetadataRemovalForm
@ratelimit(key=... | 1,154 | 0 | 22 |
a89ddb9745ba5e0f514015de6cbc530cb2a36195 | 274 | py | Python | src/pages/views.py | earth-emoji/infotechia | 44ed7aecf052001573b47320e6a1239968d2a067 | [
"BSD-2-Clause"
] | null | null | null | src/pages/views.py | earth-emoji/infotechia | 44ed7aecf052001573b47320e6a1239968d2a067 | [
"BSD-2-Clause"
] | 11 | 2019-10-27T23:41:10.000Z | 2022-02-10T10:30:00.000Z | src/pages/views.py | earth-emoji/infotechia | 44ed7aecf052001573b47320e6a1239968d2a067 | [
"BSD-2-Clause"
] | null | null | null | from django.shortcuts import render, redirect
# Create your views here.
| 34.25 | 68 | 0.759124 | from django.shortcuts import render, redirect
# Create your views here.
def home(request, template_name='pages/home.html'):
if request.user.is_authenticated:
return redirect('workspace:home', request.user.profile.slug)
return render(request, template_name)
| 179 | 0 | 22 |
1c503cbca6e93841890aaeb1463f9eee90246168 | 35,502 | py | Python | test/test_entrypoints.py | cdoronc/remote | 4155e7f019891d72fbad6081ad62f8441d6b3e76 | [
"BSD-2-Clause"
] | 15 | 2020-05-25T18:23:58.000Z | 2021-08-19T19:26:36.000Z | test/test_entrypoints.py | cdoronc/remote | 4155e7f019891d72fbad6081ad62f8441d6b3e76 | [
"BSD-2-Clause"
] | 12 | 2020-05-11T23:41:24.000Z | 2022-02-02T13:33:39.000Z | test/test_entrypoints.py | cdoronc/remote | 4155e7f019891d72fbad6081ad62f8441d6b3e76 | [
"BSD-2-Clause"
] | 7 | 2020-06-05T01:33:32.000Z | 2021-06-08T21:57:44.000Z | """Integration-ish tests for CLI endpoints.
We only mock subprocess calls since we cannot do multi-host testing.
Some of the test above don't verify much, but they at least ensure that all parts work well together.
"""
import os
import sys
from contextlib import contextmanager
from datetime import datetime
from unitt... | 28.981224 | 120 | 0.54011 | """Integration-ish tests for CLI endpoints.
We only mock subprocess calls since we cannot do multi-host testing.
Some of the test above don't verify much, but they at least ensure that all parts work well together.
"""
import os
import sys
from contextlib import contextmanager
from datetime import datetime
from unitt... | 30,653 | 0 | 822 |
0751c12b22a4f0628bee313acb69f83c51fb4a4f | 3,368 | py | Python | cnn_mnist.py | alexlungu10/CNN-MNIST | 130f654f3b0f94531ddcb28d2af82df246d70e56 | [
"Apache-2.0"
] | null | null | null | cnn_mnist.py | alexlungu10/CNN-MNIST | 130f654f3b0f94531ddcb28d2af82df246d70e56 | [
"Apache-2.0"
] | null | null | null | cnn_mnist.py | alexlungu10/CNN-MNIST | 130f654f3b0f94531ddcb28d2af82df246d70e56 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from keras.layers import Conv2D, MaxPooling2D, Flatten, Dense
from keras.models import Sequential, model_from_json
from keras.datasets import mnist
from keras.utils import to_categorical
from keras.preprocessing import image
import matplotlib.pyplot as plt
import numpy as np
# %matplotlib ... | 37.010989 | 117 | 0.603029 | from pathlib import Path
from keras.layers import Conv2D, MaxPooling2D, Flatten, Dense
from keras.models import Sequential, model_from_json
from keras.datasets import mnist
from keras.utils import to_categorical
from keras.preprocessing import image
import matplotlib.pyplot as plt
import numpy as np
# %matplotlib ... | 2,996 | -4 | 49 |
208dd2c64fba31155e794c192457834b5ca3374a | 690 | py | Python | tools/frontend/dbpedia_links_rating/rating/management/commands/uploadLinks.py | The-Actual-Damien/https-github.com-dbpedia-links | 4bd785f62fadb30610bddd42735403b8e6dded19 | [
"Apache-2.0"
] | 52 | 2015-05-09T23:59:45.000Z | 2022-02-10T13:30:32.000Z | tools/frontend/dbpedia_links_rating/rating/management/commands/uploadLinks.py | The-Actual-Damien/https-github.com-dbpedia-links | 4bd785f62fadb30610bddd42735403b8e6dded19 | [
"Apache-2.0"
] | 40 | 2015-05-12T06:44:26.000Z | 2020-12-02T18:32:57.000Z | tools/frontend/dbpedia_links_rating/rating/management/commands/uploadLinks.py | The-Actual-Damien/https-github.com-dbpedia-links | 4bd785f62fadb30610bddd42735403b8e6dded19 | [
"Apache-2.0"
] | 66 | 2015-05-11T17:08:57.000Z | 2022-03-18T12:24:44.000Z | from __future__ import unicode_literals
from django.core.management import BaseCommand
from dbpedia_links_rating.rating.models import Link
| 31.363636 | 164 | 0.643478 | from __future__ import unicode_literals
from django.core.management import BaseCommand
from dbpedia_links_rating.rating.models import Link
class Command(BaseCommand):
help = "Read out a .nt file and create links"
def add_arguments(self, parser):
parser.add_argument('file', type=str)
missing_ar... | 357 | 169 | 23 |
84e181b99c42e175ad2e4c6ffaea1e0651a86a37 | 1,188 | py | Python | test/test_afo/test_afo_driver.py | ErwingForeroXpert/AutPresupuesto | 6c679bbd252890b0e6c5c280a35b070d6787accd | [
"MIT"
] | null | null | null | test/test_afo/test_afo_driver.py | ErwingForeroXpert/AutPresupuesto | 6c679bbd252890b0e6c5c280a35b070d6787accd | [
"MIT"
] | null | null | null | test/test_afo/test_afo_driver.py | ErwingForeroXpert/AutPresupuesto | 6c679bbd252890b0e6c5c280a35b070d6787accd | [
"MIT"
] | null | null | null | import unittest
import pandas as pd
from utils import index as utils
from afo.driver import Driver
from test.test_fixtures_funcs import generate_list_str, get_test_file | 33 | 77 | 0.688552 | import unittest
import pandas as pd
from utils import index as utils
from afo.driver import Driver
from test.test_fixtures_funcs import generate_list_str, get_test_file
class TestDriverClass(unittest.TestCase):
@classmethod
def setUp(cls) -> None:
"""Initialize the class .
"""
cls.dr... | 652 | 343 | 23 |
304e183796098ce0e1e12029b092dd7d13e4c469 | 2,004 | py | Python | dss_kaggle_clouds/data/mask_decoder.py | datascienceucsc/dss-cloudclassification | e541a7772bb2cc33a0797849b102374ce347cdf2 | [
"MIT"
] | 2 | 2019-10-13T23:11:55.000Z | 2019-10-14T01:10:37.000Z | dss_kaggle_clouds/data/mask_decoder.py | datascienceslugs/dss-cloudclassification | e541a7772bb2cc33a0797849b102374ce347cdf2 | [
"MIT"
] | 1 | 2019-10-26T20:08:11.000Z | 2019-10-26T20:08:11.000Z | dss_kaggle_clouds/data/mask_decoder.py | datascienceucsc/dss-cloudclassification | e541a7772bb2cc33a0797849b102374ce347cdf2 | [
"MIT"
] | 1 | 2019-10-08T20:10:34.000Z | 2019-10-08T20:10:34.000Z | # mask_decoder.py
#
# Sampson Mao, Anders Poirel
# 26-10-2019
#
# script for decoding the masks for each image in the training set from
# the .csv file, writing the output as a seperate .jpg file for each
# label-image pair
import pandas as pd
import numpy as np
from PIL import Image
def rle2mask(row, height =... | 32.322581 | 80 | 0.618263 | # mask_decoder.py
#
# Sampson Mao, Anders Poirel
# 26-10-2019
#
# script for decoding the masks for each image in the training set from
# the .csv file, writing the output as a seperate .jpg file for each
# label-image pair
import pandas as pd
import numpy as np
from PIL import Image
def rle2mask(row, height =... | 0 | 0 | 0 |
1aa13aad063af14972d7a466e039c2913551eea2 | 3,224 | py | Python | utils/dataset.py | slothkong/crypto_forecast | 2eff9dbcacf6894ffe01b63e7570c569dbfab90c | [
"MIT"
] | null | null | null | utils/dataset.py | slothkong/crypto_forecast | 2eff9dbcacf6894ffe01b63e7570c569dbfab90c | [
"MIT"
] | null | null | null | utils/dataset.py | slothkong/crypto_forecast | 2eff9dbcacf6894ffe01b63e7570c569dbfab90c | [
"MIT"
] | null | null | null | import os
import requests
import pandas as pd
from datetime import datetime
from easydict import EasyDict as edict
# ----------------------------------------------------------------------------------------------------------------------
# Global variables
# -------------------------------------------------------------... | 34.297872 | 120 | 0.515509 | import os
import requests
import pandas as pd
from datetime import datetime
from easydict import EasyDict as edict
# ----------------------------------------------------------------------------------------------------------------------
# Global variables
# -------------------------------------------------------------... | 0 | 0 | 0 |
c43f4cc49cf83f2f3556869d27039a7ebe123635 | 483 | py | Python | tests/datasets-04-http-dns/writepcap.py | mtremer/suricata-verify | 48621db880a4254d4f7182307f4fe3b49d059a37 | [
"MIT"
] | 58 | 2018-05-04T06:55:15.000Z | 2022-03-18T17:34:04.000Z | tests/datasets-04-http-dns/writepcap.py | mtremer/suricata-verify | 48621db880a4254d4f7182307f4fe3b49d059a37 | [
"MIT"
] | 577 | 2018-12-06T08:57:33.000Z | 2022-03-29T10:49:18.000Z | tests/datasets-04-http-dns/writepcap.py | mtremer/suricata-verify | 48621db880a4254d4f7182307f4fe3b49d059a37 | [
"MIT"
] | 64 | 2018-05-01T16:52:58.000Z | 2021-12-16T21:01:01.000Z | #!/usr/bin/env python
from scapy.all import *
pkts = []
pkts += Ether(dst='ff:ff:ff:ff:ff:ff', src='00:01:02:03:04:05')/ \
Dot1Q(vlan=6)/ \
IP(dst='1.2.3.4', src='5.6.7.8')/UDP(dport=53)/DNS(id=1, rd=1, qd=DNSQR(qname='example.com'))
pkts += Ether(dst='ff:ff:ff:ff:ff:ff', src='00:01:02:03:04:05')/ \
Dot1Q... | 34.5 | 122 | 0.583851 | #!/usr/bin/env python
from scapy.all import *
pkts = []
pkts += Ether(dst='ff:ff:ff:ff:ff:ff', src='00:01:02:03:04:05')/ \
Dot1Q(vlan=6)/ \
IP(dst='1.2.3.4', src='5.6.7.8')/UDP(dport=53)/DNS(id=1, rd=1, qd=DNSQR(qname='example.com'))
pkts += Ether(dst='ff:ff:ff:ff:ff:ff', src='00:01:02:03:04:05')/ \
Dot1Q... | 0 | 0 | 0 |
e1f3fb994fc0b05515f813a004deac918b014e70 | 1,171 | py | Python | others/snsync_pdf.py | RohanGautam/supernote-tool | e297aa0d3b8cc624aba179497576be1ddbc2b32e | [
"Apache-2.0"
] | 17 | 2021-12-02T04:19:46.000Z | 2022-03-09T18:28:16.000Z | others/snsync_pdf.py | RohanGautam/supernote-tool | e297aa0d3b8cc624aba179497576be1ddbc2b32e | [
"Apache-2.0"
] | null | null | null | others/snsync_pdf.py | RohanGautam/supernote-tool | e297aa0d3b8cc624aba179497576be1ddbc2b32e | [
"Apache-2.0"
] | 1 | 2022-02-16T21:12:18.000Z | 2022-02-16T21:12:18.000Z | import os
import re
import glob
from pathlib import Path
from tqdm import tqdm
import supernotelib as sn
SUPERNOTE_PATH = '/run/user/1000/gvfs/mtp:host=rockchip_Supernote_A5_X_SN100B10004997/Supernote/Note'
OUTPUT_PATH = '../Notes_synced'
assert os.path.exists(SUPERNOTE_PATH)
assert os.path.exists(OUTPUT_PATH)
f... | 27.232558 | 101 | 0.685739 | import os
import re
import glob
from pathlib import Path
from tqdm import tqdm
import supernotelib as sn
SUPERNOTE_PATH = '/run/user/1000/gvfs/mtp:host=rockchip_Supernote_A5_X_SN100B10004997/Supernote/Note'
OUTPUT_PATH = '../Notes_synced'
assert os.path.exists(SUPERNOTE_PATH)
assert os.path.exists(OUTPUT_PATH)
de... | 470 | 0 | 23 |
1a4489bdaac176027392636a0710ad4e86a20d86 | 1,357 | py | Python | setup.py | elohhim/PySyncTeX | 2aa8bc172edcccffd9b50350dd3b9e653b38f15e | [
"MIT"
] | null | null | null | setup.py | elohhim/PySyncTeX | 2aa8bc172edcccffd9b50350dd3b9e653b38f15e | [
"MIT"
] | null | null | null | setup.py | elohhim/PySyncTeX | 2aa8bc172edcccffd9b50350dd3b9e653b38f15e | [
"MIT"
] | null | null | null | if __name__ == '__main__':
from setuptools import setup, Extension
_synctex_parser = Extension('pysynctex._synctex_parser',
sources=['wrapper/synctex_parser.i',
'wrapper/synctex_package/synctex_parser.c',
'wrapp... | 42.40625 | 82 | 0.537214 | if __name__ == '__main__':
from setuptools import setup, Extension
_synctex_parser = Extension('pysynctex._synctex_parser',
sources=['wrapper/synctex_parser.i',
'wrapper/synctex_package/synctex_parser.c',
'wrapp... | 0 | 0 | 0 |
932bcfe7b41eb67329409b391485b67bcb24f265 | 2,861 | py | Python | nrepl/watcher.py | shonenada/nREPL-reloader | 152b2a5b11c121b30c9cfde3cd71cacec8d0449d | [
"MIT"
] | 5 | 2017-06-20T09:00:56.000Z | 2022-01-21T06:22:49.000Z | nrepl/watcher.py | shonenada/nREPL-reloader | 152b2a5b11c121b30c9cfde3cd71cacec8d0449d | [
"MIT"
] | null | null | null | nrepl/watcher.py | shonenada/nREPL-reloader | 152b2a5b11c121b30c9cfde3cd71cacec8d0449d | [
"MIT"
] | null | null | null | import os
import time
import errno
import socket
from nrepl._compat import urlparse
from nrepl.clj import get_ns
from nrepl.utils import console, get_ts, traverse_dir
from nrepl.client import Client
COLOR_GRAY = '2'
COLOR_RED = '0;31'
| 28.61 | 79 | 0.531982 | import os
import time
import errno
import socket
from nrepl._compat import urlparse
from nrepl.clj import get_ns
from nrepl.utils import console, get_ts, traverse_dir
from nrepl.client import Client
COLOR_GRAY = '2'
COLOR_RED = '0;31'
class TimeoutError(Exception):
pass
def nrepl_connect(uri):
uri = urlp... | 2,424 | 19 | 177 |
765cd431aef6353e6f38502d782feccd3055175f | 3,662 | py | Python | animal_classification_script.py | prabhat-123/Animal_Classification_In_The_WIld | 9be19dae9ec9a51edc755bbbd472e2e36364c9b0 | [
"MIT"
] | null | null | null | animal_classification_script.py | prabhat-123/Animal_Classification_In_The_WIld | 9be19dae9ec9a51edc755bbbd472e2e36364c9b0 | [
"MIT"
] | null | null | null | animal_classification_script.py | prabhat-123/Animal_Classification_In_The_WIld | 9be19dae9ec9a51edc755bbbd472e2e36364c9b0 | [
"MIT"
] | 2 | 2021-06-24T19:02:48.000Z | 2021-06-24T19:15:11.000Z | import numpy as np
import os
import json
import tensorflow as tf
from tensorflow.keras.models import model_from_json
from tensorflow.keras.preprocessing import image
from tensorflow.compat.v1 import ConfigProto
from tqdm import tqdm
import shutil
from animal_classification_report_generator import Animal_Classi... | 40.688889 | 210 | 0.696887 | import numpy as np
import os
import json
import tensorflow as tf
from tensorflow.keras.models import model_from_json
from tensorflow.keras.preprocessing import image
from tensorflow.compat.v1 import ConfigProto
from tqdm import tqdm
import shutil
from animal_classification_report_generator import Animal_Classi... | 283 | 0 | 25 |
a36a8b7dce2983389c6d63da6857d0c35d38edc4 | 2,161 | py | Python | examples/host_variant_call.py | ihmpdcc/cutlass | 7c4d858bf0075361235e26ea25631a8d1c5152c2 | [
"MIT"
] | 5 | 2015-06-26T13:16:55.000Z | 2021-08-31T06:00:28.000Z | examples/host_variant_call.py | ihmpdcc/cutlass | 7c4d858bf0075361235e26ea25631a8d1c5152c2 | [
"MIT"
] | 10 | 2015-06-25T21:50:06.000Z | 2017-12-18T22:53:36.000Z | examples/host_variant_call.py | ihmpdcc/cutlass | 7c4d858bf0075361235e26ea25631a8d1c5152c2 | [
"MIT"
] | 11 | 2015-06-25T21:04:16.000Z | 2019-05-14T14:35:01.000Z | #!/usr/bin/env python
# pylint: disable=C0111, C0325
import logging
import sys
import tempfile
from pprint import pprint
from cutlass import HostVariantCall
from cutlass import iHMPSession
username = "test"
password = "test"
def set_logging():
""" Setup logging. """
root = logging.getLogger()
root.setLe... | 25.127907 | 89 | 0.706617 | #!/usr/bin/env python
# pylint: disable=C0111, C0325
import logging
import sys
import tempfile
from pprint import pprint
from cutlass import HostVariantCall
from cutlass import iHMPSession
username = "test"
password = "test"
def set_logging():
""" Setup logging. """
root = logging.getLogger()
root.setLe... | 0 | 0 | 0 |
3f15612cae706633992d9a4c4bd4f4a0593622e0 | 3,869 | py | Python | bin/generate.py | JohnShullTopDev/generating-traning-data-for-healthcare-machine-learningcare- | d0ffb26e1b99204a796df905b50c8caf01417f69 | [
"Apache-2.0"
] | 1 | 2019-11-11T11:21:08.000Z | 2019-11-11T11:21:08.000Z | bin/generate.py | JohnShullTopDev/generating-traning-data-for-healthcare-machine-learningcare- | d0ffb26e1b99204a796df905b50c8caf01417f69 | [
"Apache-2.0"
] | null | null | null | bin/generate.py | JohnShullTopDev/generating-traning-data-for-healthcare-machine-learningcare- | d0ffb26e1b99204a796df905b50c8caf01417f69 | [
"Apache-2.0"
] | 1 | 2020-01-28T03:48:14.000Z | 2020-01-28T03:48:14.000Z | import argparse
# import sys
import os
from patient import Patient
from vitals import VitalSigns
from lab import Lab
from socialhistory import SocialHistory
from familyhistory import FamilyHistory
from immunization import Immunization
from procedure import Procedure
from condition import Condition
from m... | 29.761538 | 95 | 0.595761 | import argparse
# import sys
import os
from patient import Patient
from vitals import VitalSigns
from lab import Lab
from socialhistory import SocialHistory
from familyhistory import FamilyHistory
from immunization import Immunization
from procedure import Procedure
from condition import Condition
from m... | 0 | 0 | 0 |
ad7c2d9339b1ad2a556d9bc9431a0ea4036d8092 | 31,169 | py | Python | tests/integration/incremental_trees/test_trees.py | garethjns/IncrementalTrees | dbc6324a36bd7a597ad8d7f4bc66e7cdab433df6 | [
"MIT"
] | 22 | 2019-01-10T15:52:23.000Z | 2021-12-23T21:55:36.000Z | tests/integration/incremental_trees/test_trees.py | garethjns/IncrementalTrees | dbc6324a36bd7a597ad8d7f4bc66e7cdab433df6 | [
"MIT"
] | 6 | 2019-02-13T09:04:05.000Z | 2021-08-17T13:49:15.000Z | tests/integration/incremental_trees/test_trees.py | garethjns/IncrementalTrees | dbc6324a36bd7a597ad8d7f4bc66e7cdab433df6 | [
"MIT"
] | 3 | 2019-12-10T15:52:48.000Z | 2021-02-22T22:04:22.000Z | import unittest
import numpy as np
import sklearn
import sklearn.datasets
from incremental_trees.models.classification.streaming_extc import StreamingEXTC
from incremental_trees.models.regression.streaming_extr import StreamingEXTR
from incremental_trees.models.regression.streaming_rfr import StreamingRFR
from increm... | 34.709354 | 118 | 0.528217 | import unittest
import numpy as np
import sklearn
import sklearn.datasets
from incremental_trees.models.classification.streaming_extc import StreamingEXTC
from incremental_trees.models.regression.streaming_extr import StreamingEXTR
from incremental_trees.models.regression.streaming_rfr import StreamingRFR
from increm... | 0 | 7,794 | 276 |
fe2d5fb810aa19356f6a559afc7030f56fb8ff31 | 4,191 | py | Python | lib/scan/icmp/engine.py | th3cyb3rc0p/Nettacker | 24640d8695716aee48435710287f58486ed174ab | [
"Apache-2.0"
] | 35 | 2019-10-17T17:42:50.000Z | 2020-10-06T12:08:29.000Z | lib/scan/icmp/engine.py | th3cyb3rc0p/Nettacker | 24640d8695716aee48435710287f58486ed174ab | [
"Apache-2.0"
] | 1 | 2022-03-29T22:02:36.000Z | 2022-03-29T22:02:36.000Z | lib/scan/icmp/engine.py | th3cyb3rc0p/Nettacker | 24640d8695716aee48435710287f58486ed174ab | [
"Apache-2.0"
] | 7 | 2019-10-17T21:46:09.000Z | 2021-12-15T04:56:29.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import socket
import os
import socks
import json
from core.targets import target_type
from core.alert import info
from core.alert import messages
from core.alert import warn
from lib.icmp.engine import send_one_ping, receive_one_ping
from lib.socks_resolver.engine import g... | 44.115789 | 119 | 0.527798 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import socket
import os
import socks
import json
from core.targets import target_type
from core.alert import info
from core.alert import messages
from core.alert import warn
from lib.icmp.engine import send_one_ping, receive_one_ping
from lib.socks_resolver.engine import g... | 3,271 | 0 | 46 |
a3fef9108c5f8d1dadbba5932d912357a779a996 | 181 | py | Python | script.module.streamlink.crypto/lib/cryptopy/passwords/__init__.py | bobbybark/tantrumrepo | 1451c481254d3fedec9f430139d18db7312a9b1a | [
"Beerware"
] | 3 | 2020-03-03T13:21:44.000Z | 2021-07-21T09:53:31.000Z | script.module.streamlink.crypto/lib/cryptopy/passwords/__init__.py | eggman19/tantrumrepo | 1451c481254d3fedec9f430139d18db7312a9b1a | [
"Beerware"
] | null | null | null | script.module.streamlink.crypto/lib/cryptopy/passwords/__init__.py | eggman19/tantrumrepo | 1451c481254d3fedec9f430139d18db7312a9b1a | [
"Beerware"
] | 1 | 2018-08-30T20:04:34.000Z | 2018-08-30T20:04:34.000Z | """ CryptoPy - a pure python cryptographic libraries
cryptopy.passwords package
Copyright (c) 2002 by Paul A. Lambert
Read LICENSE.txt for license information.
"""
| 22.625 | 52 | 0.707182 | """ CryptoPy - a pure python cryptographic libraries
cryptopy.passwords package
Copyright (c) 2002 by Paul A. Lambert
Read LICENSE.txt for license information.
"""
| 0 | 0 | 0 |
34a117fb153991c88f329c519a1058c6144ca378 | 3,777 | py | Python | pra_request_tracker/pra_request_tracker/record_requests/admin.py | SeattleDSA/pra-request-tracker | 0c4c628d249efc579faaa8f1d352fa0d120a510c | [
"MIT"
] | 1 | 2021-09-30T20:25:49.000Z | 2021-09-30T20:25:49.000Z | pra_request_tracker/pra_request_tracker/record_requests/admin.py | SeattleDSA/pra-request-tracker | 0c4c628d249efc579faaa8f1d352fa0d120a510c | [
"MIT"
] | 14 | 2021-06-29T18:04:09.000Z | 2021-07-23T20:15:46.000Z | pra_request_tracker/pra_request_tracker/record_requests/admin.py | SeattleDSA/pra-request-tracker | 0c4c628d249efc579faaa8f1d352fa0d120a510c | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.http import QueryDict
from django.urls import reverse
from django.utils.html import format_html
from .forms import (
AgencyForm,
CorrespondenceForm,
RecordRequestFileForm,
RecordRequestForm,
)
from .models import Agency, Correspondence, RecordRequest, Record... | 35.299065 | 99 | 0.643103 | from django.contrib import admin
from django.http import QueryDict
from django.urls import reverse
from django.utils.html import format_html
from .forms import (
AgencyForm,
CorrespondenceForm,
RecordRequestFileForm,
RecordRequestForm,
)
from .models import Agency, Correspondence, RecordRequest, Record... | 1,947 | 1,280 | 88 |
8ad09c19a037f5d5d993e9d98f715be4f4596b89 | 1,722 | py | Python | azure-servicefabric/azure/servicefabric/models/deployed_service_package_health_state_chunk.py | SUSE/azure-sdk-for-python | 324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f | [
"MIT"
] | 2 | 2020-07-29T14:22:17.000Z | 2020-11-06T18:47:40.000Z | azure-servicefabric/azure/servicefabric/models/deployed_service_package_health_state_chunk.py | SUSE/azure-sdk-for-python | 324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f | [
"MIT"
] | 1 | 2016-08-01T07:37:04.000Z | 2016-08-01T07:37:04.000Z | azure-servicefabric/azure/servicefabric/models/deployed_service_package_health_state_chunk.py | SUSE/azure-sdk-for-python | 324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f | [
"MIT"
] | 1 | 2020-12-12T21:04:41.000Z | 2020-12-12T21:04:41.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 43.05 | 106 | 0.680604 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 311 | 0 | 27 |
07e0a04afe6a8a7ee2183f140d652851a60d23ac | 2,708 | py | Python | chooseK.py | gadgrandez/fastStructure | 98f85880562e2c4f4aacb4c8304d0e1aed551985 | [
"MIT"
] | 92 | 2015-03-16T20:05:46.000Z | 2022-03-22T14:31:16.000Z | chooseK.py | gadgrandez/fastStructure | 98f85880562e2c4f4aacb4c8304d0e1aed551985 | [
"MIT"
] | 47 | 2015-01-01T11:18:52.000Z | 2022-03-03T11:11:39.000Z | chooseK.py | gadgrandez/fastStructure | 98f85880562e2c4f4aacb4c8304d0e1aed551985 | [
"MIT"
] | 45 | 2015-02-20T18:26:32.000Z | 2022-03-31T02:12:31.000Z | import numpy as np
import getopt
import vars.utils as utils
import glob
import sys
import pdb
def parse_logs(files):
"""
parses through log files to extract marginal
likelihood estimates from executing the
variational inference algorithm on a dataset.
Arguments:
files : list
... | 23.964602 | 104 | 0.608567 | import numpy as np
import getopt
import vars.utils as utils
import glob
import sys
import pdb
def parse_logs(files):
"""
parses through log files to extract marginal
likelihood estimates from executing the
variational inference algorithm on a dataset.
Arguments:
files : list
... | 0 | 0 | 0 |
1f186c3fb2179eed2f5999b503f9f4a488d20829 | 5,287 | py | Python | backend/question_generation.py | tkyaw1/lotus | 3d1eabf3ef2dec26d9d846a787c9f9e018b94740 | [
"MIT"
] | null | null | null | backend/question_generation.py | tkyaw1/lotus | 3d1eabf3ef2dec26d9d846a787c9f9e018b94740 | [
"MIT"
] | null | null | null | backend/question_generation.py | tkyaw1/lotus | 3d1eabf3ef2dec26d9d846a787c9f9e018b94740 | [
"MIT"
] | null | null | null | import sys
import ast
from random import randint
from questions_backend import QuestionGeneration
import requests
from watson_developer_cloud import NaturalLanguageUnderstandingV1
from watson_developer_cloud.natural_language_understanding_v1 import Features, KeywordsOptions
import json
"""
argv[1] : ke... | 40.05303 | 124 | 0.641763 | import sys
import ast
from random import randint
from questions_backend import QuestionGeneration
import requests
from watson_developer_cloud import NaturalLanguageUnderstandingV1
from watson_developer_cloud.natural_language_understanding_v1 import Features, KeywordsOptions
import json
"""
argv[1] : ke... | 2,500 | 0 | 25 |
ee28e9bb6b7d358dd75e9453b453527788ab80b1 | 3,758 | py | Python | World/Object/Player.py | VeryHardBit/Duengon-and-puzzle | b877c240ca6a1d01d2962d90a958ae7d7bf8c966 | [
"Apache-2.0"
] | null | null | null | World/Object/Player.py | VeryHardBit/Duengon-and-puzzle | b877c240ca6a1d01d2962d90a958ae7d7bf8c966 | [
"Apache-2.0"
] | null | null | null | World/Object/Player.py | VeryHardBit/Duengon-and-puzzle | b877c240ca6a1d01d2962d90a958ae7d7bf8c966 | [
"Apache-2.0"
] | null | null | null | from .__init__helper import *
#clear warning from pylance
from .Exit import *
from .Trap import *
from .Chair import *
from .Monster import * | 30.306452 | 90 | 0.556945 | from .__init__helper import *
#clear warning from pylance
from .Exit import *
from .Trap import *
from .Chair import *
from .Monster import *
class Player(CommonObject):
def __init__(self,data,move_limit=999):
CommonObject.__init__(self)
data.setdefault('pos',[None,None])
self.take... | 3,118 | 476 | 23 |
89a51b1d0d3097aa038bbc187a0f87245edbbe4a | 4,265 | py | Python | python/301.remove-invalid-parentheses.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 10 | 2019-09-15T00:23:57.000Z | 2022-01-05T12:53:42.000Z | python/301.remove-invalid-parentheses.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 3 | 2021-06-30T00:39:26.000Z | 2021-08-01T07:13:59.000Z | python/301.remove-invalid-parentheses.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 6 | 2020-02-08T02:55:22.000Z | 2022-01-02T22:48:18.000Z | #
# @lc app=leetcode id=301 lang=python3
#
# [301] Remove Invalid Parentheses
#
# https://leetcode.com/problems/remove-invalid-parentheses/description/
#
# algorithms
# Hard (44.46%)
# Likes: 3255
# Dislikes: 151
# Total Accepted: 258.9K
# Total Submissions: 577.9K
# Testcase Example: '"()())()"'
#
# Given a str... | 23.563536 | 136 | 0.470106 | #
# @lc app=leetcode id=301 lang=python3
#
# [301] Remove Invalid Parentheses
#
# https://leetcode.com/problems/remove-invalid-parentheses/description/
#
# algorithms
# Hard (44.46%)
# Likes: 3255
# Dislikes: 151
# Total Accepted: 258.9K
# Total Submissions: 577.9K
# Testcase Example: '"()())()"'
#
# Given a str... | 2,913 | 7 | 260 |