hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
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
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
1d31e93e31c793bdd05dfba69ef56693f1358e4d
715
py
Python
poem_generator/PoemCallback.py
Aaronsom/poem-generation
10cccad88d073f82f6556374fdfb23a5b5e3769a
[ "MIT" ]
null
null
null
poem_generator/PoemCallback.py
Aaronsom/poem-generation
10cccad88d073f82f6556374fdfb23a5b5e3769a
[ "MIT" ]
null
null
null
poem_generator/PoemCallback.py
Aaronsom/poem-generation
10cccad88d073f82f6556374fdfb23a5b5e3769a
[ "MIT" ]
null
null
null
from tensorflow.keras.callbacks import Callback from poem_generator.word_generator import generate_poem class PoemCallback(Callback): def __init__(self, poems, seed_length, dictionary, single=True): super(PoemCallback, self).__init__() self.poems = poems self.dictionary = dictionary ...
39.722222
117
0.699301
609
0.851748
0
0
0
0
0
0
26
0.036364
1d33a06767c4e42865ab97028637606945438718
1,456
py
Python
Inprocessing/Thomas/Python/core/optimizers/linear_shatter.py
maliha93/Fairness-Analysis-Code
acf13c6e7993704fc627249fe4ada44d8b616264
[ "MIT" ]
9
2020-07-09T07:32:57.000Z
2022-02-25T12:21:28.000Z
Inprocessing/Thomas/Python/core/optimizers/linear_shatter.py
maliha93/Fairness-Analysis-Code
acf13c6e7993704fc627249fe4ada44d8b616264
[ "MIT" ]
null
null
null
Inprocessing/Thomas/Python/core/optimizers/linear_shatter.py
maliha93/Fairness-Analysis-Code
acf13c6e7993704fc627249fe4ada44d8b616264
[ "MIT" ]
3
2020-07-09T12:35:09.000Z
2021-09-06T13:54:19.000Z
import numpy as np from scipy.spatial import ConvexHull from core.optimizers import SMLAOptimizer class LinearShatterBFOptimizer(SMLAOptimizer): def __init__(self, X, buffer_angle=5.0, has_intercept=False, use_chull=True): self._samplef = self.get_linear_samplef(X, buffer_angle, has_intercept, use_chul...
28
84
0.662775
1,346
0.924451
0
0
814
0.559066
0
0
120
0.082418
1d366388fe3fd891610cd7eed119bc9220611ae4
13,464
py
Python
vendor/pyLibrary/env/big_data.py
klahnakoski/auth0-api
eda9c2554c641da76687f64445b8d35543d012d9
[ "MIT" ]
null
null
null
vendor/pyLibrary/env/big_data.py
klahnakoski/auth0-api
eda9c2554c641da76687f64445b8d35543d012d9
[ "MIT" ]
null
null
null
vendor/pyLibrary/env/big_data.py
klahnakoski/auth0-api
eda9c2554c641da76687f64445b8d35543d012d9
[ "MIT" ]
null
null
null
# encoding: utf-8 # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, division,...
29.142857
131
0.562908
6,683
0.496361
5,163
0.383467
0
0
0
0
2,979
0.221257
1d39d676517e96a73bf0a00218bd894b6ea7add5
820
py
Python
chapter_10_testing_and_tdd/dependent/test_dependent_mocked_test.py
Tm2197/Python-Architecture-Patterns
8091b4d8e2580763ceb55a83c75aa9b6225fcb72
[ "MIT" ]
12
2021-07-20T12:55:39.000Z
2022-02-05T10:53:38.000Z
chapter_10_testing_and_tdd/dependent/test_dependent_mocked_test.py
Tm2197/Python-Architecture-Patterns
8091b4d8e2580763ceb55a83c75aa9b6225fcb72
[ "MIT" ]
null
null
null
chapter_10_testing_and_tdd/dependent/test_dependent_mocked_test.py
Tm2197/Python-Architecture-Patterns
8091b4d8e2580763ceb55a83c75aa9b6225fcb72
[ "MIT" ]
9
2021-07-22T06:01:03.000Z
2022-03-01T05:50:45.000Z
from unittest.mock import patch from dependent import parameter_dependent @patch('math.sqrt') def test_negative(mock_sqrt): assert parameter_dependent(-1) == 0 mock_sqrt.assert_not_called() @patch('math.sqrt') def test_zero(mock_sqrt): mock_sqrt.return_value = 0 assert parameter_dependent(0) == 0 ...
22.777778
41
0.747561
0
0
0
0
731
0.891463
0
0
55
0.067073
1d39ff1e6bd4edf957d03269b5fb60c6c678992b
416
py
Python
test_world_rowing/test_dashboard.py
matthewghgriffiths/rowing
d682e66ca8d8a811e033ae32c2a1948376659123
[ "MIT" ]
1
2022-02-21T09:52:12.000Z
2022-02-21T09:52:12.000Z
test_world_rowing/test_dashboard.py
matthewghgriffiths/rowing
d682e66ca8d8a811e033ae32c2a1948376659123
[ "MIT" ]
null
null
null
test_world_rowing/test_dashboard.py
matthewghgriffiths/rowing
d682e66ca8d8a811e033ae32c2a1948376659123
[ "MIT" ]
null
null
null
import pytest from world_rowing import dashboard def test_dashboard_main(): dashboard.main(block=False) def test_dashboard_predict(): dash = dashboard.Dashboard.load_last_race() live_data, intermediates = dash.race_tracker.update_livedata() dash.update( live_data.loc[:300], inte...
15.407407
66
0.670673
0
0
0
0
0
0
0
0
0
0
1d3d8280c20d0be738af64bc749e533b575ef043
1,665
py
Python
plerr/tests/test_package.py
b2bs-team/pylint-errors
f1362c8afbe6b7075f805560d7699f63ad35a10b
[ "MIT" ]
2
2020-10-28T23:53:59.000Z
2020-10-29T03:31:20.000Z
plerr/tests/test_package.py
b2bs-team/pylint-errors
f1362c8afbe6b7075f805560d7699f63ad35a10b
[ "MIT" ]
null
null
null
plerr/tests/test_package.py
b2bs-team/pylint-errors
f1362c8afbe6b7075f805560d7699f63ad35a10b
[ "MIT" ]
1
2020-10-28T23:53:47.000Z
2020-10-28T23:53:47.000Z
"""Tests a package installation on a user OS.""" import pathlib import subprocess import unittest class TestPlErrPackage(unittest.TestCase): def test_plerr_error_getter(self): # Given: a command to get a description of a pylint error by an # error code. command = ['python3', '-m', 'plerr',...
30.833333
77
0.583183
1,564
0.939339
0
0
0
0
0
0
564
0.338739
1d3ea69b3e4a276b5c416f98c802081047762711
2,826
py
Python
src/api2db/install/make_lab.py
TristenHarr/api2db
8c8b14280441f5153ff146c23359a0eb91022ddb
[ "MIT" ]
45
2021-05-05T01:34:20.000Z
2021-11-02T08:41:34.000Z
src/api2db/install/make_lab.py
TristenHarr/api2db
8c8b14280441f5153ff146c23359a0eb91022ddb
[ "MIT" ]
1
2021-06-02T11:43:33.000Z
2021-06-02T20:32:29.000Z
src/api2db/install/make_lab.py
TristenHarr/api2db
8c8b14280441f5153ff146c23359a0eb91022ddb
[ "MIT" ]
3
2021-05-08T21:49:24.000Z
2021-05-13T23:14:09.000Z
import os _lab_components = """from api2db.ingest import * CACHE=True # Caches API data so that only a single API call is made if True def import_target(): return None def pre_process(): return None def data_features(): return None def post_process(): return None if __name__ == "__main__": ...
28.836735
100
0.381812
0
0
0
0
0
0
0
0
2,486
0.879689
1d4106adaf0d42a3f4d5f358b322161fcf83843b
485
py
Python
30-39/37. sliceview/sliceview.py
dcragusa/PythonMorsels
5f75b51a68769036e4004e9ccdada6b220124ab6
[ "MIT" ]
1
2021-11-30T05:03:24.000Z
2021-11-30T05:03:24.000Z
30-39/37. sliceview/sliceview.py
dcragusa/PythonMorsels
5f75b51a68769036e4004e9ccdada6b220124ab6
[ "MIT" ]
null
null
null
30-39/37. sliceview/sliceview.py
dcragusa/PythonMorsels
5f75b51a68769036e4004e9ccdada6b220124ab6
[ "MIT" ]
2
2021-04-18T05:26:43.000Z
2021-11-28T18:46:43.000Z
from collections.abc import Sequence class SliceView(Sequence): def __init__(self, sequence, start=None, stop=None, step=None): self.sequence = sequence self.range = range(*slice(start, stop, step).indices(len(sequence))) def __len__(self): return len(self.range) def __getitem__(...
30.3125
76
0.663918
445
0.917526
0
0
0
0
0
0
0
0
1d4187041cb8f8754084b1a0b8f675142f96aee6
2,348
py
Python
docs/examples/use_cases/video_superres/common/loss_scaler.py
cyyever/DALI
e2b2d5a061da605e3e9e681017a7b2d53fe41a62
[ "ECL-2.0", "Apache-2.0" ]
3,967
2018-06-19T04:39:09.000Z
2022-03-31T10:57:53.000Z
docs/examples/use_cases/video_superres/common/loss_scaler.py
cyyever/DALI
e2b2d5a061da605e3e9e681017a7b2d53fe41a62
[ "ECL-2.0", "Apache-2.0" ]
3,494
2018-06-21T07:09:58.000Z
2022-03-31T19:44:51.000Z
docs/examples/use_cases/video_superres/common/loss_scaler.py
cyyever/DALI
e2b2d5a061da605e3e9e681017a7b2d53fe41a62
[ "ECL-2.0", "Apache-2.0" ]
531
2018-06-19T23:53:10.000Z
2022-03-30T08:35:59.000Z
import torch class LossScaler: def __init__(self, scale=1): self.cur_scale = scale # `params` is a list / generator of torch.Variable def has_overflow(self, params): return False # `x` is a torch.Tensor def _has_inf_or_nan(x): return False # `overflow` is boolean ind...
28.634146
85
0.617121
2,331
0.99276
0
0
130
0.055366
0
0
371
0.158007
1d4187891be83646d904f0d1cc49e72009c69797
3,172
py
Python
shop/forms.py
dwx9/test
a74e38369de40b9e5f481f6ac9dda6d5eb161da0
[ "BSD-3-Clause" ]
1
2021-02-11T10:01:11.000Z
2021-02-11T10:01:11.000Z
shop/forms.py
dwx9/test
a74e38369de40b9e5f481f6ac9dda6d5eb161da0
[ "BSD-3-Clause" ]
null
null
null
shop/forms.py
dwx9/test
a74e38369de40b9e5f481f6ac9dda6d5eb161da0
[ "BSD-3-Clause" ]
1
2020-11-08T17:56:45.000Z
2020-11-08T17:56:45.000Z
#-*- coding: utf-8 -*- """Forms for the django-shop app.""" from django import forms from django.conf import settings from django.forms.models import modelformset_factory from django.utils.translation import ugettext_lazy as _ from shop.backends_pool import backends_pool from shop.models.cartmodel import CartItem from...
36.45977
116
0.720996
1,125
0.354666
0
0
0
0
0
0
1,265
0.398802
1d41a5d36753a39f9bdaaccc33c457eebde52284
6,298
py
Python
conflowgen/tests/posthoc_analyses/test_quay_side_throughput_analysis.py
1grasse/conflowgen
142330ab6427254109af3b86102a30a13144ba0c
[ "MIT" ]
5
2022-02-16T11:44:42.000Z
2022-02-24T20:02:17.000Z
conflowgen/tests/posthoc_analyses/test_quay_side_throughput_analysis.py
1grasse/conflowgen
142330ab6427254109af3b86102a30a13144ba0c
[ "MIT" ]
90
2021-12-08T14:05:44.000Z
2022-03-24T08:53:31.000Z
conflowgen/tests/posthoc_analyses/test_quay_side_throughput_analysis.py
1grasse/conflowgen
142330ab6427254109af3b86102a30a13144ba0c
[ "MIT" ]
5
2021-12-07T16:05:15.000Z
2022-02-16T08:24:07.000Z
import datetime import unittest from conflowgen.domain_models.arrival_information import TruckArrivalInformationForPickup, \ TruckArrivalInformationForDelivery from conflowgen.domain_models.container import Container from conflowgen.domain_models.data_types.container_length import ContainerLength from conflowgen.d...
42.268456
115
0.694665
5,268
0.836456
0
0
0
0
0
0
162
0.025722
1d41b1db26751bf84729eea34f1bc555d8b62d08
591
py
Python
backend/tests/access/test_access_user_remove.py
fjacob21/mididecweb
b65f28eb6fdeafa265796b6190a4264a5eac54ce
[ "MIT" ]
null
null
null
backend/tests/access/test_access_user_remove.py
fjacob21/mididecweb
b65f28eb6fdeafa265796b6190a4264a5eac54ce
[ "MIT" ]
88
2016-11-12T14:54:38.000Z
2018-08-02T00:25:07.000Z
backend/tests/access/test_access_user_remove.py
mididecouverte/mididecweb
b65f28eb6fdeafa265796b6190a4264a5eac54ce
[ "MIT" ]
null
null
null
from src.access import UserRemoveAccess from generate_access_data import generate_access_data def test_remove_user_access(): sessions = generate_access_data() user = sessions['user'].users.get('user') useraccess = UserRemoveAccess(sessions['user'], user) manageraccess = UserRemoveAccess(sessions['mana...
36.9375
63
0.752961
0
0
0
0
0
0
0
0
40
0.067682
1d42c5d5454b1ecc51005c189c8d3fc67484d164
541
py
Python
tests/gdb/execute_nacl_manifest_twice.py
kapkic/native_client
51c8bc8c249d55606232ae011bdfc8b4cab3d794
[ "BSD-3-Clause" ]
1
2021-12-23T00:36:43.000Z
2021-12-23T00:36:43.000Z
tests/gdb/execute_nacl_manifest_twice.py
kapkic/native_client
51c8bc8c249d55606232ae011bdfc8b4cab3d794
[ "BSD-3-Clause" ]
null
null
null
tests/gdb/execute_nacl_manifest_twice.py
kapkic/native_client
51c8bc8c249d55606232ae011bdfc8b4cab3d794
[ "BSD-3-Clause" ]
null
null
null
# -*- python2 -*- # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from gdb_test import AssertEquals import gdb_test def test(gdb): # The second superfluous call to LoadManifestFile. This is a...
28.473684
79
0.735675
0
0
0
0
0
0
0
0
358
0.661738
1d4318fe475f3ff0a677d7ca22d845bd46a02756
1,403
py
Python
dev/3_30_2018/UPS_Main.py
npwebste/UPS_Controller
a90ce2229108197fd48f956310ae2929e0fa5d9a
[ "AFL-1.1" ]
null
null
null
dev/3_30_2018/UPS_Main.py
npwebste/UPS_Controller
a90ce2229108197fd48f956310ae2929e0fa5d9a
[ "AFL-1.1" ]
null
null
null
dev/3_30_2018/UPS_Main.py
npwebste/UPS_Controller
a90ce2229108197fd48f956310ae2929e0fa5d9a
[ "AFL-1.1" ]
null
null
null
# Universal Power Supply Controller # USAID Middle East Water Security Initiative # # Developed by: Nathan Webster # Primary Investigator: Nathan Johnson # # Version History (mm_dd_yyyy) # 1.00 03_24_2018_NW # ###################################################### # Import Libraries import Config import time import sql...
15.086022
87
0.652887
0
0
0
0
0
0
0
0
1,001
0.713471
1d450a8c2c7ee65bca377acf9e9a6b2af8f1bf8a
4,054
py
Python
bioconverters/utils.py
jakelever/biotext
3925524f38fdeea3944bf829c8c563f09d62a13e
[ "MIT" ]
6
2020-10-07T13:33:09.000Z
2021-12-24T22:46:52.000Z
bioconverters/utils.py
jakelever/biotext
3925524f38fdeea3944bf829c8c563f09d62a13e
[ "MIT" ]
11
2021-05-21T00:06:16.000Z
2022-02-16T12:23:25.000Z
bioconverters/utils.py
jakelever/biotext
3925524f38fdeea3944bf829c8c563f09d62a13e
[ "MIT" ]
4
2020-10-01T02:26:03.000Z
2022-03-23T04:35:06.000Z
import re import unicodedata # Remove empty brackets (that could happen if the contents have been removed already # e.g. for citation ( [3] [4] ) -> ( ) -> nothing def remove_brackets_without_words(text: str) -> str: fixed = re.sub(r"\([\W\s]*\)", " ", text) fixed = re.sub(r"\[[\W\s]*\]", " ", fixed) ...
32.174603
85
0.609521
0
0
0
0
0
0
0
0
1,563
0.385545
1d4544e69d225092db077d2bbcbd9fa3de697615
17,887
py
Python
pylinx/core.py
raczben/pylinx
230f9e4079942c3c561681d8fc0884904f0de893
[ "Apache-2.0" ]
null
null
null
pylinx/core.py
raczben/pylinx
230f9e4079942c3c561681d8fc0884904f0de893
[ "Apache-2.0" ]
1
2020-07-26T14:57:42.000Z
2020-08-26T12:26:44.000Z
pylinx/core.py
raczben/pylinx
230f9e4079942c3c561681d8fc0884904f0de893
[ "Apache-2.0" ]
3
2019-11-28T15:29:36.000Z
2021-11-22T07:15:59.000Z
#!/usr/bin/env python3 # # Import built in packages # import logging import platform import os import time import socket import subprocess import signal import psutil from .util import setup_logger from .util import PylinxException import re # Import 3th party modules: # - wexpect/pexpect to launch...
38.301927
116
0.592497
16,852
0.942137
0
0
0
0
0
0
6,329
0.353832
1d479001ca8c194710be9daccfb27ed5e279b01d
532
py
Python
b0012_integer_to_roman.py
savarin/algorithms
4d1f8f2361de12a02f376883f648697562d177ae
[ "MIT" ]
1
2020-06-16T23:22:54.000Z
2020-06-16T23:22:54.000Z
b0012_integer_to_roman.py
savarin/algorithms
4d1f8f2361de12a02f376883f648697562d177ae
[ "MIT" ]
null
null
null
b0012_integer_to_roman.py
savarin/algorithms
4d1f8f2361de12a02f376883f648697562d177ae
[ "MIT" ]
null
null
null
lookup = [ (10, "x"), (9, "ix"), (5, "v"), (4, "iv"), (1, "i"), ] def to_roman(integer): # """ """ for decimal, roman in lookup: if decimal <= integer: return roman + to_roman(integer - decimal) return "" def main(): print(to_roman(1)) print(to_ro...
15.2
54
0.513158
0
0
0
0
0
0
0
0
41
0.077068
1d4b5de957e9dedc94124939d23c8450668c5a52
1,781
py
Python
IAD-Laboratory-Work-1/include/dispatch.py
TolimanStaR/Intelligent-Data-Analysis-Minor
4e50abbb14aafeb07e9037a208bbbedff4758246
[ "MIT" ]
null
null
null
IAD-Laboratory-Work-1/include/dispatch.py
TolimanStaR/Intelligent-Data-Analysis-Minor
4e50abbb14aafeb07e9037a208bbbedff4758246
[ "MIT" ]
null
null
null
IAD-Laboratory-Work-1/include/dispatch.py
TolimanStaR/Intelligent-Data-Analysis-Minor
4e50abbb14aafeb07e9037a208bbbedff4758246
[ "MIT" ]
null
null
null
from .service import * import multiprocessing import threading __recognizer = None def init_session(*args) -> None: global __recognizer # __recognizer = LiveSpeech() # daemon = multiprocessing.Process(target=__recognizer.daemon(), args=(), ) # daemon.start() # r = threading.Thread(target=shell...
20.709302
85
0.578888
0
0
0
0
0
0
0
0
397
0.219701
1d4dd929550bf7b4692d9cb7d58e97e19856e8bd
3,618
py
Python
behave_tests/steps/get_events.py
Sindhuja-SRL/back-end
d84dae8ed212913339dec646b46a67fcc0b77f52
[ "MIT" ]
null
null
null
behave_tests/steps/get_events.py
Sindhuja-SRL/back-end
d84dae8ed212913339dec646b46a67fcc0b77f52
[ "MIT" ]
null
null
null
behave_tests/steps/get_events.py
Sindhuja-SRL/back-end
d84dae8ed212913339dec646b46a67fcc0b77f52
[ "MIT" ]
1
2022-03-11T01:45:39.000Z
2022-03-11T01:45:39.000Z
from behave import * import requests from django.contrib.auth.models import User from rest_framework.authtoken.models import Token use_step_matcher("re") @given("that I am a registered host of privilege walk events and exists events on my username") def step_impl(context): context.username = "12thMan" conte...
29.900826
104
0.701216
0
0
0
0
3,435
0.94942
0
0
1,163
0.321448
1d4e1390d738eb0ddc1e3c14bffd7c96ac769e6a
1,011
py
Python
P20-Stack Abstract Data Type/Stack - Base Converter.py
necrospiritus/Python-Working-Examples
075d410673e470fc7c4ffc262e92109a3032132f
[ "MIT" ]
null
null
null
P20-Stack Abstract Data Type/Stack - Base Converter.py
necrospiritus/Python-Working-Examples
075d410673e470fc7c4ffc262e92109a3032132f
[ "MIT" ]
null
null
null
P20-Stack Abstract Data Type/Stack - Base Converter.py
necrospiritus/Python-Working-Examples
075d410673e470fc7c4ffc262e92109a3032132f
[ "MIT" ]
null
null
null
class Stack: def __init__(self): self.items = [] def is_empty(self): # test to see whether the stack is empty. return self.items == [] def push(self, item): # adds a new item to the top of the stack. self.items.append(item) def pop(self): # removes the top item from the sta...
25.923077
69
0.635015
559
0.552918
0
0
0
0
0
0
221
0.218595
1d4e5f95e9a8949b22d01dfef301296ff8f780c4
4,422
py
Python
model_api/model_training/trigger_ner/model/soft_encoder.py
INK-USC/LEAN-LIFE
e3d6debc3e4c41145ef1c03236c4cf57bfd8be7d
[ "MIT" ]
21
2020-09-29T12:45:50.000Z
2022-03-27T13:11:12.000Z
model_api/model_training/trigger_ner/model/soft_encoder.py
INK-USC/LEAN-LIFE
e3d6debc3e4c41145ef1c03236c4cf57bfd8be7d
[ "MIT" ]
3
2020-12-03T10:34:54.000Z
2021-03-29T09:01:05.000Z
model_api/model_training/trigger_ner/model/soft_encoder.py
INK-USC/LEAN-LIFE
e3d6debc3e4c41145ef1c03236c4cf57bfd8be7d
[ "MIT" ]
3
2021-02-14T08:39:02.000Z
2021-07-29T02:33:14.000Z
"""soft_encoder.py: Encoding sentence with LSTM. It encodes sentence with Bi-LSTM. After encoding, it uses all tokens for sentence, and extract some parts for trigger. Written in 2020 by Dong-Ho Lee. """ from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence import torch.nn as nn import torch from ...
40.568807
120
0.622795
4,027
0.910674
0
0
0
0
0
0
562
0.127092
1d515818a17c0385781342938f73ea5ce795d738
1,040
py
Python
TrajPlot/main.py
CodesDope/python-pro-course-projects
1c334ff70f38b7db4314826853a982b7dd89ead0
[ "MIT" ]
null
null
null
TrajPlot/main.py
CodesDope/python-pro-course-projects
1c334ff70f38b7db4314826853a982b7dd89ead0
[ "MIT" ]
null
null
null
TrajPlot/main.py
CodesDope/python-pro-course-projects
1c334ff70f38b7db4314826853a982b7dd89ead0
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import math angle = float(input("Enter angle (degree): ")) velocity = float(input("Enter Velocity (m/s): ")) g = 9.81 cos_theta = math.cos(math.radians(angle)) sin_theta = math.sin(math.radians(angle)) v_x = velocity * cos_theta v_y = velocity * sin_theta time_of_...
20.392157
59
0.641346
0
0
0
0
0
0
0
0
247
0.2375
1d523451cc925d640abefc8dc4a8dd62ec1de69a
305
py
Python
myscrumy/remiljscrumy/urls.py
mikkeyiv/Django-App
b1114e9e53bd673119a38a1acfefb7a9fd9f172e
[ "MIT" ]
null
null
null
myscrumy/remiljscrumy/urls.py
mikkeyiv/Django-App
b1114e9e53bd673119a38a1acfefb7a9fd9f172e
[ "MIT" ]
null
null
null
myscrumy/remiljscrumy/urls.py
mikkeyiv/Django-App
b1114e9e53bd673119a38a1acfefb7a9fd9f172e
[ "MIT" ]
null
null
null
from django.urls import include,path from remiljscrumy import views app_name = 'remiljscrumy' urlpatterns = [ path('',views.index,name='index'), path('<int:goal_id>/', views.move_goal, name = "move_goal"), path('accounts/', include('django.contrib.auth.urls')), ]
16.944444
65
0.632787
0
0
0
0
0
0
0
0
87
0.285246
1d527a9ea85f89d985ce11b29b779c2d5f4e16c8
914
py
Python
src/django_idom/config.py
idom-team/django-idom
940fbe21a2a5492f69fd0ba822917e4f4625c582
[ "MIT" ]
82
2021-07-23T04:42:24.000Z
2022-03-31T10:43:30.000Z
src/django_idom/config.py
idom-team/django-idom
940fbe21a2a5492f69fd0ba822917e4f4625c582
[ "MIT" ]
47
2021-05-20T06:53:43.000Z
2022-03-05T22:25:21.000Z
src/django_idom/config.py
idom-team/django-idom
940fbe21a2a5492f69fd0ba822917e4f4625c582
[ "MIT" ]
4
2021-05-17T21:51:48.000Z
2022-02-08T08:36:08.000Z
from typing import Dict from django.conf import settings from django.core.cache import DEFAULT_CACHE_ALIAS from idom.core.proto import ComponentConstructor IDOM_REGISTERED_COMPONENTS: Dict[str, ComponentConstructor] = {} IDOM_BASE_URL = getattr(settings, "IDOM_BASE_URL", "_idom/") IDOM_WEBSOCKET_URL = IDOM_BASE_URL...
31.517241
86
0.784464
0
0
0
0
0
0
0
0
230
0.251641
1d54ee0f796a2f72b2598319b4e1cc6534789204
496
py
Python
ox_herd/core/plugins/awstools_plugin/forms.py
empower-capital/ox_herd
2aa77db945296c152dc8d420f42a6d6455d514fa
[ "BSD-2-Clause" ]
1
2021-11-28T20:35:31.000Z
2021-11-28T20:35:31.000Z
ox_herd/core/plugins/awstools_plugin/forms.py
empower-capital/ox_herd
2aa77db945296c152dc8d420f42a6d6455d514fa
[ "BSD-2-Clause" ]
5
2017-11-21T00:21:13.000Z
2021-06-30T19:47:54.000Z
ox_herd/core/plugins/awstools_plugin/forms.py
empower-capital/ox_herd
2aa77db945296c152dc8d420f42a6d6455d514fa
[ "BSD-2-Clause" ]
4
2021-12-17T10:58:15.000Z
2021-12-23T14:38:40.000Z
"""Forms for ox_herd commands. """ from wtforms import StringField from ox_herd.core.plugins import base class BackupForm(base.GenericOxForm): """Use this form to enter parameters for a new backup job. """ bucket_name = StringField( 'bucket_name', [], description=( 'Name of AWS bucke...
24.8
62
0.645161
382
0.770161
0
0
0
0
0
0
214
0.431452
1d55e3c66873c14775b1b524718c409625a3347a
1,455
py
Python
rpiRobot/test/dexterity/infrastructure/test_electromagnetGPIO.py
olgam4/design3
6e05d123a24deae7dda646df535844a158ef5cc0
[ "WTFPL" ]
null
null
null
rpiRobot/test/dexterity/infrastructure/test_electromagnetGPIO.py
olgam4/design3
6e05d123a24deae7dda646df535844a158ef5cc0
[ "WTFPL" ]
null
null
null
rpiRobot/test/dexterity/infrastructure/test_electromagnetGPIO.py
olgam4/design3
6e05d123a24deae7dda646df535844a158ef5cc0
[ "WTFPL" ]
null
null
null
from unittest import TestCase from unittest.mock import patch, Mock, DEFAULT, call from dexterity.infrastructure.electromagnetGPIO import ElectromagnetGPIO class TestElectromagnetGPIO(TestCase): def setUp(self) -> None: led_patcher = patch('dexterity.infrastructure.electromagnetGPIO.Led') self.Le...
31.630435
77
0.692784
1,295
0.890034
0
0
0
0
0
0
48
0.03299
1d576f6588eb1d2aae7c778d0ad217e3ca9a9ecd
35
py
Python
cog/__init__.py
uniphil/cog
deae32a3b06ee379fa44f68477ecfc00a2fc723d
[ "MIT" ]
158
2018-07-09T02:46:54.000Z
2022-03-06T15:56:49.000Z
cog/__init__.py
uniphil/cog
deae32a3b06ee379fa44f68477ecfc00a2fc723d
[ "MIT" ]
18
2018-07-12T14:59:01.000Z
2022-01-02T04:57:20.000Z
cog/__init__.py
uniphil/cog
deae32a3b06ee379fa44f68477ecfc00a2fc723d
[ "MIT" ]
22
2019-01-31T14:57:39.000Z
2022-03-16T07:25:53.000Z
def cog(): return "Cog is alive."
11.666667
23
0.628571
0
0
0
0
0
0
0
0
15
0.428571
1d5874fe18b2e75012e32310519149b4c42547fe
81
py
Python
app_folder/schemas/api.py
Nuznhy/day-f-hack
9f3dbcd73e73ea4e7807e5197bf0b0ded76bc9f3
[ "MIT" ]
2
2021-10-02T12:12:57.000Z
2021-11-16T11:36:15.000Z
app_folder/schemas/api.py
Nuznhy/day-f-hack
9f3dbcd73e73ea4e7807e5197bf0b0ded76bc9f3
[ "MIT" ]
null
null
null
app_folder/schemas/api.py
Nuznhy/day-f-hack
9f3dbcd73e73ea4e7807e5197bf0b0ded76bc9f3
[ "MIT" ]
null
null
null
from pydantic import BaseModel class ReadyResponse(BaseModel): status: str
13.5
31
0.777778
47
0.580247
0
0
0
0
0
0
0
0
1d590653c6d0bc80cf945214103ea57aa9992bdd
1,087
py
Python
bots/rand/rand.py
markmelnic/IS-Project
85a4418c1ec9da4bd4fd105c20f4ca5c50d99ff5
[ "MIT" ]
51
2019-02-01T19:43:37.000Z
2022-03-16T09:07:03.000Z
bots/rand/rand.py
markmelnic/IS-Project
85a4418c1ec9da4bd4fd105c20f4ca5c50d99ff5
[ "MIT" ]
2
2019-02-23T18:54:22.000Z
2019-11-09T01:30:32.000Z
bots/rand/rand.py
markmelnic/IS-Project
85a4418c1ec9da4bd4fd105c20f4ca5c50d99ff5
[ "MIT" ]
35
2019-02-08T02:00:31.000Z
2022-03-01T23:17:00.000Z
""" RandomBot -- A simple strategy: enumerates all legal moves, and picks one uniformly at random. """ # Import the API objects from api import State import random class Bot: def __init__(self): pass def get_move(self, state): # type: (State) -> tuple[int, int] """ Function ...
31.057143
93
0.645814
920
0.846366
0
0
0
0
0
0
861
0.792088
1d5c20c56742eec9a208d57b7cd8d133f379fa4b
8,252
py
Python
storeAdjust/models.py
FreeGodCode/store
1ea1d6f0d6030fb58bce9a4e2d428342a0c3ad19
[ "MIT" ]
null
null
null
storeAdjust/models.py
FreeGodCode/store
1ea1d6f0d6030fb58bce9a4e2d428342a0c3ad19
[ "MIT" ]
1
2021-03-05T15:00:38.000Z
2021-03-05T15:00:38.000Z
storeAdjust/models.py
FreeGodCode/store
1ea1d6f0d6030fb58bce9a4e2d428342a0c3ad19
[ "MIT" ]
null
null
null
import datetime from django.db import models class TransferRequest(models.Model): """转库申请单""" STR_STATUS_CHOICES = ( (0, '草稿'), (1, '已审批') ) id = models.AutoField(primary_key=True) str_identify = models.CharField(max_length=15, verbose_name='转库申请单编号') str_serial = models.CharFi...
44.847826
131
0.702739
4,969
0.522722
0
0
0
0
0
0
5,981
0.629182
1d5d4eb18eb25d8b1449b6d42e4176ad70ac4a53
401
py
Python
auctions/context_processors/footer_ctx.py
AH-SALAH/CS50W-commerce
19663da14721b5fbadb691763d79d9ae66a40faa
[ "CNRI-Python" ]
null
null
null
auctions/context_processors/footer_ctx.py
AH-SALAH/CS50W-commerce
19663da14721b5fbadb691763d79d9ae66a40faa
[ "CNRI-Python" ]
null
null
null
auctions/context_processors/footer_ctx.py
AH-SALAH/CS50W-commerce
19663da14721b5fbadb691763d79d9ae66a40faa
[ "CNRI-Python" ]
null
null
null
from auctions.models import Category, Listing from django.utils.timezone import now as tz_now def footer_ctx(request): listings = Listing.objects.filter(is_active=True, published_date__lte=tz_now(), expiry_date__gt=tz_now())[:5] categories = Category.objects.all()[:5] ...
33.416667
83
0.643392
0
0
0
0
0
0
0
0
22
0.054863
1d5d6d8998dc584931f9eeaf41067c368cf6390e
4,237
py
Python
sga/operators.py
ggarrett13/genetic-algorithm-example
02dc8664245728fff74c54493c504ec1e7bae482
[ "MIT" ]
1
2020-08-10T15:29:59.000Z
2020-08-10T15:29:59.000Z
sga/operators.py
ggarrett13/genetic-algorithm-example
02dc8664245728fff74c54493c504ec1e7bae482
[ "MIT" ]
null
null
null
sga/operators.py
ggarrett13/genetic-algorithm-example
02dc8664245728fff74c54493c504ec1e7bae482
[ "MIT" ]
null
null
null
import numpy as np import operator # TODO: Make Mutation Operator. class TerminationCriteria: @staticmethod def _convergence_check(convergence_ratio, population_fitness): if abs((np.max(population_fitness) - np.mean(population_fitness)) / np.mean( population_fitness)) <= convergence_...
33.101563
117
0.64928
3,667
0.865471
0
0
1,950
0.460231
0
0
528
0.124616
1d5e37d663df33d8a715b4a60c72cd71296f8689
29
py
Python
validation/__init__.py
pauloubuntu/ocr-processing-service
3a8e755e6ec62336499280e4a48ffbd0d41df3cf
[ "MIT" ]
22
2015-06-10T22:40:11.000Z
2018-08-12T04:26:57.000Z
validation/__init__.py
pauloubuntu/ocr-processing-service
3a8e755e6ec62336499280e4a48ffbd0d41df3cf
[ "MIT" ]
6
2015-07-31T17:52:49.000Z
2017-03-06T11:36:00.000Z
validation/__init__.py
nfscan/ocr-processing-service
3a8e755e6ec62336499280e4a48ffbd0d41df3cf
[ "MIT" ]
20
2015-06-10T12:47:10.000Z
2020-03-24T20:23:14.000Z
__author__ = 'paulo.rodenas'
14.5
28
0.758621
0
0
0
0
0
0
0
0
15
0.517241
1d611badfcce77d76278b903a3e886a36ee2bfd5
443
py
Python
setup.py
gabeabrams/niu
a2979b6b3ed497a1cfa421f105c9e919d7709832
[ "MIT" ]
null
null
null
setup.py
gabeabrams/niu
a2979b6b3ed497a1cfa421f105c9e919d7709832
[ "MIT" ]
null
null
null
setup.py
gabeabrams/niu
a2979b6b3ed497a1cfa421f105c9e919d7709832
[ "MIT" ]
null
null
null
from distutils.core import setup setup( name = 'niu', packages = ['niu'], version = '0.2', description = 'A grouping and pairing library', author = 'Gabriel Abrams', author_email = 'gabeabrams@gmail.com', url = 'https://github.com/gabeabrams/niu', download_url = 'https://github.com/gabeabrams/niu/archi...
26.058824
72
0.656885
0
0
0
0
0
0
0
0
209
0.471783
1d61ecbda3d99cd0aa543ea4733231e129cbee3a
544
py
Python
etherscan/stats.py
adamzhang1987/py-etherscan-api
9a3accfa455eb1d9d82ac7be41012948a58f90e3
[ "MIT" ]
458
2016-07-21T19:49:30.000Z
2022-03-23T18:01:19.000Z
etherscan/stats.py
adamzhang1987/py-etherscan-api
9a3accfa455eb1d9d82ac7be41012948a58f90e3
[ "MIT" ]
71
2016-06-17T19:34:18.000Z
2022-03-06T20:13:37.000Z
etherscan/stats.py
adamzhang1987/py-etherscan-api
9a3accfa455eb1d9d82ac7be41012948a58f90e3
[ "MIT" ]
269
2016-06-20T09:51:17.000Z
2022-03-17T19:19:10.000Z
from .client import Client class Stats(Client): def __init__(self, api_key='YourApiKeyToken'): Client.__init__(self, address='', api_key=api_key) self.url_dict[self.MODULE] = 'stats' def get_total_ether_supply(self): self.url_dict[self.ACTION] = 'ethsupply' self.build_url() ...
27.2
58
0.628676
514
0.944853
0
0
0
0
0
0
63
0.115809
1d6268f350e6d98480c5a0858a845fd5f515b56e
2,842
py
Python
hidrocomp/graphics/gantt.py
clebsonpy/HydroComp
9d17fa533e8a15c760030df5246ff531ddb4cb22
[ "MIT" ]
4
2020-05-14T20:03:49.000Z
2020-05-22T19:56:43.000Z
hidrocomp/graphics/gantt.py
clebsonpy/HydroComp
9d17fa533e8a15c760030df5246ff531ddb4cb22
[ "MIT" ]
19
2019-06-27T18:12:27.000Z
2020-04-28T13:28:03.000Z
hidrocomp/graphics/gantt.py
clebsonpy/HydroComp
9d17fa533e8a15c760030df5246ff531ddb4cb22
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import calendar import datetime import plotly as py import plotly.graph_objs as go class Gantt(object): def __init__(self, data): self.data = data def get_gantt(self, df, less, index): color = 0 n = 1 for j in less.index: d...
40.028169
126
0.478184
2,716
0.955665
0
0
2,147
0.755454
0
0
236
0.08304
1d632172c51d0d9115fa84dc7ab954ae04bb0eb7
229
py
Python
solid/recources/lab_drafts/01_SRP/books.py
BoyanPeychinov/object_oriented_programming
a960721c7c17710bd7b151a9025647e953435962
[ "MIT" ]
null
null
null
solid/recources/lab_drafts/01_SRP/books.py
BoyanPeychinov/object_oriented_programming
a960721c7c17710bd7b151a9025647e953435962
[ "MIT" ]
null
null
null
solid/recources/lab_drafts/01_SRP/books.py
BoyanPeychinov/object_oriented_programming
a960721c7c17710bd7b151a9025647e953435962
[ "MIT" ]
null
null
null
class Book: def __init__(self, title, author, location): self.title = title self.author = author self.location = location self.page = 0 def turn_page(self, page): self.page = page
22.9
48
0.585153
228
0.995633
0
0
0
0
0
0
0
0
1d642def5287972efd9e7b0713ed0b36627e2f0c
8,530
py
Python
scripts/clues_ancient_samples.py
ekirving/mesoneo_paper
7b5ac1b5beff8bfc09dca18554502518f6f15e36
[ "MIT" ]
null
null
null
scripts/clues_ancient_samples.py
ekirving/mesoneo_paper
7b5ac1b5beff8bfc09dca18554502518f6f15e36
[ "MIT" ]
null
null
null
scripts/clues_ancient_samples.py
ekirving/mesoneo_paper
7b5ac1b5beff8bfc09dca18554502518f6f15e36
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "Evan K. Irving-Pease" __copyright__ = "Copyright 2020, University of Copenhagen" __email__ = "evan.irvingpease@gmail.com" __license__ = "MIT" import os import sys from math import log import click import pysam import yaml sys.path.append(os.getcwd()) from...
38.423423
117
0.605393
0
0
0
0
7,179
0.841618
0
0
3,056
0.358265
1d66db9f64a830eb8e8e7037d37357c250c45e15
5,773
py
Python
auth/app.py
Celeo/GETIN-HR
3acc4bd1b09abf4fe7da05e25fd849ebe7c6f6a6
[ "MIT" ]
null
null
null
auth/app.py
Celeo/GETIN-HR
3acc4bd1b09abf4fe7da05e25fd849ebe7c6f6a6
[ "MIT" ]
null
null
null
auth/app.py
Celeo/GETIN-HR
3acc4bd1b09abf4fe7da05e25fd849ebe7c6f6a6
[ "MIT" ]
null
null
null
import logging from datetime import timedelta from flask import Flask, render_template, redirect, request, url_for, flash from flask_login import LoginManager, login_user, logout_user, current_user from preston.crest import Preston as CREST from preston.xmlapi import Preston as XMLAPI from auth.shared import db, evea...
30.067708
120
0.690802
0
0
0
0
3,478
0.60246
0
0
2,751
0.476529
1d67b713f23618331d3a012ef4bff6ddf73e4235
3,891
py
Python
setup.py
cathalmccabe/IIoT-SPYN
3d7ac560bfc31ecd763ac3a8c266fc63874f20ad
[ "BSD-3-Clause" ]
1
2019-01-01T14:52:51.000Z
2019-01-01T14:52:51.000Z
setup.py
cathalmccabe/IIoT-SPYN
3d7ac560bfc31ecd763ac3a8c266fc63874f20ad
[ "BSD-3-Clause" ]
null
null
null
setup.py
cathalmccabe/IIoT-SPYN
3d7ac560bfc31ecd763ac3a8c266fc63874f20ad
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2018, Xilinx, Inc. # 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 ...
35.372727
79
0.67926
0
0
0
0
0
0
0
0
2,191
0.563094
1d6897c7f3fa33acc1091f86b4c9ad7e47b3a66b
4,141
py
Python
eth2/beacon/tools/builder/initializer.py
Jwomers/trinity
3a09276d2f21adfc5b233272e1b1cc2ad1a0c11e
[ "MIT" ]
null
null
null
eth2/beacon/tools/builder/initializer.py
Jwomers/trinity
3a09276d2f21adfc5b233272e1b1cc2ad1a0c11e
[ "MIT" ]
null
null
null
eth2/beacon/tools/builder/initializer.py
Jwomers/trinity
3a09276d2f21adfc5b233272e1b1cc2ad1a0c11e
[ "MIT" ]
null
null
null
from typing import ( Dict, Sequence, Tuple, Type, ) from eth2.beacon.on_startup import ( get_genesis_block, get_initial_beacon_state, ) from eth2.beacon.state_machines.configs import BeaconConfig from eth2.beacon.types.blocks import ( BaseBeaconBlock, ) from eth2.beacon.types.deposits imp...
32.351563
74
0.658295
0
0
0
0
0
0
0
0
32
0.007728
1d6909e7697fe6f7ef13f4e0b61221718a698804
1,525
py
Python
settings.py
oogles/django-goodies
bef5f322f848e2bd466cc4955061ead9bed8c6c5
[ "BSD-3-Clause" ]
2
2020-08-28T00:36:48.000Z
2021-07-01T07:14:31.000Z
settings.py
oogles/djem
bef5f322f848e2bd466cc4955061ead9bed8c6c5
[ "BSD-3-Clause" ]
2
2018-03-22T05:46:17.000Z
2022-02-10T11:41:26.000Z
settings.py
oogles/djem
bef5f322f848e2bd466cc4955061ead9bed8c6c5
[ "BSD-3-Clause" ]
null
null
null
# Minimal settings file to allow the running of tests, execution of migrations, # and several other useful management commands. SECRET_KEY = 'abcde12345' # nosec # Needs to point to something to allow tests to perform url resolving. The file # doesn't actually need to contain any urls (but does need to define "urlpa...
27.727273
84
0.664918
0
0
0
0
0
0
0
0
1,043
0.683934
1d6e65b0e5d6c4ee6ad11a44b07d0b7c7fe3d49f
360
py
Python
SimpleSign.py
wanzhiguo/mininero
7dd71b02a4613478b59b2670ccf7c74a22cc2ffd
[ "BSD-3-Clause" ]
182
2016-02-05T18:33:09.000Z
2022-03-23T12:31:54.000Z
SimpleSign.py
wanzhiguo/mininero
7dd71b02a4613478b59b2670ccf7c74a22cc2ffd
[ "BSD-3-Clause" ]
81
2016-09-04T14:00:24.000Z
2022-03-28T17:22:52.000Z
SimpleSign.py
wanzhiguo/mininero
7dd71b02a4613478b59b2670ccf7c74a22cc2ffd
[ "BSD-3-Clause" ]
63
2016-02-05T19:38:06.000Z
2022-03-07T06:07:46.000Z
import MiniNero import ed25519 import binascii import PaperWallet import cherrypy import os import time import bitmonerod import SimpleXMR2 import SimpleServer message = "send0d000114545737471em2WCg9QKxRxbo6S3xKF2K4UDvdu6hMc" message = "send0d0114545747771em2WCg9QKxRxbo6S3xKF2K4UDvdu6hMc" sec = raw_input("sec?") print...
21.176471
65
0.858333
0
0
0
0
0
0
0
0
114
0.316667
1d6e919f05dbd8e9f87f5045a93be702a3ed1a8c
599
py
Python
lib/logger.py
amkolhar/JamaAutomation
840d404df0b1483cdbb85e17e1e5059a36c69cc7
[ "Apache-2.0" ]
null
null
null
lib/logger.py
amkolhar/JamaAutomation
840d404df0b1483cdbb85e17e1e5059a36c69cc7
[ "Apache-2.0" ]
null
null
null
lib/logger.py
amkolhar/JamaAutomation
840d404df0b1483cdbb85e17e1e5059a36c69cc7
[ "Apache-2.0" ]
null
null
null
# Atharv Kolhar (atharv) import logging import warnings warnings.filterwarnings("ignore") jamalogger = logging.getLogger("JAMALIB") jamalogger.setLevel(logging.DEBUG) handle = logging.StreamHandler() formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s', ...
27.227273
85
0.737896
0
0
0
0
0
0
0
0
141
0.235392
1d6f6b83566cbb11fd4ba3d140094d32e8247565
1,851
py
Python
src/common/download.py
Nut-Guo/adv
b0fdcfbf8acfe59916118e152d3c63d27ea88611
[ "MIT" ]
2
2021-09-25T05:26:47.000Z
2022-03-09T13:42:10.000Z
src/common/download.py
Nut-Guo/adv
b0fdcfbf8acfe59916118e152d3c63d27ea88611
[ "MIT" ]
null
null
null
src/common/download.py
Nut-Guo/adv
b0fdcfbf8acfe59916118e152d3c63d27ea88611
[ "MIT" ]
null
null
null
import os import requests import logging from tqdm import tqdm as tq import zipfile import tarfile def download_file(url: str, path: str, verbose: bool = False) -> None: """ Download file with progressbar Usage: download_file('http://web4host.net/5MB.zip') """ if not os.path.exists(path):...
26.442857
96
0.589411
0
0
0
0
0
0
0
0
505
0.272825
1d72d39d1134cd19db279903a576512ac8b9b659
139
py
Python
vedasal/criteria/losses/builder.py
Kuro96/vedasal
3c5588bf12059af5bd7bc779fd5f9dc0b2901cb2
[ "Apache-2.0" ]
2
2020-11-06T06:39:04.000Z
2020-11-11T03:39:22.000Z
vedasal/criteria/losses/builder.py
Kuro96/vedasal
3c5588bf12059af5bd7bc779fd5f9dc0b2901cb2
[ "Apache-2.0" ]
null
null
null
vedasal/criteria/losses/builder.py
Kuro96/vedasal
3c5588bf12059af5bd7bc779fd5f9dc0b2901cb2
[ "Apache-2.0" ]
null
null
null
from vedacore.misc import registry, build_from_cfg def build_loss(cfg): loss = build_from_cfg(cfg, registry, 'loss') return loss
19.857143
50
0.741007
0
0
0
0
0
0
0
0
6
0.043165
1d73ed57b830c4f17e023e29c9340e779af1482f
6,667
py
Python
django_rest_scaffold/management/commands/create-model.py
regisec/django-rest-scaffold
8ba5c5ad3105812d4b0143f4e69bb687ba1ac166
[ "BSD-3-Clause" ]
null
null
null
django_rest_scaffold/management/commands/create-model.py
regisec/django-rest-scaffold
8ba5c5ad3105812d4b0143f4e69bb687ba1ac166
[ "BSD-3-Clause" ]
4
2019-08-05T05:00:45.000Z
2021-06-10T19:28:56.000Z
django_rest_scaffold/management/commands/create-model.py
regisec/django-rest-scaffold
8ba5c5ad3105812d4b0143f4e69bb687ba1ac166
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: UTF-8 -*- """ Created by Régis Eduardo Crestani <regis.crestani@gmail.com> on 19/06/2016. """ import os from datetime import datetime from django.core.management.base import BaseCommand, CommandError from django_rest_scaffold.settings import DJANGO_REST_SCAFFOLD_SETTINGS as SETTINGS class Command(B...
44.152318
118
0.578071
6,362
0.953966
0
0
501
0.075124
0
0
1,742
0.261209
1d740317cdf78e3f80e81cac80068c2f4804af40
3,066
py
Python
social_api/urls.py
muhfajar/social_api
05ca23b215db5cb4f9060134b464b643c49beb0f
[ "MIT" ]
null
null
null
social_api/urls.py
muhfajar/social_api
05ca23b215db5cb4f9060134b464b643c49beb0f
[ "MIT" ]
null
null
null
social_api/urls.py
muhfajar/social_api
05ca23b215db5cb4f9060134b464b643c49beb0f
[ "MIT" ]
null
null
null
"""social_api URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
47.90625
115
0.665688
0
0
0
0
0
0
0
0
1,730
0.564253
1d7424d7e6f29bb89685d0551b4a9bc7832c6b24
5,186
py
Python
src/meta_memcache/base/connection_pool.py
RevenueCat/meta-memcache-py
755ecfc4cfbb029d3435590c5f9aa8a8aa2a36e3
[ "MIT" ]
null
null
null
src/meta_memcache/base/connection_pool.py
RevenueCat/meta-memcache-py
755ecfc4cfbb029d3435590c5f9aa8a8aa2a36e3
[ "MIT" ]
4
2022-01-10T23:06:43.000Z
2022-03-08T22:49:39.000Z
src/meta_memcache/base/connection_pool.py
RevenueCat/meta-memcache-py
755ecfc4cfbb029d3435590c5f9aa8a8aa2a36e3
[ "MIT" ]
null
null
null
import itertools import logging import socket import time from collections import deque from contextlib import contextmanager from typing import Callable, Deque, Generator, NamedTuple, Optional from meta_memcache.base.memcache_socket import MemcacheSocket from meta_memcache.errors import MemcacheServerError from meta_...
38.414815
87
0.652912
4,681
0.902622
831
0.160239
851
0.164096
0
0
987
0.19032
1d7bf9fe9ade355b6e87b40c8b814174167a1aed
1,599
py
Python
src/derl/tracker.py
tpiekarski/derl
b2687f8f02870b2a29bc7466195d4ed45f192cbf
[ "MIT" ]
10
2020-06-17T12:03:28.000Z
2021-09-07T04:03:34.000Z
src/derl/tracker.py
tpiekarski/derl
b2687f8f02870b2a29bc7466195d4ed45f192cbf
[ "MIT" ]
42
2020-06-17T12:27:26.000Z
2021-09-05T10:51:43.000Z
src/derl/tracker.py
tpiekarski/derl
b2687f8f02870b2a29bc7466195d4ed45f192cbf
[ "MIT" ]
1
2020-06-17T12:03:30.000Z
2020-06-17T12:03:30.000Z
# # derl: CLI Utility for searching for dead URLs <https://github.com/tpiekarski/derl> # --- # Copyright 2020 Thomas Piekarski <t.piekarski@deloquencia.de> # from time import perf_counter from derl.model.stats import Stats class Singleton(type): _instances = {} def __call__(cls: "Singleton", *args: tuple, ...
24.227273
100
0.614134
1,313
0.821138
0
0
0
0
0
0
300
0.187617
1d808fc6752a54152448f2c150ce9d43facfe6b6
1,813
py
Python
class/lect/Lect-06/shuffle.py
MikenzieAlasca/F21-1010
a7c15b8d9bf84f316aa6921f6d8a588c513a22b8
[ "MIT" ]
5
2021-09-09T21:08:14.000Z
2021-12-14T02:30:52.000Z
class/lect/Lect-06/shuffle.py
MikenzieAlasca/F21-1010
a7c15b8d9bf84f316aa6921f6d8a588c513a22b8
[ "MIT" ]
null
null
null
class/lect/Lect-06/shuffle.py
MikenzieAlasca/F21-1010
a7c15b8d9bf84f316aa6921f6d8a588c513a22b8
[ "MIT" ]
8
2021-09-09T17:46:07.000Z
2022-02-08T22:41:35.000Z
import random import copy rr = random.Random ( 22 ) def readNameList(fn): f = open(fn,"r") if f == None: print ( f"Invalid file {fn} - failed to open" ) return None dt = f.readlines() f.close() for i in range (len(dt)): s = dt[i].rstrip() dt[i] = s return dt ...
22.382716
115
0.479868
0
0
0
0
0
0
0
0
263
0.145063
1d8175f2740077e4e182203daab2cb883fd6dc00
3,641
py
Python
step_impl/http.py
WorldHealthOrganization/ddcc-gateway-api-tests
914e81243e162c3e8375786df2f21f8e1008fc0d
[ "Apache-2.0" ]
null
null
null
step_impl/http.py
WorldHealthOrganization/ddcc-gateway-api-tests
914e81243e162c3e8375786df2f21f8e1008fc0d
[ "Apache-2.0" ]
null
null
null
step_impl/http.py
WorldHealthOrganization/ddcc-gateway-api-tests
914e81243e162c3e8375786df2f21f8e1008fc0d
[ "Apache-2.0" ]
2
2022-02-04T11:10:27.000Z
2022-02-17T09:06:29.000Z
# ---license-start # eu-digital-green-certificates / dgc-api-tests # --- # Copyright (C) 2021 T-Systems International GmbH and all other contributors # --- # 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 ...
41.375
128
0.753364
0
0
0
0
2,822
0.775062
0
0
1,779
0.488602
1d83766ae57b1b09e9fc0fe2cbd36a3f3b83c731
4,503
py
Python
celligner2/surgery/trvae.py
broadinstitute/celligner2
ddddb3f4c13c66277bc93b08ebe65c1cc0bd941c
[ "Unlicense" ]
null
null
null
celligner2/surgery/trvae.py
broadinstitute/celligner2
ddddb3f4c13c66277bc93b08ebe65c1cc0bd941c
[ "Unlicense" ]
null
null
null
celligner2/surgery/trvae.py
broadinstitute/celligner2
ddddb3f4c13c66277bc93b08ebe65c1cc0bd941c
[ "Unlicense" ]
null
null
null
import numpy as np import torch import anndata from celligner2.othermodels.trvae.trvae import trVAE from celligner2.trainers.trvae.unsupervised import trVAETrainer def trvae_operate( network: trVAE, data: anndata, condition_key: str = None, size_factor_key: str = None, n_epoch...
37.525
118
0.653342
0
0
0
0
0
0
0
0
1,385
0.307573
1d8538ea9563fe089e63d6ca2260f4ed77161708
2,519
py
Python
helpers/connections.py
cheak1974/remi-app-template
6c724dda0294b41b906134b9062eadce0f6c0617
[ "Apache-2.0" ]
12
2020-02-24T08:44:29.000Z
2022-02-21T07:18:31.000Z
helpers/connections.py
cheak1974/remi-app-template
6c724dda0294b41b906134b9062eadce0f6c0617
[ "Apache-2.0" ]
null
null
null
helpers/connections.py
cheak1974/remi-app-template
6c724dda0294b41b906134b9062eadce0f6c0617
[ "Apache-2.0" ]
3
2020-05-02T15:47:09.000Z
2021-06-12T23:56:52.000Z
import datetime import remi import core.globals connected_clients = {} # Dict with key=session id of App Instance and value=ws_client.client_address of App Instance connected_clients['number'] = 0 # Special Dict Field for amount of active connections client_route_url_to...
66.289474
167
0.691147
0
0
0
0
0
0
0
0
1,205
0.478364
1d8628fbeb788aef2e5985787b2abb68a9b0d934
2,111
py
Python
tests/api/endpoints/admin/test_two_factor_auth.py
weimens/seahub
5ecf78ed7a2ddc72a23961804ee41be21c24893f
[ "Apache-2.0" ]
420
2015-01-03T11:34:46.000Z
2022-03-10T07:15:41.000Z
tests/api/endpoints/admin/test_two_factor_auth.py
weimens/seahub
5ecf78ed7a2ddc72a23961804ee41be21c24893f
[ "Apache-2.0" ]
735
2015-01-04T21:22:51.000Z
2022-03-31T09:26:07.000Z
tests/api/endpoints/admin/test_two_factor_auth.py
weimens/seahub
5ecf78ed7a2ddc72a23961804ee41be21c24893f
[ "Apache-2.0" ]
379
2015-01-05T17:08:03.000Z
2022-03-06T00:11:50.000Z
import os import pytest from django.urls import reverse from seahub.options.models import (UserOptions, KEY_FORCE_2FA, VAL_FORCE_2FA) from seahub.test_utils import BaseTestCase from seahub.two_factor.models import TOTPDevice, devices_for_user TRAVIS = 'TRAVIS' in os.environ @pytest.mark.skipif(TRAVIS, reason="") cl...
32.476923
99
0.58882
1,792
0.848887
0
0
1,831
0.867361
0
0
174
0.082425
1d873a9042df6f711d83b72908d095913ffcd921
1,495
py
Python
saucenao/http.py
DaRealFreak/saucenao
28a1abc4fba6b7efdda54b140ba0c164e0b9c11a
[ "MIT" ]
30
2018-04-04T19:58:39.000Z
2021-11-24T16:25:51.000Z
saucenao/http.py
DaRealFreak/saucenao
28a1abc4fba6b7efdda54b140ba0c164e0b9c11a
[ "MIT" ]
6
2019-04-02T04:53:47.000Z
2020-09-25T09:50:15.000Z
saucenao/http.py
DaRealFreak/saucenao
28a1abc4fba6b7efdda54b140ba0c164e0b9c11a
[ "MIT" ]
4
2018-04-04T05:07:20.000Z
2020-03-10T14:19:03.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- import requests from saucenao.exceptions import * PREVIOUS_STATUS_CODE = None STATUS_CODE_OK = 1 STATUS_CODE_SKIP = 2 STATUS_CODE_REPEAT = 3 def verify_status_code(request_response: requests.Response) -> tuple: """Verify the status code of the post request to the sear...
35.595238
114
0.70301
0
0
0
0
0
0
0
0
524
0.350502
1d8982e4961fe4520d62952b9772740d30716f97
6,711
py
Python
dialogue/sinodoju.py
jeanlucancey/pronunciamento
a7c7407cda8e5dace3f4cd8eebbfee9bdd469e14
[ "BSD-2-Clause" ]
null
null
null
dialogue/sinodoju.py
jeanlucancey/pronunciamento
a7c7407cda8e5dace3f4cd8eebbfee9bdd469e14
[ "BSD-2-Clause" ]
null
null
null
dialogue/sinodoju.py
jeanlucancey/pronunciamento
a7c7407cda8e5dace3f4cd8eebbfee9bdd469e14
[ "BSD-2-Clause" ]
null
null
null
import time from os import system from django.http import HttpResponse from django.template import Context, loader from django.views.decorators.csrf import csrf_exempt # Pour des formulaires POST libres from jla_utils.utils import Fichier from .models import ElementDialogue class Tunnel: def __init__(self, long...
35.696809
101
0.649829
141
0.020963
0
0
1,256
0.186738
0
0
1,366
0.203092
1d8a630a7af7286dcfe25ff650a3b9fddf8961f0
1,294
py
Python
tools/python/boutiques/tests/test_bids.py
shots47s/boutiques
831f937a6b1491af63a800786967e4d9bca1e262
[ "MIT" ]
54
2016-07-21T19:14:13.000Z
2021-11-16T11:49:15.000Z
tools/python/boutiques/tests/test_bids.py
shots47s/boutiques
831f937a6b1491af63a800786967e4d9bca1e262
[ "MIT" ]
539
2016-07-20T20:09:38.000Z
2022-03-17T00:45:26.000Z
tools/python/boutiques/tests/test_bids.py
shots47s/boutiques
831f937a6b1491af63a800786967e4d9bca1e262
[ "MIT" ]
52
2016-07-22T18:09:59.000Z
2021-02-03T15:22:55.000Z
#!/usr/bin/env python from unittest import TestCase from boutiques.bosh import bosh from boutiques.bids import validate_bids from boutiques import __file__ as bofile from jsonschema.exceptions import ValidationError from boutiques.validator import DescriptorValidationError import os.path as op import simplejson as jso...
36.971429
76
0.641422
959
0.741113
0
0
0
0
0
0
191
0.147604
1d8b6f8e19293ba21c2228c7a6bbaaebe7835fb6
425
py
Python
libs/yowsup/yowsup/yowsup/layers/protocol_receipts/protocolentities/test_receipt_outgoing.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
22
2017-07-14T20:01:17.000Z
2022-03-08T14:22:39.000Z
libs/yowsup/yowsup/yowsup/layers/protocol_receipts/protocolentities/test_receipt_outgoing.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
6
2017-07-14T21:03:50.000Z
2021-06-10T19:08:32.000Z
libs/yowsup/yowsup/yowsup/layers/protocol_receipts/protocolentities/test_receipt_outgoing.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
13
2017-07-14T20:13:14.000Z
2020-11-12T08:06:05.000Z
from yowsup.layers.protocol_receipts.protocolentities import OutgoingReceiptProtocolEntity from yowsup.structs.protocolentity import ProtocolEntityTest import unittest class OutgoingReceiptProtocolEntityTest(ProtocolEntityTest, unittest.TestCase): def setUp(self): self.ProtocolEntity = OutgoingReceiptProto...
53.125
95
0.828235
256
0.602353
0
0
0
0
0
0
19
0.044706
1d8e88981310f80f962aaedf4421391c24b8f208
2,769
py
Python
empire/server/modules/powershell/situational_awareness/network/get_sql_server_info.py
awsmhacks/Empire
6a6f0881798ce92a54ce9896d2ffe4855855872d
[ "BSD-3-Clause" ]
null
null
null
empire/server/modules/powershell/situational_awareness/network/get_sql_server_info.py
awsmhacks/Empire
6a6f0881798ce92a54ce9896d2ffe4855855872d
[ "BSD-3-Clause" ]
null
null
null
empire/server/modules/powershell/situational_awareness/network/get_sql_server_info.py
awsmhacks/Empire
6a6f0881798ce92a54ce9896d2ffe4855855872d
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function import pathlib from builtins import object, str from typing import Dict from empire.server.common import helpers from empire.server.common.module_models import PydanticModule from empire.server.utils import data_util from empire.server.utils.module_util import handle_error_messag...
33.361446
86
0.552907
2,444
0.882629
0
0
2,418
0.873239
0
0
499
0.180209
1d8eb891210e75a2298ded03715a2b3415109050
230
py
Python
gameplay/urls.py
Urosh91/TicTacToe
40d6c763993b525327d2c3cd3f132dc8822c85fe
[ "MIT" ]
null
null
null
gameplay/urls.py
Urosh91/TicTacToe
40d6c763993b525327d2c3cd3f132dc8822c85fe
[ "MIT" ]
null
null
null
gameplay/urls.py
Urosh91/TicTacToe
40d6c763993b525327d2c3cd3f132dc8822c85fe
[ "MIT" ]
null
null
null
from django.urls import path from .views import game_detail, make_move urlpatterns = [ path(r'detail/<int:id>/', game_detail, name="gameplay_detail"), path(r'make_move/<int:id>', make_move, name="gameplay_make_move") ]
23
69
0.721739
0
0
0
0
0
0
0
0
77
0.334783
1d9140bd33fb078d1bfd2d6231763b19bed995bc
740
py
Python
setup.py
Bonifatius94/sc2sim
ac765f826e2465354aa4b619ab84d52249eec474
[ "MIT" ]
null
null
null
setup.py
Bonifatius94/sc2sim
ac765f826e2465354aa4b619ab84d52249eec474
[ "MIT" ]
null
null
null
setup.py
Bonifatius94/sc2sim
ac765f826e2465354aa4b619ab84d52249eec474
[ "MIT" ]
null
null
null
from setuptools import setup def load_pip_dependency_list(): with open('./requirements.txt', 'r', encoding='utf-8') as file: return file.read().splitlines() def load_readme_desc(): with open("README.md", "r", encoding="utf-8") as readme_file: return readme_file.read() setup( name="sc2sim"...
30.833333
81
0.7
0
0
0
0
0
0
0
0
238
0.321188
1d91db395da59fee0f0dc15b16ea80b100b25421
1,906
py
Python
2016/24/air_duct_spelunking.py
GeoffRiley/AdventOfCode
27fe8670a1923cb3b0675784f5e855ad18c29c93
[ "Unlicense" ]
2
2020-12-12T03:18:45.000Z
2021-12-17T00:35:33.000Z
2016/24/air_duct_spelunking.py
GeoffRiley/AdventOfCode
27fe8670a1923cb3b0675784f5e855ad18c29c93
[ "Unlicense" ]
null
null
null
2016/24/air_duct_spelunking.py
GeoffRiley/AdventOfCode
27fe8670a1923cb3b0675784f5e855ad18c29c93
[ "Unlicense" ]
null
null
null
from collections import defaultdict from itertools import permutations import networkx as nx def air_duct_spelunking(inp, part1=True): max_y = len(inp) max_x = max(len(line) for line in inp) grid = defaultdict(lambda: '#') numbers = defaultdict(lambda: '') route_list = defaultdict(lambda: 0) ...
33.438596
91
0.53043
0
0
0
0
0
0
0
0
217
0.113851
1d92705a0e03671b2fdc534d799cc8d39e832d40
3,889
py
Python
src/bo4e/com/angebotsteil.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/com/angebotsteil.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/com/angebotsteil.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains Angebotsteil class and corresponding marshmallow schema for de-/serialization """ from typing import List, Optional import attr from marshmallow import fields from bo4e.bo.marktlokation import Marktlokation, MarktlokationSchema from bo4e.com.angebotsposition import Angebotsposition, AngebotspositionSche...
41.37234
179
0.750579
3,234
0.830508
0
0
2,611
0.670519
0
0
1,447
0.371597
1d929ee149bb8ee418892e5d7ce4bfaffb5ee0ea
63,926
py
Python
lib/kb_kaiju/Utils/OutputBuilder.py
mclark58/kb_kaiju
477b23ef7fdf8b75a9cffc2239c546c915875c74
[ "MIT" ]
null
null
null
lib/kb_kaiju/Utils/OutputBuilder.py
mclark58/kb_kaiju
477b23ef7fdf8b75a9cffc2239c546c915875c74
[ "MIT" ]
null
null
null
lib/kb_kaiju/Utils/OutputBuilder.py
mclark58/kb_kaiju
477b23ef7fdf8b75a9cffc2239c546c915875c74
[ "MIT" ]
null
null
null
import os import shutil import ast import sys import time import re from datetime import datetime as dt import pytz import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as mpatches import random from random import shuffle from biokbase.workspace.client import Workspace as workspaceService #fro...
41.61849
148
0.543018
63,236
0.989206
0
0
0
0
0
0
16,547
0.258846
1d93308a11488dd842ee04ecb3fb3f177a82ba23
1,723
py
Python
Gds/src/fprime_gds/wxgui/tools/PexpectRunnerConsolGUI.py
hunterpaulson/fprime
70560897b56dc3037dc966c99751b708b1cc8a05
[ "Apache-2.0" ]
null
null
null
Gds/src/fprime_gds/wxgui/tools/PexpectRunnerConsolGUI.py
hunterpaulson/fprime
70560897b56dc3037dc966c99751b708b1cc8a05
[ "Apache-2.0" ]
5
2020-07-13T16:56:33.000Z
2020-07-23T20:38:13.000Z
Gds/src/fprime_gds/wxgui/tools/PexpectRunnerConsolGUI.py
hunterpaulson/lgtm-fprime
9eeda383c263ecba8da8188a45e1d020107ff323
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version May 29 2018) ## http://www.wxformbuilder.org/ ## ## PLEASE DO *NOT* EDIT THIS FILE! ########################################################################### impor...
27.790323
75
0.490424
1,202
0.69762
0
0
0
0
0
0
574
0.33314
1d950e325ef85dc98b69ae74e351c6705f81fa42
20,121
py
Python
web/openerp/addons/base/tests/test_ir_actions.py
diogocs1/comps
63df07f6cf21c41e4527c06e2d0499f23f4322e7
[ "Apache-2.0" ]
1
2019-12-29T11:53:56.000Z
2019-12-29T11:53:56.000Z
odoo/openerp/addons/base/tests/test_ir_actions.py
tuanquanghpvn/odoo8-tutorial
52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e
[ "MIT" ]
null
null
null
odoo/openerp/addons/base/tests/test_ir_actions.py
tuanquanghpvn/odoo8-tutorial
52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e
[ "MIT" ]
3
2020-10-08T14:42:10.000Z
2022-01-28T14:12:29.000Z
import unittest2 from openerp.osv.orm import except_orm import openerp.tests.common as common from openerp.tools import mute_logger class TestServerActionsBase(common.TransactionCase): def setUp(self): super(TestServerActionsBase, self).setUp() cr, uid = self.cr, self.uid # Models ...
49.195599
163
0.610705
19,932
0.990607
0
0
1,846
0.091745
0
0
6,878
0.341832
1d955fce32b36603e242788ccaf03954bf57a21c
506
py
Python
linchpin/provision/filter_plugins/duplicateattr.py
seandst/linchpin
427b6fb61f550a4d1120ac94c55d121fbecd70a6
[ "Apache-2.0" ]
null
null
null
linchpin/provision/filter_plugins/duplicateattr.py
seandst/linchpin
427b6fb61f550a4d1120ac94c55d121fbecd70a6
[ "Apache-2.0" ]
null
null
null
linchpin/provision/filter_plugins/duplicateattr.py
seandst/linchpin
427b6fb61f550a4d1120ac94c55d121fbecd70a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os import sys import abc import StringIO from ansible import errors def duplicateattr(output, attr, dattr): new_output = [] for group in output: if attr in group: new_group = group new_group[dattr] = group[attr] new_output.append(new_grou...
22
42
0.624506
163
0.322134
0
0
0
0
0
0
74
0.146245
1d95852843689e3fd89ad1bab5143b8e92c83354
3,564
py
Python
memory.py
Bl41r/gb-emulator-python
04917fa0cdd09eb522e1409fc992e41df34fbf9a
[ "MIT" ]
null
null
null
memory.py
Bl41r/gb-emulator-python
04917fa0cdd09eb522e1409fc992e41df34fbf9a
[ "MIT" ]
null
null
null
memory.py
Bl41r/gb-emulator-python
04917fa0cdd09eb522e1409fc992e41df34fbf9a
[ "MIT" ]
null
null
null
"""Gameboy memory. Cartridge --------- [0000-3FFF] Cartridge ROM, bank 0: The first 16,384 bytes of the cartridge program are always available at this point in the memory map. Special circumstances apply: [0000-00FF] BIOS: When the CPU starts up, PC starts at 0000h, which is the start of the 256-byte GameBoy BIOS code...
59.4
332
0.720819
1,049
0.294332
0
0
0
0
0
0
2,766
0.776094
1d95ef9da2b683c95ffb53337138d330ab1ec3fd
1,127
py
Python
elstruct/reader/_orca4/surface.py
sjklipp/elstruct
1db630a12e11bf70df91443f963f79637244e844
[ "Apache-2.0" ]
null
null
null
elstruct/reader/_orca4/surface.py
sjklipp/elstruct
1db630a12e11bf70df91443f963f79637244e844
[ "Apache-2.0" ]
null
null
null
elstruct/reader/_orca4/surface.py
sjklipp/elstruct
1db630a12e11bf70df91443f963f79637244e844
[ "Apache-2.0" ]
null
null
null
""" gradient and hessian readers """ import numpy import autoread as ar import autoparse.pattern as app def gradient(output_string): """ read gradient from the output string """ grad = ar.matrix.read( output_string, start_ptt=app.padded(app.NEWLINE).join([ app.padded(app.escape...
27.487805
73
0.60071
0
0
0
0
0
0
0
0
168
0.149068
1d95ff83525f3bfc63f6749e33f1c51f0190ec41
1,072
py
Python
Language/Parser/lr1_item.py
Chains99/Battlefield-Simulator
9dc209c34aac5160232e47d6799bbe1b1bfcebad
[ "MIT" ]
null
null
null
Language/Parser/lr1_item.py
Chains99/Battlefield-Simulator
9dc209c34aac5160232e47d6799bbe1b1bfcebad
[ "MIT" ]
null
null
null
Language/Parser/lr1_item.py
Chains99/Battlefield-Simulator
9dc209c34aac5160232e47d6799bbe1b1bfcebad
[ "MIT" ]
null
null
null
from Language.Grammar.grammar import Production, Symbol, Terminal class LR1Item: def __init__(self, production: Production, dot_index: int, lookahead: Terminal = None): self._repr = '' self.production = production self.dot_index = dot_index self.lookahead = lookahead self._...
34.580645
123
0.630597
1,003
0.935634
0
0
0
0
0
0
63
0.058769
1d97b0cbdfb243aad3abbcdbd52cf67f81f74a12
1,402
py
Python
example/0_Basic_usage_of_the_library/python_feapder/1_quick_start/1_quick_start.py
RecluseXU/learning_spider
45fa790ed7970be57a21b40817cc66856de3d99b
[ "MIT" ]
38
2020-08-30T11:41:53.000Z
2022-03-23T04:30:26.000Z
example/0_Basic_usage_of_the_library/python_feapder/1_quick_start/1_quick_start.py
AndersonHJB/learning_spider
b855b7808fb5268e9564180cf73ba5b1fb133f58
[ "MIT" ]
2
2021-08-20T16:34:12.000Z
2021-10-08T11:06:41.000Z
example/0_Basic_usage_of_the_library/python_feapder/1_quick_start/1_quick_start.py
AndersonHJB/learning_spider
b855b7808fb5268e9564180cf73ba5b1fb133f58
[ "MIT" ]
10
2020-11-24T09:15:42.000Z
2022-02-25T06:05:16.000Z
# -*- coding: utf-8 -*- """ Created on 2021-03-11 18:53:58 --------- @summary: 抓糗事百科的案例 --------- @author: Administrator """ import feapder class Spider(feapder.AirSpider): def start_requests(self): for page_num in range(1, 2): url = "https://www.qiushibaike.com/8hr/page/{}/".format(page_...
34.195122
106
0.603424
1,334
0.821429
783
0.482143
0
0
0
0
730
0.449507
1d9ac71d3a8fcaba493e70c86ce538da80100fc4
613
py
Python
Python3-GUI/Turtle01_Motion.py
anliven/L-Python
a814cab207bbaad6b5c69b9feeb8bf2f459baf2b
[ "Apache-2.0" ]
null
null
null
Python3-GUI/Turtle01_Motion.py
anliven/L-Python
a814cab207bbaad6b5c69b9feeb8bf2f459baf2b
[ "Apache-2.0" ]
null
null
null
Python3-GUI/Turtle01_Motion.py
anliven/L-Python
a814cab207bbaad6b5c69b9feeb8bf2f459baf2b
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 import turtle t = turtle.Turtle() t.goto(-50, 0) for j in range(3): t.forward(180) t.right(120) t.reset() # 清空窗口,重置turtle状态为起始状态 t2 = turtle.Turtle() t2.speed(50) for i in range(5): t2.forward(150) t2.right(144) turtle.exitonclick() # 保持图案,直到鼠标点击才退出 # ### 标准库turtle...
19.15625
48
0.619902
0
0
0
0
0
0
0
0
484
0.647925
1d9b3dd104b11b23ec830541750f56c9d580c920
519
py
Python
backend/core/MlDiagnosis/ML_models/heartAttackPrediction/testDeploy.py
arc-arnob/Reddit-Clone
607918160596a10b0aff85bc7f472c8b76ace7c5
[ "Apache-2.0" ]
null
null
null
backend/core/MlDiagnosis/ML_models/heartAttackPrediction/testDeploy.py
arc-arnob/Reddit-Clone
607918160596a10b0aff85bc7f472c8b76ace7c5
[ "Apache-2.0" ]
null
null
null
backend/core/MlDiagnosis/ML_models/heartAttackPrediction/testDeploy.py
arc-arnob/Reddit-Clone
607918160596a10b0aff85bc7f472c8b76ace7c5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Mar 13 10:26:55 2021 @author: hp """ import importlib import prediction import numpy as np dataframe_instance = [] msg = ["marital status","age","hypertension","heart","glucose"] for i in range(13): read = (float(input())) dataframe_instance.append(read) #data_np = n...
23.590909
63
0.71869
0
0
0
0
0
0
0
0
233
0.44894
1d9d41151655848833ede87fdc1e56259da9adc2
327
py
Python
lib/signtest.py
Laurancy-Dorian/DrawTheTableau
c8b1e67286303f0b0098cdbb8fb662ccfa31c235
[ "MIT" ]
null
null
null
lib/signtest.py
Laurancy-Dorian/DrawTheTableau
c8b1e67286303f0b0098cdbb8fb662ccfa31c235
[ "MIT" ]
null
null
null
lib/signtest.py
Laurancy-Dorian/DrawTheTableau
c8b1e67286303f0b0098cdbb8fb662ccfa31c235
[ "MIT" ]
null
null
null
import signal import os import time def receive_signal(signum, stack): print 'Received:', signum signal.signal(signal.SIGUSR1, receive_signal) signal.signal(signal.SIGUSR2, receive_signal) signal.signal(signal.SIGINT, receive_signal) print 'My PID is:', os.getpid() while True: print 'Waiting...' time.sl...
19.235294
45
0.746177
0
0
0
0
0
0
0
0
35
0.107034
1d9d9317657c45de513b0d2d559ef0e59aa2beb3
5,211
py
Python
maskfirst/masker.py
xianpf/CenterMask
287111f4abd58df356e7899a22bf47d23647ee72
[ "BSD-2-Clause" ]
null
null
null
maskfirst/masker.py
xianpf/CenterMask
287111f4abd58df356e7899a22bf47d23647ee72
[ "BSD-2-Clause" ]
null
null
null
maskfirst/masker.py
xianpf/CenterMask
287111f4abd58df356e7899a22bf47d23647ee72
[ "BSD-2-Clause" ]
null
null
null
import torch import torch.nn.functional as F from maskrcnn_benchmark.structures.bounding_box import BoxList # the next two functions should be merged inside Masker # but are kept here for the moment while we need them # temporarily gor paste_mask_in_image def expand_boxes(boxes, scale): w_half = (boxes[:, 2] - box...
32.166667
105
0.587027
2,155
0.413548
0
0
0
0
0
0
776
0.148916
1d9dcef6f5f353c0ea5bbef7cb388e0ae27dc089
2,047
py
Python
certbot-ventilator/tests/conftest.py
gerrito333/letsencrypt-cert-manager
957ea555cc0f18fc3af9c275dc2fc5a8ab0a1668
[ "MIT" ]
2
2020-07-08T17:36:11.000Z
2020-07-08T18:20:59.000Z
certbot-ventilator/tests/conftest.py
gerrito333/letsencrypt-cert-manager
957ea555cc0f18fc3af9c275dc2fc5a8ab0a1668
[ "MIT" ]
2
2020-07-08T17:57:19.000Z
2020-07-08T18:00:38.000Z
certbot-ventilator/tests/conftest.py
gerrito333/letsencrypt-cert-manager
957ea555cc0f18fc3af9c275dc2fc5a8ab0a1668
[ "MIT" ]
1
2020-12-18T21:49:10.000Z
2020-12-18T21:49:10.000Z
"""Fixtures for tests.""" import json import boto3 from moto import mock_dynamodb2 import pytest from fixtures import LambdaContextMock import payloads @pytest.fixture def event(): """Return parsed event.""" with open('tests/payloads/success.json') as json_data: return json.load(json_data) @pytest...
24.662651
69
0.651685
0
0
123
0.060088
1,873
0.914998
0
0
744
0.363459
1d9dfc92ac3aa9a3c4519b13db031ca1c8e467a6
51,450
py
Python
smarc_bt/src/bt_actions.py
svbhat/smarc_missions
0fa9f858dff033a88385a156b5bb09b3f8fe2780
[ "BSD-3-Clause" ]
null
null
null
smarc_bt/src/bt_actions.py
svbhat/smarc_missions
0fa9f858dff033a88385a156b5bb09b3f8fe2780
[ "BSD-3-Clause" ]
null
null
null
smarc_bt/src/bt_actions.py
svbhat/smarc_missions
0fa9f858dff033a88385a156b5bb09b3f8fe2780
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # Ozer Ozkahraman (ozero@kth.se) import py_trees as pt import py_trees_ros as ptr import time import numpy as np import rospy import tf import actionlib # from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal from smarc_msgs.msg import GotoWaypo...
36.437677
165
0.634772
50,424
0.980058
0
0
0
0
0
0
11,645
0.226336
1da32fba530eac4eeca4097a02c12b5c6d943941
464
py
Python
back-end/src/handler/common/image.py
gfxcc/san11-platform
1d085d818bc265f5ffa7e8a7279c3b686deed98c
[ "MIT" ]
2
2021-12-23T06:18:35.000Z
2021-12-23T06:18:39.000Z
back-end/src/handler/common/image.py
gfxcc/san11-platform-back-end
74f60d201e21396c5c8601ddc404077ebd97871f
[ "MIT" ]
9
2021-03-10T01:54:16.000Z
2022-03-27T21:38:34.000Z
back-end/src/handler/common/image.py
gfxcc/san11-platform-back-end
74f60d201e21396c5c8601ddc404077ebd97871f
[ "MIT" ]
null
null
null
from __future__ import annotations import logging import os import os.path from ..util import gcs logger = logging.getLogger(os.path.basename(__file__)) class Image: def __init__(self, url) -> None: self.url = url def __str__(self) -> str: return self.url def delete(self): gcs...
17.846154
54
0.650862
305
0.657328
0
0
69
0.148707
0
0
20
0.043103
1da36580d402ceaa2d29765e76d1412b05300439
285
py
Python
diofant/tests/utilities/test_misc.py
rajkk1/diofant
6b361334569e4ec2e8c7d30dc324387a4ad417c2
[ "BSD-3-Clause" ]
57
2016-09-13T23:16:26.000Z
2022-03-29T06:45:51.000Z
diofant/tests/utilities/test_misc.py
rajkk1/diofant
6b361334569e4ec2e8c7d30dc324387a4ad417c2
[ "BSD-3-Clause" ]
402
2016-05-11T11:11:47.000Z
2022-03-31T14:27:02.000Z
diofant/tests/utilities/test_misc.py
rajkk1/diofant
6b361334569e4ec2e8c7d30dc324387a4ad417c2
[ "BSD-3-Clause" ]
20
2016-05-11T08:17:37.000Z
2021-09-10T09:15:51.000Z
from diofant.utilities.decorator import no_attrs_in_subclass __all__ = () def test_no_attrs_in_subclass(): class A: x = 'test' A.x = no_attrs_in_subclass(A, A.x) class B(A): pass assert hasattr(A, 'x') is True assert hasattr(B, 'x') is False
15.833333
60
0.631579
51
0.178947
0
0
0
0
0
0
12
0.042105
1da4cb39ba5d9ec1a0b4a7639eec537b2e91f417
921
py
Python
ccc_client/app_repo/cli/upload_image.py
ohsu-comp-bio/ccc_client
433a7fad3d8e6817362678b783110f38ca81e0a7
[ "MIT" ]
null
null
null
ccc_client/app_repo/cli/upload_image.py
ohsu-comp-bio/ccc_client
433a7fad3d8e6817362678b783110f38ca81e0a7
[ "MIT" ]
null
null
null
ccc_client/app_repo/cli/upload_image.py
ohsu-comp-bio/ccc_client
433a7fad3d8e6817362678b783110f38ca81e0a7
[ "MIT" ]
null
null
null
import argparse from ccc_client.app_repo.AppRepoRunner import AppRepoRunner from ccc_client.utils import print_API_response def run(args): runner = AppRepoRunner(args.host, args.port, args.authToken) r = runner.upload_image(args.imageBlob, args.imageName, args.imageTag) print_API_response(r) if args...
23.615385
74
0.693811
0
0
0
0
0
0
0
0
193
0.209555
1da6c2497156cd58fc4b35c6c90260b47daa47fa
1,781
py
Python
src/simulation/entity.py
rah/optimal-search
96d46ae1491b105a1ee21dc75e9297337249d466
[ "MIT" ]
null
null
null
src/simulation/entity.py
rah/optimal-search
96d46ae1491b105a1ee21dc75e9297337249d466
[ "MIT" ]
4
2018-04-26T01:49:12.000Z
2022-01-08T08:12:52.000Z
src/simulation/entity.py
rah/optimal-search
96d46ae1491b105a1ee21dc75e9297337249d466
[ "MIT" ]
null
null
null
class Entity(object): ''' An entity has: - energy - position(x,y) - size(length, width) An entity may have a parent entity An entity may have child entities ''' def __init__( self, p, parent=None, children=None): ...
25.442857
63
0.498596
1,779
0.998877
0
0
0
0
0
0
436
0.244806
1daa69dd3bb44dba1f878107d4e4e2d32c7a2934
43
py
Python
utils/__init__.py
Lolik-Bolik/The-production-cells-formation-problem
8c4f5790b92fbca7c9c5c8143c7e70fb3bb8b78b
[ "MIT" ]
5
2020-06-01T18:58:14.000Z
2020-06-17T04:52:49.000Z
utils/__init__.py
Lolik-Bolik/The-production-cells-formation-problem
8c4f5790b92fbca7c9c5c8143c7e70fb3bb8b78b
[ "MIT" ]
null
null
null
utils/__init__.py
Lolik-Bolik/The-production-cells-formation-problem
8c4f5790b92fbca7c9c5c8143c7e70fb3bb8b78b
[ "MIT" ]
null
null
null
from .dataloader import CellsProductionData
43
43
0.906977
0
0
0
0
0
0
0
0
0
0
d517cc6539e57b415b0f04b37c782b97faf26a2f
4,586
py
Python
create-kickstart.py
ulzeraj/autobond-autoraid-kickstarter
935d9857fe31c9a70a4cdda5e872060abf09238d
[ "Unlicense" ]
null
null
null
create-kickstart.py
ulzeraj/autobond-autoraid-kickstarter
935d9857fe31c9a70a4cdda5e872060abf09238d
[ "Unlicense" ]
null
null
null
create-kickstart.py
ulzeraj/autobond-autoraid-kickstarter
935d9857fe31c9a70a4cdda5e872060abf09238d
[ "Unlicense" ]
null
null
null
#!/usr/bin/python2.6 #-*- coding: utf-8 -*- import signal import subprocess from glob import glob from os import listdir from os.path import basename, dirname label = 'CentOS_6.9_Final' def listifaces(): ethernet = [] for iface in listdir('/sys/class/net/'): if iface != 'lo': ethernet.app...
30.986486
126
0.703445
0
0
0
0
0
0
0
0
2,954
0.644134
d518b9809b1e54d82285859972d83bf60fe776bf
6,023
py
Python
src/kalman_filter.py
Ashwin-Rajesh/Kalman_filter_carla
75887655043070842bb0d292bf511e8ddc8fd40c
[ "MIT" ]
1
2021-04-10T09:01:08.000Z
2021-04-10T09:01:08.000Z
src/kalman_filter.py
Ashwin-Rajesh/Kalman_filter_carla
75887655043070842bb0d292bf511e8ddc8fd40c
[ "MIT" ]
1
2021-11-22T10:42:11.000Z
2021-11-22T10:42:11.000Z
src/kalman_filter.py
Ashwin-Rajesh/Kalman_filter_carla
75887655043070842bb0d292bf511e8ddc8fd40c
[ "MIT" ]
3
2021-04-06T08:41:23.000Z
2021-09-24T09:50:10.000Z
#!/usr/bin/env python3 # MIT License # # Copyright (c) 2021 Ashwin Rajesh # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to ...
35.429412
122
0.492612
4,869
0.808401
0
0
0
0
0
0
2,294
0.380873
d519202436d106e402d5a165429654cca28794e3
2,096
py
Python
fileMover.py
ioawnen/fileMover2
4f5746e1d3261793403ef7d95c388792f58c3028
[ "MIT" ]
null
null
null
fileMover.py
ioawnen/fileMover2
4f5746e1d3261793403ef7d95c388792f58c3028
[ "MIT" ]
null
null
null
fileMover.py
ioawnen/fileMover2
4f5746e1d3261793403ef7d95c388792f58c3028
[ "MIT" ]
null
null
null
import re import sre_constants from fileIO import * from moveTasks import MoveTasks, MoveTaskIface import logging def get_matching_files(move_task: MoveTaskIface) -> list: matches = [] try: pattern = re.compile(move_task.filename_regex) for root, dirs, files in get_all_files(move_task.search...
35.525424
101
0.510496
0
0
0
0
0
0
0
0
869
0.414599
d519270c80775a7bacb99ae959f7231648e44d40
222
py
Python
ckan_cloud_operator/drivers/kubectl/driver.py
MuhammadIsmailShahzad/ckan-cloud-operator
35a4ca88c4908d81d1040a21fca8904e77c4cded
[ "MIT" ]
14
2019-11-18T12:01:03.000Z
2021-09-15T15:29:50.000Z
ckan_cloud_operator/drivers/kubectl/driver.py
MuhammadIsmailShahzad/ckan-cloud-operator
35a4ca88c4908d81d1040a21fca8904e77c4cded
[ "MIT" ]
52
2019-09-09T14:22:41.000Z
2021-09-29T08:29:24.000Z
ckan_cloud_operator/drivers/kubectl/driver.py
MuhammadIsmailShahzad/ckan-cloud-operator
35a4ca88c4908d81d1040a21fca8904e77c4cded
[ "MIT" ]
8
2019-10-05T12:46:25.000Z
2021-09-15T15:13:05.000Z
from ckan_cloud_operator import kubectl def get(what, *args, required=True, namespace=None, get_cmd=None, **kwargs): return kubectl.get(what, *args, required=required, namespace=namespace, get_cmd=get_cmd, **kwargs)
37
102
0.765766
0
0
0
0
0
0
0
0
0
0
d51abf3de14a0e2363d262ce1c07a37057407501
2,121
py
Python
wafextras/lyx2tex.py
tjhunter/phd-thesis-tjhunter
8238e156b5dba9940bdda2a46cfffb62699f364d
[ "Apache-2.0" ]
1
2018-03-25T11:36:21.000Z
2018-03-25T11:36:21.000Z
wafextras/lyx2tex.py
tjhunter/phd-thesis-tjhunter
8238e156b5dba9940bdda2a46cfffb62699f364d
[ "Apache-2.0" ]
null
null
null
wafextras/lyx2tex.py
tjhunter/phd-thesis-tjhunter
8238e156b5dba9940bdda2a46cfffb62699f364d
[ "Apache-2.0" ]
null
null
null
""" Converts some lyx files to the latex format. Note: everything in the file is thrown away until a section or the workd "stopskip" is found. This way, all the preamble added by lyx is removed. """ from waflib import Logs from waflib import TaskGen,Task from waflib import Utils from waflib.Configure import conf def ...
31.191176
119
0.666195
163
0.076851
0
0
404
0.190476
0
0
591
0.278642
d51cc9225f7dcd43ef79699c1d6c59de3a5d91bf
492
py
Python
monero_glue/xmr/core/pycompat.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
20
2018-04-05T22:06:10.000Z
2021-09-18T10:43:44.000Z
monero_glue/xmr/core/pycompat.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
null
null
null
monero_glue/xmr/core/pycompat.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
5
2018-08-06T15:06:04.000Z
2021-07-16T01:58:43.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Dusan Klinec, ph4r05, 2018 import operator import sys # Useful for very coarse version differentiation. PY3 = sys.version_info[0] == 3 if PY3: indexbytes = operator.getitem intlist2bytes = bytes int2byte = operator.methodcaller("to_bytes", 1, "big")...
19.68
58
0.648374
0
0
0
0
0
0
0
0
147
0.29878
d51eac1b5ab841692ba733e2c183650a99fc9aed
2,324
py
Python
train.py
liaojh1998/RNW
412764400a4a555fb8245ab51047019429d1141f
[ "MIT" ]
null
null
null
train.py
liaojh1998/RNW
412764400a4a555fb8245ab51047019429d1141f
[ "MIT" ]
null
null
null
train.py
liaojh1998/RNW
412764400a4a555fb8245ab51047019429d1141f
[ "MIT" ]
null
null
null
import os.path as osp from argparse import ArgumentParser from mmcv import Config from pytorch_lightning import Trainer, seed_everything from pytorch_lightning.callbacks import ModelCheckpoint from torch.utils.data import DataLoader from datasets import build_dataset from models import MODELS import torch def parse...
30.578947
113
0.596816
0
0
0
0
0
0
0
0
360
0.154905
d51ec3243c5401e7f40b444326beab4b487e1f76
11,327
py
Python
Audio_record_and_classifier_framework/helpers.py
stanFurrer/Multimodal-solution-for-grasp-stability-prediction
b7d07a217e2a4846f3fe782fe7c3f4942f3299b3
[ "MIT" ]
null
null
null
Audio_record_and_classifier_framework/helpers.py
stanFurrer/Multimodal-solution-for-grasp-stability-prediction
b7d07a217e2a4846f3fe782fe7c3f4942f3299b3
[ "MIT" ]
null
null
null
Audio_record_and_classifier_framework/helpers.py
stanFurrer/Multimodal-solution-for-grasp-stability-prediction
b7d07a217e2a4846f3fe782fe7c3f4942f3299b3
[ "MIT" ]
null
null
null
""" This Script contain the different function used in the framework part1. Data processing part2. Prediction and analisys part3. Plotting """ import numpy as np import librosa import matplotlib.pyplot as plt from sklearn import metrics import os import pickle import time import struct """ Data processing """ def g...
33.71131
116
0.611636
0
0
0
0
0
0
0
0
2,627
0.231924
d51ed2677db13fc8507ae2a63e4d95395e17a141
15,067
py
Python
pdfimage/jb2.py
MatthewDaws/PDFImage
c5bcdbc324a28271fb9fa006989270ef0d1ea0d5
[ "MIT" ]
3
2019-06-11T14:12:15.000Z
2022-02-17T10:57:20.000Z
pdfimage/jb2.py
MatthewDaws/PDFImage
c5bcdbc324a28271fb9fa006989270ef0d1ea0d5
[ "MIT" ]
null
null
null
pdfimage/jb2.py
MatthewDaws/PDFImage
c5bcdbc324a28271fb9fa006989270ef0d1ea0d5
[ "MIT" ]
null
null
null
""" jb2.py ~~~~~~ Use JBIG2, and an external compressor, for black and white images. """ import os, sys, subprocess, struct, zipfile, random from . import pdf_image from . import pdf_write from . import pdf import PIL.Image as _PILImage _default_jbig2_exe = os.path.join(os.path.abspath(".."), "agl-jbig2enc", "jbig2....
37.387097
113
0.605761
14,711
0.976372
0
0
1,006
0.066768
0
0
3,769
0.250149
d52024545b971d12235af9a15abe55f96fe6aa8a
1,581
py
Python
python/mpopt/ct/cmdline/jug.py
vislearn/libmpopt
11c9e99bedc7fb5dd2e11bff69c60d4ce974f525
[ "MIT" ]
1
2021-03-23T06:45:42.000Z
2021-03-23T06:45:42.000Z
python/mpopt/ct/cmdline/jug.py
vislearn/libmpopt
11c9e99bedc7fb5dd2e11bff69c60d4ce974f525
[ "MIT" ]
1
2022-01-18T03:17:09.000Z
2022-01-18T03:17:09.000Z
python/mpopt/ct/cmdline/jug.py
vislearn/libmpopt
11c9e99bedc7fb5dd2e11bff69c60d4ce974f525
[ "MIT" ]
2
2021-03-03T14:01:52.000Z
2022-01-18T02:45:55.000Z
#!/usr/bin/env python3 import argparse import sys from mpopt import ct, utils if __name__ == '__main__': parser = argparse.ArgumentParser(prog='ct_jug', description='Optimizer for *.jug cell tracking models.') parser.add_argument('-B', '--batch-size', type=int, default=ct.DEFAULT_BATCH_SIZE) parser.add_...
37.642857
114
0.667932
0
0
0
0
0
0
0
0
320
0.202404
d520c0da5ba138e741aa09521a01f1f65620aa03
1,436
py
Python
setup.py
CybercentreCanada/assemblyline-v4-p2compat
96aa268f672f8d226eb9f4234d2e97c1a39b7b66
[ "MIT" ]
null
null
null
setup.py
CybercentreCanada/assemblyline-v4-p2compat
96aa268f672f8d226eb9f4234d2e97c1a39b7b66
[ "MIT" ]
1
2020-09-09T13:26:52.000Z
2020-09-09T13:26:52.000Z
setup.py
CybercentreCanada/assemblyline-v4-p2compat
96aa268f672f8d226eb9f4234d2e97c1a39b7b66
[ "MIT" ]
2
2020-09-08T16:59:57.000Z
2020-09-09T12:08:07.000Z
import os from setuptools import setup, find_packages # For development and local builds use this version number, but for real builds replace it # with the tag found in the environment package_version = "4.0.0.dev0" if 'BITBUCKET_TAG' in os.environ: package_version = os.environ['BITBUCKET_TAG'].lstrip('v') elif '...
34.190476
95
0.685237
0
0
0
0
0
0
0
0
811
0.564763
d5220e82bf5048293d79285d2100fa6124ce5c82
695
py
Python
Arrays and Strings/LongestSubstringWithoutRepeating.py
dileeppandey/hello-interview
78f6cf4e2da4106fd07f4bd86247026396075c69
[ "MIT" ]
null
null
null
Arrays and Strings/LongestSubstringWithoutRepeating.py
dileeppandey/hello-interview
78f6cf4e2da4106fd07f4bd86247026396075c69
[ "MIT" ]
null
null
null
Arrays and Strings/LongestSubstringWithoutRepeating.py
dileeppandey/hello-interview
78f6cf4e2da4106fd07f4bd86247026396075c69
[ "MIT" ]
1
2020-02-12T16:57:46.000Z
2020-02-12T16:57:46.000Z
""" https://leetcode.com/problems/longest-substring-without-repeating-characters/ Given a string, find the length of the longest substring without repeating characters. """ class Solution: def lengthOfLongestSubstring(self, s): longest = 0 longest_substr = "" for ch in s: if...
27.8
86
0.630216
456
0.656115
0
0
0
0
0
0
187
0.269065
d522a2438ec803dddc6ee2c08ebc2b5bae1d14b5
388
py
Python
core/src/trezor/messages/TxAck.py
Kayuii/trezor-crypto
6556616681a4e2d7e18817e8692d4f6e041dee01
[ "MIT" ]
null
null
null
core/src/trezor/messages/TxAck.py
Kayuii/trezor-crypto
6556616681a4e2d7e18817e8692d4f6e041dee01
[ "MIT" ]
1
2019-02-08T00:22:42.000Z
2019-02-13T09:41:54.000Z
core/src/trezor/messages/TxAck.py
Kayuii/trezor-crypto
6556616681a4e2d7e18817e8692d4f6e041dee01
[ "MIT" ]
2
2019-02-07T23:57:09.000Z
2020-10-21T07:07:27.000Z
# Automatically generated by pb2py # fmt: off import protobuf as p from .TransactionType import TransactionType class TxAck(p.MessageType): MESSAGE_WIRE_TYPE = 22 def __init__( self, tx: TransactionType = None, ) -> None: self.tx = tx @classmethod def get_fields(cls): ...
17.636364
44
0.600515
272
0.701031
0
0
107
0.275773
0
0
48
0.123711
d52368f2b3c16c6294cb4e60b4f69e820a0d92d4
12,476
py
Python
balrog/__main__.py
samhorsfield96/ggCaller
01a32b85e3221e9e3d3552095c439dfc89cd70b6
[ "MIT" ]
15
2020-08-26T10:31:37.000Z
2022-03-03T15:42:04.000Z
balrog/__main__.py
samhorsfield96/ggCaller
01a32b85e3221e9e3d3552095c439dfc89cd70b6
[ "MIT" ]
null
null
null
balrog/__main__.py
samhorsfield96/ggCaller
01a32b85e3221e9e3d3552095c439dfc89cd70b6
[ "MIT" ]
null
null
null
import os import tarfile import time import pickle import numpy as np from Bio.Seq import Seq from scipy.special import expit from scipy.special import logit import torch import torch.nn.functional as F """ Get directories for model and seengenes """ module_dir = os.path.dirname(os.path.realpath(__file__)) model_dir ...
32.321244
106
0.605162
0
0
0
0
0
0
0
0
2,609
0.209122
d52452bbbdfe7f2a5739d5992e91cfe848ffbc23
154
py
Python
toal/annotators/AbstractAnnotator.py
Bhaskers-Blu-Org1/text-oriented-active-learning
facfb40673a59e43391b7bdb508e612dff1988d9
[ "MIT" ]
4
2020-10-23T14:42:30.000Z
2021-06-10T13:29:04.000Z
toal/annotators/AbstractAnnotator.py
Bhaskers-Blu-Org1/text-oriented-active-learning
facfb40673a59e43391b7bdb508e612dff1988d9
[ "MIT" ]
null
null
null
toal/annotators/AbstractAnnotator.py
Bhaskers-Blu-Org1/text-oriented-active-learning
facfb40673a59e43391b7bdb508e612dff1988d9
[ "MIT" ]
1
2020-07-30T10:35:09.000Z
2020-07-30T10:35:09.000Z
import abc class AbstractAnnotator(abc.ABC): @abc.abstractmethod def annotate(self, unlab_index, unlabeled): raise NotImplementedError()
22
47
0.733766
142
0.922078
0
0
103
0.668831
0
0
0
0
d52485559a1125bc8acdb1957ce05811a8034901
1,046
py
Python
code/HHV2020_07/Adafruit_Trinket_Neopixel_Strip_Cycle/main.py
gowenrw/BSidesDFW_2020_HHV
accfe2d4ba91f8899c3d4dca75c13c220e224960
[ "MIT" ]
null
null
null
code/HHV2020_07/Adafruit_Trinket_Neopixel_Strip_Cycle/main.py
gowenrw/BSidesDFW_2020_HHV
accfe2d4ba91f8899c3d4dca75c13c220e224960
[ "MIT" ]
null
null
null
code/HHV2020_07/Adafruit_Trinket_Neopixel_Strip_Cycle/main.py
gowenrw/BSidesDFW_2020_HHV
accfe2d4ba91f8899c3d4dca75c13c220e224960
[ "MIT" ]
null
null
null
import board, time import neopixel # Define Neopixels LED7_PIN = board.D0 # pin that the NeoPixel is connected to # Most Neopixels have a color order of GRB or GRBW some use RGB LED7_ORDER = neopixel.GRB # pixel color channel order # Create NeoPixel object LED6 = neopixel.NeoPixel(board.D1, 1, pixel_order=neopixel.R...
29.055556
63
0.614723
0
0
0
0
0
0
0
0
318
0.304015
d52c443ce49f74f8bcfed2e21fe8f2f3f85e5084
263
py
Python
abc/abc163/abc163c-1.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
1
2019-08-21T00:49:34.000Z
2019-08-21T00:49:34.000Z
abc/abc163/abc163c-1.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
abc/abc163/abc163c-1.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
N = int(input()) A = list(map(int, input().split())) d = {} for i in range(N - 1): if A[i] in d: d[A[i]].append(i + 2) else: d[A[i]] = [i + 2] for i in range(1, N + 1): if i in d: print(len(d[i])) else: print(0)
15.470588
35
0.422053
0
0
0
0
0
0
0
0
0
0