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
bd4f544d8896cf4cc8569ba0288541ed6799028b
6,058
py
Python
gameRL/game_simulators/blackjack.py
dwraft/gameRL
518b2a2d193220f7334584ccde5cf2ab318d718a
[ "MIT" ]
null
null
null
gameRL/game_simulators/blackjack.py
dwraft/gameRL
518b2a2d193220f7334584ccde5cf2ab318d718a
[ "MIT" ]
null
null
null
gameRL/game_simulators/blackjack.py
dwraft/gameRL
518b2a2d193220f7334584ccde5cf2ab318d718a
[ "MIT" ]
null
null
null
""" Modeled largely after https://github.com/openai/gym/blob/master/gym/envs/toy_text/blackjack.py Also, the github version draws with replacement, while I modified to not use replacement Also, reference here for how to play blackjack """ from typing import Dict, List, Tuple import gym import numpy as np from gym imp...
31.884211
88
0.610432
5,603
0.924893
0
0
71
0.01172
0
0
1,306
0.215583
bd503a6e6bd6d6f165fffc6aa8ef728aa475b171
228
py
Python
dragn/dice/__init__.py
hugovk/dragn
8e6e3146c3a5980a384f4be5dc7019c10ab0bffe
[ "MIT" ]
null
null
null
dragn/dice/__init__.py
hugovk/dragn
8e6e3146c3a5980a384f4be5dc7019c10ab0bffe
[ "MIT" ]
null
null
null
dragn/dice/__init__.py
hugovk/dragn
8e6e3146c3a5980a384f4be5dc7019c10ab0bffe
[ "MIT" ]
null
null
null
from functools import partial from dragn.dice.die_and_roller import roller D4 = partial(roller, 4) D6 = partial(roller, 6) D8 = partial(roller, 8) D10 = partial(roller, 10) D12 = partial(roller, 12) D20 = partial(roller, 20)
19
44
0.732456
0
0
0
0
0
0
0
0
0
0
bd50555970de3cea2bfe20e4fa5b5203c2dc67c1
472
py
Python
setup.py
steinnes/apnscli
3573fb835fe71dcec1c1611eed8c5b73347f0157
[ "MIT" ]
2
2015-08-13T18:29:45.000Z
2021-08-12T03:31:58.000Z
setup.py
steinnes/apnscli
3573fb835fe71dcec1c1611eed8c5b73347f0157
[ "MIT" ]
null
null
null
setup.py
steinnes/apnscli
3573fb835fe71dcec1c1611eed8c5b73347f0157
[ "MIT" ]
null
null
null
from setuptools import setup from pip.req import parse_requirements from pip.download import PipSession setup( name='apnsend', version='0.1', description='apnsend is a tool to test your APNS certificate, key and token.', py_modules=['apnsend'], install_requires=[ str(req.req) for req in par...
26.222222
92
0.680085
0
0
0
0
0
0
0
0
172
0.364407
bd5085ad69142965ca0cc325bce4a8b98430c865
7,159
py
Python
down2earth/core/client.py
intenvy/down-to-earth
3d15366a47fe81ee895ba38c7f90a714b18a6c08
[ "MIT" ]
null
null
null
down2earth/core/client.py
intenvy/down-to-earth
3d15366a47fe81ee895ba38c7f90a714b18a6c08
[ "MIT" ]
null
null
null
down2earth/core/client.py
intenvy/down-to-earth
3d15366a47fe81ee895ba38c7f90a714b18a6c08
[ "MIT" ]
null
null
null
import json from abc import ABC, abstractmethod from typing import Optional from aiohttp import ClientResponse as Response from .mechanisms.fetch import IFetchMechanism from .models.request import IRestRequest from ..errors.fetching_errors import FetchMechanismFailed from ..utils.logging_utils import IMonitorLogger, ...
33.297674
107
0.624808
1,840
0.257019
0
0
251
0.035061
949
0.13256
4,641
0.648275
bd55c1befc97ceb37b6df37eb99994c9d21b2ba9
773
py
Python
python/206.reverse-linked-list.py
Wanger-SJTU/leetcode-solutions
eb7f2fb142b8a30d987c5ac8002a96ead0aa56f4
[ "MIT" ]
2
2019-05-13T17:09:15.000Z
2019-09-08T15:32:42.000Z
python/206.reverse-linked-list.py
Wanger-SJTU/leetcode
eb7f2fb142b8a30d987c5ac8002a96ead0aa56f4
[ "MIT" ]
null
null
null
python/206.reverse-linked-list.py
Wanger-SJTU/leetcode
eb7f2fb142b8a30d987c5ac8002a96ead0aa56f4
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=206 lang=python3 # # [206] Reverse Linked List # # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def reverseList(self, head: ListNode) -> ListNode: def iterative(head): ...
23.424242
54
0.500647
563
0.728331
0
0
0
0
0
0
197
0.254851
1f9c7aa01ba17d2af64bca27a27081040ab187d0
2,521
py
Python
tests/default_tags.py
GrAndSE/lighty-template
63834fbb2421506205745bb596ff8ac726361f2a
[ "BSD-3-Clause" ]
1
2018-05-09T19:56:15.000Z
2018-05-09T19:56:15.000Z
tests/default_tags.py
GrAndSE/lighty-template
63834fbb2421506205745bb596ff8ac726361f2a
[ "BSD-3-Clause" ]
null
null
null
tests/default_tags.py
GrAndSE/lighty-template
63834fbb2421506205745bb596ff8ac726361f2a
[ "BSD-3-Clause" ]
null
null
null
'''Module to test default template tags such as if, for, with, include, etc. ''' import unittest from lighty.templates import Template from lighty.templates.loaders import FSLoader class DefaultTagsTestCase(unittest.TestCase): """Test case for if template tag """ def assertResult(self, name, result, val...
36.536232
79
0.568029
1,987
0.788179
0
0
0
0
0
0
880
0.349068
1f9c9104d3d243f4e10cfdbb1fb0326c74424885
3,038
py
Python
tests/test_calibration.py
SoyGema/NannyML
323ff404e0e06c479b01d2a63c1c3af9680d95ab
[ "Apache-2.0" ]
null
null
null
tests/test_calibration.py
SoyGema/NannyML
323ff404e0e06c479b01d2a63c1c3af9680d95ab
[ "Apache-2.0" ]
null
null
null
tests/test_calibration.py
SoyGema/NannyML
323ff404e0e06c479b01d2a63c1c3af9680d95ab
[ "Apache-2.0" ]
null
null
null
# Author: Niels Nuyttens <niels@nannyml.com> # # License: Apache Software License 2.0 """Unit tests for the calibration module.""" import numpy as np import pandas as pd import pytest from nannyml.calibration import IsotonicCalibrator, _get_bin_index_edges, needs_calibration from nannyml.exceptions import Invali...
41.616438
104
0.71264
0
0
0
0
725
0.238644
0
0
336
0.110599
1f9d448358740aaa0c055882926c57c97ff59db8
3,962
py
Python
code/utils.py
liudaizong/IA-Net
f19295d13d1468eb582521131cde3de83dfd18f6
[ "MIT" ]
4
2021-11-02T10:57:12.000Z
2022-02-13T17:53:03.000Z
code/utils.py
liudaizong/IA-Net
f19295d13d1468eb582521131cde3de83dfd18f6
[ "MIT" ]
null
null
null
code/utils.py
liudaizong/IA-Net
f19295d13d1468eb582521131cde3de83dfd18f6
[ "MIT" ]
null
null
null
import copy import nltk import json from gensim.models import KeyedVectors import h5py import numpy as np from torch import nn def clones(module, N): return nn.ModuleList([copy.deepcopy(module) for _ in range(N)]) def load_feature(filename, dataset='ActivityNet'): if dataset == 'ActivityNet': with ...
25.397436
73
0.579253
1,746
0.440687
0
0
222
0.056032
0
0
447
0.112822
1f9e4501c0a3ac77cc15f6de9e5e460d7fd997df
2,654
py
Python
aps_purchasing/tests/forms_tests.py
bitmazk/django-aps-purchasing
ff0316f0eaff5bd39ae40aaa861543d125f33dae
[ "MIT" ]
4
2015-05-18T13:51:16.000Z
2015-05-18T14:47:32.000Z
aps_purchasing/tests/forms_tests.py
bitmazk/django-aps-purchasing
ff0316f0eaff5bd39ae40aaa861543d125f33dae
[ "MIT" ]
null
null
null
aps_purchasing/tests/forms_tests.py
bitmazk/django-aps-purchasing
ff0316f0eaff5bd39ae40aaa861543d125f33dae
[ "MIT" ]
null
null
null
"""Tests for the forms of the ``aps_purchasing`` app.""" import os from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase from django.utils.timezone import now from ..forms import QuotationUploadForm from ..models import MPN, Price, Quotation, Q...
37.380282
79
0.629239
2,221
0.83685
0
0
0
0
0
0
742
0.279578
1f9eb8e2438d5e8851abb15909ddab5b70595c79
1,839
py
Python
test/test_read_embark_fields_json_file.py
ndlib/mellon-search
30f7eb267e35d77ee6d126789866d44d825c3e0c
[ "Apache-2.0" ]
null
null
null
test/test_read_embark_fields_json_file.py
ndlib/mellon-search
30f7eb267e35d77ee6d126789866d44d825c3e0c
[ "Apache-2.0" ]
null
null
null
test/test_read_embark_fields_json_file.py
ndlib/mellon-search
30f7eb267e35d77ee6d126789866d44d825c3e0c
[ "Apache-2.0" ]
null
null
null
# test_read_embark_fields_json_file.py 2/18/19 sm """ test read_embark_fields_json_file.py """ import json import unittest # add parent directory to path import os import inspect import sys CURRENTDIR = os.path.dirname(os.path.abspath(inspect.getfile( inspect.currentframe()))) PARENTDIR = os.path.dirname(CURRENTD...
32.839286
74
0.694943
1,244
0.676455
0
0
0
0
0
0
484
0.263187
1fa0d3c9b6fdeba10b20b2a6b065d708f3d43858
8,928
py
Python
menu/show_results.py
Jcollier722/PageRemoval
ec14cd3927bbb754883a6a3dcff312ba90cd45db
[ "Apache-2.0" ]
null
null
null
menu/show_results.py
Jcollier722/PageRemoval
ec14cd3927bbb754883a6a3dcff312ba90cd45db
[ "Apache-2.0" ]
null
null
null
menu/show_results.py
Jcollier722/PageRemoval
ec14cd3927bbb754883a6a3dcff312ba90cd45db
[ "Apache-2.0" ]
null
null
null
"""This file is the results window""" import sys sys.path.insert(0, 'menu/') sys.path.insert(1, 'util/') sys.path.insert(2, 'sim/') import tkinter as tk import menu import import_jobs as ij import validate_jobs as validate import show_results as sr import export_results as xr import compare_sim import con...
46.020619
172
0.635529
0
0
0
0
0
0
0
0
1,841
0.206205
1fa185f55ac389ddda6ff7507b5d50529d297d77
539
py
Python
index.py
eddowh/flask-react-gae-multiuser-blog
7979567455936d32ba55c6edf0df82c4670754ef
[ "Unlicense" ]
1
2016-10-25T10:12:58.000Z
2016-10-25T10:12:58.000Z
index.py
eddowh/flask-react-gae-multiuser-blog
7979567455936d32ba55c6edf0df82c4670754ef
[ "Unlicense" ]
null
null
null
index.py
eddowh/flask-react-gae-multiuser-blog
7979567455936d32ba55c6edf0df82c4670754ef
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- from importlib import import_module import os import sys BASE_PATH = os.path.dirname(os.path.abspath(__file__)) APP_NAME = 'server' SYS_DIRS = [ 'lib', ] # add directories to sys path for dir in SYS_DIRS + [APP_NAME]: sys.path.insert(1, os.path.join(BASE_PATH, dir)) # register flas...
21.56
55
0.742115
0
0
0
0
0
0
0
0
156
0.289425
1fa2167771953e0aff81f31c29233d456380649d
67
py
Python
latex/slides/resources/01_getting_started/present_main.py
AntonObersteiner/python-lessons
1d5536f0777853fba437566672cfb1d613984945
[ "CC-BY-4.0" ]
null
null
null
latex/slides/resources/01_getting_started/present_main.py
AntonObersteiner/python-lessons
1d5536f0777853fba437566672cfb1d613984945
[ "CC-BY-4.0" ]
null
null
null
latex/slides/resources/01_getting_started/present_main.py
AntonObersteiner/python-lessons
1d5536f0777853fba437566672cfb1d613984945
[ "CC-BY-4.0" ]
null
null
null
print(present("Py-Kurs", "am Di in der 5.", "dem FSR-Kurssystem"))
33.5
66
0.656716
0
0
0
0
0
0
0
0
46
0.686567
1fa40e3d5ffd5031f4b30a989255c4474dd77b5f
9,440
py
Python
POP909-Dataset-master/data_process/processor.py
agurdins/RTU_Bachelor
28ed4bf90a8ffdb2b599e549bae5f2b12a795ff1
[ "Apache-2.0" ]
140
2020-08-06T12:15:56.000Z
2022-03-26T11:02:36.000Z
POP909-Dataset-master/data_process/processor.py
agurdins/RTU_Bachelor
28ed4bf90a8ffdb2b599e549bae5f2b12a795ff1
[ "Apache-2.0" ]
5
2020-08-18T08:29:46.000Z
2021-09-25T16:56:49.000Z
POP909-Dataset-master/data_process/processor.py
agurdins/RTU_Bachelor
28ed4bf90a8ffdb2b599e549bae5f2b12a795ff1
[ "Apache-2.0" ]
18
2020-09-21T07:13:44.000Z
2022-03-19T14:30:09.000Z
""" Representation Processor ============ These are core classes of representation processor. Repr Processor: the basic representation processor - Event Processor """ import numpy as np from abc import ABC, abstractmethod import pretty_midi as pyd class ReprProcessor(ABC): """Abstract base class severing as...
30.550162
126
0.500953
9,177
0.97214
0
0
612
0.064831
0
0
4,065
0.430614
1fa55ad9cf461decaa935b9ad2c9830d3dd93f16
5,521
py
Python
tests/test_products.py
lukeshiner/ccp_api
5bd8a075108df4983b62197ea950e14297f5ad19
[ "MIT" ]
null
null
null
tests/test_products.py
lukeshiner/ccp_api
5bd8a075108df4983b62197ea950e14297f5ad19
[ "MIT" ]
null
null
null
tests/test_products.py
lukeshiner/ccp_api
5bd8a075108df4983b62197ea950e14297f5ad19
[ "MIT" ]
null
null
null
import ccp_api import pytest from .test_ccp_api import Base_ccp_api_Test class TestProducts(Base_ccp_api_Test): @pytest.fixture def products_wsdl(self, file_fixture): return file_fixture("products", "wsdl.xml") @pytest.fixture def product_by_ID_response(self, file_fixture): return fi...
40.007246
85
0.768339
5,426
0.982793
0
0
1,656
0.299946
0
0
730
0.132222
1fa567e6eb55b654152cc249c03df4836f9c4a5f
340
py
Python
restart/TokenyjcL/Float.py
yujiecong/yjcL
6d6dc4ad3611cb34c07192a1a3038a1ac3f67d6c
[ "MIT" ]
null
null
null
restart/TokenyjcL/Float.py
yujiecong/yjcL
6d6dc4ad3611cb34c07192a1a3038a1ac3f67d6c
[ "MIT" ]
null
null
null
restart/TokenyjcL/Float.py
yujiecong/yjcL
6d6dc4ad3611cb34c07192a1a3038a1ac3f67d6c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' @IDE :PyCharm @Project :yjcL @USER :yanyin @File :Float.py @Author :yujiecong @Date :2021/9/1 16:19 ''' from restart.TokenyjcL.Token import Token_yjcL class Float_yjcL(Token_yjcL): def __init__(self,valueDict): super(Float_yjcL, self)...
21.25
51
0.652941
115
0.338235
0
0
0
0
0
0
173
0.508824
1fa5b81e8ddb69f6e5c8f48345327239689cae22
19,461
py
Python
xtb_trading.py
lemassykoi/XTBApi
3b159f0b711e0d445a9cd7fec5c7a499cc623140
[ "MIT" ]
null
null
null
xtb_trading.py
lemassykoi/XTBApi
3b159f0b711e0d445a9cd7fec5c7a499cc623140
[ "MIT" ]
null
null
null
xtb_trading.py
lemassykoi/XTBApi
3b159f0b711e0d445a9cd7fec5c7a499cc623140
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # adaptation du script FXCM pour XTB ## debug = 1 ## DEBUG ENABLED OR DISABLED from XTBApi.api import * import time import pandas as pd import datetime as dt import talib.abstract as ta ## Maths modules import pyti.bollinger_bands as bb from pyti.relative_strength_index import rela...
40.459459
152
0.590874
1,798
0.09239
0
0
0
0
0
0
7,124
0.366065
1fa915f1d01ae50c5c5d775a6b404ccefbb0a1db
23,609
py
Python
datanode/src/storage_interface.py
airmap/InterUSS-Platform
fa19af360826b4dd7b841013c0c569a4f282919d
[ "Apache-2.0" ]
null
null
null
datanode/src/storage_interface.py
airmap/InterUSS-Platform
fa19af360826b4dd7b841013c0c569a4f282919d
[ "Apache-2.0" ]
1
2021-03-26T12:13:17.000Z
2021-03-26T12:13:17.000Z
datanode/src/storage_interface.py
isabella232/InterUSS-Platform
fa19af360826b4dd7b841013c0c569a4f282919d
[ "Apache-2.0" ]
2
2019-08-11T20:20:32.000Z
2021-03-26T12:01:43.000Z
"""The InterUSS Platform Data Node storage API server. This flexible and distributed system is used to connect multiple USSs operating in the same general area to share safety information while protecting the privacy of USSs, businesses, operator and consumers. The system is focused on facilitating communication among...
38.264182
80
0.656275
21,020
0.890338
0
0
336
0.014232
0
0
12,793
0.54187
1fa9bd99cc0cefda66b99c89d32eb998269a611a
32,069
py
Python
snape/flicker.py
SuryaThiru/snape
3402af05ad2ccba958888befa5177a4850adbf7f
[ "Apache-2.0" ]
182
2016-12-14T21:09:42.000Z
2022-03-04T03:39:46.000Z
snape/flicker.py
SuryaThiru/snape
3402af05ad2ccba958888befa5177a4850adbf7f
[ "Apache-2.0" ]
15
2016-12-06T18:37:08.000Z
2020-07-31T17:30:00.000Z
core/flicker.py
slizb/iglu
888ec9009431b50a47fe009f8ac13638b6547745
[ "Apache-2.0" ]
30
2017-01-19T19:24:37.000Z
2021-12-06T10:23:04.000Z
junk_image1 = b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x01\xf4\x00\x00\x01v\x08\x00\x00\x00\x00\xbd\xc55\x85\x00\x00\x07\xcaIDATx\x01\xec\xd9m\xeb\xd2P\x1c\xc6\xf1\xff\xfb\x7f)g\xe1)oB\x0ef\x92\xe2\xcd\n\x94\xac\xa8\x19Ef\xa93l\xd8\xb4:n\xfe\xba\xda\xa6\xab\xe7\xff\'\x1e\xaf/x\xcdm\x0f?0\x06\xbb\xdb\xb2\x9b\xebn+...
8,017.25
26,043
0.732234
0
0
0
0
0
0
0
0
32,038
0.999033
1faa1a1b78082931266633b4320d81cdfa0d54a0
1,342
py
Python
python/repeated_substring_pattern.py
shub0/leetcode
8221d10f201d001abcb15b27c9cf4b8cd5060f1f
[ "BSD-3-Clause" ]
null
null
null
python/repeated_substring_pattern.py
shub0/leetcode
8221d10f201d001abcb15b27c9cf4b8cd5060f1f
[ "BSD-3-Clause" ]
null
null
null
python/repeated_substring_pattern.py
shub0/leetcode
8221d10f201d001abcb15b27c9cf4b8cd5060f1f
[ "BSD-3-Clause" ]
null
null
null
''' Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You may assume the given string consists of lowercase English letters only and its length will not exceed 10000. Example 1: Input: "abab" Output: True Explanation: It's the...
26.84
253
0.655738
598
0.445604
0
0
0
0
0
0
607
0.45231
1faa329bdcdfd3ec7bf7b728a50094b19a036130
162
py
Python
all_auto_test/users/views.py
Evading77/all_auto_testing_eva
81fe4732a686327084701be1ef9cf5850e7d78d8
[ "MIT" ]
null
null
null
all_auto_test/users/views.py
Evading77/all_auto_testing_eva
81fe4732a686327084701be1ef9cf5850e7d78d8
[ "MIT" ]
null
null
null
all_auto_test/users/views.py
Evading77/all_auto_testing_eva
81fe4732a686327084701be1ef9cf5850e7d78d8
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.views import View class LoginView(View): def get(self,request): return render(request,'login.html')
20.25
43
0.734568
93
0.574074
0
0
0
0
0
0
12
0.074074
1fac74b876540807e88381140691e44fb1871829
6,417
py
Python
src/webinterface.py
Wassasin/vrijbrief
de081395c651e73a436662bfe09f4542e0ca27c7
[ "MIT" ]
null
null
null
src/webinterface.py
Wassasin/vrijbrief
de081395c651e73a436662bfe09f4542e0ca27c7
[ "MIT" ]
1
2015-02-07T23:36:13.000Z
2015-02-07T23:36:13.000Z
src/webinterface.py
Wassasin/vrijbrief
de081395c651e73a436662bfe09f4542e0ca27c7
[ "MIT" ]
2
2015-02-07T20:01:18.000Z
2021-05-13T13:21:11.000Z
import browser import re import datetime from bs4 import BeautifulSoup, NavigableString RX_OCCUPATION = re.compile(r"([0-9]+)/([0-9]+)") RX_TIME = re.compile(r"([0-9]{2}:[0-9]{2})-([0-9]{2}:[0-9]{2})") RX_FULLDATE = re.compile(r"[a-z]{2} ([0-9]{2}) ([a-z]{3}) ([0-9]{4})") MONTHS = ["jan", "feb", "maa", "apr", "mei"...
38.196429
158
0.555244
6,041
0.941406
3,140
0.489325
0
0
0
0
1,566
0.244039
1fb09b5991e8d87644d6f495740d136659baa06e
10,805
py
Python
scar_core/scripts/icp.py
yycho0108/SSAM
8b93f84cb162e475231e1de29360e6c6f1632363
[ "MIT" ]
null
null
null
scar_core/scripts/icp.py
yycho0108/SSAM
8b93f84cb162e475231e1de29360e6c6f1632363
[ "MIT" ]
null
null
null
scar_core/scripts/icp.py
yycho0108/SSAM
8b93f84cb162e475231e1de29360e6c6f1632363
[ "MIT" ]
null
null
null
import numpy as np from sklearn.neighbors import NearestNeighbors import cv2 def estimate_normals(p, k=20): neigh = NearestNeighbors(n_neighbors=k) neigh.fit(p) distances, indices = neigh.kneighbors(return_distance=True) dp = (p[indices] - p[:,None]) U, s, V = np.linalg.svd(dp.transpose(0,2,1)) ...
31.686217
117
0.544563
6,945
0.642758
0
0
6,866
0.635447
0
0
4,551
0.421194
1fb0d351102592159ee6a917dd248009cd700533
20,393
py
Python
sdk/python/pulumi_newrelic/api_access_key.py
bob-bins/pulumi-newrelic
f8a121fb7d6e6ad979d3ccf72467b9e89769e305
[ "ECL-2.0", "Apache-2.0" ]
6
2019-09-17T20:41:26.000Z
2022-01-13T23:54:14.000Z
sdk/python/pulumi_newrelic/api_access_key.py
bob-bins/pulumi-newrelic
f8a121fb7d6e6ad979d3ccf72467b9e89769e305
[ "ECL-2.0", "Apache-2.0" ]
136
2019-04-29T21:34:57.000Z
2022-03-30T17:07:03.000Z
sdk/python/pulumi_newrelic/api_access_key.py
bob-bins/pulumi-newrelic
f8a121fb7d6e6ad979d3ccf72467b9e89769e305
[ "ECL-2.0", "Apache-2.0" ]
3
2019-10-05T10:33:59.000Z
2021-06-15T16:37:49.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
42.574113
201
0.630903
19,967
0.97911
0
0
17,617
0.863875
0
0
10,456
0.512725
1fb15d8fc5f2340ec039cd29cb846d5d8253d9c0
9,501
py
Python
scormxblock/scormxblock.py
Pearson-Advance/edx_xblock_scorm
eff4f18963424ac090662e03040dc8f003770cd3
[ "Apache-2.0" ]
null
null
null
scormxblock/scormxblock.py
Pearson-Advance/edx_xblock_scorm
eff4f18963424ac090662e03040dc8f003770cd3
[ "Apache-2.0" ]
1
2020-10-27T20:04:30.000Z
2020-10-27T20:04:30.000Z
scormxblock/scormxblock.py
Pearson-Advance/edx_xblock_scorm
eff4f18963424ac090662e03040dc8f003770cd3
[ "Apache-2.0" ]
null
null
null
import json import re import os import pkg_resources import zipfile import shutil import xml.etree.ElementTree as ET from django.conf import settings from django.template import Context, Template from webob import Response from xblock.core import XBlock from xblock.fields import Scope, String, Float, Boolean, Dict fr...
35.059041
131
0.592674
9,076
0.955268
0
0
3,021
0.317967
0
0
1,990
0.209452
1fb35315892b484eea92d588c1ea5a815edbedc1
4,861
py
Python
src/core/modules/stt.py
pyVoice/pyVoice
62e42a5c6307df2dd2d74bcd20ca64fd81c58851
[ "MIT" ]
1
2020-12-12T12:06:12.000Z
2020-12-12T12:06:12.000Z
src/core/modules/stt.py
pyVoice/pyVoice
62e42a5c6307df2dd2d74bcd20ca64fd81c58851
[ "MIT" ]
24
2021-02-08T19:44:44.000Z
2021-04-10T11:54:53.000Z
src/core/modules/stt.py
pyVoice/pyVoice
62e42a5c6307df2dd2d74bcd20ca64fd81c58851
[ "MIT" ]
null
null
null
""" **Speech to Text (STT) engine** Converts the user speech (audio) into text. """ import threading import traceback import speech_recognition as sr from src import settings from src.core.modules import log, tts, replying def setup() -> None: """ Initializes the STT engine Steps: 1. Creates a...
27.619318
102
0.632174
0
0
0
0
0
0
0
0
2,218
0.456285
1fb417062e3b9b19b6daba41e40d879e942a6790
203
py
Python
px511-2021/code/qrCode/TestQrCode.py
Relex12/Decentralized-Password-Manager
0b861a310131782003a469d9c436e04e5bb05420
[ "MIT" ]
null
null
null
px511-2021/code/qrCode/TestQrCode.py
Relex12/Decentralized-Password-Manager
0b861a310131782003a469d9c436e04e5bb05420
[ "MIT" ]
null
null
null
px511-2021/code/qrCode/TestQrCode.py
Relex12/Decentralized-Password-Manager
0b861a310131782003a469d9c436e04e5bb05420
[ "MIT" ]
null
null
null
from QrCode import * # Sert pour tester sur un même pc à la fois la génération du QrCode et la lecture de celui ci if __name__ == '__main__': sync_other_device_QrCode() sync_this_device_QrCode()
33.833333
93
0.753695
0
0
0
0
0
0
0
0
107
0.516908
1fb4d55d5bca1b790eead271507bcc6a81cff6e7
7,289
py
Python
tests/test_api.py
brycecaine/sqlpt
98b2d72d5f59f92e95a9172dfb0dab92018076f9
[ "MIT" ]
null
null
null
tests/test_api.py
brycecaine/sqlpt
98b2d72d5f59f92e95a9172dfb0dab92018076f9
[ "MIT" ]
3
2021-12-27T21:53:11.000Z
2021-12-27T21:53:11.000Z
tests/test_api.py
brycecaine/sqlpt
98b2d72d5f59f92e95a9172dfb0dab92018076f9
[ "MIT" ]
null
null
null
import unittest import sqlparse from sqlparse import tokens as T from sqlparse.sql import (Identifier, Statement, Token, TokenList) from context import ( extract_from_clause, extract_where_clause, tokenize) # , fused) from context import ( Query, Join, Tabl...
30.755274
68
0.498697
6,867
0.942105
0
0
0
0
0
0
2,244
0.307861
1fb53f7f4bb36d6fa18b06b4d87e7b488b8f5de0
1,356
py
Python
src/phpcms/9.6.1/任意文件下载漏洞/download-exp.py
baidu-security/app-env-docker
794f4d23a4ff61e045108977119eb0e529bb0213
[ "Apache-2.0" ]
226
2018-02-17T07:18:12.000Z
2022-03-24T01:04:41.000Z
src/phpcms/9.6.1/任意文件下载漏洞/download-exp.py
baidu-security/app-env-docker
794f4d23a4ff61e045108977119eb0e529bb0213
[ "Apache-2.0" ]
7
2018-07-14T07:59:47.000Z
2021-05-07T06:30:54.000Z
src/phpcms/9.6.1/任意文件下载漏洞/download-exp.py
baidu-security/app-env-docker
794f4d23a4ff61e045108977119eb0e529bb0213
[ "Apache-2.0" ]
51
2018-04-20T15:39:06.000Z
2022-03-24T16:27:41.000Z
# coding: utf-8 ''' name: PHPCMS v9.6.1 任意文件下载 author: Anka9080 description: 过滤函数不严谨导致任意文件下载。 ''' import sys import requests import re def poc(target): print('第一次请求,获取 cookie_siteid ') url = target +'index.php?m=wap&c=index&a=init&siteid=1' s = requests.Session() r = s.get(url) cookie_siteid = r.h...
30.133333
175
0.634956
0
0
0
0
0
0
0
0
715
0.487057
1fb73cc1aa55107790f427e4e1e4f03476a6ace6
1,493
py
Python
packages/w3af/w3af/core/controllers/profiling/scan_log_analysis/data/errors.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
null
null
null
packages/w3af/w3af/core/controllers/profiling/scan_log_analysis/data/errors.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
null
null
null
packages/w3af/w3af/core/controllers/profiling/scan_log_analysis/data/errors.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
null
null
null
import re from utils.output import KeyValueOutput ERRORS_RE = [re.compile('Unhandled exception "(.*?)"'), re.compile('traceback', re.IGNORECASE), re.compile('w3af-crash'), re.compile('scan was able to continue by ignoring those'), re.compile('The scan will stop')] ...
25.305085
95
0.592096
0
0
0
0
0
0
0
0
471
0.315472
1fb8522ba4f170c8979ed698897c6d122c029720
196
py
Python
maximum_average_subarray_i.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
maximum_average_subarray_i.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
maximum_average_subarray_i.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
class MaximumAverageSubarrayI: """ https://leetcode-cn.com/problems/maximum-average-subarray-i/ """ def findMaxAverage(self, nums: List[int], k: int) -> float:
19.6
64
0.602041
185
0.943878
0
0
0
0
0
0
76
0.387755
1fb8c0338db15cdfd4d8333778bf52ca725b2f55
5,925
py
Python
__main__.py
Naruto0/fplyst
af5c30a5bbd91ace21c3c5305c8e202ba016ba09
[ "MIT" ]
null
null
null
__main__.py
Naruto0/fplyst
af5c30a5bbd91ace21c3c5305c8e202ba016ba09
[ "MIT" ]
3
2021-03-22T17:12:14.000Z
2021-12-13T19:39:39.000Z
__main__.py
Naruto0/fplyst
af5c30a5bbd91ace21c3c5305c8e202ba016ba09
[ "MIT" ]
null
null
null
#! /usr/bin/python3 # # Usage: # # path/to/script$ python3 __main__.py -c <config_file> # # Will create 'YYYY_MM_DD_STREAMNAME_PLAYLIST.txt' file # which will contain currently captured song # # HH:MM Interpret - Song Name # # To capture whole playlist you have to # make crontab scheldule or widows/mac equivalen...
25.320513
89
0.606076
0
0
0
0
0
0
0
0
2,118
0.357468
1fbb637cd9392b8a2ffe427325fa61c758a9f423
14,341
py
Python
1_ps4/ps4b.py
gyalpodongo/6.0001_psets
b2e12d572d3382921a073e6712a337f98ade7c4a
[ "MIT" ]
null
null
null
1_ps4/ps4b.py
gyalpodongo/6.0001_psets
b2e12d572d3382921a073e6712a337f98ade7c4a
[ "MIT" ]
null
null
null
1_ps4/ps4b.py
gyalpodongo/6.0001_psets
b2e12d572d3382921a073e6712a337f98ade7c4a
[ "MIT" ]
null
null
null
# Problem Set 4B # Name: Gyalpo Dongo # Collaborators: # Time Spent: 9:00 # Late Days Used: 1 import string ### HELPER CODE ### def load_words(file_name): ''' file_name (string): the name of the file containing the list of words to load Returns: a list of valid words. Words are strings ...
36.214646
98
0.619064
9,738
0.679032
0
0
0
0
0
0
8,498
0.592567
1fbe01d48c418a25dac0b1a8cdfdd4ff5a631b60
13,996
py
Python
tests/integration/cartography/intel/gcp/test_compute.py
sckevmit/cartography
fefb63b5ec97986dcc29038331d0e5b027b95d5f
[ "Apache-2.0" ]
2,322
2019-03-02T01:07:20.000Z
2022-03-31T20:39:12.000Z
tests/integration/cartography/intel/gcp/test_compute.py
sckevmit/cartography
fefb63b5ec97986dcc29038331d0e5b027b95d5f
[ "Apache-2.0" ]
462
2019-03-07T18:38:11.000Z
2022-03-31T14:55:20.000Z
tests/integration/cartography/intel/gcp/test_compute.py
sckevmit/cartography
fefb63b5ec97986dcc29038331d0e5b027b95d5f
[ "Apache-2.0" ]
246
2019-03-03T02:39:23.000Z
2022-02-24T09:46:38.000Z
import cartography.intel.gcp.compute import tests.data.gcp.compute TEST_UPDATE_TAG = 123456789 def _ensure_local_neo4j_has_test_instance_data(neo4j_session): cartography.intel.gcp.compute.load_gcp_instances( neo4j_session, tests.data.gcp.compute.TRANSFORMED_GCP_INSTANCES, TEST_UPDATE_TAG...
32.85446
118
0.627894
0
0
0
0
0
0
0
0
6,007
0.429194
1fc21aa494251b943ab4e4b535ca093a791a6af8
6,208
py
Python
gae/backend/services/slack/slack.py
jlapenna/bikebuds
6e2b54fa2e4fa03e5ff250ca779c269ccc49a2d8
[ "Apache-2.0" ]
9
2018-11-17T00:53:47.000Z
2021-03-16T05:18:01.000Z
gae/backend/services/slack/slack.py
jlapenna/bikebuds
6e2b54fa2e4fa03e5ff250ca779c269ccc49a2d8
[ "Apache-2.0" ]
8
2018-11-28T17:19:07.000Z
2022-02-26T17:46:09.000Z
gae/backend/services/slack/slack.py
jlapenna/bikebuds
6e2b54fa2e4fa03e5ff250ca779c269ccc49a2d8
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.846561
92
0.704897
0
0
0
0
557
0.089723
0
0
1,451
0.233731
1fc244ac9c29079630ffd294e5609b1a6c46e1ff
3,895
py
Python
ooobuild/lo/drawing/framework/tab_bar_button.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/drawing/framework/tab_bar_button.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/drawing/framework/tab_bar_button.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
33.869565
166
0.668293
2,997
0.769448
0
0
1,079
0.277022
0
0
2,246
0.576637
1fc419f20f21c00b2f7e26ead5cc3549a10d6b37
662
py
Python
decorator/mark_with_args.py
levs72/pyneng-examples
d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9
[ "MIT" ]
11
2021-04-05T09:30:23.000Z
2022-03-09T13:27:56.000Z
decorator/mark_with_args.py
levs72/pyneng-examples
d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9
[ "MIT" ]
null
null
null
decorator/mark_with_args.py
levs72/pyneng-examples
d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9
[ "MIT" ]
11
2021-04-06T03:44:35.000Z
2022-03-04T21:20:40.000Z
def mark(**kwargs): print(f"Получил аргументы {kwargs}") def decorator(func): print(f"добавляем атрибуты функции {kwargs}") for name, value in kwargs.items(): setattr(func, name, value) return func decorator.data = kwargs return decorator def mark_2(**kwargs_mark)...
24.518519
58
0.614804
0
0
0
0
0
0
0
0
224
0.301887
1fc41c98a94f4ecb65c5c9b1a3aac7dc614e2662
5,087
py
Python
shared/tools/snapshot/utils.py
DougMahoney/metatools
112340102962ff0c3e323564357cc4e848939cf7
[ "Apache-2.0" ]
12
2020-04-10T07:09:24.000Z
2022-03-04T09:22:40.000Z
shared/tools/snapshot/utils.py
DougMahoney/metatools
112340102962ff0c3e323564357cc4e848939cf7
[ "Apache-2.0" ]
5
2020-05-16T18:22:23.000Z
2022-03-29T13:19:27.000Z
shared/tools/snapshot/utils.py
DougMahoney/metatools
112340102962ff0c3e323564357cc4e848939cf7
[ "Apache-2.0" ]
2
2020-12-10T15:17:40.000Z
2021-12-02T17:34:56.000Z
""" Extraction utilities and supporting functions Some operations are used frequently or repeated enough to be factored out. Note that SQL can be used via the POORSQL_BINARY_PATH Download the binary from http://architectshack.com/PoorMansTSqlFormatter.ashx It's a phenominal utility that brilliantly normaliz...
25.691919
94
0.716139
0
0
0
0
0
0
0
0
1,660
0.326322
1fc6fa21c4051a53146d8cf76b830b672309eed5
12,203
py
Python
HTGTSrep/HTGTSrep/junctionsPerLibs.py
Yyx2626/HTGTSrep
d8716304b555a7b9161e5f2ce988ebfd17abc9f0
[ "MIT" ]
2
2020-05-08T05:12:37.000Z
2022-03-28T02:53:03.000Z
HTGTSrep/HTGTSrep/junctionsPerLibs.py
Yyx2626/HTGTSrep
d8716304b555a7b9161e5f2ce988ebfd17abc9f0
[ "MIT" ]
1
2020-03-05T04:08:39.000Z
2021-08-11T15:02:37.000Z
HTGTSrep/HTGTSrep/junctionsPerLibs.py
Yyx2626/HTGTSrep
d8716304b555a7b9161e5f2ce988ebfd17abc9f0
[ "MIT" ]
4
2020-05-30T12:45:48.000Z
2022-03-31T12:24:53.000Z
'''import sys import operator from Bio.Seq import Seq try: from Bio.Alphabet import generic_dna, IUPAC Bio_Alphabet = True except ImportError: Bio_Alphabet = None # usages of generic_dna, IUPAC are not supported in Biopython 1.78 (September 2020). print(f"The installed BioPython is a new version tha...
35.891176
186
0.578137
0
0
0
0
0
0
0
0
8,313
0.681226
1fc8f64a1c48e617dc27ddaba536434b9f8ea44b
4,915
py
Python
Configuration/GlobalRuns/python/reco_TLR_311X.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Configuration/GlobalRuns/python/reco_TLR_311X.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Configuration/GlobalRuns/python/reco_TLR_311X.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms def customiseCommon(process): ##################################################################################################### #### #### Top level replaces for handling strange scenarios of early collisions #### ## TRACKING: process.newSeedFr...
36.407407
107
0.545677
0
0
0
0
0
0
0
0
1,856
0.37762
1fcb25844610f792402d0768084d92368a8057d1
4,838
py
Python
renderer/settings.py
12564985/DeFMO
8ed9c2963678e2c59c7431ec8786302eea841572
[ "MIT" ]
1
2022-03-14T12:46:38.000Z
2022-03-14T12:46:38.000Z
renderer/settings.py
12564985/DeFMO
8ed9c2963678e2c59c7431ec8786302eea841572
[ "MIT" ]
null
null
null
renderer/settings.py
12564985/DeFMO
8ed9c2963678e2c59c7431ec8786302eea841572
[ "MIT" ]
null
null
null
## TODO: insert your ShapeNetCore.v2, textures, training and testing background paths # NOTE that HDF5 is not generated here, to convert the dataset to HDF5 use dataloaders/conversion.py g_datasets_path = '/mnt/lascar/rozumden/dataset' g_shapenet_path = g_datasets_path + '/ShapeNetv2/ShapeNetCore.v2' g_textures_path ...
35.573529
582
0.668251
0
0
0
0
0
0
0
0
2,931
0.596945
1fcc73246e5b2e2deb6ef1a5498a653dfdea012b
3,094
py
Python
pynm/feature/extract/nmf.py
ohtaman/pynm
b003962201e4270d0dab681ede37f2d8edd560f2
[ "MIT" ]
1
2018-08-16T20:48:52.000Z
2018-08-16T20:48:52.000Z
pynm/feature/extract/nmf.py
ohtaman/pynm
b003962201e4270d0dab681ede37f2d8edd560f2
[ "MIT" ]
5
2015-01-12T20:40:46.000Z
2017-11-17T01:27:41.000Z
pynm/feature/extract/nmf.py
ohtaman/pynm
b003962201e4270d0dab681ede37f2d8edd560f2
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import numpy import numpy.random import numpy.linalg from . import svd def svd_init(matrix, dim, seed=None): u, s, v = svd.svd(matrix, dim) ss = numpy.sqrt(numpy.diag(s)) return numpy.maximum(0.001, u.dot(ss)), numpy.maximum(0.001, ss.dot(v)) def random_init(matrix, dim, seed=Non...
29.75
94
0.597931
0
0
0
0
0
0
0
0
690
0.223012
1fccf8df9831cb035ab2861081b74267181cefc9
6,052
py
Python
examples/demo_livepeer.py
scout-cool/Bubbletea
f0312d6f1c7fde4098d500e811f0503796973d07
[ "Apache-2.0" ]
10
2021-08-29T14:58:09.000Z
2022-02-07T21:03:07.000Z
examples/demo_livepeer.py
scout-cool/Bubbletea
f0312d6f1c7fde4098d500e811f0503796973d07
[ "Apache-2.0" ]
null
null
null
examples/demo_livepeer.py
scout-cool/Bubbletea
f0312d6f1c7fde4098d500e811f0503796973d07
[ "Apache-2.0" ]
null
null
null
import datetime import datetime from altair.vegalite.v4.schema.core import Legend import pandas from pandas.core.frame import DataFrame import streamlit as st import time import bubbletea st.header("LIVEPEER Stake Movement") urlvars = bubbletea.parse_url_var([{'key':'startdate','type':'datetime'}, {'key':'enddate','t...
28.682464
117
0.594019
0
0
0
0
0
0
0
0
1,634
0.269993
1fcde10af6e71da8c4ae91b2cecfc62ef747de93
956
py
Python
tests/utils/test_match.py
jeremyschlatter/vaccine-feed-ingest
215f6c144fe5220deaccdb5db3e96f28b7077b3f
[ "MIT" ]
null
null
null
tests/utils/test_match.py
jeremyschlatter/vaccine-feed-ingest
215f6c144fe5220deaccdb5db3e96f28b7077b3f
[ "MIT" ]
65
2021-05-04T13:05:01.000Z
2022-03-31T10:13:49.000Z
tests/utils/test_match.py
jeremyschlatter/vaccine-feed-ingest
215f6c144fe5220deaccdb5db3e96f28b7077b3f
[ "MIT" ]
null
null
null
from vaccine_feed_ingest.utils import match def test_is_concordance_similar(full_location, minimal_location, vial_location): assert match.is_concordance_similar(full_location, vial_location) assert not match.is_concordance_similar(minimal_location, vial_location) def test_is_address_similar(full_location, ...
36.769231
83
0.848326
0
0
0
0
0
0
0
0
0
0
1fce94867341b2964e24bbb0a90fa03bff2006d5
2,201
py
Python
PyRods/examples/user_info.py
kaldrill/irodspython
9a1018429acf9e86af8fb7ea6f37fb397e0010da
[ "CNRI-Python" ]
null
null
null
PyRods/examples/user_info.py
kaldrill/irodspython
9a1018429acf9e86af8fb7ea6f37fb397e0010da
[ "CNRI-Python" ]
null
null
null
PyRods/examples/user_info.py
kaldrill/irodspython
9a1018429acf9e86af8fb7ea6f37fb397e0010da
[ "CNRI-Python" ]
null
null
null
# Copyright (c) 2013, University of Liverpool # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program ...
37.305085
92
0.685597
0
0
0
0
0
0
0
0
1,434
0.651522
1fd17f1089fdee8a486a2a65c3fb934cc9195151
1,072
py
Python
sml_iris_knn_dtc.py
drishtim17/supervisedML
3981d283a9937bfce793237c171fa95764846558
[ "Apache-2.0" ]
null
null
null
sml_iris_knn_dtc.py
drishtim17/supervisedML
3981d283a9937bfce793237c171fa95764846558
[ "Apache-2.0" ]
null
null
null
sml_iris_knn_dtc.py
drishtim17/supervisedML
3981d283a9937bfce793237c171fa95764846558
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 import sklearn from sklearn.datasets import load_iris from sklearn.neighbors import KNeighborsClassifier from sklearn.model_selection import train_test_split from sklearn import tree from sklearn.metrics import accuracy_score #loading iris iris=load_iris() #traning flowers.features is stored in i...
24.363636
99
0.841418
0
0
0
0
0
0
0
0
282
0.26306
1fd3b3ac45b4ed570227a76c3f4f622771cac325
2,762
py
Python
Python/Exercises/Humanize/humanize.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
115
2015-03-23T13:34:42.000Z
2022-03-21T00:27:21.000Z
Python/Exercises/Humanize/humanize.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
56
2015-02-25T15:04:26.000Z
2022-01-03T07:42:48.000Z
Python/Exercises/Humanize/humanize.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
59
2015-11-26T11:44:51.000Z
2022-03-21T00:27:22.000Z
#!/usr/bin/env python def humanize(n, base=10, digits=1, unit=''): '''convert a floating point number to a human-readable format Parameters ---------- n : float or str number to convert, it can a string representation of a floating point number base : int base to use, eith...
28.474227
77
0.513034
0
0
0
0
0
0
0
0
1,164
0.421434
1fd529b1fbfbcec29e94685aeef6fbda0d26c559
1,337
py
Python
data/Latent.py
YoungjuNa-KR/Gaze_estimator_implementation
95482db40ddef413870f51dadc907910d624ee6e
[ "MIT" ]
null
null
null
data/Latent.py
YoungjuNa-KR/Gaze_estimator_implementation
95482db40ddef413870f51dadc907910d624ee6e
[ "MIT" ]
null
null
null
data/Latent.py
YoungjuNa-KR/Gaze_estimator_implementation
95482db40ddef413870f51dadc907910d624ee6e
[ "MIT" ]
1
2022-02-03T11:11:21.000Z
2022-02-03T11:11:21.000Z
import os import PIL import torch from glob import glob from torch.utils.data import DataLoader from torchvision.transforms.functional import pil_to_tensor class Latent(torch.utils.data.Dataset): def __init__(self, dir_name, transforms=None): # dataset 디렉토리를 기반으로 parse.data_train, test에 따라서 # 각각 다...
29.711111
68
0.604338
1,433
0.896185
0
0
0
0
0
0
547
0.342089
1fd5cfc21f6a649e70a7b0760d51e47fca8f6d12
1,069
py
Python
day/day_05/solution.py
moki/aoc2015
da43fccd20d154840161c022d1f3c0f70035d604
[ "BSD-3-Clause" ]
null
null
null
day/day_05/solution.py
moki/aoc2015
da43fccd20d154840161c022d1f3c0f70035d604
[ "BSD-3-Clause" ]
null
null
null
day/day_05/solution.py
moki/aoc2015
da43fccd20d154840161c022d1f3c0f70035d604
[ "BSD-3-Clause" ]
null
null
null
def count_vowel(line): return len([c for c in line if c in "aeiou"]) def is_vowelly(line): return count_vowel(line) > 2 def is_doublly(line): return len( [line[i] for i in range(len(line) - 1) if line[i] == line[i + 1]]) def is_valid(line): return not sum(c in line for c in ['ab', 'cd', 'p...
21.38
74
0.507951
0
0
0
0
0
0
0
0
31
0.028999
1fd676c1868fb5496119162edb66de118a176730
876
py
Python
scripts/mklanguages.py
yasen-m/dosage
81fe088621ad335cac2a53fcbc7b9b37f49ddce2
[ "MIT" ]
null
null
null
scripts/mklanguages.py
yasen-m/dosage
81fe088621ad335cac2a53fcbc7b9b37f49ddce2
[ "MIT" ]
null
null
null
scripts/mklanguages.py
yasen-m/dosage
81fe088621ad335cac2a53fcbc7b9b37f49ddce2
[ "MIT" ]
null
null
null
#!/usr/bin/python # update languages.py from pycountry import os import codecs import pycountry basepath = os.path.dirname(os.path.dirname(__file__)) def main(): """Update language information in dosagelib/languages.py.""" fn =os.path.join(basepath, 'dosagelib', 'languages.py') encoding = 'utf-8' with...
29.2
83
0.634703
0
0
0
0
0
0
0
0
308
0.351598
1fd6b807f6071d9b5d2c510c8209a51bbbc35084
531
py
Python
reference/for_and_while.py
SeanSyue/TensorflowReferences
2c93f4c770e2713ef4769f287e022d03e7097188
[ "MIT" ]
null
null
null
reference/for_and_while.py
SeanSyue/TensorflowReferences
2c93f4c770e2713ef4769f287e022d03e7097188
[ "MIT" ]
null
null
null
reference/for_and_while.py
SeanSyue/TensorflowReferences
2c93f4c770e2713ef4769f287e022d03e7097188
[ "MIT" ]
null
null
null
import tensorflow as tf x = tf.Variable(0, name='x') model = tf.global_variables_initializer() with tf.Session() as session: for i in range(5): session.run(model) x = x + 1 print(session.run(x)) x = tf.Variable(0., name='x') threshold = tf.constant(5.) model = tf.glob...
19.666667
46
0.589454
0
0
0
0
0
0
0
0
6
0.011299
1fd6f57e7b90621a24c47afd31d7bbd91668d230
59
py
Python
raising_exception_3.py
godontop/python-work
ea22e0df8b0b17605f5a434e556a388d1f75aa47
[ "MIT" ]
null
null
null
raising_exception_3.py
godontop/python-work
ea22e0df8b0b17605f5a434e556a388d1f75aa47
[ "MIT" ]
null
null
null
raising_exception_3.py
godontop/python-work
ea22e0df8b0b17605f5a434e556a388d1f75aa47
[ "MIT" ]
null
null
null
try: num = 5 / 0 except: print("An error occured") raise
11.8
26
0.644068
0
0
0
0
0
0
0
0
18
0.305085
1fd7ed8a83b56f175881d6f318fa389d67ee450a
732
py
Python
bewerte/muendlich.py
jupfi81/NotenManager
ee96a41088bb898c025aed7b3c904741cb71d004
[ "MIT" ]
null
null
null
bewerte/muendlich.py
jupfi81/NotenManager
ee96a41088bb898c025aed7b3c904741cb71d004
[ "MIT" ]
null
null
null
bewerte/muendlich.py
jupfi81/NotenManager
ee96a41088bb898c025aed7b3c904741cb71d004
[ "MIT" ]
null
null
null
"""Berechnet die mündliche Note""" import csv with open('bewertung.csv', encoding='utf-8', mode='r') as bewertung: TABELLE = [] DATA = csv.reader(bewertung, delimiter=',') for row in DATA: TABELLE.append([element.strip() for element in row]) OUTPUT = [TABELLE[0] + ["Note"]] del TABELLE[0] ...
31.826087
92
0.562842
0
0
0
0
0
0
0
0
92
0.125512
1fd7f7aa485ce2ad0b848a0e2bbaa8cf36a6c24a
410
py
Python
python3/tests/test_edit_distance.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
4
2018-03-05T02:27:16.000Z
2021-03-15T14:19:44.000Z
python3/tests/test_edit_distance.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
null
null
null
python3/tests/test_edit_distance.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
2
2018-07-22T10:32:10.000Z
2018-10-20T03:14:28.000Z
from unittest import TestCase from leetcodepy.edit_distance import * solution1 = Solution1() word11 = "horse" word12 = "ros" expected1 = 3 word21 = "intention" word22 = "execution" expected2 = 5 class TestEditDistance(TestCase): def test1(self): self.assertEqual(expected1, solution1.minDistance(wo...
17.083333
74
0.731707
204
0.497561
0
0
0
0
0
0
34
0.082927
1fd8f8fea0aa37bc2adfbcbf6dda99e537d99a7f
805
py
Python
pageobject/commands/index.py
lukas-linhart/pageobject
6ae83680ae62a94f93cefc394e4f3cc6999aeead
[ "MIT" ]
1
2017-01-12T06:15:36.000Z
2017-01-12T06:15:36.000Z
pageobject/commands/index.py
lukas-linhart/pageobject
6ae83680ae62a94f93cefc394e4f3cc6999aeead
[ "MIT" ]
null
null
null
pageobject/commands/index.py
lukas-linhart/pageobject
6ae83680ae62a94f93cefc394e4f3cc6999aeead
[ "MIT" ]
null
null
null
def index(self, value): """ Return index of the first child containing the specified value. :param str value: text value to look for :returns: index of the first child containing the specified value :rtype: int :raises ValueError: if the value is not found """ self.logger.info('getting ...
47.352941
116
0.690683
0
0
0
0
0
0
0
0
474
0.58882
1fda8ca8896b2d1bcde84055f16e53f955e23e9c
2,724
py
Python
vlsopt/data_factory/transaction_factory.py
violas-core/bvexchange
74cf3197aad02e0f5e2dac457266d11c9c8cc746
[ "MIT" ]
null
null
null
vlsopt/data_factory/transaction_factory.py
violas-core/bvexchange
74cf3197aad02e0f5e2dac457266d11c9c8cc746
[ "MIT" ]
null
null
null
vlsopt/data_factory/transaction_factory.py
violas-core/bvexchange
74cf3197aad02e0f5e2dac457266d11c9c8cc746
[ "MIT" ]
1
2022-01-05T04:39:47.000Z
2022-01-05T04:39:47.000Z
#!/usr/bin/python3 import operator import sys import json import os sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "./")) sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")) sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../")) sys.pat...
33.62963
96
0.551762
1,521
0.55837
0
0
0
0
0
0
675
0.247797
1fdabe81a3501b610902f47c9629b3212106ad89
3,746
py
Python
python/tdk_fetch.py
selcukcihan/namewizard
c2aeb3fd1eb3ce839d0e3a145bdf2a6df354d568
[ "CC0-1.0" ]
null
null
null
python/tdk_fetch.py
selcukcihan/namewizard
c2aeb3fd1eb3ce839d0e3a145bdf2a6df354d568
[ "CC0-1.0" ]
null
null
null
python/tdk_fetch.py
selcukcihan/namewizard
c2aeb3fd1eb3ce839d0e3a145bdf2a6df354d568
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python from BeautifulSoup import BeautifulSoup import json import urllib import urllib2 import re import time import os.path def getgoogleurl(search,siteurl=False): search = search.encode("utf-8") if siteurl==False: return 'http://www.google.com/search?q='+urllib.quote_plus(search) ...
32.293103
136
0.570208
0
0
0
0
0
0
0
0
645
0.172184
1fdadaa704a4a57bab069bbf9519d57e9bc28d25
3,703
py
Python
tests/test_source.py
j18ter/exchangelib
afb0df65c5533999bca92e25be4c00de5c03043c
[ "BSD-2-Clause" ]
null
null
null
tests/test_source.py
j18ter/exchangelib
afb0df65c5533999bca92e25be4c00de5c03043c
[ "BSD-2-Clause" ]
null
null
null
tests/test_source.py
j18ter/exchangelib
afb0df65c5533999bca92e25be4c00de5c03043c
[ "BSD-2-Clause" ]
null
null
null
from exchangelib.errors import ( ErrorAccessDenied, ErrorFolderNotFound, ErrorInvalidOperation, ErrorItemNotFound, ErrorNoPublicFolderReplicaAvailable, ) from exchangelib.properties import EWSElement from .common import EWSTest class CommonTest(EWSTest): def test_magic(self): self.ass...
34.287037
105
0.533081
3,451
0.931947
0
0
0
0
0
0
924
0.249527
1fdb3bda49808628500a9864a821b84e3138f89c
735
py
Python
{{cookiecutter.project_slug}}/app/utils/mail.py
Bexils/fastapi-project-template
1d6937c5adce7603c77e01f8560032082392fdbd
[ "MIT" ]
4
2021-04-04T23:19:06.000Z
2021-04-10T21:32:23.000Z
{{cookiecutter.project_slug}}/app/utils/mail.py
Bexils/fastapi-project-template
1d6937c5adce7603c77e01f8560032082392fdbd
[ "MIT" ]
null
null
null
{{cookiecutter.project_slug}}/app/utils/mail.py
Bexils/fastapi-project-template
1d6937c5adce7603c77e01f8560032082392fdbd
[ "MIT" ]
null
null
null
import os from datetime import datetime from pathlib import Path from pydantic import EmailStr def send_dummy_mail(subject: str, message: str, to: EmailStr): current_path = os.getcwd() filename = f'{datetime.now().timestamp()} - {subject}.txt' email_text = f'''Subject: {subject} From: no-reply@email.com T...
28.269231
64
0.672109
0
0
0
0
0
0
0
0
153
0.208163
1fded2389baa0f710851c0214c487f38445e67b1
3,540
py
Python
predict_btc_future.py
benjaminshi02003220/Bitcoin_price_prediction
f4894614bafa0a4295d08d0b8f53d314c4262724
[ "MIT" ]
6
2018-03-11T13:47:22.000Z
2018-07-03T05:03:48.000Z
predict_btc_future.py
benjaminshi02003220/Bitcoin_price_prediction
f4894614bafa0a4295d08d0b8f53d314c4262724
[ "MIT" ]
null
null
null
predict_btc_future.py
benjaminshi02003220/Bitcoin_price_prediction
f4894614bafa0a4295d08d0b8f53d314c4262724
[ "MIT" ]
4
2018-03-27T15:38:40.000Z
2018-07-07T20:04:29.000Z
# -*- coding: utf-8 -*- """ Created on Fri Mar 9 17:06:09 2018 @author: v-beshi """ import pyodbc import pandas as pd def get_agg_data(): con=pyodbc.connect('DRIVER={SQL Server};SERVER=ServerName;DATABASE=DB;UID=ID;PWD=Password') raw_data=pd.read_sql('select * from dbo.BitcoinTradeHistory',con) raw_d...
38.478261
232
0.664124
0
0
0
0
0
0
0
0
917
0.25904
1fe22fd049d8e5e23653953f62233abe237a47e8
16,692
py
Python
bloodbank_rl/pyomo_models/stochastic_model_runner.py
joefarrington/bloodbank_rl
f285581145034b498f01c9b44f95437ceddb042a
[ "MIT" ]
null
null
null
bloodbank_rl/pyomo_models/stochastic_model_runner.py
joefarrington/bloodbank_rl
f285581145034b498f01c9b44f95437ceddb042a
[ "MIT" ]
null
null
null
bloodbank_rl/pyomo_models/stochastic_model_runner.py
joefarrington/bloodbank_rl
f285581145034b498f01c9b44f95437ceddb042a
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import pyomo.environ as pyo import mpisppy.utils.sputils as sputils from mpisppy.opt.ef import ExtensiveForm from pathlib import Path import os import sys path_root = Path(os.path.abspath(__file__)).parents[2] sys.path.append(str(path_root)) from bloodbank_rl.environments.plat...
37.679458
107
0.557453
16,262
0.974239
0
0
0
0
0
0
3,756
0.225018
1fe41f5dc40be297773f566df8109a75b70ca3b8
3,623
py
Python
ch1/tictactoe.py
T0nyX1ang/Reinforcement-Learning
a86ab92ee628b95c7dbe432c079b7ce04b5e982a
[ "MIT" ]
null
null
null
ch1/tictactoe.py
T0nyX1ang/Reinforcement-Learning
a86ab92ee628b95c7dbe432c079b7ce04b5e982a
[ "MIT" ]
null
null
null
ch1/tictactoe.py
T0nyX1ang/Reinforcement-Learning
a86ab92ee628b95c7dbe432c079b7ce04b5e982a
[ "MIT" ]
null
null
null
import random import json class TTTGame(object): def __init__(self): self._board = [0] * 9 self._end = False with open('learning.json', 'r') as f: self._state = json.loads(f.read()) self._alpha = 0.05 def judge(self, state): if (sum(state[0: 3]) == 3 or \ sum(state[3: 6]) == 3 or \ sum(state[6::]...
27.037313
134
0.619928
3,493
0.964118
0
0
0
0
0
0
352
0.097157
1fe4750a23a26455a9111641d38426011cdda650
141
py
Python
Chapter 03/ch3_1_38.py
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
f6a4194684515495d00aa38347a725dd08f39a0c
[ "MIT" ]
null
null
null
Chapter 03/ch3_1_38.py
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
f6a4194684515495d00aa38347a725dd08f39a0c
[ "MIT" ]
null
null
null
Chapter 03/ch3_1_38.py
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
f6a4194684515495d00aa38347a725dd08f39a0c
[ "MIT" ]
null
null
null
str1 = ' Happy Life ' str2= ' Happy Life ' if (str1.strip()== str2.strip()): print("Same") else: print("Not same") # same
17.625
34
0.531915
0
0
0
0
0
0
0
0
55
0.390071
1fe4a5c508f25892277d20cf17891a3088bcee69
2,601
py
Python
text_analytic_emotion_load_only.py
agussuarjaya/Text_Analytic_-Emotion-
01cdf6f3661eaad2cb76111ebaee90ec50b592f0
[ "MIT" ]
null
null
null
text_analytic_emotion_load_only.py
agussuarjaya/Text_Analytic_-Emotion-
01cdf6f3661eaad2cb76111ebaee90ec50b592f0
[ "MIT" ]
1
2020-03-28T16:06:04.000Z
2020-03-29T02:03:44.000Z
text_analytic_emotion_load_only.py
agussuarjaya/Text_Analytic_-Emotion-
01cdf6f3661eaad2cb76111ebaee90ec50b592f0
[ "MIT" ]
2
2020-03-28T15:02:48.000Z
2020-03-29T12:27:50.000Z
# -*- coding: utf-8 -*- """Text Analytic (Emotion) - load_only.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1ec4JMQZ5zoj-PB_a0mUkJWRKotgQSd9f """ """ Text Analytic (Emotion) with TensorFlow Copyright 2020 I Made Agus Dwi Suarjaya ...
38.820896
189
0.685506
0
0
0
0
0
0
0
0
1,886
0.725106
1fe6e5bdf88233acf9a9c841722eff52d327f1f2
13,160
py
Python
Server.py
HackintoshwithUbuntu/Python-Chat-App
d5af370e33a092c52702efed6b1074d458c593ac
[ "MIT" ]
2
2021-08-30T03:19:10.000Z
2021-09-06T21:51:02.000Z
Server.py
HackintoshwithUbuntu/Python-Chat-App
d5af370e33a092c52702efed6b1074d458c593ac
[ "MIT" ]
null
null
null
Server.py
HackintoshwithUbuntu/Python-Chat-App
d5af370e33a092c52702efed6b1074d458c593ac
[ "MIT" ]
null
null
null
# Imports import socket # Communication import threading # Communication with multiple users at once import pickle # Serialising data import hashlib # Hashing passwords from Crypto.Cipher import AES # AES encryption algorithms from Crypto.Random import get_random_bytes # For generating random keys and nonces...
38.820059
115
0.572188
0
0
0
0
0
0
0
0
6,109
0.46421
1fe7b45de50e9ea21f771782230c1d73959dc62a
215
py
Python
devmine/config/environments/production.py
sniperkit/snk.fork.devmine-core
6ab43abd0c1041831ecb86dcba55ffd9e05ce615
[ "BSD-3-Clause" ]
null
null
null
devmine/config/environments/production.py
sniperkit/snk.fork.devmine-core
6ab43abd0c1041831ecb86dcba55ffd9e05ce615
[ "BSD-3-Clause" ]
null
null
null
devmine/config/environments/production.py
sniperkit/snk.fork.devmine-core
6ab43abd0c1041831ecb86dcba55ffd9e05ce615
[ "BSD-3-Clause" ]
null
null
null
# server backend server = 'cherrypy' # debug error messages debug = False # auto-reload reloader = False # database url db_url = 'sqlite:///devmine/db/devmine.db' # echo database engine messages db_echo = False
14.333333
42
0.730233
0
0
0
0
0
0
0
0
139
0.646512
1fe923af70915246d98e2a502a9e9ce347a11d16
1,279
py
Python
gen_screens.py
shurkova/currentVers
25027f3f4faa9033b69041459f0785c1436c3f31
[ "CECILL-B" ]
1
2020-09-09T15:30:38.000Z
2020-09-09T15:30:38.000Z
gen_screens.py
shurkova/currentVers
25027f3f4faa9033b69041459f0785c1436c3f31
[ "CECILL-B" ]
null
null
null
gen_screens.py
shurkova/currentVers
25027f3f4faa9033b69041459f0785c1436c3f31
[ "CECILL-B" ]
11
2020-05-01T09:03:14.000Z
2022-02-09T14:17:41.000Z
# generate 500 screens. import random objs = [] for i in range(500): go_to = random.choice([2,3]) for j in range(go_to): new_obj = {'name': 'non_exist', 'RBs': [], 'set': 'memory', 'analog': i} width = round(random.random()*20) hight = round(random.random()*10) x = round(rando...
51.16
704
0.56294
0
0
0
0
0
0
0
0
474
0.370602
1fec0bf47c009cdb0ca6fac21df153c55c6c1431
46,269
py
Python
bot/utils/trackmania.py
NottCurious/TMIndiaBot
824c171fa2f41aa21631796c384f70a34a721364
[ "MIT" ]
1
2022-02-12T16:40:17.000Z
2022-02-12T16:40:17.000Z
bot/utils/trackmania.py
NottCurious/TMIndiaBot
824c171fa2f41aa21631796c384f70a34a721364
[ "MIT" ]
78
2021-10-14T05:32:54.000Z
2022-01-21T09:22:37.000Z
bot/utils/trackmania.py
NottCurious/TMIndiaBot
824c171fa2f41aa21631796c384f70a34a721364
[ "MIT" ]
null
null
null
import asyncio import json import os import shutil import typing from datetime import datetime, timezone, timedelta from matplotlib import pyplot as plt import cv2 import country_converter as coco import flag import requests import discord from bot.api import APIClient from bot.log import get_logger from bot.utils.co...
35.756569
195
0.578832
45,807
0.990015
0
0
25,094
0.54235
16,164
0.349348
15,656
0.338369
1fed6ebbcca1ccb5af62d7ab28474d73bafe114f
4,535
py
Python
src/vehicle_core/model/throttle_model.py
decabyte/vehicle_core
623e1e993445713ab2ba625ac54be150077c2f1e
[ "BSD-3-Clause" ]
1
2016-12-14T11:48:02.000Z
2016-12-14T11:48:02.000Z
src/vehicle_core/model/throttle_model.py
decabyte/vehicle_core
623e1e993445713ab2ba625ac54be150077c2f1e
[ "BSD-3-Clause" ]
null
null
null
src/vehicle_core/model/throttle_model.py
decabyte/vehicle_core
623e1e993445713ab2ba625ac54be150077c2f1e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Software License Agreement (BSD License) # # Copyright (c) 2014, Ocean Systems Laboratory, Heriot-Watt University, UK. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follow...
40.855856
118
0.714443
0
0
0
0
0
0
0
0
3,508
0.773539
1fee9ed72e23e0f9892bd14d8b33f1a360d24471
1,605
py
Python
social_friends_finder/backends/vkontakte_backend.py
haremmaster/django-social-friends-finder
cad63349b19b3c301626c24420ace13c63f45ad7
[ "BSD-3-Clause" ]
19
2015-01-01T16:23:06.000Z
2020-01-02T22:42:17.000Z
social_friends_finder/backends/vkontakte_backend.py
haremmaster/django-social-friends-finder
cad63349b19b3c301626c24420ace13c63f45ad7
[ "BSD-3-Clause" ]
2
2015-01-01T16:34:59.000Z
2015-03-26T10:30:59.000Z
social_friends_finder/backends/vkontakte_backend.py
laplacesdemon/django-social-friends-finder
cad63349b19b3c301626c24420ace13c63f45ad7
[ "BSD-3-Clause" ]
11
2015-01-16T18:39:34.000Z
2021-08-13T00:46:41.000Z
from social_friends_finder.backends import BaseFriendsProvider from social_friends_finder.utils import setting if not setting("SOCIAL_FRIENDS_USING_ALLAUTH", False): from social_auth.backends.contrib.vk import VKOAuth2Backend USING_ALLAUTH = False else: from allauth.socialaccount.models import SocialToken, ...
33.4375
114
0.684112
1,215
0.757009
0
0
0
0
0
0
693
0.431776
1feefa448dd4d27276c85f5a38d04e04d811d4b4
56
py
Python
tests/cms_bundles/__init__.py
ff0000/scarlet
6c37befd810916a2d7ffff2cdb2dab57bcb6d12e
[ "MIT" ]
9
2015-10-13T04:35:56.000Z
2017-03-16T19:00:44.000Z
tests/cms_bundles/__init__.py
ff0000/scarlet
6c37befd810916a2d7ffff2cdb2dab57bcb6d12e
[ "MIT" ]
32
2015-02-10T21:09:18.000Z
2017-07-18T20:26:51.000Z
tests/cms_bundles/__init__.py
ff0000/scarlet
6c37befd810916a2d7ffff2cdb2dab57bcb6d12e
[ "MIT" ]
3
2017-07-13T13:32:21.000Z
2019-04-08T20:18:58.000Z
default_app_config = 'tests.cms_bundles.apps.AppConfig'
28
55
0.839286
0
0
0
0
0
0
0
0
34
0.607143
1ff9642e37e0136fb4ef1901be1925b6d57a71f4
2,543
py
Python
app/test/commonJSONStrings.py
rmetcalf9/dockJob
a61acf7ca52e37ff513695a5cc201d346fb4a7fa
[ "MIT" ]
14
2018-03-28T20:37:56.000Z
2020-08-30T13:29:05.000Z
app/test/commonJSONStrings.py
rmetcalf9/dockJob
a61acf7ca52e37ff513695a5cc201d346fb4a7fa
[ "MIT" ]
79
2018-02-07T14:42:00.000Z
2022-02-11T22:30:03.000Z
app/test/commonJSONStrings.py
rmetcalf9/dockJob
a61acf7ca52e37ff513695a5cc201d346fb4a7fa
[ "MIT" ]
6
2018-05-08T21:49:40.000Z
2021-07-30T13:47:37.000Z
data_simpleJobCreateParams = { "name": "TestJob", "repetitionInterval": "HOURLY:03", "command": "ls", "enabled": True } data_simpleManualJobCreateParams = { "name": "TestJob", "repetitionInterval": "", "command": "ls", "enabled": False } data_simpleJobCreateExpRes = { "guid": 'IGNORE', "name": da...
35.319444
152
0.773889
0
0
0
0
0
0
0
0
1,278
0.502556
1ff9b69a4019a1762d86b4de69764598a30ea2b6
8,228
py
Python
dial/metrics.py
neukg/KAT-TSLF
91bff10312ba5fbbd46978b268a1c97a5d627dcd
[ "MIT" ]
11
2021-11-19T06:17:10.000Z
2022-03-11T07:12:30.000Z
dial/metrics.py
neukg/KAT-TSLF
91bff10312ba5fbbd46978b268a1c97a5d627dcd
[ "MIT" ]
3
2021-11-20T14:00:24.000Z
2022-03-03T19:41:01.000Z
dial/metrics.py
neukg/KAT-TSLF
91bff10312ba5fbbd46978b268a1c97a5d627dcd
[ "MIT" ]
null
null
null
from nltk.translate.bleu_score import corpus_bleu, sentence_bleu, SmoothingFunction from nltk import word_tokenize # import language_evaluation from typing import List from collections import defaultdict, Counter import re import math import sys def mean(lst): return sum(lst) / len(lst) def _calc_ngram_dict(tok...
35.465517
113
0.653986
0
0
0
0
0
0
0
0
1,050
0.127613
1ffa89e42119c66f0b38cae0145de37c497cd8de
896
py
Python
06_packet_sniffer/packet_sniffer.py
maks-nurgazy/ethical-hacking
0f9f2b943b5afa9b11251270e4672e0965ec1769
[ "MIT" ]
null
null
null
06_packet_sniffer/packet_sniffer.py
maks-nurgazy/ethical-hacking
0f9f2b943b5afa9b11251270e4672e0965ec1769
[ "MIT" ]
null
null
null
06_packet_sniffer/packet_sniffer.py
maks-nurgazy/ethical-hacking
0f9f2b943b5afa9b11251270e4672e0965ec1769
[ "MIT" ]
null
null
null
import scapy.all as scapy from scapy.layers import http def sniff(interface): scapy.sniff(iface=interface, store=False, prn=process_sniffed_packed) def get_url(packet): return (packet[http.HTTPRequest].Host + packet[http.HTTPRequest].Path).decode("utf-8") def get_login_info(packet): if packet.haslayer...
27.151515
90
0.631696
0
0
0
0
0
0
0
0
133
0.148438
1ffb6e885c207ea205ef242e09f2cabe5866ad26
3,705
py
Python
cameraToWorld.py
blguweb/Tap-Tap-computer
4e2007b5a31e6d5f902b1e3ca58206870331ef07
[ "MIT" ]
null
null
null
cameraToWorld.py
blguweb/Tap-Tap-computer
4e2007b5a31e6d5f902b1e3ca58206870331ef07
[ "MIT" ]
null
null
null
cameraToWorld.py
blguweb/Tap-Tap-computer
4e2007b5a31e6d5f902b1e3ca58206870331ef07
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os from typing import NoReturn import cv2 as cv import numpy as np from numpy import mat import xml.etree.ElementTree as ET import math camera_angle = 315 camera_intrinsic = { # # 相机内参矩阵 # 相机内参矩阵 matlab 求得 "camera_matrix": [871.08632815...
33.080357
129
0.550877
2,268
0.580794
0
0
0
0
0
0
993
0.254289
1ffb6f2d2eca765ba18ee0ccc397d70767e06533
5,004
py
Python
compilers/labs/lab2/gui.py
vampy/university
9496cb63594dcf1cc2cec8650b8eee603f85fdab
[ "MIT" ]
6
2015-06-22T19:43:13.000Z
2019-07-15T18:08:41.000Z
compilers/labs/lab2/gui.py
vampy/university
9496cb63594dcf1cc2cec8650b8eee603f85fdab
[ "MIT" ]
null
null
null
compilers/labs/lab2/gui.py
vampy/university
9496cb63594dcf1cc2cec8650b8eee603f85fdab
[ "MIT" ]
1
2015-09-26T09:01:54.000Z
2015-09-26T09:01:54.000Z
#!/usr/bin/python import os from log import Log from enum import IntEnum, unique from grammar import Grammar from automaton import FiniteAutomaton @unique class Command(IntEnum): GRAMMAR_READ = 1 GRAMMAR_DISPLAY = 2 GRAMMAR_VERIFY = 3 AUTOMATON_READ = 4 AUTOMATON_DISPLAY = 5 CONVERT_RG_TO_FA...
33.139073
108
0.552158
4,843
0.967826
0
0
4,812
0.961631
0
0
539
0.107714
1ffbe3042328109603927698807569c875283801
180
py
Python
atividades/ex31.py
Fleen66/Python_exercises
fd05fdf1181da833a1a1bc9f4a476afc8f467977
[ "MIT" ]
null
null
null
atividades/ex31.py
Fleen66/Python_exercises
fd05fdf1181da833a1a1bc9f4a476afc8f467977
[ "MIT" ]
null
null
null
atividades/ex31.py
Fleen66/Python_exercises
fd05fdf1181da833a1a1bc9f4a476afc8f467977
[ "MIT" ]
null
null
null
distancia = int(input('Digite a distancia de sua viagem: ')) if distancia <= 200: preco = distancia * 0.50 print(preco) else: preco = distancia * 0.40 print(preco)
22.5
60
0.644444
0
0
0
0
0
0
0
0
36
0.2
1ffc42584a05c85ceb4b5e649094a2917f366627
7,947
py
Python
src/triangle.py
songrun/VectorSkinning
a19dff78215b51d824adcd39c7dcdf8dc78ec617
[ "Apache-2.0" ]
18
2015-04-29T20:54:15.000Z
2021-12-13T17:48:05.000Z
src/triangle.py
songrun/VectorSkinning
a19dff78215b51d824adcd39c7dcdf8dc78ec617
[ "Apache-2.0" ]
null
null
null
src/triangle.py
songrun/VectorSkinning
a19dff78215b51d824adcd39c7dcdf8dc78ec617
[ "Apache-2.0" ]
8
2017-04-23T17:52:13.000Z
2022-03-14T11:01:56.000Z
import sys import subprocess import os from numpy import asarray #triangle_path = os.path.join( "C:\\Users\\Mai\\Dropbox\\Research\\Deformation\\src\\py\\triangle", "triangle.exe") triangle_path = os.path.join( os.path.dirname( __file__ ), "triangle", "triangle" ) if not os.path.exists( triangle_path ): raise Imp...
36.287671
215
0.630804
0
0
0
0
0
0
0
0
4,219
0.530892
1ffe75b4736bb2daa16ad12967f532235a2b0677
4,559
py
Python
edbdeploy/spec/baremetal.py
vincentp7212/postgres-deployment
ea0ed0e06a4eb99cc28600398eddcf2320778113
[ "BSD-3-Clause" ]
58
2020-02-24T21:02:50.000Z
2022-03-28T14:51:56.000Z
edbdeploy/spec/baremetal.py
vincentp7212/postgres-deployment
ea0ed0e06a4eb99cc28600398eddcf2320778113
[ "BSD-3-Clause" ]
108
2020-09-18T12:53:44.000Z
2022-02-02T09:02:31.000Z
edbdeploy/spec/baremetal.py
vincentp7212/postgres-deployment
ea0ed0e06a4eb99cc28600398eddcf2320778113
[ "BSD-3-Clause" ]
47
2020-03-04T15:51:01.000Z
2022-02-27T13:48:05.000Z
from . import SpecValidator BaremetalSpec = { 'EDB-RA-1': { 'ssh_user': SpecValidator(type='string', default=None), 'pg_data': SpecValidator(type='string', default=None), 'pg_wal': SpecValidator(type='string', default=None), 'postgres_server_1': { 'name': SpecValidator(t...
45.59
68
0.573591
0
0
0
0
0
0
0
0
1,351
0.296337
1ffec07dcf5a4c57c0d689934f15fff735336375
2,382
py
Python
ml-scripts/ss_calib/scripts/ss_charge_cali.py
YashengFu/exo-200_scripts
d33a1a2eeda5f072409656b96e8730f2de53ee0b
[ "MIT" ]
null
null
null
ml-scripts/ss_calib/scripts/ss_charge_cali.py
YashengFu/exo-200_scripts
d33a1a2eeda5f072409656b96e8730f2de53ee0b
[ "MIT" ]
null
null
null
ml-scripts/ss_calib/scripts/ss_charge_cali.py
YashengFu/exo-200_scripts
d33a1a2eeda5f072409656b96e8730f2de53ee0b
[ "MIT" ]
null
null
null
import numpy as np import time import argparse import pandas as pd import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from scipy import special from tqdm import tqdm from scipy.optimize import curve_fit from utils.build_hist import build_hist class SS_Charge: """ read calibration data and ...
38.419355
184
0.673804
1,661
0.697313
0
0
0
0
0
0
358
0.150294
1fff4ed247e76eafdf9461ae3d7ab7dc88f2b73c
97,747
py
Python
ExoplanetPocketknife.py
ScottHull/Exoplanet-Pocketknife
15b49ff3612adc3b31a78c27379fb8b2f47c6c8f
[ "CC0-1.0" ]
null
null
null
ExoplanetPocketknife.py
ScottHull/Exoplanet-Pocketknife
15b49ff3612adc3b31a78c27379fb8b2f47c6c8f
[ "CC0-1.0" ]
null
null
null
ExoplanetPocketknife.py
ScottHull/Exoplanet-Pocketknife
15b49ff3612adc3b31a78c27379fb8b2f47c6c8f
[ "CC0-1.0" ]
null
null
null
# python /usr/bin/env/python # /// The Exoplanet Pocketknife # /// Scott D. Hull, The Ohio State University 2015-2017 # /// All usage must include proper citation and a link to the Github repository # /// https://github.com/ScottHull/Exoplanet-Pocketknife import os, csv, time, sys, shutil, subprocess from threading ...
46.7689
207
0.541234
0
0
0
0
0
0
0
0
30,456
0.31158
9500f8ddc8a192d5b326bf23ad973aa2e9a8109b
4,074
py
Python
tools/extract_observable.py
pauxy-qmc/pauxy
1da80284284769b59361c73cfa3c2d914c74a73f
[ "Apache-2.0" ]
16
2020-08-05T17:17:17.000Z
2022-03-18T04:06:18.000Z
tools/extract_observable.py
pauxy-qmc/pauxy
1da80284284769b59361c73cfa3c2d914c74a73f
[ "Apache-2.0" ]
4
2020-05-17T21:28:20.000Z
2021-04-22T18:05:50.000Z
tools/extract_observable.py
pauxy-qmc/pauxy
1da80284284769b59361c73cfa3c2d914c74a73f
[ "Apache-2.0" ]
5
2020-05-18T01:03:18.000Z
2021-04-13T15:36:29.000Z
#!/usr/bin/env python '''Exctact element of green's function''' import argparse import sys import numpy import os import pandas as pd import json _script_dir = os.path.abspath(os.path.dirname(__file__)) sys.path.append(os.path.join(_script_dir, 'analysis')) import matplotlib.pyplot as plt # from pauxy.analysis.extract...
33.393443
82
0.579774
0
0
0
0
0
0
0
0
1,317
0.32327
950130b7d174e4ab134e14783a96e2c70ef6e914
12,854
py
Python
datasets.py
shivakanthsujit/FMMRNet
12742398e3b981938a69e44b3f37d285904929b4
[ "MIT" ]
null
null
null
datasets.py
shivakanthsujit/FMMRNet
12742398e3b981938a69e44b3f37d285904929b4
[ "MIT" ]
null
null
null
datasets.py
shivakanthsujit/FMMRNet
12742398e3b981938a69e44b3f37d285904929b4
[ "MIT" ]
null
null
null
import glob import os import albumentations as A import kaggle import numpy as np import PIL import pytorch_lightning as pl import torch from albumentations.pytorch import ToTensorV2 from torch.utils.data import random_split from torch.utils.data.dataloader import DataLoader from utils import show_images def get_tr...
33.300518
119
0.628131
9,365
0.728567
0
0
0
0
0
0
1,245
0.096857
9505115c9cbc7843483152234defea7c4da55e5d
663
py
Python
29_Tree/Step03/wowo0709.py
StudyForCoding/BEAKJOON
84e1c5e463255e919ccf6b6a782978c205420dbf
[ "MIT" ]
null
null
null
29_Tree/Step03/wowo0709.py
StudyForCoding/BEAKJOON
84e1c5e463255e919ccf6b6a782978c205420dbf
[ "MIT" ]
3
2020-11-04T05:38:53.000Z
2021-03-02T02:15:19.000Z
29_Tree/Step03/wowo0709.py
StudyForCoding/BEAKJOON
84e1c5e463255e919ccf6b6a782978c205420dbf
[ "MIT" ]
null
null
null
import sys input = sys.stdin.readline from collections import deque def bfs(v): dp = [-1 for _ in range(V+1)] dp[v] = 0 q = deque() q.append(v) while q: cv = q.popleft() for nc,nv in tree[cv]: if dp[nv] == -1: # 아직 들르지 않았다면, dp[nv] = dp[cv] + nc ...
24.555556
43
0.517345
0
0
0
0
0
0
0
0
210
0.269576
9506269afc0618a55f2884b0a52f8b3902a5b1f4
997
py
Python
config.py
anvme/TONTgContractBot
e5fa48d262faec26e2835daa6db764867a369672
[ "Apache-2.0" ]
null
null
null
config.py
anvme/TONTgContractBot
e5fa48d262faec26e2835daa6db764867a369672
[ "Apache-2.0" ]
null
null
null
config.py
anvme/TONTgContractBot
e5fa48d262faec26e2835daa6db764867a369672
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ##### TONTgBotContract Config # Edit starts here TgBotAPIKey = 'xxxx:yyyy' # API Keythat you get from @BotFather tg = 11111 # Your id, you can get it by sending command /id to bot @TONTgIDBot # Edit ends here tonoscli = '/opt/tonos-cli/target/release/tonos-cli' # P...
32.16129
78
0.713139
0
0
0
0
0
0
0
0
814
0.816449
95086bdd5bed5808e0d9ba240d94e656c6d84fab
1,624
py
Python
_scripts/pandoc_wiki_filter.py
BenjaminPollak/coursebook
4646102b5f4c3d283885ba1b221da71a5e509eeb
[ "CC-BY-3.0", "CC-BY-4.0" ]
null
null
null
_scripts/pandoc_wiki_filter.py
BenjaminPollak/coursebook
4646102b5f4c3d283885ba1b221da71a5e509eeb
[ "CC-BY-3.0", "CC-BY-4.0" ]
null
null
null
_scripts/pandoc_wiki_filter.py
BenjaminPollak/coursebook
4646102b5f4c3d283885ba1b221da71a5e509eeb
[ "CC-BY-3.0", "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python3 """ Pandoc filter to change each relative URL to absolute """ from panflute import run_filter, Str, Header, Image, Math, Link, RawInline import sys import re base_raw_url = 'https://raw.githubusercontent.com/illinois-cs241/coursebook/master/' class NoAltTagException(Exception): pass def ...
28.491228
84
0.640394
44
0.027094
0
0
0
0
0
0
689
0.424261
9508ac69c9c25e71d33441ccd8a681ec504ce33e
8,793
py
Python
PA_multiagent_game/multiagent_utils.py
salesforce/RIRL
6f137955bfbe2054be18bb2b15d0e6aedb972b06
[ "BSD-3-Clause" ]
null
null
null
PA_multiagent_game/multiagent_utils.py
salesforce/RIRL
6f137955bfbe2054be18bb2b15d0e6aedb972b06
[ "BSD-3-Clause" ]
null
null
null
PA_multiagent_game/multiagent_utils.py
salesforce/RIRL
6f137955bfbe2054be18bb2b15d0e6aedb972b06
[ "BSD-3-Clause" ]
null
null
null
# # Copyright (c) 2022, salesforce.com, inc. # All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause # import sys import glob sys.path.insert(0, '..') import numpy as np import matplotlib import matp...
35.313253
230
0.585579
0
0
0
0
0
0
0
0
2,117
0.24076
950a7c06be019526c5d13e887a482057df6c98cd
758
py
Python
UVa Online Judge/v128/12808.py
mjenrungrot/algorithm
e0e8174eb133ba20931c2c7f5c67732e4cb2b703
[ "MIT" ]
1
2021-12-08T08:58:43.000Z
2021-12-08T08:58:43.000Z
UVa Online Judge/v128/12808.py
mjenrungrot/algorithm
e0e8174eb133ba20931c2c7f5c67732e4cb2b703
[ "MIT" ]
null
null
null
UVa Online Judge/v128/12808.py
mjenrungrot/algorithm
e0e8174eb133ba20931c2c7f5c67732e4cb2b703
[ "MIT" ]
null
null
null
# ============================================================================= # Author: Teerapat Jenrungrot - https://github.com/mjenrungrot/ # FileName: 12808.py # Description: UVa Online Judge - 12808 # ============================================================================= import math...
27.071429
79
0.387863
0
0
0
0
0
0
0
0
332
0.437995
950ac99a04713eeb0672575cefd8c1ec3997841b
4,377
py
Python
cnn_implementer/backends/halide.py
lwaeijen/cnn-mapping-tool
a41c2dccb820f6227ddb6d75af9213e187744826
[ "MIT" ]
null
null
null
cnn_implementer/backends/halide.py
lwaeijen/cnn-mapping-tool
a41c2dccb820f6227ddb6d75af9213e187744826
[ "MIT" ]
null
null
null
cnn_implementer/backends/halide.py
lwaeijen/cnn-mapping-tool
a41c2dccb820f6227ddb6d75af9213e187744826
[ "MIT" ]
null
null
null
import os import jinja2 import networkx as nx from ..utils import Logger from math import ceil, floor from ..model import Segment #Add function to Segments that generates unique names for internal nodes #Function is specific for halide backend, hence it is added here and not in the original definition of Segment def h...
31.042553
162
0.558145
3,527
0.805803
0
0
0
0
0
0
1,429
0.326479
950b9bd680855e1bc01f2dffb96d063d03df4633
137
py
Python
plasmapy/utils/pytest_helpers/__init__.py
seanjunheng2/PlasmaPy
7b4e4aaf8b03d88b654456bca881329ade09e377
[ "BSD-2-Clause", "MIT", "BSD-2-Clause-Patent", "BSD-1-Clause", "BSD-3-Clause" ]
429
2016-10-31T19:40:32.000Z
2022-03-25T12:27:11.000Z
plasmapy/utils/pytest_helpers/__init__.py
RAJAGOPALAN-GANGADHARAN/PlasmaPy
6df9583cc47375687a07300c0aa11ba31634d770
[ "BSD-2-Clause", "MIT", "BSD-2-Clause-Patent", "BSD-1-Clause", "BSD-3-Clause" ]
1,400
2015-11-24T23:00:44.000Z
2022-03-30T21:03:25.000Z
plasmapy/utils/pytest_helpers/__init__.py
RAJAGOPALAN-GANGADHARAN/PlasmaPy
6df9583cc47375687a07300c0aa11ba31634d770
[ "BSD-2-Clause", "MIT", "BSD-2-Clause-Patent", "BSD-1-Clause", "BSD-3-Clause" ]
289
2015-11-24T18:54:57.000Z
2022-03-18T17:26:59.000Z
from plasmapy.utils.pytest_helpers.pytest_helpers import ( assert_can_handle_nparray, run_test, run_test_equivalent_calls, )
22.833333
58
0.79562
0
0
0
0
0
0
0
0
0
0
950c169f450a431d53eeadbbe5cd4c9bc80dac22
664
py
Python
code/Attack/ParameterTypes/Types.py
TomasMadeja/ID2T
77f51c074d1ff83c7d648ae62ecaed3e5cfde80c
[ "MIT" ]
33
2018-11-21T12:50:52.000Z
2022-01-12T05:38:12.000Z
code/Attack/ParameterTypes/Types.py
TomasMadeja/ID2T
77f51c074d1ff83c7d648ae62ecaed3e5cfde80c
[ "MIT" ]
108
2018-11-21T12:33:47.000Z
2022-02-09T15:56:59.000Z
code/Attack/ParameterTypes/Types.py
TomasMadeja/ID2T
77f51c074d1ff83c7d648ae62ecaed3e5cfde80c
[ "MIT" ]
20
2018-11-22T13:03:20.000Z
2022-01-12T00:19:28.000Z
import enum class ParameterTypes(enum.Enum): """ Defines types for parameters. These types may be used in the specification of allowed parameters within the individual attack classes. The type is used to verify the validity of the given value. """ TYPE_IP_ADDRESS = 0 TYPE_MAC_ADDRESS = 1 T...
28.869565
111
0.712349
649
0.97741
0
0
0
0
0
0
275
0.414157
950c84ecd7d7ee95d6bf316b3a497327243be4e4
1,984
py
Python
utils/error_handlrer.py
RobinPaspuel/YtechCode
219a8492aa5be76c445f3d70f8b2ef74e81c188e
[ "MIT" ]
null
null
null
utils/error_handlrer.py
RobinPaspuel/YtechCode
219a8492aa5be76c445f3d70f8b2ef74e81c188e
[ "MIT" ]
null
null
null
utils/error_handlrer.py
RobinPaspuel/YtechCode
219a8492aa5be76c445f3d70f8b2ef74e81c188e
[ "MIT" ]
null
null
null
from utils.error_with_arrows import * ##### ERRORS ######## class Error: def __init__(self, initial_pos, final_pos, error_class, details): self.initial_pos = initial_pos self.final_pos = final_pos self.error_class= error_class self.details= details def error_string(self): ...
40.489796
106
0.655242
1,880
0.947581
0
0
0
0
0
0
402
0.202621
950dcd67a7917370bcc5ec2201e9aaf688e1aa85
2,062
py
Python
postgres/python-asyncio/main.py
Gelbpunkt/idlebench
fe370f9fa6335cf738a91ca818638aedf0cf1ba3
[ "Apache-2.0" ]
null
null
null
postgres/python-asyncio/main.py
Gelbpunkt/idlebench
fe370f9fa6335cf738a91ca818638aedf0cf1ba3
[ "Apache-2.0" ]
null
null
null
postgres/python-asyncio/main.py
Gelbpunkt/idlebench
fe370f9fa6335cf738a91ca818638aedf0cf1ba3
[ "Apache-2.0" ]
4
2020-08-16T22:23:42.000Z
2020-08-17T20:15:33.000Z
import asyncio import asyncpg VALUES = [ 356091260429402122, "Why are you reading", 9164, 6000000, 14, 0, 0, 0, 463318425901596672, "https://i.imgur.com/LRV2QCK.png", 15306, ["Paragon", "White Sorcerer"], 0, 0, 647, "Leader", None, 0, "10.0",...
25.45679
88
0.511639
0
0
0
0
0
0
1,490
0.722599
1,075
0.521339
950e90e9549308bcb8380f5876c0fc12c6f68485
1,112
py
Python
fv-courseware/exercise-01/counter_formal.py
DonaldKellett/nmigen-beginner
260ae76a5277e36ec9909aaf6b76acab320aed88
[ "MIT" ]
1
2020-11-09T13:34:02.000Z
2020-11-09T13:34:02.000Z
fv-courseware/exercise-01/counter_formal.py
DonaldKellett/nmigen-beginner
260ae76a5277e36ec9909aaf6b76acab320aed88
[ "MIT" ]
null
null
null
fv-courseware/exercise-01/counter_formal.py
DonaldKellett/nmigen-beginner
260ae76a5277e36ec9909aaf6b76acab320aed88
[ "MIT" ]
null
null
null
from nmigen import * from nmigen.asserts import Assert from nmigen.cli import main_parser, main_runner __all__ = ["Counter"] """ Simple counter with formal verification See slides 50-60 in https://zipcpu.com/tutorial/class-verilog.pdf """ class Counter(Elaboratable): def __init__(self, fv_mode = False): self.fv_m...
25.272727
55
0.695144
671
0.603417
0
0
0
0
0
0
132
0.118705
951023fa012fa8c9f93693ace80f46cf9b0de998
10,524
py
Python
regru_cloudapi/__init__.py
plvskiy/regru_cloudapi
e137a391f67b116f51b77b8e33755f8a6c3b170d
[ "MIT" ]
1
2021-03-07T14:25:59.000Z
2021-03-07T14:25:59.000Z
regru_cloudapi/__init__.py
plvskiy/regru_cloudapi
e137a391f67b116f51b77b8e33755f8a6c3b170d
[ "MIT" ]
null
null
null
regru_cloudapi/__init__.py
plvskiy/regru_cloudapi
e137a391f67b116f51b77b8e33755f8a6c3b170d
[ "MIT" ]
null
null
null
import json import requests from regru_cloudapi.utils import Errors class CloudAPI(object): def __init__(self, token=None): self.token = token self.api_url = 'https://api.cloudvps.reg.ru/v1' self.HEADERS = {'Content-Type': 'application/json'} if self.token is not None: ...
33.515924
114
0.601292
10,578
0.993333
0
0
0
0
0
0
1,766
0.165837
9510db3851814a40d1e201c8697a846d403a09e9
731
py
Python
mnist/download.py
hiroog/cppapimnist
30d7e01954fc43da2eea5fe3ebf034b37e79cfd1
[ "MIT" ]
null
null
null
mnist/download.py
hiroog/cppapimnist
30d7e01954fc43da2eea5fe3ebf034b37e79cfd1
[ "MIT" ]
null
null
null
mnist/download.py
hiroog/cppapimnist
30d7e01954fc43da2eea5fe3ebf034b37e79cfd1
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import urllib.request import os import gzip DOWNLOAD_URL='http://yann.lecun.com/exdb/mnist/' file_list=[ 'train-images-idx3-ubyte', 'train-labels-idx1-ubyte', 't10k-images-idx3-ubyte', 't10k-labels-idx1-ubyte' ] for name in file_list: if not os.path.exists( name ): gz_name= name + '.gz'...
30.458333
118
0.575923
0
0
0
0
0
0
0
0
185
0.253078
951110f9319a47de447b38bde1aba4ab72ddd1bd
2,651
py
Python
arch/arm64/tests/a64_tbnz.py
Samsung/ADBI
3e424c45386b0a36c57211da819021cb1929775a
[ "Apache-2.0" ]
312
2016-02-04T11:03:17.000Z
2022-03-18T11:30:10.000Z
arch/arm64/tests/a64_tbnz.py
NickHardwood/ADBI
3e424c45386b0a36c57211da819021cb1929775a
[ "Apache-2.0" ]
4
2016-02-04T11:05:40.000Z
2017-07-27T04:22:27.000Z
arch/arm64/tests/a64_tbnz.py
NickHardwood/ADBI
3e424c45386b0a36c57211da819021cb1929775a
[ "Apache-2.0" ]
85
2016-02-04T12:48:30.000Z
2021-01-14T06:23:24.000Z
import random from common import * class test_a64_tbnz(TemplateTest): def gen_rand(self): regs = list(set(GPREGS) - {'x0', 'w0'}) while True: yield {'insn' : random.choice(['tbz', 'tbnz']), 'reg' : random.choice(regs), 'bit' : random.randint(...
38.42029
94
0.488118
2,614
0.986043
2,205
0.831762
0
0
0
0
334
0.12599
95128ff73c5b19e12278311e5737397a3c5afe40
6,943
py
Python
infrastructure/cdn-in-a-box/ort/traffic_ops_ort/utils.py
hbeatty/incubator-trafficcontrol
13ed991531778c60298eb8f532b2a4862f7cb67b
[ "MIT", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
1
2021-04-11T16:55:27.000Z
2021-04-11T16:55:27.000Z
infrastructure/cdn-in-a-box/ort/traffic_ops_ort/utils.py
hbeatty/incubator-trafficcontrol
13ed991531778c60298eb8f532b2a4862f7cb67b
[ "MIT", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
3
2021-03-12T22:35:02.000Z
2021-12-09T23:00:11.000Z
infrastructure/cdn-in-a-box/ort/traffic_ops_ort/utils.py
hbeatty/incubator-trafficcontrol
13ed991531778c60298eb8f532b2a4862f7cb67b
[ "MIT", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.572222
211
0.715109
0
0
0
0
0
0
0
0
4,621
0.665562
9512a6419412924d68f8311278ec236177bb738a
138
py
Python
api/models/province.py
krosben/api-ctan
01d5e29694e6f4e35fbe6797c319b109e5bc1c3f
[ "MIT" ]
null
null
null
api/models/province.py
krosben/api-ctan
01d5e29694e6f4e35fbe6797c319b109e5bc1c3f
[ "MIT" ]
6
2020-06-05T23:40:32.000Z
2021-06-10T19:03:25.000Z
api/models/province.py
krosben/api-ctan
01d5e29694e6f4e35fbe6797c319b109e5bc1c3f
[ "MIT" ]
null
null
null
from django.db import models class Province(models.Model): name = models.CharField(max_length=50, help_text="Name of the province")
23
76
0.76087
106
0.768116
0
0
0
0
0
0
22
0.15942
9513d85dbfeb9ed30b03373fa4dafc60c0d1a5b4
7,512
py
Python
audino/backend/routes/labels.py
UCSD-E4E/Pyrenote
bede2cfae9cb543a855d5cb01133b8d7c4abaa1c
[ "MIT" ]
11
2021-07-09T21:39:05.000Z
2022-03-06T23:11:44.000Z
audino/backend/routes/labels.py
UCSD-E4E/Pyrenote
bede2cfae9cb543a855d5cb01133b8d7c4abaa1c
[ "MIT" ]
120
2021-07-08T04:15:18.000Z
2022-02-26T00:21:25.000Z
audino/backend/routes/labels.py
UCSD-E4E/Pyrenote
bede2cfae9cb543a855d5cb01133b8d7c4abaa1c
[ "MIT" ]
1
2021-10-16T04:55:42.000Z
2021-10-16T04:55:42.000Z
import sqlalchemy as sa from flask import jsonify, request from flask_jwt_extended import jwt_required, get_jwt_identity import csv from sqlalchemy.sql.expression import false from backend import app, db from backend.models import Label, LabelValue, Project from .helper_functions import ( check_admin, check_a...
29.574803
78
0.580804
0
0
0
0
7,097
0.944755
0
0
1,301
0.17319