hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
42314301c21e9d9a0374fc5a6948fd930c44cebb
199
py
Python
src/pywmapi/common/__init__.py
leonardodalinky/pywmapi
b9e2650761895eb9a88170497c4d209b5dd6870c
[ "MIT" ]
4
2022-01-27T14:31:38.000Z
2022-03-25T08:52:01.000Z
src/pywmapi/common/__init__.py
leonardodalinky/pywmapi
b9e2650761895eb9a88170497c4d209b5dd6870c
[ "MIT" ]
null
null
null
src/pywmapi/common/__init__.py
leonardodalinky/pywmapi
b9e2650761895eb9a88170497c4d209b5dd6870c
[ "MIT" ]
null
null
null
HOMEPAGE_URL = "https://warframe.market" API_BASE_URL = "https://api.warframe.market/v1" WSS_BASE_URL = "wss://warframe.market/socket"
24.875
47
0.738693
from .defs import * from .enums import * from .models import * HOMEPAGE_URL = "https://warframe.market" API_BASE_URL = "https://api.warframe.market/v1" WSS_BASE_URL = "wss://warframe.market/socket"
0
0
0
0
0
0
0
-3
66
517c28415512e55a2db28762175fda18b5bb7b4d
2,448
py
Python
prody/routines/prody_select.py
gokceneraslan/ProDy
74d40c372c53bd68f5e9f9c47b991b2e2b1b9f27
[ "NCSA" ]
null
null
null
prody/routines/prody_select.py
gokceneraslan/ProDy
74d40c372c53bd68f5e9f9c47b991b2e2b1b9f27
[ "NCSA" ]
null
null
null
prody/routines/prody_select.py
gokceneraslan/ProDy
74d40c372c53bd68f5e9f9c47b991b2e2b1b9f27
[ "NCSA" ]
null
null
null
# ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 Ahmet Bakan # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
34.971429
78
0.698529
# ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 Ahmet Bakan # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
0
0
0
0
0
932
0
0
46
110fe71a6d76acd8c7d0b80c7f91d79e696b7cc3
12,435
py
Python
src/discorn/blockchain.py
Discorn-Project/Discorn
016afd750031e28880d9acf803ff6bc182adcb7f
[ "MIT" ]
9
2021-04-03T12:28:49.000Z
2021-05-03T13:07:33.000Z
blockchain.py
busybox11/Discorn
d48f1013d4f4149ce3c53996ff966074ae45dc89
[ "MIT" ]
1
2021-05-02T18:37:31.000Z
2021-05-02T18:44:29.000Z
blockchain.py
busybox11/Discorn
d48f1013d4f4149ce3c53996ff966074ae45dc89
[ "MIT" ]
2
2021-05-16T20:32:29.000Z
2021-12-14T17:25:21.000Z
import pycryptonight import hashlib import string string def fast_hash(data: bytes): """ Hashing function used for Corner hashes. :param data: bytes :return: str """ return pycryptonight.cn_fast_hash(data).hex() def get_hash(data: bytes, hash_func=hashlib.sha256): """ Hashing funct...
25.325866
98
0.54998
import pycryptonight import ecdsa from Crypto.Hash import RIPEMD160 import hashlib from log import Logger import base58 import os import time import string from merklelib import MerkleTree string def fast_hash(data: bytes): """ Hashing function used for Corner hashes. :param data: bytes :return: str...
0
2,142
0
9,196
0
0
0
-15
407
6c3e1105a5477b409c757e32e4d1edc15f105a05
3,531
py
Python
pre_process.py
thinkAmi/ipa_issues_model_by_doc2vec
8fd2c7f48c7342fd185b8f4e4bd4ed2ae0447fa4
[ "MIT" ]
null
null
null
pre_process.py
thinkAmi/ipa_issues_model_by_doc2vec
8fd2c7f48c7342fd185b8f4e4bd4ed2ae0447fa4
[ "MIT" ]
null
null
null
pre_process.py
thinkAmi/ipa_issues_model_by_doc2vec
8fd2c7f48c7342fd185b8f4e4bd4ed2ae0447fa4
[ "MIT" ]
null
null
null
import re OCR_AP = { 'dir': 'ap', 'last': '80' } OCR_KOUDO = { 'dir': 'koudo', 'last': '30', } # AFTER_LAST_QUESTION = re.compile(r'[0-9]|-') if __name__ == '__main__': main()
31.810811
98
0.540923
import pathlib import re OCR_AP = { 'dir': 'ap', 'last': '問80' } OCR_KOUDO = { 'dir': 'koudo', 'last': '問30', } # 最後の問題が終わったと判断するための正規表現 AFTER_LAST_QUESTION = re.compile(r'[0-9]|-') def main(): split_by_question(OCR_AP) split_by_question(OCR_KOUDO) def split_by_question(ocr_type): # ht...
1,416
0
0
0
0
2,747
0
-7
114
0fef97600b12f3be377b20b9cce249f59e622c18
39,809
py
Python
BioSTEAM 2.x.x/biorefineries/BDO/system.py
blsymens/Bioindustrial-Park
c1173646185d52f4b8d595ad088ade8e5216614d
[ "MIT" ]
1
2020-01-08T23:05:34.000Z
2020-01-08T23:05:34.000Z
BioSTEAM 2.x.x/biorefineries/BDO/system.py
blsymens/Bioindustrial-Park
c1173646185d52f4b8d595ad088ade8e5216614d
[ "MIT" ]
3
2020-12-30T03:16:50.000Z
2021-01-04T20:36:45.000Z
BioSTEAM 2.x.x/biorefineries/BDO/system.py
blsymens/Bioindustrial-Park
c1173646185d52f4b8d595ad088ade8e5216614d
[ "MIT" ]
1
2021-03-09T12:04:54.000Z
2021-03-09T12:04:54.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 30 09:15:23 2019 Modified from the cornstover biorefinery constructed in Cortes-Pea et al., 2020, with modification of fermentation system for organic acids instead of the original ethanol [1] Cortes-Pea et al., BioSTEAM: A Fast and Flexible Platfo...
39.968876
162
0.567962
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 30 09:15:23 2019 Modified from the cornstover biorefinery constructed in Cortes-Peña et al., 2020, with modification of fermentation system for organic acids instead of the original ethanol [1] Cortes-Peña et al., BioSTEAM: A Fast and Flexible Plat...
9
229
0
0
0
3,141
0
63
293
5eae81090612c227c9b6d70ca8dad4b306ff2c67
332
py
Python
tests/test_remove_stress.py
absentabyss/ithkuil
2f10841189550c19d7f951c87e0b020969356cda
[ "MIT" ]
20
2016-03-01T04:21:21.000Z
2021-04-28T06:52:30.000Z
tests/test_remove_stress.py
absentabyss/ithkuil
2f10841189550c19d7f951c87e0b020969356cda
[ "MIT" ]
5
2016-01-07T16:22:25.000Z
2019-12-26T01:49:16.000Z
tests/test_remove_stress.py
absentabyss/ithkuil
2f10841189550c19d7f951c87e0b020969356cda
[ "MIT" ]
6
2017-05-08T20:46:43.000Z
2020-05-09T23:54:56.000Z
txts_to_test = [ ('a', 'a'), ('o', 'o'), ('u', 'au'), ('i', 'ai'), ('a', 'a'), ('a', 'ae'), ('', 'a') ]
20.75
55
0.566265
import pytest from ithkuil.morphology.words import remove_stress txts_to_test = [ ('a', 'a'), ('o', 'o'), ('áu', 'au'), ('ái', 'ai'), ('aú', 'aù'), ('aé', 'ae'), ('á', 'a') ] @pytest.mark.parametrize('txt, expected', txts_to_test) def test_word(txt, expected): assert remove_stress(txt)...
12
106
0
0
0
0
0
21
67
d1751d4f4b25090308f574118440758b1ed37a82
792
py
Python
symbols/source/DCVoltage.py
d-fathi/PyAMS
98b6e052280551bf53bbb9cb20a6cef1f92faf89
[ "Unlicense" ]
null
null
null
symbols/source/DCVoltage.py
d-fathi/PyAMS
98b6e052280551bf53bbb9cb20a6cef1f92faf89
[ "Unlicense" ]
null
null
null
symbols/source/DCVoltage.py
d-fathi/PyAMS
98b6e052280551bf53bbb9cb20a6cef1f92faf89
[ "Unlicense" ]
null
null
null
#------------------------------------------------------------------------------- # Name: Vdc Source # Author: D.Fathi # Created: 20/03/2015 # Modified: 01/04/2020 # Copyright: (c) PyAMS # Licence: CC-BY-SA #------------------------------------------------------------------------------- #S...
24.75
81
0.415404
#------------------------------------------------------------------------------- # Name: Vdc Source # Author: D.Fathi # Created: 20/03/2015 # Modified: 01/04/2020 # Copyright: (c) PyAMS # Licence: CC-BY-SA #------------------------------------------------------------------------------- fr...
3
0
0
350
0
0
0
24
68
d703b3e89c861e867d5f47f407e19a572813a9c7
3,079
py
Python
Python/Services/Logger.py
vanavski/Text_tonal_analyzer
a990d965dc4eca5bb43a70a050eb3ad10323760b
[ "Apache-2.0" ]
null
null
null
Python/Services/Logger.py
vanavski/Text_tonal_analyzer
a990d965dc4eca5bb43a70a050eb3ad10323760b
[ "Apache-2.0" ]
1
2020-08-07T20:20:46.000Z
2020-08-07T20:20:46.000Z
Python/Services/Logger.py
vanavski/Text_tonal_analyzer
a990d965dc4eca5bb43a70a050eb3ad10323760b
[ "Apache-2.0" ]
null
null
null
# Copyright 2018. All rights reserved. # Author: German Yakimov # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
39.474359
120
0.63722
# Copyright © 2018. All rights reserved. # Author: German Yakimov # 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 appl...
2
0
0
2,319
0
0
0
-9
157
48068e5d5ca90193702b291b60b5c5e4dac6e08d
695
py
Python
setup.py
ismailktami/robotframework-publisher-results-jira
26167b6c1881fe0ea8ea492f4b58f63061247a48
[ "MIT" ]
null
null
null
setup.py
ismailktami/robotframework-publisher-results-jira
26167b6c1881fe0ea8ea492f4b58f63061247a48
[ "MIT" ]
null
null
null
setup.py
ismailktami/robotframework-publisher-results-jira
26167b6c1881fe0ea8ea492f4b58f63061247a48
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from PublisherJiraTestsResults.version import VERSION classifiers = [ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3' ] setup( name='robotframework-publisher-results-jira', version=VERS...
27.8
78
0.723741
from setuptools import setup, find_packages from PublisherJiraTestsResults.version import VERSION classifiers = [ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3' ] setup( name='robotframework-publisher-results-jira', version=VERS...
0
0
0
0
0
0
0
0
0
c74abbf7e46a03add2c525bde08bf9a7b39f5235
1,060
py
Python
rasp/device/__init__.py
CreeperLin/RASP
c45f9ad57b18d92b663419538562d511149c329f
[ "MIT" ]
1
2021-07-20T14:56:58.000Z
2021-07-20T14:56:58.000Z
rasp/device/__init__.py
CreeperLin/RASP
c45f9ad57b18d92b663419538562d511149c329f
[ "MIT" ]
null
null
null
rasp/device/__init__.py
CreeperLin/RASP
c45f9ad57b18d92b663419538562d511149c329f
[ "MIT" ]
2
2020-04-21T06:49:04.000Z
2021-07-20T14:57:06.000Z
_DEVICE = 'frontend' required_entries = [ 'reset', 'init', 'run', 'add_node', ]
25.238095
72
0.587736
import importlib _DEVICE = 'frontend' required_entries = [ 'reset', 'init', 'run', 'add_node', ] def load_device(config): global _DEVICE _DEVICE = config.get('type', 'frontend') if _DEVICE == 'frontend': module_name = '.frontend_device' package = 'rasp.device' elif _D...
0
0
0
0
0
898
0
-5
68
7fe867fd559b5df13421d21d6455bfcb821f7df6
7,328
py
Python
test_meIRL/run_experiment_irl.py
ranok92/deepirl
88c7e76986243cf0b988d8d7dc0eef6b58e07864
[ "MIT" ]
2
2019-01-04T22:03:15.000Z
2019-04-03T00:16:11.000Z
test_meIRL/run_experiment_irl.py
ranok92/deepirl
88c7e76986243cf0b988d8d7dc0eef6b58e07864
[ "MIT" ]
null
null
null
test_meIRL/run_experiment_irl.py
ranok92/deepirl
88c7e76986243cf0b988d8d7dc0eef6b58e07864
[ "MIT" ]
null
null
null
import argparse import numpy as np import sys sys.path.insert(0, '..') # NOQA: E402 parser = argparse.ArgumentParser() parser.add_argument('--policy-path', type=str, nargs='?', default=None) parser.add_argument('--play', action='store_true', help='play given or latest stored policy.') parser.add_a...
38.568421
118
0.63619
import pdb import argparse import matplotlib import numpy as np import gym, sys, time, os import torch import numpy as np import datetime sys.path.insert(0, '..') # NOQA: E402 from logger.logger import Logger import utils from mountain_car import MCFeatures, MCFeaturesOnehot parser = argparse.ArgumentParser() par...
0
0
0
0
0
4,025
0
16
203
34f87cabe1432e440a2c44c39b5241ba4fafb621
3,918
py
Python
nr.parsing.core/src/nr/parsing/core/tokenizer/ruleset.py
NiklasRosenstein/nr-python
dc5b31ae5773ea4522a6f35112792dde9e872bef
[ "MIT" ]
3
2018-11-20T22:19:35.000Z
2020-10-31T09:23:53.000Z
nr.parsing.core/src/nr/parsing/core/tokenizer/ruleset.py
NiklasRosenstein/python-nr
dc5b31ae5773ea4522a6f35112792dde9e872bef
[ "MIT" ]
3
2021-08-09T00:14:26.000Z
2021-08-09T00:28:27.000Z
nr.parsing.core/src/nr/parsing/core/tokenizer/ruleset.py
NiklasRosenstein/nr-python
dc5b31ae5773ea4522a6f35112792dde9e872bef
[ "MIT" ]
3
2019-03-22T06:15:17.000Z
2020-10-31T09:23:53.000Z
import typing as t if t.TYPE_CHECKING: T = t.TypeVar('T') U = t.TypeVar('U') V = t.TypeVar('V') R = t.TypeVar('R')
29.458647
98
0.667688
import contextlib import typing as t from dataclasses import dataclass from ..scanner import Scanner if t.TYPE_CHECKING: from .extractor import TokenExtractor T = t.TypeVar('T') U = t.TypeVar('U') V = t.TypeVar('V') R = t.TypeVar('R') @dataclass class Sentinel(t.Generic[T, U]): type: T value: U @dataclass...
0
909
0
2,671
0
0
0
32
184
6bbe5d2a02bded07f7cafa565ca1011f98c09985
734
py
Python
coniii/test_utils.py
bcdaniels/coniii
50218dc571135dd08b441361da33fed64a8eebc4
[ "MIT" ]
10
2018-01-26T09:52:17.000Z
2019-04-02T13:34:53.000Z
coniii/test_utils.py
bcdaniels/coniii
50218dc571135dd08b441361da33fed64a8eebc4
[ "MIT" ]
19
2017-04-19T17:05:50.000Z
2019-01-20T20:54:06.000Z
coniii/test_utils.py
bcdaniels/coniii
50218dc571135dd08b441361da33fed64a8eebc4
[ "MIT" ]
3
2017-04-19T16:58:05.000Z
2018-10-22T19:14:04.000Z
from __future__ import division def test_state_gen_and_count(): """Test generation of binary states using bin_states() and xbin_states().""" assert np.array_equal( bin_states(5),np.vstack([i for i in xbin_states(5)]) ) states = bin_states(5) p,s = state_probs(states) assert (p==1/32).all() ass...
28.230769
81
0.63624
from __future__ import division from utils import * def test_sub_to_ind(): for n in xrange(2,5): counter = 0 for i,j in combinations(range(n),2): assert sub_to_ind(n,i,j)==counter assert ind_to_sub(n,counter)==(i,j) counter += 1 def test_state_gen_and_count(): ...
0
0
0
0
0
211
0
-2
45
d2697b8cee1ae168ceb349d5972a5029bb7ed9db
838
py
Python
exercicios/ex056b.py
DeyvisonR/curso_python
983b634d39f542369628ae48c7449ea75fd1ebbd
[ "MIT" ]
null
null
null
exercicios/ex056b.py
DeyvisonR/curso_python
983b634d39f542369628ae48c7449ea75fd1ebbd
[ "MIT" ]
null
null
null
exercicios/ex056b.py
DeyvisonR/curso_python
983b634d39f542369628ae48c7449ea75fd1ebbd
[ "MIT" ]
null
null
null
soma = 0 cont = 0 maior = 0 mulher = 0 nomemaisvelho = '' for p in range(1, 5): print(f'----- {p} pessoa -----') nome = str(input('nome: ')).strip() idade = int(input('idade: ')) sexo = str(input('sexo [M/F]: ')).strip().lower() soma = idade + soma cont = cont + 1 if p == 1 and sexo == 'm': ...
29.928571
79
0.547733
soma = 0 cont = 0 maior = 0 mulher = 0 nomemaisvelho = '' for p in range(1, 5): print(f'----- {p}ª pessoa -----') nome = str(input('nome: ')).strip() idade = int(input('idade: ')) sexo = str(input('sexo [M/F]: ')).strip().lower() soma = idade + soma cont = cont + 1 if p == 1 and sexo == 'm':...
4
0
0
0
0
0
0
0
0
e5c50c04b31164b92292c1fe2313cfdab744cbfe
659
py
Python
parser/team26/G26/Instrucciones/DML/update.py
susanliss/tytus
a613a2352cf4a1d0e90ce27bb346ab60ed8039cc
[ "MIT" ]
1
2021-01-09T05:32:35.000Z
2021-01-09T05:32:35.000Z
parser/team26/G26/Instrucciones/DML/update.py
XiomRB/tytus
0873e4bdce5c110bee6ef2aa98240be6a93ae024
[ "MIT" ]
null
null
null
parser/team26/G26/Instrucciones/DML/update.py
XiomRB/tytus
0873e4bdce5c110bee6ef2aa98240be6a93ae024
[ "MIT" ]
null
null
null
import sys sys.path.append('../G26/Instrucciones')
21.966667
69
0.660091
import sys sys.path.append('../G26/Instrucciones') from instruccion import * class Update(Instruccion): def __init__(self, tableid, asignaciones = [], condiciones = []): self.tableid = tableid self.asignaciones = asignaciones self.condiciones = condiciones def execute(self): ...
0
0
0
535
0
0
0
4
69
efec58b37a6b309b204c9cecd14c0f798a333343
2,258
py
Python
example_stage.py
SimonDaNinja/2D_Platform
56fd708d306dd45afa2b695492dc6517134aa045
[ "MIT" ]
1
2021-04-02T20:38:42.000Z
2021-04-02T20:38:42.000Z
example_stage.py
SimonDaNinja/2D_Platform
56fd708d306dd45afa2b695492dc6517134aa045
[ "MIT" ]
null
null
null
example_stage.py
SimonDaNinja/2D_Platform
56fd708d306dd45afa2b695492dc6517134aa045
[ "MIT" ]
null
null
null
#--------------- #MIT License #Copyright (c) 2019 Simon Liljestrand #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 use, copy, ...
35.84127
91
0.736935
#--------------- #MIT License #Copyright (c) 2019 Simon Liljestrand #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 use, copy, ...
0
0
0
0
0
0
0
0
0
9aeac8d4cde040c2bf4ea72b342d583dce376fc0
1,001
py
Python
mtdb/eval/unused/local-and-ebs-mag/throughput-latency/Conf.py
hobinyoon/mutants-cassandra-2.2.3
a26821726dcedbb5a96a02e649d552e06815ea5f
[ "Apache-2.0" ]
null
null
null
mtdb/eval/unused/local-and-ebs-mag/throughput-latency/Conf.py
hobinyoon/mutants-cassandra-2.2.3
a26821726dcedbb5a96a02e649d552e06815ea5f
[ "Apache-2.0" ]
2
2016-07-06T14:38:40.000Z
2016-07-07T16:41:20.000Z
mtdb/eval/unused/local-and-ebs-mag/throughput-latency/Conf.py
hobinyoon/mutants-cassandra-2.2.3
a26821726dcedbb5a96a02e649d552e06815ea5f
[ "Apache-2.0" ]
1
2015-11-07T03:07:04.000Z
2015-11-07T03:07:04.000Z
import sys sys.path.insert(0, "../../../util/python") _conf = None # Implement when needed
25.025
126
0.755245
import argparse import sys import yaml sys.path.insert(0, "../../../util/python") import Cons _conf = None def Init(): _ParseYaml() #_ParseCmdlineArgs() def Get(key): return _conf[key] def _ParseYaml(): global _conf with open("configuration.yaml", 'r') as stream: _conf = yaml.load(stream) #Cons.P(_conf)...
0
0
0
0
0
773
0
-26
157
6aa70387d9c785be792414a0f4abdbc04d5dcd35
3,344
py
Python
ann_solution/inference.py
michaellengyel/Rat_Logger
ea0627aa4fadfd587725495818c3f3dbb818151e
[ "Apache-2.0" ]
null
null
null
ann_solution/inference.py
michaellengyel/Rat_Logger
ea0627aa4fadfd587725495818c3f3dbb818151e
[ "Apache-2.0" ]
null
null
null
ann_solution/inference.py
michaellengyel/Rat_Logger
ea0627aa4fadfd587725495818c3f3dbb818151e
[ "Apache-2.0" ]
null
null
null
import torch.nn as nn import torchvision.transforms as transforms if __name__ == '__main__': main()
30.678899
162
0.632177
import torch import torch.nn as nn import torchvision.transforms as transforms import matplotlib.pyplot as plt import numpy as np import pandas as pd from torch.utils.data import Dataset from torch.utils.data import DataLoader class RatNet(nn.Module): def __init__(self, input_size, hidden_size, output_size): ...
0
0
0
1,180
0
1,800
0
29
225
8c8b6d16519c9b33cc933584b02e1a244bc29d16
1,443
py
Python
ddpg-pendulum/main.py
xlnwel/deep-reinforcement-learning
59581b9e3402f9e4dc8763d8bc2f54df88f3d885
[ "MIT" ]
7
2018-08-18T17:13:33.000Z
2020-05-03T00:12:41.000Z
ddpg-pendulum/main.py
xlnwel/deep-reinforcement-learning
59581b9e3402f9e4dc8763d8bc2f54df88f3d885
[ "MIT" ]
null
null
null
ddpg-pendulum/main.py
xlnwel/deep-reinforcement-learning
59581b9e3402f9e4dc8763d8bc2f54df88f3d885
[ "MIT" ]
4
2018-10-29T02:43:29.000Z
2019-02-12T05:08:53.000Z
import gym # imort matplotlib.pyplot as plt from MyAgent import Agent env = gym.make('Pendulum-v0') env.seed(2) agent = Agent(state_size=3, action_size=1) scores = ddpg() # fig = plt.figure() # ax = fig.add_subplot(111) # plt.plot(np.arange(1, len(scores)+1), scores) # plt.ylabel('Score') # plt.xlabel('Episode #') #...
32.066667
101
0.629245
import gym import random import torch import numpy as np from collections import deque # imort matplotlib.pyplot as plt from MyAgent import Agent env = gym.make('Pendulum-v0') env.seed(2) agent = Agent(state_size=3, action_size=1) def ddpg(n_episodes=1000, max_t=300, print_every=100): scores_deque = deque(maxlen=...
0
0
0
0
0
1,013
0
-12
111
4b483af26b27d5c60b10cc101f5caa6d0b4f4af5
485
py
Python
voxel_globe/ingest/tasks.py
ngageoint/voxel-globe
91f386de652b704942165889c10468b2c4cf4eec
[ "MIT" ]
28
2015-07-27T23:57:24.000Z
2020-04-05T15:10:52.000Z
voxel_globe/ingest/tasks.py
VisionSystemsInc/voxel_globe
6eb3fca5586726428e9d914f7b730ca164c64a52
[ "MIT" ]
50
2016-02-11T15:50:22.000Z
2016-10-27T22:38:27.000Z
voxel_globe/ingest/tasks.py
ngageoint/voxel-globe
91f386de652b704942165889c10468b2c4cf4eec
[ "MIT" ]
8
2015-07-27T19:22:03.000Z
2021-01-04T09:44:48.000Z
from celery.utils.log import get_task_logger logger = get_task_logger(__name__)
28.529412
77
0.802062
from voxel_globe.common_tasks import shared_task, VipTask from celery.utils.log import get_task_logger logger = get_task_logger(__name__) @shared_task(base=VipTask, bind=True) def cleanup(self, upload_session_id): ''' Clean up after successful ingest Currently this only entails removing the upload session ...
0
321
0
0
0
0
0
36
45
34fcd78f59e4ffbb673bcddd783c944205d0744b
8,250
py
Python
extra_files/lambda.py
rishabh-goel/Rishabh_Goel_CS441_HW3
09768825edd11afa2dd3186851c2668c1cef9214
[ "Apache-2.0" ]
null
null
null
extra_files/lambda.py
rishabh-goel/Rishabh_Goel_CS441_HW3
09768825edd11afa2dd3186851c2668c1cef9214
[ "Apache-2.0" ]
null
null
null
extra_files/lambda.py
rishabh-goel/Rishabh_Goel_CS441_HW3
09768825edd11afa2dd3186851c2668c1cef9214
[ "Apache-2.0" ]
null
null
null
import boto3 import re s3 = boto3.client('s3') GET_RAW_PATH = '/getLogCount' POST_RAW_PATH = '/postLogCount' GRPC_RAW_PATH = '/GRPC' TEST_RAW_PATH = '/test' regexPattern = re.compile('([a-c][e-g][0-3]|[A-Z][5-9][f-w]){5,15}') ## Method to parse input for GET, POST, GRPC requests ## Method to parse input for Test ca...
38.732394
106
0.621939
import json import boto3 import re import datetime s3 = boto3.client('s3') GET_RAW_PATH = '/getLogCount' POST_RAW_PATH = '/postLogCount' GRPC_RAW_PATH = '/GRPC' TEST_RAW_PATH = '/test' regexPattern = re.compile('([a-c][e-g][0-3]|[A-Z][5-9][f-w]){5,15}') ## Method to parse input for GET, POST, GRPC requests def getIn...
0
0
0
0
0
7,612
0
-16
154
0d1c2f707a84ac2af7189b219b6c863866eda165
421
py
Python
10_learn_openpyxl/write_image.py
shikechen/LearnPython
aa7b914779702c650733c2e95fad1b9dd2c1cb50
[ "Apache-2.0" ]
null
null
null
10_learn_openpyxl/write_image.py
shikechen/LearnPython
aa7b914779702c650733c2e95fad1b9dd2c1cb50
[ "Apache-2.0" ]
null
null
null
10_learn_openpyxl/write_image.py
shikechen/LearnPython
aa7b914779702c650733c2e95fad1b9dd2c1cb50
[ "Apache-2.0" ]
null
null
null
""" Author: shikechen Function: Write image to sheet Version: 1.0 Date: 2019/3/6 """ if __name__ == '__main__': main()
16.84
42
0.643705
""" Author: shikechen Function: Write image to sheet Version: 1.0 Date: 2019/3/6 """ from openpyxl import Workbook from openpyxl.drawing.image import Image def main(): book = Workbook() sheet = book.active img = Image('dream_lake_colorado.png') sheet['A1'] = 'Beautiful scenery' s...
0
0
0
0
0
185
0
27
67
ac5eba834fdc677c381d2e7ae04fddee91bf71b1
1,837
py
Python
imgToTextColor.py
fizzrepo/Video-to-Text
699db051b3dec96e14f7495722ee24f091e03716
[ "MIT" ]
1
2022-03-15T17:22:34.000Z
2022-03-15T17:22:34.000Z
imgToTextColor.py
fizzrepo/Video-to-Text
699db051b3dec96e14f7495722ee24f091e03716
[ "MIT" ]
null
null
null
imgToTextColor.py
fizzrepo/Video-to-Text
699db051b3dec96e14f7495722ee24f091e03716
[ "MIT" ]
1
2022-03-14T17:18:13.000Z
2022-03-14T17:18:13.000Z
import numpy as np import pickle # Load in color lookup table data with open('colors.pkl', 'rb') as f: LERPED = pickle.load(f) LUT = np.load('LUT.npy') def set_color(bg, fg): ''' Generates a character sequence to set the foreground and background colors ''' return f'\u001b[48;5;{bg...
28.261538
83
0.559064
import numpy as np import pickle # Load in color lookup table data with open('colors.pkl', 'rb') as f: LERPED = pickle.load(f) LUT = np.load('LUT.npy') def set_color(bg, fg): ''' Generates a character sequence to set the foreground and background colors ''' return f'\u001b[48;5;{bg...
0
0
0
0
0
0
0
0
0
56d0ecb05cc73a86cd5f3c0e5f67c43ac55f2d2a
1,713
py
Python
ace/samples/breiman85.py
partofthething/ace
689d0caac3ba0708444be6ebf62627137b08ae46
[ "MIT" ]
47
2015-04-29T06:52:03.000Z
2022-03-15T11:05:01.000Z
ace/samples/breiman85.py
Jimmy-INL/ace
689d0caac3ba0708444be6ebf62627137b08ae46
[ "MIT" ]
12
2015-05-29T15:21:25.000Z
2020-10-08T15:03:41.000Z
ace/samples/breiman85.py
Jimmy-INL/ace
689d0caac3ba0708444be6ebf62627137b08ae46
[ "MIT" ]
22
2015-06-02T17:30:35.000Z
2022-02-16T20:46:24.000Z
"""Run the Sample ACE problem from [Breiman85]_.""" import numpy.random import scipy.special from ace import ace def build_sample_ace_problem_breiman85(N=200): """Sample problem from Breiman 1985.""" x_cubed = numpy.random.standard_normal(N) x = scipy.special.cbrt(x_cubed) noise = numpy.random.stand...
25.954545
67
0.649154
"""Run the Sample ACE problem from [Breiman85]_.""" import numpy.random import scipy.special from ace import ace def build_sample_ace_problem_breiman85(N=200): """Sample problem from Breiman 1985.""" x_cubed = numpy.random.standard_normal(N) x = scipy.special.cbrt(x_cubed) noise = numpy.random.stand...
0
0
0
0
0
0
0
0
0
5b077fb5a268307f3cef04f6d4fc0dd242b3a15c
1,511
py
Python
src/entity_linker/readers/config.py
mjstrobl/WEXEA
0af0be1cdb93fc00cd81f885aa15ef8d6579b304
[ "Apache-2.0" ]
10
2020-06-14T15:46:53.000Z
2021-04-29T15:02:23.000Z
src/entity_linker/readers/config.py
mjstrobl/WEXEA
0af0be1cdb93fc00cd81f885aa15ef8d6579b304
[ "Apache-2.0" ]
3
2021-08-25T16:16:45.000Z
2022-02-10T04:29:10.000Z
src/entity_linker/readers/config.py
mjstrobl/WEXEA
0af0be1cdb93fc00cd81f885aa15ef8d6579b304
[ "Apache-2.0" ]
1
2021-02-17T17:44:06.000Z
2021-02-17T17:44:06.000Z
""" Modifications copyright (C) 2020 Michael Strobl """ import pprint pp = pprint.PrettyPrinter() if __name__=='__main__': c = Config("configs/allnew_mentions_config.ini", verbose=True)
27.981481
73
0.64593
""" Modifications copyright (C) 2020 Michael Strobl """ import pprint import configparser pp = pprint.PrettyPrinter() class Config(object): def __init__(self, paths_config, verbose=False): config = configparser.ConfigParser() config._interpolation = configparser.ExtendedInterpolation() co...
0
0
0
1,275
0
0
0
-2
45
02731303dd2b95f83367d78fede4715419f9c5b4
7,001
py
Python
utils/helper_models.py
aaqib-ali/Flight_Delay-Prediction
6f849a60d0705d0f86beccf302e4953dafbee777
[ "MIT" ]
null
null
null
utils/helper_models.py
aaqib-ali/Flight_Delay-Prediction
6f849a60d0705d0f86beccf302e4953dafbee777
[ "MIT" ]
null
null
null
utils/helper_models.py
aaqib-ali/Flight_Delay-Prediction
6f849a60d0705d0f86beccf302e4953dafbee777
[ "MIT" ]
null
null
null
# sklearn # sklearn # from this project import utils.common as common # Function to calculate missing values by column
32.714953
140
0.6989
import pandas as pd import dill as pickle # sklearn from sklearn.model_selection import train_test_split import json import os import numpy as np import matplotlib.pyplot as plt import itertools from collections import Counter # sklearn from sklearn.preprocessing import MinMaxScaler from sklearn.metrics import roc_au...
0
0
0
0
0
6,182
0
152
538
727d355b83b641b8f67e979604f60f9994140c64
3,965
py
Python
IPython/nbconvert/utils/console.py
chebee7i/ipython
85b169fa3afc3d374973295c7f1409ededddbaca
[ "BSD-3-Clause-Clear" ]
2
2015-02-10T18:00:31.000Z
2015-05-01T02:53:46.000Z
IPython/nbconvert/utils/console.py
chebee7i/ipython
85b169fa3afc3d374973295c7f1409ededddbaca
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/nbconvert/utils/console.py
chebee7i/ipython
85b169fa3afc3d374973295c7f1409ededddbaca
[ "BSD-3-Clause-Clear" ]
1
2021-05-22T13:52:12.000Z
2021-05-22T13:52:12.000Z
"""Utility functions for interacting with the console""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this ...
32.768595
93
0.540731
"""Utility functions for interacting with the console""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this ...
0
0
0
0
0
0
0
0
0
c9263fd639d60076d028c1812c0b20f6dab313a3
279
py
Python
src/run.py
elipavlov/items
c935e3321284af251c3339e72531f26e9dd64802
[ "MIT" ]
null
null
null
src/run.py
elipavlov/items
c935e3321284af251c3339e72531f26e9dd64802
[ "MIT" ]
null
null
null
src/run.py
elipavlov/items
c935e3321284af251c3339e72531f26e9dd64802
[ "MIT" ]
null
null
null
# coding=utf-8 from os import sys, path from logging import getLogger from items.view import app sys.path.append(path.dirname(path.abspath(__file__))) logger = getLogger(__name__) logger.info(sys.path) if __name__ == '__main__': app.run(host='0.0.0.0', port=8080)
13.285714
53
0.716846
# coding=utf-8 from os import sys, path from logging import getLogger from items.view import app sys.path.append(path.dirname(path.abspath(__file__))) logger = getLogger(__name__) logger.info(sys.path) if __name__ == '__main__': app.run(host='0.0.0.0', port=8080)
0
0
0
0
0
0
0
0
0
e732c22894abd5f1d154324b3c2e6fecb4f9e857
22,935
py
Python
tethys_cli/gen_commands.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
null
null
null
tethys_cli/gen_commands.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
null
null
null
tethys_cli/gen_commands.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
null
null
null
""" ******************************************************************************** * Name: gen_commands.py * Author: Nathan Swain * Created On: 2015 * Copyright: (c) Brigham Young University 2015 * License: BSD 2-Clause ******************************************************************************** """ import os fro...
48.591102
120
0.631349
""" ******************************************************************************** * Name: gen_commands.py * Author: Nathan Swain * Created On: 2015 * Copyright: (c) Brigham Young University 2015 * License: BSD 2-Clause ******************************************************************************** """ import os imp...
0
0
0
0
0
20,356
0
38
433
d4d14ac14b85a0a8efbb2402cd9f83dbde86d1d6
2,040
py
Python
backend/Solve.py
Hasnae-bouhmady/Sudoku-Solver-machine-learning
9cf967d274df24ba473c12134f7d91ffbd3637bc
[ "MIT" ]
3
2021-12-12T23:26:23.000Z
2022-02-02T20:43:56.000Z
backend/Solve.py
Hasnae-bouhmady/Sudoku-Solver-machine-learning
9cf967d274df24ba473c12134f7d91ffbd3637bc
[ "MIT" ]
null
null
null
backend/Solve.py
Hasnae-bouhmady/Sudoku-Solver-machine-learning
9cf967d274df24ba473c12134f7d91ffbd3637bc
[ "MIT" ]
1
2021-12-12T23:30:13.000Z
2021-12-12T23:30:13.000Z
if __name__ == "__main__": grid = [[0 for x in range(9)] for y in range(9)] grid = [[3, 0, 6, 5, 0, 8, 4, 0, 0], [5, 2, 0, 0, 0, 0, 0, 0, 0], [0, 8, 7, 0, 0, 0, 0, 3, 1], [0, 0, 3, 0, 1, 0, 0, 8, 0], [9, 0, 0, 8, 6, 3, 0, 0, 5], ...
23.181818
137
0.429902
def print_grid(arr): for i in range(9): for j in range(9): print(arr[i][j], " " , end="") print("") def find_empty_location(arr, l): for row in range(9): for col in range(9): if (arr[row][col] == 0): l[0] = row l[1] = co...
0
0
0
0
0
1,273
0
0
173
ede5060dd70e8ed7ad17b5066c34d6fe825ce088
1,043
py
Python
docs/conf.py
squarethecircle/hymn
5cd291cc9d377b374c238fc154b020d534a6dcea
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
squarethecircle/hymn
5cd291cc9d377b374c238fc154b020d534a6dcea
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
squarethecircle/hymn
5cd291cc9d377b374c238fc154b020d534a6dcea
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Hymn documentation build configuration file import os import sys PROJECT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '../')) sys.path.insert(0, PROJECT_DIR) import hymn extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', ] sourc...
17.982759
77
0.677852
# -*- coding: utf-8 -*- # # Hymn documentation build configuration file import os import sys PROJECT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '../')) sys.path.insert(0, PROJECT_DIR) import hymn extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', ] sourc...
0
0
0
0
0
0
0
0
0
6f9eab99af42002e0f7f05b4838bcc2129e0bed3
1,334
py
Python
we-web/services/real/voices.py
h-qub/wordeater-web
9a336d1e467d08c6b3875bd8b83dea0dc3b9236d
[ "MIT" ]
null
null
null
we-web/services/real/voices.py
h-qub/wordeater-web
9a336d1e467d08c6b3875bd8b83dea0dc3b9236d
[ "MIT" ]
3
2016-03-11T08:43:47.000Z
2016-11-01T13:07:48.000Z
we-web/services/real/voices.py
h-qub/wordeater-web
9a336d1e467d08c6b3875bd8b83dea0dc3b9236d
[ "MIT" ]
null
null
null
# coding=utf-8 __author__ = 'Glebov Boris'
23
77
0.574963
# coding=utf-8 from services.base import BaseService from services.service_locator import ServiceLocator from logger import error __author__ = 'Glebov Boris' class VoicesService(BaseService): def __init__(self): BaseService.__init__(self) def get(self, text): """ Try to find voice i...
88
0
0
1,106
0
0
0
49
90
7645b899e4921a3987e32469e1005cfa80ca5d7b
7,328
py
Python
Dataset/create_dataset_JPS.py
mawanda-jun/NoLabels
6861867ad5ab49fc7ae6f562977f60195f9ff216
[ "MIT" ]
1
2021-05-27T09:41:58.000Z
2021-05-27T09:41:58.000Z
Dataset/create_dataset_JPS.py
mawanda-jun/NoLabels
6861867ad5ab49fc7ae6f562977f60195f9ff216
[ "MIT" ]
null
null
null
Dataset/create_dataset_JPS.py
mawanda-jun/NoLabels
6861867ad5ab49fc7ae6f562977f60195f9ff216
[ "MIT" ]
null
null
null
import os from typing import List import random import h5py import numpy as np from PIL import Image, ImageFile # force pillow to load also truncated images ImageFile.LOAD_TRUNCATED_IMAGES = True # number of images to take from the folder N_EL = int(5e5) # path/to/folder that contains the images. No particular structu...
39.397849
121
0.609989
import os from typing import List import random import h5py import numpy as np from PIL import Image, ImageFile import threading # force pillow to load also truncated images ImageFile.LOAD_TRUNCATED_IMAGES = True # number of images to take from the folder N_EL = int(5e5) # path/to/folder that contains the images. No p...
0
0
0
2,645
0
0
0
-5
45
2f3c579b4337afc0afba19e7860fbba1c1305085
1,866
py
Python
FileGather.py
stevenjson/CuisineClassifying
349fbcadcd9a47deaaf94b4452870f531b137899
[ "MIT" ]
20
2017-10-31T11:01:40.000Z
2021-08-04T18:07:18.000Z
FileGather.py
stevenjson/CuisineClassifying
349fbcadcd9a47deaaf94b4452870f531b137899
[ "MIT" ]
null
null
null
FileGather.py
stevenjson/CuisineClassifying
349fbcadcd9a47deaaf94b4452870f531b137899
[ "MIT" ]
5
2019-05-20T19:57:38.000Z
2020-04-14T04:51:09.000Z
import urllib.request import os import argparse from bs4 import BeautifulSoup parser = argparse.ArgumentParser() parser.add_argument("url", type=str, nargs=1, help="Main url with list of recipe URLs") parser.add_argument("cuisine", type=str, nargs=1, help="Type of cuisine on the main url page") parser.add_argument("pa...
27.850746
94
0.651661
import urllib.request import os import argparse from bs4 import BeautifulSoup parser = argparse.ArgumentParser() parser.add_argument("url", type=str, nargs=1, help="Main url with list of recipe URLs") parser.add_argument("cuisine", type=str, nargs=1, help="Type of cuisine on the main url page") parser.add_argument("pa...
0
0
0
0
0
0
0
0
0
3a790c549b7fb6bb73028e5521bff4c96bf60cf4
979
py
Python
setting.py
AlexRamAlv/following_requests
cd7bc3bbe5675562b0544b14492d5330061dbdc2
[ "MIT" ]
null
null
null
setting.py
AlexRamAlv/following_requests
cd7bc3bbe5675562b0544b14492d5330061dbdc2
[ "MIT" ]
null
null
null
setting.py
AlexRamAlv/following_requests
cd7bc3bbe5675562b0544b14492d5330061dbdc2
[ "MIT" ]
null
null
null
""" Here are declare all the settings of the app. 1. Database configurations. 2. Develop config 3. Prod config 4. Also default config that is develop """ import os # file' path BASE_DIR = os.path.abspath(os.path.dirname(__file__)) #main class configuration # Develop configuration ...
26.459459
121
0.691522
""" Here are declare all the settings of the app. 1. Database configurations. 2. Develop config 3. Prod config 4. Also default config that is develop """ import os # file' path BASE_DIR = os.path.abspath(os.path.dirname(__file__)) #main class configuration class Config: SECRET_...
0
28
0
403
0
0
0
0
66
405d33839e2a90b181857aecdd3b4a29dabb0667
3,083
py
Python
datahub/dataset/company_referral/test/test_views.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
6
2019-12-02T16:11:24.000Z
2022-03-18T10:02:02.000Z
datahub/dataset/company_referral/test/test_views.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
1,696
2019-10-31T14:08:37.000Z
2022-03-29T12:35:57.000Z
datahub/dataset/company_referral/test/test_views.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
9
2019-11-22T12:42:03.000Z
2021-09-03T14:25:05.000Z
from datahub.core.test_utils import format_date_or_datetime, get_attr_or_none def get_expected_data_from_company_referral(referral): """Returns company referral data as a dictionary""" return { 'company_id': str(referral.company_id), 'completed_by_id': get_attr_or_none(referral, 'completed_by_...
39.525641
99
0.692507
import pytest from django.urls import reverse from freezegun import freeze_time from rest_framework import status from datahub.company_referral.test.factories import ( ClosedCompanyReferralFactory, CompanyReferralFactory, ) from datahub.core.test_utils import format_date_or_datetime, get_attr_or_none from data...
0
1,847
0
0
0
0
0
158
156
bc82c39d125f223e4aa09c5efc2af2c10af7d92c
28,389
py
Python
aws_iam_tester/lib/aws_iam_tester.py
paprins/aws-iam-tester
57898fb4dfcb4acaae7bc21954c1324fa100b75a
[ "MIT" ]
null
null
null
aws_iam_tester/lib/aws_iam_tester.py
paprins/aws-iam-tester
57898fb4dfcb4acaae7bc21954c1324fa100b75a
[ "MIT" ]
null
null
null
aws_iam_tester/lib/aws_iam_tester.py
paprins/aws-iam-tester
57898fb4dfcb4acaae7bc21954c1324fa100b75a
[ "MIT" ]
null
null
null
""" The AwsIamTester class implements all necessary logic to run validations on an account, role or user. """ # pylint: disable=broad-except,C0103,E0401,R0912,R0913,R0914,R0915,R1702,W0603,W1203 from __future__ import annotations
36.868831
125
0.496847
""" The AwsIamTester class implements all necessary logic to run validations on an account, role or user. """ # pylint: disable=broad-except,C0103,E0401,R0912,R0913,R0914,R0915,R1702,W0603,W1203 from __future__ import annotations import os import sys import errno import json import logging import re import time impo...
0
0
0
27,804
0
0
0
-52
404
b776c6a61f581ef76c0481f426d55d7c88dd03e9
211
py
Python
doc/python_time/code/02_calendar.py
CodeLingoBot/learn
d7ea19cb9a887ec60435698b9e945a110163eea2
[ "CC-BY-4.0" ]
1,235
2015-09-08T20:21:49.000Z
2022-03-28T10:54:28.000Z
doc/python_time/code/02_calendar.py
fengpf/learn
d7ea19cb9a887ec60435698b9e945a110163eea2
[ "CC-BY-4.0" ]
10
2015-09-08T23:16:52.000Z
2021-12-15T01:15:13.000Z
doc/python_time/code/02_calendar.py
fengpf/learn
d7ea19cb9a887ec60435698b9e945a110163eea2
[ "CC-BY-4.0" ]
183
2015-09-08T14:46:09.000Z
2022-03-06T07:03:31.000Z
#!/usr/bin/python -u import datetime import calendar if __name__ == "__main__": print datetime.datetime.today().weekday() # 3 print calendar.day_name[datetime.datetime.today().weekday()] # Thursday
23.444444
64
0.7109
#!/usr/bin/python -u import datetime import calendar if __name__ == "__main__": print datetime.datetime.today().weekday() # 3 print calendar.day_name[datetime.datetime.today().weekday()] # Thursday
0
0
0
0
0
0
0
0
0
67c6d1af0642e9ccab47e52c069fc9f1c7b24c19
1,694
py
Python
filewatch/__main__.py
tinasty/filewatch
f9dca5187f259280429548ef6968bfcb920a72ae
[ "MIT" ]
null
null
null
filewatch/__main__.py
tinasty/filewatch
f9dca5187f259280429548ef6968bfcb920a72ae
[ "MIT" ]
null
null
null
filewatch/__main__.py
tinasty/filewatch
f9dca5187f259280429548ef6968bfcb920a72ae
[ "MIT" ]
null
null
null
if __name__ == '__main__': try: start() except FileNotFoundError: print("Use --help to see help information")
40.333333
105
0.587367
from rich.console import Console import subprocess as sp import time import click class App: def __init__(self,filepath : str,arguments : str,delay : int): self.filepath = filepath self.arguments = arguments self.delay = delay Console().rule('[#51D6FF]<FILEWATCH IS START...
0
399
0
1,016
0
0
0
-6
142
7d904ef021f40408c9a19ea6d4846ad70181217a
849
py
Python
json-to-md.py
vileppanen/json-documentor
e9f4f7c7e41af805aaf15c97e5198df26c061388
[ "MIT" ]
null
null
null
json-to-md.py
vileppanen/json-documentor
e9f4f7c7e41af805aaf15c97e5198df26c061388
[ "MIT" ]
1
2021-04-30T13:01:14.000Z
2021-05-01T06:11:18.000Z
json-to-md.py
vileppanen/json-documentor
e9f4f7c7e41af805aaf15c97e5198df26c061388
[ "MIT" ]
null
null
null
import json import os from lib.object_documentor import (documentize_object, documentize_prop, documentize_array) file_name = input("Specify json to document: ") file = open(file_name) data = json.load(file) # Iterating through the json lines = [" Prop | Type | Description | Example \n", "----|----|----|----\n"] fo...
24.257143
76
0.650177
import json import os from lib.object_documentor import ( documentize_object, documentize_prop, documentize_array, ) file_name = input("Specify json to document: ") file = open(file_name) data = json.load(file) # Iterating through the json lines = [" Prop | Type | Description | Example \n", "----|----|-...
0
0
0
0
0
0
0
15
0
8a5bb6ed166aa99acc59213fa8d390cd9c45b467
210
py
Python
scripts/item/consume_2435313.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
54
2019-04-16T23:24:48.000Z
2021-12-18T11:41:50.000Z
scripts/item/consume_2435313.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
3
2019-05-19T15:19:41.000Z
2020-04-27T16:29:16.000Z
scripts/item/consume_2435313.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
49
2020-11-25T23:29:16.000Z
2022-03-26T16:20:24.000Z
# Blackheart Day Damage Skin success = sm.addDamageSkin(2435313) if success: sm.chat("The Blackheart Day Damage Skin has been added to your account's damage skin collection.") # sm.consumeItem(2435313)
35
102
0.757143
# Blackheart Day Damage Skin success = sm.addDamageSkin(2435313) if success: sm.chat("The Blackheart Day Damage Skin has been added to your account's damage skin collection.") # sm.consumeItem(2435313)
0
0
0
0
0
0
0
0
0
1e21494c36d4bd09deddf191d2fbd1641f39119c
274
py
Python
11-Regular_Expressions/Exercises/6-Extract_the_Links.py
eclipse-ib/Software-University-Fundamentals_Module
994ef75c70d1bae8e615dbb789aeffd6e0a42c34
[ "MIT" ]
null
null
null
11-Regular_Expressions/Exercises/6-Extract_the_Links.py
eclipse-ib/Software-University-Fundamentals_Module
994ef75c70d1bae8e615dbb789aeffd6e0a42c34
[ "MIT" ]
null
null
null
11-Regular_Expressions/Exercises/6-Extract_the_Links.py
eclipse-ib/Software-University-Fundamentals_Module
994ef75c70d1bae8e615dbb789aeffd6e0a42c34
[ "MIT" ]
null
null
null
import re string = "" while True: command = input() if command == "": break else: string += " "+command search_patter = r"(www\.([A-Za-z0-9]+((-[A-Za-z0-9]+))*)\.([a-z]+((\.[a-z]+))*))" for i in re.findall(search_patter, string): print(i[0])
22.833333
81
0.510949
import re string = "" while True: command = input() if command == "": break else: string += " "+command search_patter = r"(www\.([A-Za-z0-9]+((-[A-Za-z0-9]+))*)\.([a-z]+((\.[a-z]+))*))" for i in re.findall(search_patter, string): print(i[0])
0
0
0
0
0
0
0
0
0
0d7cacd979e59285b82887ad14e076edd44a5d5a
544
py
Python
swagger_django_generator/templates/django/schemas.py
ClizzyJ/swagger-django-generator
a456b0aac949fbb34e6b45cbae19e0e2a6c02a41
[ "BSD-3-Clause" ]
null
null
null
swagger_django_generator/templates/django/schemas.py
ClizzyJ/swagger-django-generator
a456b0aac949fbb34e6b45cbae19e0e2a6c02a41
[ "BSD-3-Clause" ]
null
null
null
swagger_django_generator/templates/django/schemas.py
ClizzyJ/swagger-django-generator
a456b0aac949fbb34e6b45cbae19e0e2a6c02a41
[ "BSD-3-Clause" ]
null
null
null
""" Do not modify this file. It is generated from the Swagger specification. Container module for JSONSchema definitions. This does not include inlined definitions. The pretty-printing functionality provided by the json module is superior to what is provided by pformat, hence the use of json.loads(). """ import json ...
25.904762
76
0.738971
""" Do not modify this file. It is generated from the Swagger specification. Container module for JSONSchema definitions. This does not include inlined definitions. The pretty-printing functionality provided by the json module is superior to what is provided by pformat, hence the use of json.loads(). """ import json ...
0
0
0
0
0
0
0
0
0
9204fd76a8b05854e4a9ac9390c9732a8d38a53b
11,560
py
Python
vcd_cli/vapp_network_firewall.py
ltimothy7/vcd-cli
b30e6fa1b96c2d2f0153ea39e08034962f50c669
[ "Apache-2.0", "MIT" ]
4
2019-01-11T05:05:39.000Z
2019-08-14T07:04:39.000Z
vcd_cli/vapp_network_firewall.py
ltimothy7/vcd-cli
b30e6fa1b96c2d2f0153ea39e08034962f50c669
[ "Apache-2.0", "MIT" ]
null
null
null
vcd_cli/vapp_network_firewall.py
ltimothy7/vcd-cli
b30e6fa1b96c2d2f0153ea39e08034962f50c669
[ "Apache-2.0", "MIT" ]
1
2020-08-31T21:10:50.000Z
2020-08-31T21:10:50.000Z
# VMware vCloud Director Python SDK # Copyright (c) 2014-2019 VMware, Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
39.054054
79
0.627076
# VMware vCloud Director Python SDK # Copyright (c) 2014-2019 VMware, Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
0
10,166
0
0
0
0
0
33
249
adc3b01fc06ad9db748363eae9bdd1841e0cff46
2,500
py
Python
api/schema/schema.py
matchd-ch/matchd-backend
84be4aab1b4708cae50a8988301b15df877c8db0
[ "Apache-2.0" ]
1
2022-03-03T09:55:57.000Z
2022-03-03T09:55:57.000Z
api/schema/schema.py
matchd-ch/matchd-backend
84be4aab1b4708cae50a8988301b15df877c8db0
[ "Apache-2.0" ]
7
2022-02-09T10:44:53.000Z
2022-03-28T03:29:43.000Z
api/schema/schema.py
matchd-ch/matchd-backend
84be4aab1b4708cae50a8988301b15df877c8db0
[ "Apache-2.0" ]
null
null
null
import graphene schema = graphene.Schema(query=Query, mutation=Mutation)
50
97
0.838
import graphene from graphene import relay from api.schema.benefit import BenefitQuery from api.schema.branch import BranchQuery from api.schema.cultural_fit import CulturalFitQuery from api.schema.dashboard import DashboardQuery from api.schema.faq_category import FAQCategoryQuery from api.schema.company import Compa...
0
0
0
771
0
0
0
967
685
e10c61d4857a31141cadadc85b9babb7dbfba4a7
3,362
py
Python
src/paper_sampler/paper_sampler.py
harshit158/paper-dots
cbb2fb36e0d0a55998d80c228d3f35b4df21e808
[ "MIT" ]
3
2021-03-31T12:46:45.000Z
2022-02-25T18:37:50.000Z
src/paper_sampler/paper_sampler.py
harshit158/paper-dots
cbb2fb36e0d0a55998d80c228d3f35b4df21e808
[ "MIT" ]
null
null
null
src/paper_sampler/paper_sampler.py
harshit158/paper-dots
cbb2fb36e0d0a55998d80c228d3f35b4df21e808
[ "MIT" ]
1
2021-07-12T08:19:41.000Z
2021-07-12T08:19:41.000Z
if __name__=='__main__': paper_id = '0704.0001' title = "Calculation of prompt diphoton production cross sections at Tevatron and LHC energies" abstract = '''A fully differential calculation in perturbative quantum chromodynamics is presented for the production of massive photon...
44.236842
120
0.660024
import pandas as pd import h5py from sentence_transformers import SentenceTransformer, util import re import pickle class Sample(): """Samples a relevant paper given an input, using corpus_embeddings """ def __init__(self): # Reading corpus_embeddings data=h5py.File('./data/corpus_emb...
0
0
0
1,807
0
0
0
6
133
8c1d20e833da889207041b9c4c416d22d3948fad
626
py
Python
mmf/datasets/builders/visual_genome/masked_builder.py
dk25021999/mmf
218057265a3fc175f656b5ebe8fb44ef5ccca2e9
[ "BSD-3-Clause" ]
3,252
2018-07-27T02:32:24.000Z
2020-05-07T17:54:46.000Z
mmf/datasets/builders/visual_genome/masked_builder.py
dk25021999/mmf
218057265a3fc175f656b5ebe8fb44ef5ccca2e9
[ "BSD-3-Clause" ]
914
2020-05-07T18:36:26.000Z
2022-03-31T05:45:26.000Z
mmf/datasets/builders/visual_genome/masked_builder.py
dk25021999/mmf
218057265a3fc175f656b5ebe8fb44ef5ccca2e9
[ "BSD-3-Clause" ]
490
2020-05-07T20:05:10.000Z
2022-03-31T14:17:23.000Z
# Copyright (c) Facebook, Inc. and its affiliates.
34.777778
88
0.785942
# Copyright (c) Facebook, Inc. and its affiliates. from mmf.common.registry import registry from mmf.datasets.builders.visual_genome.builder import VisualGenomeBuilder from mmf.datasets.builders.visual_genome.masked_dataset import MaskedVisualGenomeDataset @registry.register_builder("masked_visual_genome") class Mas...
0
344
0
0
0
0
0
140
90
22f5fbf1bbb1a4ca5321e65775ed3512aa58d3cc
1,391
py
Python
samples/fn_lambdas_map.py
allancth/python3-with-linux
11411296d3d6abf876f6fe290a0a3f1a40980354
[ "MIT" ]
null
null
null
samples/fn_lambdas_map.py
allancth/python3-with-linux
11411296d3d6abf876f6fe290a0a3f1a40980354
[ "MIT" ]
null
null
null
samples/fn_lambdas_map.py
allancth/python3-with-linux
11411296d3d6abf876f6fe290a0a3f1a40980354
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2017 allancth # # 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...
36.605263
80
0.716751
#!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2017 allancth # # 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...
0
0
0
0
0
39
0
0
23
c17b631cbf0f5662370eab32fb96f3cf8126ad13
779
py
Python
config.py
CS-savvy/Transformer-for-Parkinsons-disease
42ef54071092f4aab74c8b9ec82c52e944806a5b
[ "MIT" ]
null
null
null
config.py
CS-savvy/Transformer-for-Parkinsons-disease
42ef54071092f4aab74c8b9ec82c52e944806a5b
[ "MIT" ]
null
null
null
config.py
CS-savvy/Transformer-for-Parkinsons-disease
42ef54071092f4aab74c8b9ec82c52e944806a5b
[ "MIT" ]
null
null
null
from pathlib import Path EXP_NAME = 'Transformer32' EPOCH = 20 EMBEDDING_DIM = 64 ENCODER_STACK = 6 ATTENTION_HEAD = 1 DROPOUT = 0.1 LR = 0.0001 BATCH_SIZE = 32 AUGMENTATION = None MAX_FEATURE = 32 SMOTE_SEED = 23904 PYTORCH_SEED = 321295675063 PYTHON_SEED = 123146427 ML_SEED = 32129 MODEL_DIR = Path.cwd() / "models...
26.862069
103
0.707317
from pathlib import Path EXP_NAME = 'Transformer32' EPOCH = 20 EMBEDDING_DIM = 64 ENCODER_STACK = 6 ATTENTION_HEAD = 1 DROPOUT = 0.1 LR = 0.0001 BATCH_SIZE = 32 AUGMENTATION = None MAX_FEATURE = 32 SMOTE_SEED = 23904 PYTORCH_SEED = 321295675063 PYTHON_SEED = 123146427 ML_SEED = 32129 MODEL_DIR = Path.cwd() / "models...
0
0
0
0
0
0
0
0
0
274f85268a10113e874f5288ef77c05a0f3f3e92
10,291
py
Python
herramientas/indice_contagio_por_comunas/indiceContagioComunas.py
DiazSalinas/COVID-19
c79bc5487363a76baa2b9eb282991077eaeddf14
[ "MIT" ]
24
2020-04-02T04:35:32.000Z
2020-08-11T00:48:06.000Z
herramientas/indice_contagio_por_comunas/indiceContagioComunas.py
DiazSalinas/COVID-19
c79bc5487363a76baa2b9eb282991077eaeddf14
[ "MIT" ]
26
2020-04-03T15:07:15.000Z
2020-09-01T08:12:08.000Z
herramientas/indice_contagio_por_comunas/indiceContagioComunas.py
DiazSalinas/COVID-19
c79bc5487363a76baa2b9eb282991077eaeddf14
[ "MIT" ]
21
2020-04-02T21:29:08.000Z
2020-09-01T19:25:22.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Mar 31 11:55:42 2020 @author: esteban """ # Este script necesita que instales # conda install geopandas #conda install -c conda-forge descartes fechaAAnalizar='2020-05-04' alFecha=" al 04/05" cuarentena_total=['Arica', 'Estacin Ce...
10,291
10,291
0.611797
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Mar 31 11:55:42 2020 @author: esteban """ # Este script necesita que instales # conda install geopandas #conda install -c conda-forge descartes fechaAAnalizar='2020-05-04' alFecha=" al 04/05" cuarentena_total=['Arica', 'Estación C...
44
0
0
0
0
0
0
0
0
164b61f9259d225b2f38464d1695f315bbeed826
15,495
py
Python
CVP_API/Snapshot_Utils/Snapshot_Reporter/SnapshotReporter.py
Hugh-Adams/Example_Scripts
21cd3c2857ec41c6fef4108ca3614d1f1ee9d9c6
[ "BSD-3-Clause" ]
5
2019-06-03T14:42:25.000Z
2022-03-03T21:04:29.000Z
CVP_API/Snapshot_Utils/Snapshot_Reporter/SnapshotReporter.py
Hugh-Adams/Example_Scripts
21cd3c2857ec41c6fef4108ca3614d1f1ee9d9c6
[ "BSD-3-Clause" ]
null
null
null
CVP_API/Snapshot_Utils/Snapshot_Reporter/SnapshotReporter.py
Hugh-Adams/Example_Scripts
21cd3c2857ec41c6fef4108ca3614d1f1ee9d9c6
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2019, Arista Networks, 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: # - Redistributions of source code must retain the above copyright notice, # ...
43.525281
189
0.619619
#!/usr/bin/env python # # Copyright (c) 2019, Arista Networks, 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: # - Redistributions of source code must retain the above copyright notice, # ...
0
0
0
4,274
0
3,318
0
0
68
bea488599494de76a3ccf78b45f13020696eaa76
767
py
Python
Algorithms/0048_Rotate_Image/Python/Rotate_Image_Solution_2.py
lht19900714/Leetcode_Solutions
dac7a038329a5c1f8a78e86cc6f49116b963f1fb
[ "MIT" ]
null
null
null
Algorithms/0048_Rotate_Image/Python/Rotate_Image_Solution_2.py
lht19900714/Leetcode_Solutions
dac7a038329a5c1f8a78e86cc6f49116b963f1fb
[ "MIT" ]
null
null
null
Algorithms/0048_Rotate_Image/Python/Rotate_Image_Solution_2.py
lht19900714/Leetcode_Solutions
dac7a038329a5c1f8a78e86cc6f49116b963f1fb
[ "MIT" ]
null
null
null
# Space: O(1) # Time: O(n)
24.741935
71
0.477184
# Space: O(1) # Time: O(n) class Solution: def rotate(self, matrix): """ Do not return anything, modify matrix in-place instead. """ m = len(matrix) n = len(matrix[0]) if m == 1 and n == 1: return index = 0 first, last = 0, n - 1 while first...
0
0
0
712
0
0
0
0
23
02a47cc4846469426d858d56021d0b7456e1a45e
2,570
py
Python
scripts/check_reachwp_1.py
goofyweng/mavros_multi_uav_control
60a17e59bd54b491521ac4fb173c9bca74490718
[ "BSD-3-Clause" ]
1
2022-03-07T06:13:04.000Z
2022-03-07T06:13:04.000Z
scripts/check_reachwp_1.py
goofyweng/mavros_multi_uav_control
60a17e59bd54b491521ac4fb173c9bca74490718
[ "BSD-3-Clause" ]
null
null
null
scripts/check_reachwp_1.py
goofyweng/mavros_multi_uav_control
60a17e59bd54b491521ac4fb173c9bca74490718
[ "BSD-3-Clause" ]
1
2020-08-31T02:42:10.000Z
2020-08-31T02:42:10.000Z
#!/usr/bin/env python import rospy from mavros_msgs.msg import PositionTarget from geometry_msgs.msg import PoseStamped if __name__ == '__main__': rospy.init_node('checker_1') server = Server() rospy.Subscriber("/uav1/mavros/local_position/pose", PoseStamped , server.curpos_callback) rospy.Subscribe...
39.538462
149
0.629572
#!/usr/bin/env python import rospy from mavros_msgs.msg import PositionTarget from geometry_msgs.msg import PoseStamped from std_msgs.msg import Float32, String, Bool class Server: def __init__(self): self.curposx = None self.curposy = None self.curposz = None self.targetwpx = None ...
0
0
0
2,083
0
0
0
25
45
aaf048488c6cc74d3b7b52dd53b462a5c8dbd590
10,610
py
Python
gbt_archive/models.py
GreenBankObservatory/gbtarchive_orm
31f6d9def30646fb97c0a3ff8a0bf8096a15c479
[ "MIT" ]
null
null
null
gbt_archive/models.py
GreenBankObservatory/gbtarchive_orm
31f6d9def30646fb97c0a3ff8a0bf8096a15c479
[ "MIT" ]
7
2020-05-14T20:19:57.000Z
2022-02-10T13:58:38.000Z
gbt_archive/models.py
GreenBankObservatory/gbtarchive_orm
31f6d9def30646fb97c0a3ff8a0bf8096a15c479
[ "MIT" ]
null
null
null
"""Models!""" # class TestOfflineOld(models.Model): # errorid = models.AutoField(db_column="errorID", primary_key=True) # errormsg = models.CharField(db_column="errorMsg", max_length=64) # severity = models.IntegerField() # class Meta: # managed = False # db_table = "test_offl...
30.401146
113
0.578699
"""Models!""" from pathlib import Path import re import glob from django.db import models from django.urls import reverse from gbt_archive.utils import get_archive_path class Observer(models.Model): observerid = models.AutoField(db_column="observerID", primary_key=True) name = models.CharField(max_length=64)...
0
0
0
9,894
0
0
0
23
364
5c360b6439f881bfd7e0220e167f9b4c542aca1e
168
py
Python
code/pop_click.py
brxck/knausj_talon
0074abbd2680865080921bc0229ce2ec0022f732
[ "MIT" ]
null
null
null
code/pop_click.py
brxck/knausj_talon
0074abbd2680865080921bc0229ce2ec0022f732
[ "MIT" ]
null
null
null
code/pop_click.py
brxck/knausj_talon
0074abbd2680865080921bc0229ce2ec0022f732
[ "MIT" ]
null
null
null
from talon import ctrl, noise, actions noise.register( "pop", lambda m: ctrl.mouse_click() if actions.speech.enabled() else actions.speech.enable(), )
18.666667
38
0.678571
from talon import ctrl, noise, actions noise.register( "pop", lambda m: ctrl.mouse_click() if actions.speech.enabled() else actions.speech.enable(), )
0
0
0
0
0
0
0
0
0
88bcaa1b734bad5efec9938bf99d322ac0ff3a65
5,090
py
Python
find_chars.py
melonedo/crack-tongji-captcha
d7658a6e7360483c0e6260a7ac8d86045205af09
[ "MIT" ]
6
2020-11-01T14:12:15.000Z
2021-04-19T09:31:44.000Z
find_chars.py
melonedo/crack-tongji-captcha
d7658a6e7360483c0e6260a7ac8d86045205af09
[ "MIT" ]
1
2020-11-02T03:14:54.000Z
2021-01-25T09:30:45.000Z
find_chars.py
melonedo/crack-tongji-captcha
d7658a6e7360483c0e6260a7ac8d86045205af09
[ "MIT" ]
null
null
null
from PIL import Image from io import BytesIO from base64 import b64decode import numpy import re import cv2 from collections import namedtuple if cv2.__version__.split()[0] == '3': old_find_contours = cv2.findContours cv2.findContours = new_find_contours RotatedRect = namedtuple("RotatedRect", "center, siz...
39.153846
856
0.697053
from PIL import Image from io import BytesIO from base64 import b64decode import numpy import re import cv2 import random from collections import namedtuple from math import hypot if cv2.__version__.split()[0] == '3': old_find_contours = cv2.findContours def new_find_contours(*args, **kwargs): return...
0
0
0
29
0
414
0
-7
182
deff626d8b8d98e0958a03e1d757971333fb1ba1
9,979
py
Python
xdev/interactive_iter.py
Erotemic/xdev
86d11305d1c6c54188a012fc61f82cb60c496f38
[ "Apache-2.0" ]
3
2019-03-04T02:49:22.000Z
2022-02-08T14:41:23.000Z
xdev/interactive_iter.py
Erotemic/xdev
86d11305d1c6c54188a012fc61f82cb60c496f38
[ "Apache-2.0" ]
4
2021-10-05T21:11:38.000Z
2022-03-25T17:41:10.000Z
xdev/interactive_iter.py
Erotemic/xdev
86d11305d1c6c54188a012fc61f82cb60c496f38
[ "Apache-2.0" ]
null
null
null
import numpy as np __all__ = ['InteractiveIter'] INDEXABLE_TYPES = (list, tuple, np.ndarray)
37.374532
133
0.527508
import ubelt as ub import numpy as np from . import embeding from . import util __all__ = ['InteractiveIter'] INDEXABLE_TYPES = (list, tuple, np.ndarray) class InteractiveIter(object): """ Choose next value interactively iterable should be a list, not a generator. sorry """ def __init__(iiter...
0
726
0
9,072
0
0
0
-5
89
fa668461cf90cbc54e8b386e7ef7061b05d4ad5f
33,381
py
Python
rubiks-cube-solver.py
cahidenes/rubiks-cube-solver
6f53f57d836a1604f8e5b7829d9e220466574b80
[ "MIT" ]
4
2021-01-30T12:23:58.000Z
2021-09-07T17:11:20.000Z
rubiks-cube-solver.py
cahidenes/rubiks-cube-solver
6f53f57d836a1604f8e5b7829d9e220466574b80
[ "MIT" ]
null
null
null
rubiks-cube-solver.py
cahidenes/rubiks-cube-solver
6f53f57d836a1604f8e5b7829d9e220466574b80
[ "MIT" ]
2
2021-02-11T16:37:10.000Z
2022-02-26T23:53:00.000Z
import cv2 as cv import numpy as np import kociemba DEBUG = False eps = 0.00001 firstRead = [] secondRead = [] firstDone = False cam = cv.VideoCapture(0) cam.set(cv.CAP_PROP_FRAME_HEIGHT, 720) W, H = int(cam.get(cv.CAP_PROP_FRAME_WIDTH)), int(cam.get(cv.CAP_PROP_FRAME_HEIGHT)) if W != 1280 or H != 720: print("WAR...
44.508
194
0.451724
import cv2 as cv import numpy as np import kociemba DEBUG = False eps = 0.00001 firstRead = [] secondRead = [] firstDone = False cam = cv.VideoCapture(0) cam.set(cv.CAP_PROP_FRAME_HEIGHT, 720) W, H = int(cam.get(cv.CAP_PROP_FRAME_WIDTH)), int(cam.get(cv.CAP_PROP_FRAME_HEIGHT)) if W != 1280 or H != 720: print("WAR...
0
0
0
0
0
9,193
0
0
230
719289a9b3bd996ae9fe94a118ff18a46736ef85
21,989
py
Python
caffe-master/python/utils/sample.py
yang81/TextDetect
3011ba55f97b764879bcf9719729d196b798014b
[ "BSD-3-Clause" ]
6
2020-05-29T00:25:28.000Z
2020-07-02T07:50:54.000Z
caffe-master/python/utils/sample.py
yang81/TextDetect
3011ba55f97b764879bcf9719729d196b798014b
[ "BSD-3-Clause" ]
1
2020-07-01T08:31:01.000Z
2020-07-02T01:20:51.000Z
caffe-master/python/utils/sample.py
yang81/TextDetect
3011ba55f97b764879bcf9719729d196b798014b
[ "BSD-3-Clause" ]
1
2020-06-17T02:52:57.000Z
2020-06-17T02:52:57.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- __metaclss__=type if __name__ == '__main__': pass
26.239857
168
0.64937
#!/usr/bin/env python # -*- coding: utf-8 -*- __metaclss__=type import random import math import collections from PIL import Image, ImageDraw, ImageFont from utils.font import FontObj from utils.color import Color import skimage.util import numpy as np import cv2 import matplotlib.pyplot as plt import sys import time...
3
0
0
21,535
0
0
0
-9
357
e812749bf4529ddc1ee803b14e9468c7f8463ad6
430
py
Python
DCAL_notebooks/DCAL_Custom_Mosaics.py
gamedaygeorge/datacube-applications-library
1b6314ee3465f9f17930391a4c241e981a9e200e
[ "Apache-2.0" ]
null
null
null
DCAL_notebooks/DCAL_Custom_Mosaics.py
gamedaygeorge/datacube-applications-library
1b6314ee3465f9f17930391a4c241e981a9e200e
[ "Apache-2.0" ]
null
null
null
DCAL_notebooks/DCAL_Custom_Mosaics.py
gamedaygeorge/datacube-applications-library
1b6314ee3465f9f17930391a4c241e981a9e200e
[ "Apache-2.0" ]
1
2021-02-25T14:19:05.000Z
2021-02-25T14:19:05.000Z
# Code behind module for DCAL_Custom_Mosaics.ipynb ################################ ## ## Import Statments ## ################################ # Import standard Python modules import sys # Import DCAL utilities containing function definitions used generally across DCAL sys.path.append('../DCAL_utils') ############...
17.2
82
0.523256
# Code behind module for DCAL_Custom_Mosaics.ipynb ################################ ## ## Import Statments ## ################################ # Import standard Python modules import sys import datacube # Import DCAL utilities containing function definitions used generally across DCAL sys.path.append('../DCAL_utils'...
0
0
0
0
0
0
0
-6
22
693e89132f2d54cce0651c04638a64e17b93c21c
177
py
Python
examples/warehouse.py
tat2ddaddy/EasyPost-Fulfillment
4f04ac85e2da1054add8a7fed1a3bff65eea6214
[ "MIT" ]
1
2020-01-31T23:31:24.000Z
2020-01-31T23:31:24.000Z
examples/warehouse.py
tat2ddaddy/EasyPost-Fulfillment
4f04ac85e2da1054add8a7fed1a3bff65eea6214
[ "MIT" ]
null
null
null
examples/warehouse.py
tat2ddaddy/EasyPost-Fulfillment
4f04ac85e2da1054add8a7fed1a3bff65eea6214
[ "MIT" ]
1
2020-03-10T01:28:32.000Z
2020-03-10T01:28:32.000Z
import fulfillment fulfillment.core.api_key = 'YOUR_API_KEY_GOES_HERE' # set debug to true to get print json fulfillment.core.Debug = True fulfillment.Warehouse.retrieveALL()
22.125
51
0.813559
import fulfillment fulfillment.core.api_key = 'YOUR_API_KEY_GOES_HERE' # set debug to true to get print json fulfillment.core.Debug = True fulfillment.Warehouse.retrieveALL()
0
0
0
0
0
0
0
0
0
44703efea3dbeab7669b18375a0808879c883830
2,511
py
Python
demo/neumann_poisson2D.py
spectralDNS/shenfun
956633aa0f1638db5ebdc497ff68a438aa22b932
[ "BSD-2-Clause" ]
138
2017-06-17T13:30:27.000Z
2022-03-20T02:33:47.000Z
demo/neumann_poisson2D.py
spectralDNS/shenfun
956633aa0f1638db5ebdc497ff68a438aa22b932
[ "BSD-2-Clause" ]
73
2017-05-16T06:53:04.000Z
2022-02-04T10:40:44.000Z
demo/neumann_poisson2D.py
spectralDNS/shenfun
956633aa0f1638db5ebdc497ff68a438aa22b932
[ "BSD-2-Clause" ]
38
2018-01-31T14:37:01.000Z
2022-03-31T15:07:27.000Z
r""" Solve Poisson equation in 2D with periodic bcs in one direction and homogeneous Neumann in the other \nabla^2 u = f, Use Fourier basis for the periodic direction and Shen's Neumann basis for the non-periodic direction. The equation to solve is (\nabla^2 u, v) = (f, v) """ import sys import os from sy...
28.213483
147
0.681004
r""" Solve Poisson equation in 2D with periodic bcs in one direction and homogeneous Neumann in the other \nabla^2 u = f, Use Fourier basis for the periodic direction and Shen's Neumann basis for the non-periodic direction. The equation to solve is (\nabla^2 u, v) = (f, v) """ import sys import os from sy...
0
0
0
0
0
0
0
17
0
0fc64dcb48b6303a7a368bf41d9c7ef8a78e9f3a
788
py
Python
i3/bin/get_displays.py
grzegorzludwa/dotfiles
0ed7c13763033e774732a3317b79caa4e0fcc91b
[ "MIT" ]
null
null
null
i3/bin/get_displays.py
grzegorzludwa/dotfiles
0ed7c13763033e774732a3317b79caa4e0fcc91b
[ "MIT" ]
null
null
null
i3/bin/get_displays.py
grzegorzludwa/dotfiles
0ed7c13763033e774732a3317b79caa4e0fcc91b
[ "MIT" ]
null
null
null
import subprocess import itertools command="xrandr --listmonitors" output = subprocess.run(command.split(), stdout=subprocess.PIPE, check=True, text=True) output = output.stdout displays_lines = output.split('\n')[1:-1] displays = [] for line in displays_lines: displays.append(line.split()[-1]) options = [] fo...
23.176471
87
0.658629
import subprocess import itertools command="xrandr --listmonitors" output = subprocess.run(command.split(), stdout=subprocess.PIPE, check=True, text=True) output = output.stdout displays_lines = output.split('\n')[1:-1] displays = [] for line in displays_lines: displays.append(line.split()[-1]) options = [] fo...
0
0
0
0
0
0
0
0
0
f88773a452b544ce63be7e86cd1843c0abb55814
9,975
py
Python
Mochila-Paralelo-Threads.py
abnermuxah/algoritmo-genetico-problema-mochila
73074d20f09983b710c3782bba1cd491b16d80a7
[ "MIT" ]
null
null
null
Mochila-Paralelo-Threads.py
abnermuxah/algoritmo-genetico-problema-mochila
73074d20f09983b710c3782bba1cd491b16d80a7
[ "MIT" ]
null
null
null
Mochila-Paralelo-Threads.py
abnermuxah/algoritmo-genetico-problema-mochila
73074d20f09983b710c3782bba1cd491b16d80a7
[ "MIT" ]
null
null
null
import threading # Variavel global n_populacao = [] # funcoes if __name__ == '__main__': # Leitura do arquivo externo (instancias) file = open("100.txt") arquivo = file.read() # ler a cadeia de caracteres do arquivo .txt instancias = arquivo.split() # separar e agrupar os caracteres # manipulando a entrada dos d...
30.882353
116
0.633584
from random import randint import threading # Variavel global n_populacao = [] # funcoes def peso_cromo(cromossomo, peso): # retorna o peso toal que que o cromossomo pode levar sum_peso = 0 qtd_itens = len(peso) n = 0 if (len(cromossomo)!=qtd_itens): n = 2 else: n = 0 for i in range(qtd_itens): if cromos...
36
0
0
0
0
3,195
0
5
132
6168b33ee9764e2c6e4bf5c87b9668922f29cc89
1,266
py
Python
hd_mysql/migrations/0002_schedule_info.py
Rmond/OperMge
926f00107614ed55b26ff3beac178fe955de856a
[ "Apache-2.0" ]
1
2017-08-18T07:03:34.000Z
2017-08-18T07:03:34.000Z
hd_mysql/migrations/0002_schedule_info.py
Rmond/OperMge
926f00107614ed55b26ff3beac178fe955de856a
[ "Apache-2.0" ]
null
null
null
hd_mysql/migrations/0002_schedule_info.py
Rmond/OperMge
926f00107614ed55b26ff3beac178fe955de856a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-07-25 11:53 from __future__ import unicode_literals
39.5625
133
0.599526
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-07-25 11:53 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('django_celery_beat', '0001_initial'), ('h...
0
0
0
1,047
0
0
0
30
73
5134c3635a3e15d9ddfe2e5b01e52495708df66a
601
py
Python
ecommerce/OrderAndDelivery/migrations/0015_auto_20201016_1728.py
shakyasaijal/commerce-fm
358b6925f4b569dc374010d7cc7d4d560ede2b48
[ "MIT" ]
18
2020-12-05T14:12:32.000Z
2022-03-11T20:15:22.000Z
ecommerce/OrderAndDelivery/migrations/0015_auto_20201016_1728.py
shakyasaijal/commerce-fm
358b6925f4b569dc374010d7cc7d4d560ede2b48
[ "MIT" ]
1
2021-07-22T09:23:13.000Z
2021-07-22T09:23:13.000Z
ecommerce/OrderAndDelivery/migrations/0015_auto_20201016_1728.py
shakyasaijal/commerce-fm
358b6925f4b569dc374010d7cc7d4d560ede2b48
[ "MIT" ]
13
2020-10-15T10:17:35.000Z
2022-01-29T06:56:24.000Z
# Generated by Django 3.0 on 2020-10-16 11:43
25.041667
70
0.608985
# Generated by Django 3.0 on 2020-10-16 11:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('OrderAndDelivery', '0014_auto_20201016_1114'), ] operations = [ migrations.AddField( model_name='order', name='deliver...
0
0
0
489
0
0
0
19
46
f9fce6dff4bbc05f0d0d29b45605ef7ae92d6500
3,582
py
Python
dompetku/utils.py
blackshirt/dompetku
51b907dc25c927ef42b4522499c1884affd42980
[ "BSD-2-Clause" ]
1
2016-05-15T16:58:54.000Z
2016-05-15T16:58:54.000Z
dompetku/utils.py
blackshirt/dompetku
51b907dc25c927ef42b4522499c1884affd42980
[ "BSD-2-Clause" ]
null
null
null
dompetku/utils.py
blackshirt/dompetku
51b907dc25c927ef42b4522499c1884affd42980
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright @2014 blackshirtmuslim@yahoo.com # Licensed: see Python license """Utility module""" import uuid import hashlib def generate_hash(password, random_key=None): """Membuat password hash dengan random key 'random_key' menggunakan sha512 dari hashlib""" if not random_key: ...
29.360656
94
0.676438
#!/usr/bin/env python # # Copyright @2014 blackshirtmuslim@yahoo.com # Licensed: see Python license """Utility module""" import json import uuid import hashlib from decimal import Decimal from datetime import date, datetime from tornado import concurrent, ioloop from concurrent.futures import ThreadPoolExecutor de...
0
289
0
335
0
1,788
0
55
223
839106fce2a15faccf685f56f0c8a5dfa87571d2
1,020
py
Python
ind.py
Maria-28/LR4.2
0fd8e6a7f54602e28b452e8a4d99ada9c370165c
[ "MIT" ]
null
null
null
ind.py
Maria-28/LR4.2
0fd8e6a7f54602e28b452e8a4d99ada9c370165c
[ "MIT" ]
null
null
null
ind.py
Maria-28/LR4.2
0fd8e6a7f54602e28b452e8a4d99ada9c370165c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # , . # ( , # - ). , # . if __name__ == '__main__': # print(task(input()))
26.842105
84
0.509804
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # В строке могут присутствовать скобки как круглые, так и квадратные скобки. Каждой # открывающей скобке соответствует закрывающая того же типа (круглой – круглая, # квадратной- квадратная). Напишите рекурсивную функцию, проверяющую правильность # расстановки скобок в...
479
0
0
0
0
520
0
0
85
abb34daeae73074559a0c7bac8314ad6e47ec18e
3,642
py
Python
yacluster.py
KrzysiekJ/yacluster
4f908880283f8305e4700e1f372b45367fca268c
[ "MIT" ]
4
2016-07-05T16:23:57.000Z
2021-07-25T15:23:02.000Z
yacluster.py
KrzysiekJ/yacluster
4f908880283f8305e4700e1f372b45367fca268c
[ "MIT" ]
null
null
null
yacluster.py
KrzysiekJ/yacluster
4f908880283f8305e4700e1f372b45367fca268c
[ "MIT" ]
1
2021-07-25T15:23:09.000Z
2021-07-25T15:23:09.000Z
from functools import partial, reduce from itertools import chain def cluster_iter(clustered, point, threshold): """Add a point to a grid-like cluster structure. This allows comparing point distances only to clusters from nearby grids, not to all clusters. Useful when there are many clusters expected."""...
41.862069
147
0.720209
from functools import partial, reduce from itertools import chain, product from math import sqrt def distance(coords_1, coords_2): return sqrt(pow(coords_1[0] - coords_2[0], 2) + pow(coords_1[1] - coords_2[1], 2)) def get_grid_cell(x, y, threshold): return (int(x // threshold), int(y // threshold)) def g...
24
0
0
0
0
753
0
9
119
7b164c1bee8839bc2a1d23d1d331a90b8685fd8a
4,830
py
Python
unbox/uno/views.py
NikhilPhalange/recommendo
7594f0c12e9b3d0ac439670ae1d91f34394bd90d
[ "Apache-2.0" ]
null
null
null
unbox/uno/views.py
NikhilPhalange/recommendo
7594f0c12e9b3d0ac439670ae1d91f34394bd90d
[ "Apache-2.0" ]
null
null
null
unbox/uno/views.py
NikhilPhalange/recommendo
7594f0c12e9b3d0ac439670ae1d91f34394bd90d
[ "Apache-2.0" ]
null
null
null
#rom uno.info import information #from django.template.defaulttags import register pro = [] ''' @register.filter def get_item(dictionary, key): return dictionary.get(key) '''
34.748201
199
0.564803
from django.http import HttpResponse from django.shortcuts import render, render_to_response, RequestContext from uno.models import Question_m from django.views.generic import FormView from uno.forms import Question_f import requests #rom uno.info import information from copy import deepcopy from uno.a import i...
0
0
0
0
0
4,186
0
123
332
da6cfb1412b7f109cd7e1da326d638ba647ddc0e
13,178
py
Python
net/network/neural_net.py
elQuixote/Pytorch_ImageClassifier
22f5dc136b56a4a5d9b372191006fedfbd6c9ad5
[ "MIT" ]
1
2021-01-16T13:44:42.000Z
2021-01-16T13:44:42.000Z
net/network/neural_net.py
elQuixote/Pytorch_ImageClassifier
22f5dc136b56a4a5d9b372191006fedfbd6c9ad5
[ "MIT" ]
null
null
null
net/network/neural_net.py
elQuixote/Pytorch_ImageClassifier
22f5dc136b56a4a5d9b372191006fedfbd6c9ad5
[ "MIT" ]
null
null
null
import torchvision.models as models '''neural_net.py: Custom network object deriving from nn.Module to track the architecture ''' __author__ = "Luis Quinones" __email__ = "luis@complicitmatter.com" __status__ = "Prototype"
43.206557
137
0.588633
import torch as t from torch import nn import math as m import torchvision.models as models import numpy as np import matplotlib.pyplot as plt import copy '''neural_net.py: Custom network object deriving from nn.Module to track the architecture ''' __author__ = "Luis Quinones" __email__ = "luis@complicitmatter.com" __...
0
0
0
12,810
0
0
0
-13
155
1b922f498e9d1bd6014435b4ed0ce491985ee580
4,260
py
Python
shcomplete/tests/test_model2correct.py
gy741/shell-complete
20ad82eb45015a79afc734f4cce2201b5fba3785
[ "Apache-2.0" ]
null
null
null
shcomplete/tests/test_model2correct.py
gy741/shell-complete
20ad82eb45015a79afc734f4cce2201b5fba3785
[ "Apache-2.0" ]
null
null
null
shcomplete/tests/test_model2correct.py
gy741/shell-complete
20ad82eb45015a79afc734f4cce2201b5fba3785
[ "Apache-2.0" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
44.375
99
0.638028
import argparse import logging import os import unittest from keras.layers import recurrent import numpy as np from shcomplete.model2correct import Seq2seq, generate_model, get_chars, train_correct from shcomplete.model2correct import generator_misprints, dislpay_sample_correction class DataGenerator(unittest.TestC...
0
0
0
3,879
0
0
0
112
202
a0c458328447709abb195adfcca137536aeb22ff
456
py
Python
src/zc/set/tests.py
ZeitOnline/zc.set
e39ac9d4d87d7d95ec191190d6ea77474b1d6498
[ "ZPL-2.1" ]
null
null
null
src/zc/set/tests.py
ZeitOnline/zc.set
e39ac9d4d87d7d95ec191190d6ea77474b1d6498
[ "ZPL-2.1" ]
null
null
null
src/zc/set/tests.py
ZeitOnline/zc.set
e39ac9d4d87d7d95ec191190d6ea77474b1d6498
[ "ZPL-2.1" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main(defaultTest='test_suite')
21.714286
63
0.695175
import unittest from zope.testing import doctest, module import zc.set def setUpSetsOne(test): test.globs['factory'] = set def setUpSetsTwo(test): test.globs['factory'] = zc.set.Set def test_suite(): return unittest.TestSuite(( doctest.DocFileSuite('README.txt', setUp=setUpSetsOne), doct...
0
0
0
0
0
242
0
11
114
a7eb5f17185695564ccdccce6a73d0b6bbfbba75
222
py
Python
packages/girder_worker/girder_worker/plugins/types/format/directory/tgz_to_path.py
ShenQianwithC/HistomicsTK
4ad7e72a7ebdabbdfc879254fad04ce7ca47e320
[ "Apache-2.0" ]
null
null
null
packages/girder_worker/girder_worker/plugins/types/format/directory/tgz_to_path.py
ShenQianwithC/HistomicsTK
4ad7e72a7ebdabbdfc879254fad04ce7ca47e320
[ "Apache-2.0" ]
null
null
null
packages/girder_worker/girder_worker/plugins/types/format/directory/tgz_to_path.py
ShenQianwithC/HistomicsTK
4ad7e72a7ebdabbdfc879254fad04ce7ca47e320
[ "Apache-2.0" ]
null
null
null
import os import tarfile output = os.path.splitext(input)[0] try: os.makedirs(output) except OSError: if not os.path.exists(output): raise with tarfile.open(input, 'r') as tf: tf.extractall(output)
14.8
36
0.675676
import os import tarfile output = os.path.splitext(input)[0] try: os.makedirs(output) except OSError: if not os.path.exists(output): raise with tarfile.open(input, 'r') as tf: tf.extractall(output)
0
0
0
0
0
0
0
0
0
d801cbd215418f7c40ffbce0a7835d25d4b91e9d
4,568
py
Python
algotrader/trading/clock.py
alexcwyu/python-trading
a494f602411a3ebfdecae002a16a5ea93fc7a046
[ "Apache-2.0" ]
17
2016-03-30T21:52:30.000Z
2021-05-01T18:21:48.000Z
algotrader/trading/clock.py
ajmal017/python-trading
a494f602411a3ebfdecae002a16a5ea93fc7a046
[ "Apache-2.0" ]
2
2016-10-04T19:29:05.000Z
2017-02-01T19:24:39.000Z
algotrader/trading/clock.py
ajmal017/python-trading
a494f602411a3ebfdecae002a16a5ea93fc7a046
[ "Apache-2.0" ]
9
2016-04-24T05:05:26.000Z
2020-05-03T13:01:34.000Z
from gevent import monkey monkey.patch_time() monkey.patch_socket()
33.101449
104
0.718914
from gevent import monkey monkey.patch_time() monkey.patch_socket() import abc import datetime import time from rx.concurrency.eventloopscheduler import EventLoopScheduler from rx.concurrency.historicalscheduler import HistoricalScheduler from rx.concurrency.mainloopscheduler import GEventScheduler from rx.concurren...
0
334
0
3,531
0
0
0
269
360
8603a1697a8cfb77dbeb1e65c54d4922279ec156
1,366
py
Python
Search-Algorithms/TreeStructures.py
earmingol/Personal-Collection
5c0c322bfec140a1bbef678a11cc690e0dac48a3
[ "MIT" ]
null
null
null
Search-Algorithms/TreeStructures.py
earmingol/Personal-Collection
5c0c322bfec140a1bbef678a11cc690e0dac48a3
[ "MIT" ]
null
null
null
Search-Algorithms/TreeStructures.py
earmingol/Personal-Collection
5c0c322bfec140a1bbef678a11cc690e0dac48a3
[ "MIT" ]
null
null
null
# coding: utf-8 # Node class based on the book "Inteligencia Artificial - Fundamentos, prctica y aplicaciones" by Alberto Garca Serrano
24.392857
121
0.598829
# coding: utf-8 # Node class based on the book "Inteligencia Artificial - Fundamentos, práctica y aplicaciones" by Alberto García Serrano class Node(): def __init__(self, data, id = None): self.data = data self.id = id self.parent = None self.children = None self.cost = None...
4
0
0
1,206
0
0
0
0
23
9753c39d1853d6246410d1dad0e380c99ce01c1c
138
py
Python
teste.py
pedro-canedo/Estudos-em-Python
563c2b40ba03b9dcd08668f3c2e0485b3196ff26
[ "MIT" ]
1
2021-07-31T03:56:43.000Z
2021-07-31T03:56:43.000Z
teste.py
pedro-canedo/Estudos-em-Python
563c2b40ba03b9dcd08668f3c2e0485b3196ff26
[ "MIT" ]
null
null
null
teste.py
pedro-canedo/Estudos-em-Python
563c2b40ba03b9dcd08668f3c2e0485b3196ff26
[ "MIT" ]
null
null
null
numero = int(input("Fatorial de: ") ) resultado=1 count=1 while count <= numero: resultado *= count count --1 print(resultado)
12.545455
37
0.652174
numero = int(input("Fatorial de: ") ) resultado=1 count=1 while count <= numero: resultado *= count count --1 print(resultado)
0
0
0
0
0
0
0
0
0
627ca225022492c812109d5bc50448cc59d3b486
7,194
py
Python
utils.py
smtnkc/bert4epi
e45198916eba6e716be3e1e02c8c2a51de8c9891
[ "MIT" ]
null
null
null
utils.py
smtnkc/bert4epi
e45198916eba6e716be3e1e02c8c2a51de8c9891
[ "MIT" ]
null
null
null
utils.py
smtnkc/bert4epi
e45198916eba6e716be3e1e02c8c2a51de8c9891
[ "MIT" ]
null
null
null
import torch.nn as nn
33.152074
130
0.606339
import torch import os import torch.nn as nn import logging import time from sklearn.metrics import f1_score, classification_report, confusion_matrix from transformers import BertForSequenceClassification class BERT(nn.Module): def __init__(self): super(BERT, self).__init__() options_name = "ber...
0
0
0
318
0
6,509
0
51
293
6413b8ee3194babe2191376fca41309350962f11
2,797
py
Python
The Schelling Model.py
MapleNSteel/ConvolutionalSchelling
12f3a08b0889b2f7f5f92f6074e09c1a6642553e
[ "Apache-2.0" ]
null
null
null
The Schelling Model.py
MapleNSteel/ConvolutionalSchelling
12f3a08b0889b2f7f5f92f6074e09c1a6642553e
[ "Apache-2.0" ]
null
null
null
The Schelling Model.py
MapleNSteel/ConvolutionalSchelling
12f3a08b0889b2f7f5f92f6074e09c1a6642553e
[ "Apache-2.0" ]
null
null
null
import numpy as np from scipy import signal import cv2 numDem=500 numRep=500 numColumns=50 numRows=50 numGrid=numColumns*numRows windowSize=3 kernel=np.ones((windowSize,windowSize)) kernel[(windowSize-1)/2,(windowSize-1)/2]=0 numIter=100 valueThreshold=0.375*((windowSize**2)-1) #Slightly xenophilic, 37.5% corres...
27.97
157
0.750804
import numpy as np from scipy import signal import matplotlib.pyplot as plt import cv2 numDem=500 numRep=500 numColumns=50 numRows=50 numGrid=numColumns*numRows windowSize=3 kernel=np.ones((windowSize,windowSize)) kernel[(windowSize-1)/2,(windowSize-1)/2]=0 numIter=100 valueThreshold=0.375*((windowSize**2)-1) #S...
0
0
0
0
0
289
0
10
68
4d8cf658bd276e110dbb7b4ab8bbb325dec3a9ee
1,889
py
Python
extcats/testdata.py
vbrinnel/extcats
fd37ad19c8b613cca6410c303416d26210392a02
[ "MIT" ]
2
2019-05-07T12:57:49.000Z
2020-04-07T14:38:54.000Z
extcats/testdata.py
vbrinnel/extcats
fd37ad19c8b613cca6410c303416d26210392a02
[ "MIT" ]
5
2018-03-06T20:14:54.000Z
2018-11-01T13:59:03.000Z
extcats/testdata.py
vbrinnel/extcats
fd37ad19c8b613cca6410c303416d26210392a02
[ "MIT" ]
5
2018-02-28T15:25:58.000Z
2021-02-01T10:33:37.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # download some test data to run example notebook # # Author: M. Giomi (matteo.giomi@desy.de)
35.641509
95
0.622552
#!/usr/bin/env python # -*- coding: utf-8 -*- # # download some test data to run example notebook # # Author: M. Giomi (matteo.giomi@desy.de) import os from urllib.request import urlretrieve from shutil import unpack_archive class MQC: def download(datadir = "./testdata/milliquas", fname = "heasa...
0
0
0
1,614
0
0
0
17
114
6ecb1e95b59bfe086a21a6f2bba88cd15339dfdb
745
py
Python
fx/test.py
vangual/plasma
b5acdd8114b87c723103f90405d79e71499d4f78
[ "MIT" ]
null
null
null
fx/test.py
vangual/plasma
b5acdd8114b87c723103f90405d79e71499d4f78
[ "MIT" ]
null
null
null
fx/test.py
vangual/plasma
b5acdd8114b87c723103f90405d79e71499d4f78
[ "MIT" ]
null
null
null
import plasma import plasmafx from plasmafx import plugins import time FPS = 60 NUM_LIGHTS = 10 plasma.set_light_count(10) sequence = plasmafx.Sequence(NUM_LIGHTS) for x in range(NUM_LIGHTS): sequence.set_plugin(x, plugins.FXCycle( speed=2, spread=5, offset=(360.0/NUM_LIGHTS) * x )) ...
19.102564
68
0.609396
import plasma import plasmafx from plasmafx import plugins import time FPS = 60 NUM_LIGHTS = 10 plasma.set_light_count(10) sequence = plasmafx.Sequence(NUM_LIGHTS) for x in range(NUM_LIGHTS): sequence.set_plugin(x, plugins.FXCycle( speed=2, spread=5, offset=(360.0/NUM_LIGHTS) * x )) ...
0
0
0
0
0
0
0
0
0
d646bae450ebf34b8304da5219140af55f34a58e
7,388
py
Python
src/pallas/conversions.py
tomasbedrich/pallas
cd414f0ed0c4b5a39da21061b08f9e7a5b674c8b
[ "Apache-2.0" ]
null
null
null
src/pallas/conversions.py
tomasbedrich/pallas
cd414f0ed0c4b5a39da21061b08f9e7a5b674c8b
[ "Apache-2.0" ]
null
null
null
src/pallas/conversions.py
tomasbedrich/pallas
cd414f0ed0c4b5a39da21061b08f9e7a5b674c8b
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Akamai Technologies, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
28.091255
78
0.64889
# Copyright 2020 Akamai Technologies, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
713
0
4,127
0
425
0
94
433
62b0bacd5684234667190f618f48ce267fc5d7c8
481
bzl
Python
multi-log-test/third_party/fmtlib/direct.bzl
seuyx/bazel-experiments
ea5da09ea0d74f0a0163cbf0bfaed7c35e5cec22
[ "MIT" ]
null
null
null
multi-log-test/third_party/fmtlib/direct.bzl
seuyx/bazel-experiments
ea5da09ea0d74f0a0163cbf0bfaed7c35e5cec22
[ "MIT" ]
null
null
null
multi-log-test/third_party/fmtlib/direct.bzl
seuyx/bazel-experiments
ea5da09ea0d74f0a0163cbf0bfaed7c35e5cec22
[ "MIT" ]
null
null
null
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
37
82
0.698545
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def load_fmtlib(): maybe( http_archive, name = "com_github_fmtlib_fmt", url = "https://github.com/fmtlib/fmt/releases/download/8.1.1/fmt-8.1.1.zip", sha256 = "2...
0
0
0
0
0
326
0
0
23
89485dab73034b8b11b29b0cdd9d56b3f1d1c416
236
py
Python
data/strategies/publishers/wiley_issn.py
jamesrharwood/journal-guidelines
fe6c0a6d3c0443df6fc816b9503fad24459ddb4a
[ "MIT" ]
null
null
null
data/strategies/publishers/wiley_issn.py
jamesrharwood/journal-guidelines
fe6c0a6d3c0443df6fc816b9503fad24459ddb4a
[ "MIT" ]
null
null
null
data/strategies/publishers/wiley_issn.py
jamesrharwood/journal-guidelines
fe6c0a6d3c0443df6fc816b9503fad24459ddb4a
[ "MIT" ]
null
null
null
url = r"onlinelibrary.wiley.com/journal/{ID}/(?P<ISSN>\(ISSN\)[\d-]*)" extractor_args = dict(restrict_text=[r"author\s*guidelines"]) template = ( "https://onlinelibrary.wiley.com/page/journal/{ID}/{ISSN}/homepage/forauthors.html" )
39.333333
87
0.70339
url = r"onlinelibrary.wiley.com/journal/{ID}/(?P<ISSN>\(ISSN\)[\d-]*)" extractor_args = dict(restrict_text=[r"author\s*guidelines"]) template = ( "https://onlinelibrary.wiley.com/page/journal/{ID}/{ISSN}/homepage/forauthors.html" )
0
0
0
0
0
0
0
0
0
129a5beca9e5e509559cdb65aed64af325dd1305
2,262
py
Python
src/api.py
ifeekz/build_4_sdg
503dd37b3827f0a9cad2039ada1ee26d56a98061
[ "MIT" ]
null
null
null
src/api.py
ifeekz/build_4_sdg
503dd37b3827f0a9cad2039ada1ee26d56a98061
[ "MIT" ]
null
null
null
src/api.py
ifeekz/build_4_sdg
503dd37b3827f0a9cad2039ada1ee26d56a98061
[ "MIT" ]
null
null
null
from flask import Flask, make_response from flask_restful import Api from simplexml import dumps app = Flask(__name__) api = Api(app, default_mediatype=None) def output_xml(data, code, headers=None): """Make a Flask response with a XML encoded body""" resp = make_response(dumps({'response': data}), code) ...
38.338983
109
0.665782
import json from flask import Flask, request, jsonify, make_response from flask_restful import Api, Resource, reqparse from simplexml import dumps from estimator import estimator app = Flask(__name__) api = Api(app, default_mediatype=None) @api.representation('application/json') def output_json(data, code, headers=No...
0
299
0
807
0
0
0
38
113
a3993d03d8af22ea32a4563b7c54ce21a50f7605
9,513
py
Python
models/block.py
tadeephuy/CoFo
28461e923f112182887d66d1db499da7a2535b28
[ "MIT" ]
2
2022-02-15T07:58:29.000Z
2022-02-25T10:08:59.000Z
models/block.py
tadeephuy/CoFo
28461e923f112182887d66d1db499da7a2535b28
[ "MIT" ]
null
null
null
models/block.py
tadeephuy/CoFo
28461e923f112182887d66d1db499da7a2535b28
[ "MIT" ]
null
null
null
import torch.nn as nn
44.661972
154
0.57248
import torch import torch.nn as nn import torch.nn.functional as F import sys from .layers import PixelShuffle_ICNR def crop_combine(x1, x2): diffY = x2.size()[2] - x1.size()[2] diffX = x2.size()[3] - x1.size()[3] x2 = F.pad(x2, [ -diffX//2, -diffX//2, -diffY//2, -diffY//2 ...
0
0
0
8,811
0
343
0
6
316
e0a2f2f95574ee23b3dfa58867c5333309f07dab
632
py
Python
pandas/count_appear.py
muzudho/practice-py
a84abf0abc1f19221fa18768b068caea3c91aed4
[ "MIT" ]
null
null
null
pandas/count_appear.py
muzudho/practice-py
a84abf0abc1f19221fa18768b068caea3c91aed4
[ "MIT" ]
null
null
null
pandas/count_appear.py
muzudho/practice-py
a84abf0abc1f19221fa18768b068caea3c91aed4
[ "MIT" ]
null
null
null
import os import pandas as pd df = pd.read_csv( "{}/practice-pandas/data/test-participant.csv".format(os.getcwd()), sep=',', engine='python', verbose=True) df_grouped = df.groupby("GENRE_CODE").count() df_sorted = df_grouped["ID"].sort_values(ascending=False) # Top 1000. print(df_sorted.head(1000)) """ GENRE_CO...
19.151515
111
0.564873
import os import pandas as pd df = pd.read_csv( "{}/practice-pandas/data/test-participant.csv".format(os.getcwd()), sep=',', engine='python', verbose=True) df_grouped = df.groupby("GENRE_CODE").count() df_sorted = df_grouped["ID"].sort_values(ascending=False) # Top 1000. print(df_sorted.head(1000)) """ GENRE_CO...
0
0
0
0
0
0
0
0
0
bb68ae7738bc606f645c311825795906cc2775af
5,162
py
Python
src/reader.py
BinhNguyen231/IDCardRecognition
061f353127d1e33da1b72f4225bd11fa835501ea
[ "Apache-2.0" ]
null
null
null
src/reader.py
BinhNguyen231/IDCardRecognition
061f353127d1e33da1b72f4225bd11fa835501ea
[ "Apache-2.0" ]
null
null
null
src/reader.py
BinhNguyen231/IDCardRecognition
061f353127d1e33da1b72f4225bd11fa835501ea
[ "Apache-2.0" ]
null
null
null
import os import cv2 import time from cropper import Cropper from detector import Detector from format_info import format_information ###multi threading #from threading import Thread if __name__ == "__main__": cropper = Cropper() detector = Detector() reader = Reader() type_img = ['jpg', 'png'] ...
37.955882
173
0.585238
from vietocr.tool.translate import build_model, translate, translate_beam_search, process_input, predict from vietocr.tool.utils import download_weights from vietocr.tool.config import Cfg import sys import os import cv2 import numpy as np import math import pandas as pd import torch import time from cropper import Cro...
0
0
0
2,224
0
0
0
88
199
ffaade27a9c553f612d1d26b88569d33a8d17441
26
py
Python
Chapter 01/Chap01_Example1.91.py
bpbpublications/Programming-Techniques-using-Python
49b785f37e95a3aad1d36cef51e219ac56e5e9f0
[ "MIT" ]
null
null
null
Chapter 01/Chap01_Example1.91.py
bpbpublications/Programming-Techniques-using-Python
49b785f37e95a3aad1d36cef51e219ac56e5e9f0
[ "MIT" ]
null
null
null
Chapter 01/Chap01_Example1.91.py
bpbpublications/Programming-Techniques-using-Python
49b785f37e95a3aad1d36cef51e219ac56e5e9f0
[ "MIT" ]
null
null
null
a= 30 a //= 2 print(a)
6.5
9
0.423077
a= 30 a //= 2 print(a)
0
0
0
0
0
0
0
0
0
bf1ca4d713d828aa5bffb5c43328fb9e8ea31cd0
2,230
py
Python
scripts_Old/get_cat_as_binmatrix.py
ksegaba/ML-Pipeline
cd3914563ccd2e2eb863a55e7fe774108280ed47
[ "MIT" ]
12
2019-09-30T21:17:40.000Z
2022-02-11T00:22:52.000Z
scripts_Old/get_cat_as_binmatrix.py
DanyelleJhang/ML-Pipeline
78073fd1004f831c4efdd05e0f1eb78c8bae4fcb
[ "MIT" ]
6
2021-08-03T14:29:16.000Z
2021-11-17T22:39:13.000Z
scripts_Old/get_cat_as_binmatrix.py
DanyelleJhang/ML-Pipeline
78073fd1004f831c4efdd05e0f1eb78c8bae4fcb
[ "MIT" ]
17
2017-05-22T21:03:42.000Z
2022-03-01T15:06:29.000Z
##script used to combine multiple files into a matrix import sys import pandas as pd import numpy as np sum_matrix = open(sys.argv[1]+"_binary.matrix.txt","w") # open with pandas df = pd.read_csv(sys.argv[1], sep='\t', index_col = 0) #get first line as title list col_list= list(df.columns.values) print (col_list) #t...
28.961039
98
0.56278
##script used to combine multiple files into a matrix import os, sys import pandas as pd import numpy as np sum_matrix = open(sys.argv[1]+"_binary.matrix.txt","w") # open with pandas df = pd.read_csv(sys.argv[1], sep='\t', index_col = 0) #get first line as title list col_list= list(df.columns.values) print (col_list...
0
0
0
0
0
298
0
4
22
c8290755239ff48d7f3d7c605293cdfbf9a78742
405
py
Python
frontend/urls.py
evansMeja/django_react_django_nox_auth
1799ade605e941b0123f2b40f03aaef6479ec188
[ "MIT" ]
null
null
null
frontend/urls.py
evansMeja/django_react_django_nox_auth
1799ade605e941b0123f2b40f03aaef6479ec188
[ "MIT" ]
null
null
null
frontend/urls.py
evansMeja/django_react_django_nox_auth
1799ade605e941b0123f2b40f03aaef6479ec188
[ "MIT" ]
null
null
null
from django.urls import path from .views import index, TodoDetailView from django.conf import settings urlpatterns = [ path('', index), path('edit/<int:pk>', TodoDetailView.as_view()), path('delete/<int:pk>', TodoDetailView.as_view()), ] react_routes = getattr(settings, 'REACT_ROUTES', []) for route i...
18.409091
54
0.661728
from django.urls import path from .views import index, TodoDetailView from django.conf import settings urlpatterns = [ path('', index), path('edit/<int:pk>', TodoDetailView.as_view()), path('delete/<int:pk>', TodoDetailView.as_view()), ] react_routes = getattr(settings, 'REACT_ROUTES', []) for route i...
0
0
0
0
0
0
0
0
0
f3b6998c88ac451d5e031dd9a5844a2c373da629
6,773
py
Python
tools/graph_bag/scripts/make_groundtruth_map.py
tiferrei/astrobee
a9aa0a7e9a7dd5a28c264acfd06ccde18103190a
[ "Apache-2.0" ]
629
2017-08-31T23:09:00.000Z
2022-03-30T11:55:40.000Z
tools/graph_bag/scripts/make_groundtruth_map.py
tiferrei/astrobee
a9aa0a7e9a7dd5a28c264acfd06ccde18103190a
[ "Apache-2.0" ]
269
2018-05-05T12:31:16.000Z
2022-03-30T22:04:11.000Z
tools/graph_bag/scripts/make_groundtruth_map.py
tiferrei/astrobee
a9aa0a7e9a7dd5a28c264acfd06ccde18103190a
[ "Apache-2.0" ]
248
2017-08-31T23:20:56.000Z
2022-03-30T22:29:16.000Z
#!/usr/bin/python # # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # # All rights reserved. # # The Astrobee platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in comp...
38.482955
151
0.714454
#!/usr/bin/python # # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # # All rights reserved. # # The Astrobee platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in comp...
0
0
0
0
0
3,740
0
-13
68
28a53f3ba104946a94d464991748f4c97f055010
3,212
py
Python
nes/nasbench201/worker.py
automl/nes
1c54786c30acd6e19eb9708204bffc86b58ea272
[ "Apache-2.0" ]
26
2020-06-22T16:07:54.000Z
2022-03-23T08:12:05.000Z
nes/nasbench201/worker.py
automl/nes
1c54786c30acd6e19eb9708204bffc86b58ea272
[ "Apache-2.0" ]
2
2020-07-13T06:23:18.000Z
2022-03-31T07:30:18.000Z
nes/nasbench201/worker.py
automl/nes
1c54786c30acd6e19eb9708204bffc86b58ea272
[ "Apache-2.0" ]
4
2020-07-06T01:55:16.000Z
2021-08-02T00:00:14.000Z
import warnings warnings.filterwarnings('ignore')
38.698795
96
0.527086
import os import torch import warnings warnings.filterwarnings('ignore') from hpbandster.core.worker import Worker from nes.ensemble_selection.create_baselearners import create_baselearner class NB201Worker(Worker): def __init__(self, working_directory, *args, scheme='nes_re', dataset='cifar10',...
0
0
0
2,996
0
0
0
51
112
5ea40f57be182f0f21b54b10a278a66105e190eb
1,916
py
Python
Canvas and mouse events.py
Hanif-adedotun/Hanif-codes
9835c6196a638e9c56855123fc3f95111a1a4b08
[ "Apache-2.0" ]
null
null
null
Canvas and mouse events.py
Hanif-adedotun/Hanif-codes
9835c6196a638e9c56855123fc3f95111a1a4b08
[ "Apache-2.0" ]
null
null
null
Canvas and mouse events.py
Hanif-adedotun/Hanif-codes
9835c6196a638e9c56855123fc3f95111a1a4b08
[ "Apache-2.0" ]
null
null
null
mainclass()
29.9375
121
0.601775
import tkinter from tkinter import ttk class PenData(object): def __init__(self): self.color = 'blue' self.mouse_position_x = None self.mouse_position_y = None self.is_dragging = False def mainclass(): pen_data = PenData() root = tkinter.Tk() ...
0
0
0
165
0
1,523
0
-5
196
d1c385c7180a7b9254f9e62bbe86e0bb6017fbf0
719
py
Python
Pratical/Class11/gradient.py
JoaoCostaIFG/MNUM
6e042d8a6f64feb9eae9c79afec2fbab51f46fbd
[ "MIT" ]
1
2019-12-07T10:34:30.000Z
2019-12-07T10:34:30.000Z
Pratical/Class11/gradient.py
JoaoCostaIFG/MNUM
6e042d8a6f64feb9eae9c79afec2fbab51f46fbd
[ "MIT" ]
null
null
null
Pratical/Class11/gradient.py
JoaoCostaIFG/MNUM
6e042d8a6f64feb9eae9c79afec2fbab51f46fbd
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # init conds x = [15, 15, f(15, 15)] lamb = 2 xold = [99, 99, f(99, 99)] while dist(xold, x) > 0.5 and lamb >= 0.0001: print("x:", x) print("xold", xold) xnew = grad(*x) xnew = [x[0] - lamb * xnew[0], x[1] - lamb * xnew[1], 0] xnew[2] = f(xnew[0], xnew[1]) print("xne...
17.119048
74
0.472879
#!/usr/bin/env python3 from math import sqrt def dist(x, x2): return sqrt((x2[0] - x[0])**2 + (x2[1] - x[1])**2 + (x2[2] - x[2])**2) def f(x, y): # function return x**2 + y**2 def grad(x, y, z): # gradient of f return [2*x, 2*y, 0] # init conds x = [15, 15, f(15, 15)] lamb = 2 xold = [99, ...
0
0
0
0
0
141
0
0
92
1527752435f7ca5ae720d908e311036ee8c5efdf
812
py
Python
tanner/app/models.py
rodrigo-c/docker3
6bab0d1a88cfa763d78788eeae9092b37abcc28a
[ "Apache-2.0" ]
null
null
null
tanner/app/models.py
rodrigo-c/docker3
6bab0d1a88cfa763d78788eeae9092b37abcc28a
[ "Apache-2.0" ]
null
null
null
tanner/app/models.py
rodrigo-c/docker3
6bab0d1a88cfa763d78788eeae9092b37abcc28a
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 """ Definition of models. """
21.945946
54
0.668719
# coding=utf-8 """ Definition of models. """ from django.contrib.auth.models import User from django.db import models from django.urls import reverse class Page(models.Model): title = models.CharField('nombre', max_length=200) slug = models.SlugField('ruta') def __unicode__(self): return u"{}".fo...
4
0
0
610
0
0
0
39
112
3140c03b8f849fe93ab756edf398744377fc7852
23,908
py
Python
sdk/python/pulumi_aws/cfg/_inputs.py
sibuthomasmathew/pulumi-aws
6351f2182eb6f693d4e09e4136c385adfa0ab674
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/cfg/_inputs.py
sibuthomasmathew/pulumi-aws
6351f2182eb6f693d4e09e4136c385adfa0ab674
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/cfg/_inputs.py
sibuthomasmathew/pulumi-aws
6351f2182eb6f693d4e09e4136c385adfa0ab674
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# 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 pulumi from .. import _utilities, _tables __all__ = [ 'ConfigurationAggregatorAccountAggregationSourceArgs', 'Configurat...
49.912317
665
0.695583
# 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 from .. import _utilitie...
0
22,972
0
0
0
0
0
31
274
235658fe2b588cd6827e8328a007266b3d9a0e5c
3,455
py
Python
apart/forms/price.py
ruslan-ok/ruslan
fc402e53d2683581e13f4d6c69a6f21e5c2ca1f8
[ "MIT" ]
null
null
null
apart/forms/price.py
ruslan-ok/ruslan
fc402e53d2683581e13f4d6c69a6f21e5c2ca1f8
[ "MIT" ]
null
null
null
apart/forms/price.py
ruslan-ok/ruslan
fc402e53d2683581e13f4d6c69a6f21e5c2ca1f8
[ "MIT" ]
null
null
null
role = 'price' #---------------------------------- #----------------------------------
39.712644
137
0.61563
from django import forms from django.utils.translation import gettext_lazy as _ from rusel.base.forms import BaseCreateForm, BaseEditForm from rusel.widgets import DateInput, Select, NumberInput, UrlsInput from task.const import NUM_ROLE_SERVICE, APART_SERVICE from task.models import Task from apart.config import app_...
110
0
0
2,931
0
0
0
172
199
b7362eb4ece001a3cb24c1277ef1861a0c061a77
1,053
py
Python
usr/examples/face_detection.py
SmartArduino/openmv
9398ae0248b5f4dabb622f8890ad351e163b80c4
[ "MIT" ]
null
null
null
usr/examples/face_detection.py
SmartArduino/openmv
9398ae0248b5f4dabb622f8890ad351e163b80c4
[ "MIT" ]
null
null
null
usr/examples/face_detection.py
SmartArduino/openmv
9398ae0248b5f4dabb622f8890ad351e163b80c4
[ "MIT" ]
1
2020-11-28T14:41:49.000Z
2020-11-28T14:41:49.000Z
import sensor, time, image # Reset sensor sensor.reset() # Sensor settings sensor.set_contrast(1) sensor.set_gainceiling(16) sensor.set_framesize(sensor.QCIF) sensor.set_pixformat(sensor.GRAYSCALE) # Load Haar Cascade # By default this will use all stages, lower satges is faster but less accurate. face_cascade = ima...
25.071429
86
0.707502
import sensor, time, image # Reset sensor sensor.reset() # Sensor settings sensor.set_contrast(1) sensor.set_gainceiling(16) sensor.set_framesize(sensor.QCIF) sensor.set_pixformat(sensor.GRAYSCALE) # Load Haar Cascade # By default this will use all stages, lower satges is faster but less accurate. face_cascade = ima...
0
0
0
0
0
0
0
0
0
3c9533e279378d9905320b12521168606747a52f
15,621
py
Python
analysis/config/campaign_Legacy16.py
cms-btv-pog/jet-tagging-sf
c418e13aa4eac5522818d5f5ad3db2a0c81ec52e
[ "Apache-2.0" ]
3
2020-01-22T08:30:14.000Z
2021-12-27T18:47:43.000Z
analysis/config/campaign_Legacy16.py
cms-btv-pog/jet-tagging-sf
c418e13aa4eac5522818d5f5ad3db2a0c81ec52e
[ "Apache-2.0" ]
null
null
null
analysis/config/campaign_Legacy16.py
cms-btv-pog/jet-tagging-sf
c418e13aa4eac5522818d5f5ad3db2a0c81ec52e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # flake8: noqa """ Defintion of the campaign and datasets for 2016 legacy rereco data. """ import order as od # campaign campaign_name = "Run2_pp_13TeV_Legacy16" campaign = od.Campaign( campaign_name, 2, ecm=13, bx=25, ) # datasets dataset_data_B_ee = od.Dataset( "data_B_e...
25.441368
164
0.730299
# -*- coding: utf-8 -*- # flake8: noqa """ Defintion of the campaign and datasets for 2016 legacy rereco data. """ import order as od from analysis.config.processes import * # campaign campaign_name = "Run2_pp_13TeV_Legacy16" campaign = od.Campaign( campaign_name, 2, ecm=13, bx=25, ) # datasets data...
0
0
0
0
0
0
0
18
23