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
9ed0bfed7678b3e557578465045c55d329de8231
1,540
py
Python
setup.py
toxinu/sofart
ec93cee5979ec02ea15955def837aed8f8804970
[ "BSD-3-Clause" ]
1
2018-03-02T17:49:44.000Z
2018-03-02T17:49:44.000Z
setup.py
toxinu/sofart
ec93cee5979ec02ea15955def837aed8f8804970
[ "BSD-3-Clause" ]
null
null
null
setup.py
toxinu/sofart
ec93cee5979ec02ea15955def837aed8f8804970
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.version < '3': import codecs else: if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() setup( name=u('sofart'), v...
26.101695
79
0.655195
#!/usr/bin/env python # coding: utf-8 import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup def get_version(): VERSIONFILE = 'sofart/__init__.py' initfile_lines = open(VERSIONFILE, 'rt').readlines() VSRE = r"^__version__ = ['\"]([^'\"]*)['...
0
0
0
0
0
376
0
0
71
2c7d27c174995caee966f90d2d62e70461be4c5e
12,794
py
Python
src/sec4parser.py
zbirnba1/quantative-finance
55c20fc4db99837fce6e90cf0f621cb40af1187b
[ "MIT" ]
3
2018-10-11T19:40:56.000Z
2019-02-21T23:44:25.000Z
src/sec4parser.py
droiter/quantative-finance
55c20fc4db99837fce6e90cf0f621cb40af1187b
[ "MIT" ]
1
2019-11-02T00:54:26.000Z
2019-11-02T00:54:26.000Z
src/sec4parser.py
droiter/quantative-finance
55c20fc4db99837fce6e90cf0f621cb40af1187b
[ "MIT" ]
4
2019-03-06T23:28:14.000Z
2021-03-27T15:05:46.000Z
import logging import inspect if __name__ == "__main__": logging.basicConfig(filename=inspect.stack()[0][1].replace('py','log'),level=logging.INFO,format='%(asctime)s:%(levelname)s:%(message)s') allfilings_2_form4() update_data()
37.852071
154
0.766297
import xml.etree.cElementTree as et import urllib2 import pandas as pd import mongomanager import logging import inspect import requestswrapper from joblib import Parallel, delayed import multiprocessing from random import shuffle class sec4parser(): def __init__(self,url=None,xml_text=None): #the url should be the...
0
0
0
10,026
0
2,264
0
25
243
dd47fa495258810e2925cecbbb2c9da53d2e821f
2,144
py
Python
blueprints/html/__init__.py
mariussteffens/security-crawl-maze
7bfa4e58344633016e2b5f2f30bd2dacea0a819b
[ "Apache-2.0" ]
103
2019-05-25T00:44:52.000Z
2022-03-30T17:21:28.000Z
blueprints/html/__init__.py
mariussteffens/security-crawl-maze
7bfa4e58344633016e2b5f2f30bd2dacea0a819b
[ "Apache-2.0" ]
3
2020-08-10T09:36:30.000Z
2022-03-11T11:59:20.000Z
blueprints/html/__init__.py
mariussteffens/security-crawl-maze
7bfa4e58344633016e2b5f2f30bd2dacea0a819b
[ "Apache-2.0" ]
22
2019-06-27T11:25:16.000Z
2022-03-18T16:24:11.000Z
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
34.031746
80
0.724813
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
7
901
0
0
0
0
0
35
203
db857f32f541baebe1a0ccf43e0f9bb8532b99e7
8,373
py
Python
lib/tests/streamlit/dataframe_selector_test.py
ChangHoon-Sung/streamlit
83e0b80d2fa13e29e83d092a9fc4d946460bbf73
[ "Apache-2.0" ]
1
2022-03-14T07:55:33.000Z
2022-03-14T07:55:33.000Z
lib/tests/streamlit/dataframe_selector_test.py
ChangHoon-Sung/streamlit
83e0b80d2fa13e29e83d092a9fc4d946460bbf73
[ "Apache-2.0" ]
35
2021-10-12T04:41:39.000Z
2022-03-28T04:50:45.000Z
lib/tests/streamlit/dataframe_selector_test.py
AlexRogalskiy/streamlit
d153db37d97faada87bf88972886cda5a624f8c8
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-2022 Streamlit 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 in wr...
47.845714
88
0.745611
# Copyright 2018-2022 Streamlit 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 in wr...
0
6,724
0
640
0
0
0
56
135
ed328ad0584f94997a4717820240f934deddca73
1,272
py
Python
empower/cli/projects_commands/list_projects.py
5g-empower/empower-runtime
7a71f692f8a0814093d35de5ef0c79d348aa4c2d
[ "Apache-2.0" ]
52
2016-04-18T09:40:29.000Z
2021-12-14T19:32:21.000Z
empower/cli/projects_commands/list_projects.py
5g-empower/empower-runtime
7a71f692f8a0814093d35de5ef0c79d348aa4c2d
[ "Apache-2.0" ]
36
2016-07-04T14:10:58.000Z
2021-08-13T01:10:32.000Z
empower/cli/projects_commands/list_projects.py
5g-empower/empower-runtime
7a71f692f8a0814093d35de5ef0c79d348aa4c2d
[ "Apache-2.0" ]
51
2016-04-20T14:21:32.000Z
2022-03-18T14:43:56.000Z
#!/usr/bin/env python3 # # Copyright (c) 2019 Roberto Riggio # # 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 applicabl...
28.266667
73
0.653302
#!/usr/bin/env python3 # # Copyright (c) 2019 Roberto Riggio # # 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 applicabl...
0
0
0
0
0
0
0
0
0
fb99ead52bbf4f6574a7f21012730db1aec98efe
597
py
Python
ana/debug_buffer.py
hanswenzel/opticks
b75b5929b6cf36a5eedeffb3031af2920f75f9f0
[ "Apache-2.0" ]
11
2020-07-05T02:39:32.000Z
2022-03-20T18:52:44.000Z
ana/debug_buffer.py
hanswenzel/opticks
b75b5929b6cf36a5eedeffb3031af2920f75f9f0
[ "Apache-2.0" ]
null
null
null
ana/debug_buffer.py
hanswenzel/opticks
b75b5929b6cf36a5eedeffb3031af2920f75f9f0
[ "Apache-2.0" ]
4
2020-09-03T20:36:32.000Z
2022-01-19T07:42:21.000Z
#!/usr/bin/env python """ :: run ~/opticks/ana/debug_buffer.py """ import os, numpy as np np.set_printoptions(suppress=True) os.environ.setdefault("OPTICKS_EVENT_BASE",os.path.expandvars("/tmp/$USER/opticks")) path = os.path.expandvars("$OPTICKS_EVENT_BASE/G4OKTest/evt/g4live/natural/1/dg.npy") dg = np.load(pa...
21.321429
127
0.695142
#!/usr/bin/env python """ :: run ~/opticks/ana/debug_buffer.py """ import os, numpy as np np.set_printoptions(suppress=True) os.environ.setdefault("OPTICKS_EVENT_BASE",os.path.expandvars("/tmp/$USER/opticks")) path = os.path.expandvars("$OPTICKS_EVENT_BASE/G4OKTest/evt/g4live/natural/1/dg.npy") dg = np.load(pa...
0
0
0
0
0
0
0
0
0
894a4e16e11d105fadd523bfe361f601fd3318a5
71,917
py
Python
Tank1990AIf/Test1_main.py
cheapmouse94/Machine-Learning-tank1990-python
8b75983289c7bc0831827561cec12d4ad2addee2
[ "MIT" ]
null
null
null
Tank1990AIf/Test1_main.py
cheapmouse94/Machine-Learning-tank1990-python
8b75983289c7bc0831827561cec12d4ad2addee2
[ "MIT" ]
null
null
null
Tank1990AIf/Test1_main.py
cheapmouse94/Machine-Learning-tank1990-python
8b75983289c7bc0831827561cec12d4ad2addee2
[ "MIT" ]
null
null
null
import pygame import os FPS = 1000 SQM = 64 EAGLE_Y = [] EAGLE_G = [] BULLETS_Y_objects = [] BULLETS_Y_RECT = [] BULLETS_G_objects = [] BULLETS_G_RECT = [] BACKGROUND_RECT = [] GRASS_RECT = [] WATER_RECT = [] BRICK_RECT = [] BRICK_RECT_MANY = [] BRICK_RECT_MINI = [] SOLID_RECT = [] MAPPING = [ 'HHHH...
43.825107
212
0.584549
import threading import pygame import time import sys import os from pygame.locals import * import numpy as np from collections import deque import torch from torch.autograd import Variable from Tank_AI import Linear_QNet, QTrainer import random FPS = 1000 SQM = 64 EAGLE_Y = [] EAGLE_G = [] BULLETS_Y_...
330
0
0
67,438
0
0
0
2
471
0b166977697a50b8b973f408ecd8c891246ce69d
1,077
py
Python
Scripts/long term monobit test/graph_results/graph_results.py
robseward/Ziffer
4113bf7a92fa550195c5cef76fc9f20c46f183ff
[ "MIT" ]
15
2016-12-17T02:49:24.000Z
2020-05-04T22:51:35.000Z
Scripts/long term monobit test/graph_results/graph_results.py
robseward/Ziffer
4113bf7a92fa550195c5cef76fc9f20c46f183ff
[ "MIT" ]
1
2018-06-26T22:06:23.000Z
2020-05-25T17:30:16.000Z
Scripts/long term monobit test/graph_results/graph_results.py
robseward/Ziffer
4113bf7a92fa550195c5cef76fc9f20c46f183ff
[ "MIT" ]
2
2019-10-27T21:34:15.000Z
2021-09-29T17:40:04.000Z
import matplotlib.pyplot as plot import matplotlib.dates as md from matplotlib.dates import date2num import datetime # from pylab import * from numpy import polyfit import numpy as np f = open("deviations.csv") values = [] timestamps = [] for (i, line) in enumerate(f): if i >= 1: lineArray = line.split(",...
28.342105
97
0.680594
import matplotlib.pyplot as plot import matplotlib.dates as md from matplotlib.dates import date2num import datetime # from pylab import * from numpy import polyfit import numpy as np f = open("deviations.csv") values = [] timestamps = [] for (i, line) in enumerate(f): if i >= 1: lineArray = line.split(",...
0
0
0
0
0
0
0
0
0
a7680cf40e16dc12bf0c188958c9d947ce0852c4
1,761
py
Python
run/benchmark_runs.py
BenRLewis/P4-Source-Routing
f91fef8b0b16318bd613ae8c8e43e18a7d780733
[ "Apache-2.0" ]
1
2021-03-26T10:48:03.000Z
2021-03-26T10:48:03.000Z
run/benchmark_runs.py
BenRLewis/P4-Source-Routing
f91fef8b0b16318bd613ae8c8e43e18a7d780733
[ "Apache-2.0" ]
null
null
null
run/benchmark_runs.py
BenRLewis/P4-Source-Routing
f91fef8b0b16318bd613ae8c8e43e18a7d780733
[ "Apache-2.0" ]
null
null
null
import argparse import pexpect import sys import time import timeit import zmq parser = argparse.ArgumentParser('Run a range of tests and write the results to a file') parser.add_argument('runs', type=int, help='The number of runs for each approach') parser.add_argument('min_number', type=int, help='The starting numbe...
41.928571
111
0.687677
import argparse import pexpect import sys import time import timeit import zmq def run_table_insert(dstSwitch): context = zmq.Context() socket = context.socket(zmq.REQ) socket.connect("tcp://localhost:5555") message = {'dstIsland': dstSwitch, 'dstMac': "AA:00:00:00:05:01", 'egressPort': 1} socket.s...
0
0
0
0
0
329
0
0
23
07c14b05077c70e13464049d9d52342a04b1dd15
22,514
py
Python
asn1tools/codecs/xer.py
JoelWilloughby/asn1tools
e495bf2c40089c09c950985eccf9633ba2aa30b6
[ "MIT" ]
1
2020-03-31T07:36:57.000Z
2020-03-31T07:36:57.000Z
asn1tools/codecs/xer.py
ryanhz/asn1tools
e495bf2c40089c09c950985eccf9633ba2aa30b6
[ "MIT" ]
null
null
null
asn1tools/codecs/xer.py
ryanhz/asn1tools
e495bf2c40089c09c950985eccf9633ba2aa30b6
[ "MIT" ]
null
null
null
"""XML Encoding Rules (XER) codec. """
27.289697
89
0.567514
"""XML Encoding Rules (XER) codec. """ import time import sys from xml.etree import ElementTree import binascii import datetime from ..parser import EXTENSION_MARKER from . import EncodeError from . import DecodeError from . import compiler from . import format_or from . import utc_time_to_datetime from . import utc...
0
34
0
20,355
0
695
0
98
1,252
3745f5e5fa0c77bd411057ea744ee2db6a054fcf
25
py
Python
foo.py
spderosso/try-gitless
1cba16e2cf7c0a1b703c7c8e6960e641ff84561c
[ "MIT" ]
null
null
null
foo.py
spderosso/try-gitless
1cba16e2cf7c0a1b703c7c8e6960e641ff84561c
[ "MIT" ]
null
null
null
foo.py
spderosso/try-gitless
1cba16e2cf7c0a1b703c7c8e6960e641ff84561c
[ "MIT" ]
null
null
null
# Test file foo.py exit
6.25
18
0.68
# Test file foo.py exit
0
0
0
0
0
0
0
0
0
91462b5892791eb59bc01dbefd00fdb25c428e9c
3,840
py
Python
ejercicios/alarma.py
carlosviveros/Soluciones
115f4fa929c7854ca497e4c994352adc64565456
[ "MIT" ]
4
2021-12-14T23:51:25.000Z
2022-03-24T11:14:00.000Z
ejercicios/alarma.py
leugimkm/Soluciones
d71601c8d9b5e86e926f48d9e49462af8a956b6d
[ "MIT" ]
null
null
null
ejercicios/alarma.py
leugimkm/Soluciones
d71601c8d9b5e86e926f48d9e49462af8a956b6d
[ "MIT" ]
5
2021-11-10T06:49:50.000Z
2022-03-24T01:42:28.000Z
"""AyudaEnPython: https://www.facebook.com/groups/ayudapython Crear una aplicacin de consola que permita al usuario programar alarmas de tiempo. Para realizar esta aplicacin deber presentarle al usuario las siguientes opciones: ver alarmas activas, agregar nueva alarma, agregar nueva alarma con tiempo aleatorio, edita...
32
75
0.61224
"""AyudaEnPython: https://www.facebook.com/groups/ayudapython Crear una aplicación de consola que permita al usuario programar alarmas de tiempo. Para realizar esta aplicación deberá presentarle al usuario las siguientes opciones: ver alarmas activas, agregar nueva alarma, agregar nueva alarma con tiempo aleatorio, ed...
24
0
0
459
0
925
0
16
206
ca0538382008ecacbc38992d84daa88a595e2acd
200
py
Python
test.py
c4s4/http1
ab2610823f060632227f9ca60e98320800b5c5be
[ "Apache-2.0" ]
1
2019-11-30T14:24:25.000Z
2019-11-30T14:24:25.000Z
test.py
c4s4/http1
ab2610823f060632227f9ca60e98320800b5c5be
[ "Apache-2.0" ]
2
2015-04-25T08:14:49.000Z
2015-04-26T09:08:08.000Z
test.py
c4s4/http1
ab2610823f060632227f9ca60e98320800b5c5be
[ "Apache-2.0" ]
1
2015-04-25T09:12:59.000Z
2015-04-25T09:12:59.000Z
import http1 response = http1.request('http://www.google.com') print(f'Status: {response.status} ({response.message})') print(f'Headers: {response.headers}') #print(f'Body: {response.body.strip()}')
28.571429
56
0.715
import http1 response = http1.request('http://www.google.com') print(f'Status: {response.status} ({response.message})') print(f'Headers: {response.headers}') #print(f'Body: {response.body.strip()}')
0
0
0
0
0
0
0
0
0
6e8d76559556aad67a766a1b969129888077d6d4
275
py
Python
src/IceRayPy/type/basic.py
dmilos/IceRay
4e01f141363c0d126d3c700c1f5f892967e3d520
[ "MIT-0" ]
2
2020-09-04T12:27:15.000Z
2022-01-17T14:49:40.000Z
src/IceRayPy/type/basic.py
dmilos/IceRay
4e01f141363c0d126d3c700c1f5f892967e3d520
[ "MIT-0" ]
null
null
null
src/IceRayPy/type/basic.py
dmilos/IceRay
4e01f141363c0d126d3c700c1f5f892967e3d520
[ "MIT-0" ]
1
2020-09-04T12:27:52.000Z
2020-09-04T12:27:52.000Z
import ctypes print( '<' + __name__ + ' file=\'' + __file__ + '\'>' ) Scalar = ctypes.c_double Unsigned = ctypes.c_uint Integer = ctypes.c_int Size = ctypes.c_size_t VoidPtr = ctypes.c_void_p print( '</' + __name__ + ' file=\'' + __file__ + '\'>' )
22.916667
59
0.578182
import ctypes print( '<' + __name__ + ' file=\'' + __file__ + '\'>' ) Scalar = ctypes.c_double Unsigned = ctypes.c_uint Integer = ctypes.c_int Size = ctypes.c_size_t VoidPtr = ctypes.c_void_p print( '</' + __name__ + ' file=\'' + __file__ + '\'>' )
0
0
0
0
0
0
0
0
0
90531b3709e7fbc87192a474ce0b31ea346b07bd
328
py
Python
data/tasks.py
iColdPlayer/kasir
5c83c201a6e5e3bc0ca402ed4bb824ea85e02e38
[ "MIT" ]
29
2019-12-04T16:21:14.000Z
2022-03-02T23:27:59.000Z
data/tasks.py
mejeng/kasir
cc6f9158b61c0cb45078ddf798af9588c8771311
[ "MIT" ]
13
2019-11-29T18:12:41.000Z
2021-06-27T02:01:07.000Z
data/tasks.py
mejeng/kasir
cc6f9158b61c0cb45078ddf798af9588c8771311
[ "MIT" ]
14
2019-12-04T16:21:15.000Z
2022-02-24T07:05:12.000Z
from __future__ import absolute_import, unicode_literals
17.263158
56
0.737805
from __future__ import absolute_import, unicode_literals from celery import shared_task from .models import Stock @shared_task def add(x, y): return x + y @shared_task def mul(x, y): return x * y @shared_task def xsum(numbers): return sum(numbers) @shared_task def count_stock(): return Stock.objects...
0
123
0
0
0
0
0
13
136
f460e837d85eacf6d48a5e4585be3a3af165caaf
357
py
Python
stable_baselines3/common/pymlmc/__init__.py
atishdixit16/stable-baselines3
0188d6a7b0c905693f41a68484d71b02faee6146
[ "MIT" ]
null
null
null
stable_baselines3/common/pymlmc/__init__.py
atishdixit16/stable-baselines3
0188d6a7b0c905693f41a68484d71b02faee6146
[ "MIT" ]
null
null
null
stable_baselines3/common/pymlmc/__init__.py
atishdixit16/stable-baselines3
0188d6a7b0c905693f41a68484d71b02faee6146
[ "MIT" ]
null
null
null
__author__ = 'Patrick Farrell' __credits__ = ['Patrick Farrell', 'Mike Giles'] __license__ = 'GPL-3' __maintainer__ = 'Patrick Farrell' __email__ = 'patrick.farrell@maths.ox.ac.uk'
27.461538
50
0.753501
__author__ = 'Patrick Farrell' __credits__ = ['Patrick Farrell', 'Mike Giles'] __license__ = 'GPL-3' __maintainer__ = 'Patrick Farrell' __email__ = 'patrick.farrell@maths.ox.ac.uk' from .mlmc_plot_100 import mlmc_plot_100 from .mlmc_plot import mlmc_plot from .mlmc_test import mlmc_test from .mlmc_fn i...
0
0
0
0
0
0
0
49
111
e73d97418d8c9a7091446d2eaf9ad35aced734fb
2,753
py
Python
player/models.py
DevRx28/dbms-api
5685555c7c8b6621dc03c4092606c1972b6afda1
[ "Apache-2.0" ]
null
null
null
player/models.py
DevRx28/dbms-api
5685555c7c8b6621dc03c4092606c1972b6afda1
[ "Apache-2.0" ]
null
null
null
player/models.py
DevRx28/dbms-api
5685555c7c8b6621dc03c4092606c1972b6afda1
[ "Apache-2.0" ]
null
null
null
# from dbapi.settings import * # Create your models here.
34.848101
60
0.682165
from django.db import models # from dbapi.settings import * # Create your models here. class PlayerManager(models.Manager): def get_by_id(self, id): queryset = self.get_queryset().filter(id=id) if queryset.count() == 1: return queryset.first() return None def f...
0
0
0
2,609
0
0
0
7
73
80401d8a668db9453bfaaf0b916b26e67477ae32
5,545
py
Python
src/ctrm/learning/model/cvae.py
omron-sinicx/ctrm
83e7fe4abb8ad8559bfb6e64170878575a03fd20
[ "MIT" ]
8
2022-01-25T08:04:32.000Z
2022-02-20T10:47:40.000Z
src/ctrm/learning/model/cvae.py
omron-sinicx/ctrm
83e7fe4abb8ad8559bfb6e64170878575a03fd20
[ "MIT" ]
null
null
null
src/ctrm/learning/model/cvae.py
omron-sinicx/ctrm
83e7fe4abb8ad8559bfb6e64170878575a03fd20
[ "MIT" ]
null
null
null
"""implementation of F_CTRM Author: Keisuke Okumura / Ryo Yonetani Affiliation: TokyoTech & OSX / OSX """ from __future__ import annotations import torch.nn as nn
32.052023
79
0.571867
"""implementation of F_CTRM Author: Keisuke Okumura / Ryo Yonetani Affiliation: TokyoTech & OSX / OSX """ from __future__ import annotations from dataclasses import dataclass from functools import reduce from operator import add from typing import Optional import torch import torch.nn as nn from torch.distributions....
0
5,123
0
0
0
0
0
77
180
8e461b9f5e80c2dac77fcfd40a02f888de0595da
246
py
Python
general/save_float_image.py
miroslavradojevic/python-snippets
753e1c15dc077d3bcf5de4fd5d3a675daf0da27c
[ "MIT" ]
null
null
null
general/save_float_image.py
miroslavradojevic/python-snippets
753e1c15dc077d3bcf5de4fd5d3a675daf0da27c
[ "MIT" ]
null
null
null
general/save_float_image.py
miroslavradojevic/python-snippets
753e1c15dc077d3bcf5de4fd5d3a675daf0da27c
[ "MIT" ]
null
null
null
#!/usr/bin/env python import numpy as np import cv2 if __name__ == '__main__': arr = np.random.rand(512, 512) * 255 print("arr {} | {} -- {} | {}".format(arr.shape, np.amin(arr), np.amax(arr), arr.dtype)) cv2.imwrite("arr.jpg", arr)
27.333333
92
0.601626
#!/usr/bin/env python import numpy as np import cv2 if __name__ == '__main__': arr = np.random.rand(512, 512) * 255 print("arr {} | {} -- {} | {}".format(arr.shape, np.amin(arr), np.amax(arr), arr.dtype)) cv2.imwrite("arr.jpg", arr)
0
0
0
0
0
0
0
0
0
575e8126c17a3433ed1ce77ca87e613d080d64f9
1,179
py
Python
knn.py
enesdemirag/music-genre-classification
deb3ff729ae159c3a9eb7433ba5f35ac32fbe3d1
[ "MIT" ]
null
null
null
knn.py
enesdemirag/music-genre-classification
deb3ff729ae159c3a9eb7433ba5f35ac32fbe3d1
[ "MIT" ]
1
2020-11-30T20:10:01.000Z
2020-11-30T20:10:01.000Z
knn.py
enesdemirag/music-genre-classification
deb3ff729ae159c3a9eb7433ba5f35ac32fbe3d1
[ "MIT" ]
null
null
null
# In this script Kth Nearest Neighbor (Knn) machine learning algorithm used on dataset.csv # This dataset consist of 1000 samples with 26 features each # https://scikit-learn.org/stable/modules/neighbors.html import numpy as np from utils import load_analytic_data, save_sklearn_model from sklearn.model_selection impor...
31.864865
90
0.793045
# In this script Kth Nearest Neighbor (Knn) machine learning algorithm used on dataset.csv # This dataset consist of 1000 samples with 26 features each # https://scikit-learn.org/stable/modules/neighbors.html import numpy as np from utils import load_analytic_data, save_sklearn_model from sklearn.model_selection impor...
0
0
0
0
0
0
0
0
0
a74dc77ce350ad68add9d49a8b8ee049fe32d6ad
11,391
py
Python
experiment/Heuristic_based/pooing_guided.py
predoodl/predoo
3a0ba0515373744364a0dd9daf4251867b39650c
[ "MIT" ]
14
2021-03-27T06:19:39.000Z
2022-03-07T01:29:42.000Z
experiment/Heuristic_based/pooing_guided.py
predoodl/predoo
3a0ba0515373744364a0dd9daf4251867b39650c
[ "MIT" ]
null
null
null
experiment/Heuristic_based/pooing_guided.py
predoodl/predoo
3a0ba0515373744364a0dd9daf4251867b39650c
[ "MIT" ]
null
null
null
import numpy as np a=[] a1 = 0.0001 * np.ones((1, 2, 4, 4), np.float64) a2 = 0.000001 * np.ones((1, 2, 4, 4), np.float64) a3 = 0.00000001 * np.ones((1, 2, 4, 4), np.float64) a.append(a1) a.append(a2) a.append(a3) if __name__=='__main__': corpus = createCorpus(1000) # Max_guided(corpus, "E:\Dtype_t...
32.269122
153
0.595558
import numpy as np import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers import csv import time from queue import Queue import math a=[] a1 = 0.0001 * np.ones((1, 2, 4, 4), np.float64) a2 = 0.000001 * np.ones((1, 2, 4, 4), np.float64) a3 = 0.00000001 * np.ones((1, 2, 4, 4),...
774
0
0
0
0
9,910
0
-6
340
7fc1b69712b48076e1340be47e7045a99ba6ac20
1,813
py
Python
defs_regression/xgb.py
BrutishGuy/hyperband-astcvs
d52562d64d2b0ba63f4bba7022114da7bb9e0281
[ "BSD-2-Clause" ]
null
null
null
defs_regression/xgb.py
BrutishGuy/hyperband-astcvs
d52562d64d2b0ba63f4bba7022114da7bb9e0281
[ "BSD-2-Clause" ]
null
null
null
defs_regression/xgb.py
BrutishGuy/hyperband-astcvs
d52562d64d2b0ba63f4bba7022114da7bb9e0281
[ "BSD-2-Clause" ]
null
null
null
"function (and parameter space) definitions for hyperband" "binary classification with XGBoost" # a dict with x_train, y_train, x_test, y_test # trees_per_iteration = 5 space = { 'learning_rate': hp.choice( 'lr', [ 'default', hp.uniform( 'lr_', 0.01, 0.2 ) ]), 'max_depth': hp.choice( 'md', [ ...
22.382716
68
0.594043
"function (and parameter space) definitions for hyperband" "binary classification with XGBoost" from common_defs import * # a dict with x_train, y_train, x_test, y_test from load_data_for_regression import data from xgboost import XGBRegressor as XGB # trees_per_iteration = 5 space = { 'learning_r...
0
0
0
0
0
435
0
42
123
6f6c6d03e03b36532023680f50fe9b1064b11e82
672
py
Python
src/trains/urls.py
LikimiaD/LikimiaD_project
4967aeb5f513002abd57ae54849020f089fb0bec
[ "MIT" ]
null
null
null
src/trains/urls.py
LikimiaD/LikimiaD_project
4967aeb5f513002abd57ae54849020f089fb0bec
[ "MIT" ]
null
null
null
src/trains/urls.py
LikimiaD/LikimiaD_project
4967aeb5f513002abd57ae54849020f089fb0bec
[ "MIT" ]
null
null
null
from django.urls import path urlpatterns = [ #path('', home, name = 'home'), path('', TrainListView.as_view(), name = 'home'), # The name of the function that allows you to generate the address dynamically path('detail/<int:pk>/', TrainDetailView.as_view(), name = 'detail'), path('detail/<int:pk>/'...
39.529412
82
0.650298
from django.urls import path from trains.views import * urlpatterns = [ #path('', home, name = 'home'), path('', TrainListView.as_view(), name = 'home'), # The name of the function that allows you to generate the address dynamically path('detail/<int:pk>/', TrainDetailView.as_view(), name = 'detail'),...
0
0
0
0
0
0
0
5
23
1a91ddab7ed60e55d202c1cd84ef4067715b3371
2,300
py
Python
pycrust/tools/mako.py
alertedsnake/pycrust
ceb5da9ff92b892adc9a3057afdfe84f3e529313
[ "MIT" ]
1
2019-03-25T05:33:30.000Z
2019-03-25T05:33:30.000Z
pycrust/tools/mako.py
iwannaPython/pycrust
ceb5da9ff92b892adc9a3057afdfe84f3e529313
[ "MIT" ]
null
null
null
pycrust/tools/mako.py
iwannaPython/pycrust
ceb5da9ff92b892adc9a3057afdfe84f3e529313
[ "MIT" ]
1
2019-03-25T05:33:11.000Z
2019-03-25T05:33:11.000Z
""" Mako Templates -------------- Mako templating code was based on the code and discussion at http://tools.cherrypy.org/wiki/Mako To use the Mako renderer: cherrypy.tools.mako = cherrypy.Tool('on_start_resource', MakoLoader(directories=['/path/to/templates'])) Then in your h...
28.75
94
0.593043
""" Mako Templates -------------- Mako templating code was based on the code and discussion at http://tools.cherrypy.org/wiki/Mako To use the Mako renderer: cherrypy.tools.mako = cherrypy.Tool('on_start_resource', MakoLoader(directories=['/path/to/templates'])) Then in your h...
0
0
0
1,680
0
0
0
3
139
a50f82ff1fb6df2ed0a4489725b3568ae23502d0
8,950
py
Python
offline/assistant.py
iseaboy/ok_google
f87bf62b012f8d186da7e4575064ae8e986216e9
[ "Apache-2.0" ]
8
2017-05-29T03:11:59.000Z
2018-08-28T02:35:37.000Z
offline/assistant.py
iseaboy/ok_google
f87bf62b012f8d186da7e4575064ae8e986216e9
[ "Apache-2.0" ]
2
2017-05-12T23:43:56.000Z
2018-05-31T13:19:37.000Z
offline/assistant.py
iseaboy/ok_google
f87bf62b012f8d186da7e4575064ae8e986216e9
[ "Apache-2.0" ]
3
2017-09-20T01:53:13.000Z
2018-04-24T04:54:03.000Z
# Copyright (C) 2017 Google 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 in writi...
38.247863
79
0.67095
# Copyright (C) 2017 Google 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 in writi...
0
0
0
8,055
0
0
0
82
91
0aed6119e19574f31d9d53692882645b330f888a
9,360
py
Python
pyautonifty/renderer.py
Markichu/PythonAutoNifty
ab646601058297b6bfe14332f17b836ee3dfbe69
[ "MIT" ]
null
null
null
pyautonifty/renderer.py
Markichu/PythonAutoNifty
ab646601058297b6bfe14332f17b836ee3dfbe69
[ "MIT" ]
6
2021-11-24T00:48:57.000Z
2022-03-17T07:51:36.000Z
pyautonifty/renderer.py
Markichu/PythonAutoNifty
ab646601058297b6bfe14332f17b836ee3dfbe69
[ "MIT" ]
null
null
null
import os # Hide the Pygame support message os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = str()
45.658537
123
0.588248
import datetime import os import time import numpy as np from PIL import Image # Hide the Pygame support message os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = str() import pygame from .constants import BLACK, WHITE, DRAWING_SIZE, TITLE_BAR_HEIGHT, BORDER_WIDTH from .helper_fns import get_bezier_curve, alpha_blend cla...
0
0
0
9,022
0
0
0
65
178
70768d686e0a1a459230775315038d99092f820f
59,179
py
Python
XGB_Model.py
whitelightning450/Machine-Learning-Water-Systems-Model
9e07dd2402ef614dcf404cd28bee518ced7047ad
[ "MIT" ]
null
null
null
XGB_Model.py
whitelightning450/Machine-Learning-Water-Systems-Model
9e07dd2402ef614dcf404cd28bee518ced7047ad
[ "MIT" ]
6
2022-03-28T17:47:04.000Z
2022-03-28T20:49:51.000Z
XGB_Model.py
whitelightning450/Machine-Learning-Water-Systems-Model
9e07dd2402ef614dcf404cd28bee518ced7047ad
[ "MIT" ]
2
2022-02-22T19:48:46.000Z
2022-03-28T03:51:03.000Z
#Script developed by Ryan C. Johnson, University of Alabama for the #Salt Lake City Climate Vulnerability Project. #Date: 3/4/2022 # coding: utf-8 import xgboost as xgb from xgboost.sklearn import XGBRegressor from xgboost import cv #Developing the XGBoost_Tuning package ...
40.31267
248
0.6102
#Script developed by Ryan C. Johnson, University of Alabama for the #Salt Lake City Climate Vulnerability Project. #Date: 3/4/2022 # coding: utf-8 import xgboost as xgb from xgboost.sklearn import XGBRegressor from xgboost import cv import time import pickle import joblib from pickle import dump import numpy as np im...
0
0
0
57,818
0
0
0
271
663
4cdc028ab2ad2c9e2b0be22d389a8f86ff60d74f
1,197
py
Python
client/verta/verta/_swagger/_public/modeldb/versioning/model/VersioningPathDatasetComponentBlob.py
CaptEmulation/modeldb
78b10aca553e386554f9740db63466b1cf013a1a
[ "Apache-2.0" ]
835
2017-02-08T20:14:24.000Z
2020-03-12T17:37:49.000Z
client/verta/verta/_swagger/_public/modeldb/versioning/model/VersioningPathDatasetComponentBlob.py
CaptEmulation/modeldb
78b10aca553e386554f9740db63466b1cf013a1a
[ "Apache-2.0" ]
651
2019-04-18T12:55:07.000Z
2022-03-31T23:45:09.000Z
client/verta/verta/_swagger/_public/modeldb/versioning/model/VersioningPathDatasetComponentBlob.py
CaptEmulation/modeldb
78b10aca553e386554f9740db63466b1cf013a1a
[ "Apache-2.0" ]
170
2017-02-13T14:49:22.000Z
2020-02-19T17:59:12.000Z
# THIS FILE IS AUTO-GENERATED. DO NOT EDIT
24.9375
96
0.614871
# THIS FILE IS AUTO-GENERATED. DO NOT EDIT from verta._swagger.base_type import BaseType class VersioningPathDatasetComponentBlob(BaseType): def __init__(self, path=None, size=None, last_modified_at_source=None, sha256=None, md5=None): required = { "path": False, "size": False, "last_modified_a...
0
510
0
575
0
0
0
24
45
7a18c524a815806fa4b942a9a18257b636f44285
26,557
py
Python
app/settings.py
vpont/DemonEditor
8fee5033a49e21f960d89d6ce9101b0f84a8d354
[ "MIT" ]
null
null
null
app/settings.py
vpont/DemonEditor
8fee5033a49e21f960d89d6ce9101b0f84a8d354
[ "MIT" ]
null
null
null
app/settings.py
vpont/DemonEditor
8fee5033a49e21f960d89d6ce9101b0f84a8d354
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (c) 2018-2022 Dmitriy Yefremov # # 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 limitat...
31.317217
119
0.661633
# -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (c) 2018-2022 Dmitriy Yefremov # # 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 limitat...
0
15,337
0
9,281
0
0
0
2
293
f0500e91bd245db4ab04b7cb09749c51d33607a3
549
py
Python
resources/migrations/0002_auto_20201222_0951.py
alimustafashah/core
7280c4ca2e88d700ad35af05fbe0766e9ad8e5b4
[ "MIT" ]
null
null
null
resources/migrations/0002_auto_20201222_0951.py
alimustafashah/core
7280c4ca2e88d700ad35af05fbe0766e9ad8e5b4
[ "MIT" ]
24
2021-04-29T18:58:51.000Z
2021-08-06T23:07:03.000Z
resources/migrations/0002_auto_20201222_0951.py
alimustafashah/core
7280c4ca2e88d700ad35af05fbe0766e9ad8e5b4
[ "MIT" ]
2
2021-04-29T23:03:55.000Z
2021-04-29T23:43:52.000Z
# Generated by Django 3.1.4 on 2020-12-22 09:51
22.875
58
0.575592
# Generated by Django 3.1.4 on 2020-12-22 09:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("resources", "0001_initial"), ] operations = [ migrations.AlterField( model_name="jobposting", name="expiry_date", ...
0
0
0
435
0
0
0
19
46
132a2bbebdec9db189b8912b27d98ad701f033a6
1,286
py
Python
zhihu/scrapy_redis/BloomfilterOnRedis.py
jfzhang95/zhihu_spider
bf01e1c584302750a749401118291c909dea0d28
[ "Apache-2.0" ]
null
null
null
zhihu/scrapy_redis/BloomfilterOnRedis.py
jfzhang95/zhihu_spider
bf01e1c584302750a749401118291c909dea0d28
[ "Apache-2.0" ]
null
null
null
zhihu/scrapy_redis/BloomfilterOnRedis.py
jfzhang95/zhihu_spider
bf01e1c584302750a749401118291c909dea0d28
[ "Apache-2.0" ]
1
2020-05-16T06:56:59.000Z
2020-05-16T06:56:59.000Z
# -*- coding: utf-8 -*-
29.227273
70
0.550544
# -*- coding: utf-8 -*- class SimpleHash(object): def __init__(self, cap, seed): self.cap = cap self.seed = seed def hash(self, value): ret = 0 for i in range(len(value)): ret += self.seed * ret + ord(value[i]) return (self.cap - 1) & ret class BloomFilt...
36
0
0
1,202
0
0
0
0
46
993fb1bdcfe85063571e39e15677dc3700dd5abe
363
py
Python
algs-py/AssemblyLineScheduling.py
kliner/funCode
e4ba2e6484478e4d33746393e3163fa36fffbb9e
[ "MIT" ]
1
2017-02-13T14:46:52.000Z
2017-02-13T14:46:52.000Z
algs-py/AssemblyLineScheduling.py
kliner/funCode
e4ba2e6484478e4d33746393e3163fa36fffbb9e
[ "MIT" ]
null
null
null
algs-py/AssemblyLineScheduling.py
kliner/funCode
e4ba2e6484478e4d33746393e3163fa36fffbb9e
[ "MIT" ]
null
null
null
a = [[4, 5, 3, 2], [2, 10, 1, 4]] t = [[0, 7, 4, 5], [0, 9, 2, 8]] e = [10, 12] x = [18, 7] print carAssembly(a,t,e,x)
24.2
89
0.421488
def carAssembly(a, t, e, x): n = len(a[0]) T1, T2 = e[0]+a[0][0], e[1]+a[1][0] for i in xrange(1, n): T1, T2 = min(T1+a[0][i], T2+a[0][i]+t[1][i]), min(T1+a[1][i]+t[0][i], T2+a[1][i]) return min(T1+x[0], T2+x[1]) a = [[4, 5, 3, 2], [2, 10, 1, 4]] t = [[0, 7, 4, 5], [0, 9, 2, 8]] e = [10, 12...
0
0
0
0
0
215
0
0
22
4a7263faf5239c213d9653a2d19c403cc06c3d0a
1,487
py
Python
cms/test_utils/project/pluginapp/plugins/manytomany_rel/models.py
Mario-Kart-Felix/django-cms
6d68439fe7fd59d000f99e27c1f2135a3f9c816a
[ "BSD-3-Clause" ]
1
2021-02-11T16:20:01.000Z
2021-02-11T16:20:01.000Z
cms/test_utils/project/pluginapp/plugins/manytomany_rel/models.py
rpep/django-cms
53dddb106f45963f9f8393d434b4313fa3bbdf54
[ "BSD-3-Clause" ]
2
2020-10-28T13:48:53.000Z
2020-10-28T13:52:48.000Z
cms/test_utils/project/pluginapp/plugins/manytomany_rel/models.py
rpep/django-cms
53dddb106f45963f9f8393d434b4313fa3bbdf54
[ "BSD-3-Clause" ]
1
2021-07-26T14:43:54.000Z
2021-07-26T14:43:54.000Z
###
24.783333
88
0.708137
from django.db import models from cms.models import CMSPlugin class Article(models.Model): title = models.CharField(max_length=50) section = models.ForeignKey('Section', on_delete=models.CASCADE) def __str__(self): return u"%s -- %s" % (self.title, self.section) class Section(models.Model): ...
0
0
0
1,250
0
0
0
18
206
ebd81cf09d811b53d13f71a0ed438a98ed125be8
670
py
Python
packages/postgres-database/src/simcore_postgres_database/migration/versions/bb305829cf83_add_groups_thumbnail.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
25
2018-04-13T12:44:12.000Z
2022-03-12T15:01:17.000Z
packages/postgres-database/src/simcore_postgres_database/migration/versions/bb305829cf83_add_groups_thumbnail.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
2,553
2018-01-18T17:11:55.000Z
2022-03-31T16:26:40.000Z
packages/postgres-database/src/simcore_postgres_database/migration/versions/bb305829cf83_add_groups_thumbnail.py
mrnicegyu11/osparc-simcore
b6fa6c245dbfbc18cc74a387111a52de9b05d1f4
[ "MIT" ]
20
2018-01-18T19:45:33.000Z
2022-03-29T07:08:47.000Z
"""add groups thumbnail Revision ID: bb305829cf83 Revises: 1ca14c33e65c Create Date: 2020-06-02 12:06:21.302890+00:00 """ # revision identifiers, used by Alembic. revision = 'bb305829cf83' down_revision = '1ca14c33e65c' branch_labels = None depends_on = None
23.103448
79
0.69403
"""add groups thumbnail Revision ID: bb305829cf83 Revises: 1ca14c33e65c Create Date: 2020-06-02 12:06:21.302890+00:00 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'bb305829cf83' down_revision = '1ca14c33e65c' branch_labels = None depends_on = None def upgr...
0
0
0
0
0
312
0
3
90
e5703b27088761083d4b5f7db98e594367b431f1
1,805
py
Python
fooltrader/proxy/__init__.py
renwenduan/fooltrader
c9ede56d6ce4f952618d14e0ec28479584ad9377
[ "MIT" ]
null
null
null
fooltrader/proxy/__init__.py
renwenduan/fooltrader
c9ede56d6ce4f952618d14e0ec28479584ad9377
[ "MIT" ]
null
null
null
fooltrader/proxy/__init__.py
renwenduan/fooltrader
c9ede56d6ce4f952618d14e0ec28479584ad9377
[ "MIT" ]
null
null
null
import os # if not os.path.exists(get_proxy_dir()): os.makedirs(get_proxy_dir()) http_proxy_df = get_http_proxy() https_proxy_df = get_https_proxy() socks_proxy_df = get_socks_proxy()
24.391892
64
0.73518
import os import pandas as pd from fooltrader import settings # 获取存档的代理列表 def get_proxy_dir(): return os.path.join(settings.FOOLTRADER_STORE_PATH, "proxy") def get_http_proxy_path(): return os.path.join(get_proxy_dir(), "http_proxy.csv") def get_https_proxy_path(): return os.path.join(get_proxy_dir...
27
0
0
0
0
1,309
0
8
276
5017718e0c1ca9ca1a3baa72f5f8d88907c9163a
285
py
Python
examples/idioms/programs/126.2137-multiple-return-values.py
laowantong/paroxython
4626798a60eeaa765dbfab9e63e04030c9fcb1d0
[ "MIT" ]
31
2020-05-02T13:34:26.000Z
2021-06-06T17:25:52.000Z
examples/idioms/programs/126.2137-multiple-return-values.py
laowantong/paroxython
4626798a60eeaa765dbfab9e63e04030c9fcb1d0
[ "MIT" ]
108
2019-11-18T19:41:52.000Z
2022-03-18T13:58:17.000Z
examples/idioms/programs/126.2137-multiple-return-values.py
laowantong/paroxython
4626798a60eeaa765dbfab9e63e04030c9fcb1d0
[ "MIT" ]
4
2020-05-19T08:57:44.000Z
2020-09-21T08:53:46.000Z
"""Multiple return values. Write a function _foo that returns a _string and a _boolean value. Source: MLKo """ # Implementation author: Oldboy # Created on 2017-10-28T09:19:40.922778Z # Last modified on 2017-10-28T09:19:40.922778Z # Version 1
17.8125
66
0.726316
"""Multiple return values. Write a function _foo that returns a _string and a _boolean value. Source: MLKo """ # Implementation author: Oldboy # Created on 2017-10-28T09:19:40.922778Z # Last modified on 2017-10-28T09:19:40.922778Z # Version 1 def foo(): return "string", True
0
0
0
0
0
15
0
0
23
389425fb7c65aca7aa58902c7aab5ce0b22535af
964
py
Python
curate/migrations/0040_auto_20190314_0314.py
JoeAmmar/curate_science
b1ae49721b06c4d9377e59b5c3f9e636786f7090
[ "MIT" ]
14
2018-10-21T11:52:01.000Z
2022-01-24T21:38:05.000Z
curate/migrations/0040_auto_20190314_0314.py
JoeAmmar/curate_science
b1ae49721b06c4d9377e59b5c3f9e636786f7090
[ "MIT" ]
110
2018-10-31T07:56:17.000Z
2022-01-26T15:44:25.000Z
curate/migrations/0040_auto_20190314_0314.py
JoeAmmar/curate_science
b1ae49721b06c4d9377e59b5c3f9e636786f7090
[ "MIT" ]
7
2019-07-01T08:48:47.000Z
2020-04-04T20:54:40.000Z
# Generated by Django 2.1.7 on 2019-03-14 03:14
30.125
127
0.624481
# Generated by Django 2.1.7 on 2019-03-14 03:14 import autoslug.fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('invitations', '0003_auto_20151126_1523'), ('curate', '0039_auto_20190307_0449'), ] o...
0
0
0
794
0
0
0
31
90
f168c0ae935a62fb4869b37289ccf95b0cd09327
3,144
py
Python
gp.py
JLustig/python-gp
2628e31dbed594ef8402a25f61a950af9fa7b544
[ "MIT" ]
null
null
null
gp.py
JLustig/python-gp
2628e31dbed594ef8402a25f61a950af9fa7b544
[ "MIT" ]
null
null
null
gp.py
JLustig/python-gp
2628e31dbed594ef8402a25f61a950af9fa7b544
[ "MIT" ]
null
null
null
import numpy as np from scipy . spatial . distance import cdist import matplotlib.pyplot as plt import math #Prior #Create a GP-prior with a squared exponential co-variance function. xdata=[] x=np.arange(-math.pi,math.pi+0.1,0.05) x=np.array(x) priorMu=np.zeros(len(x)) #Sample from this prior and visualise the samp...
29.942857
100
0.681298
import pylab as pb import numpy as np from math import pi from scipy . spatial . distance import cdist from scipy.stats import multivariate_normal import matplotlib.pyplot as plt import math def kernel(xi,xj,sigma,lengthscale): return (np.power(sigma,2)*np.exp(-np.power(xi-xj,2)/np.power(lengthscale,2))) def plot...
0
0
0
0
0
2,025
0
17
181
a1be313cfc22f84c348fd7c846cdebf3da02e117
402
py
Python
archives/modules/socket_echo_server.py
mcxiaoke/python-labs
61c0a1f91008ba82fc2f5a5deb19e60aec9df960
[ "Apache-2.0" ]
7
2016-07-08T10:53:13.000Z
2021-07-20T00:20:10.000Z
archives/modules/socket_echo_server.py
mcxiaoke/python-labs
61c0a1f91008ba82fc2f5a5deb19e60aec9df960
[ "Apache-2.0" ]
1
2021-05-11T05:20:18.000Z
2021-05-11T05:20:18.000Z
archives/modules/socket_echo_server.py
mcxiaoke/python-labs
61c0a1f91008ba82fc2f5a5deb19e60aec9df960
[ "Apache-2.0" ]
7
2016-10-31T06:31:54.000Z
2020-08-31T20:55:00.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: mcxiaoke # @Date: 2015-07-13 22:43:21 import socket HOST = '' PORT = 12345 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((HOST, PORT)) s.listen(1) conn, addr = s.accept() print 'Connected from', addr while True: data = conn.r...
19.142857
54
0.61194
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: mcxiaoke # @Date: 2015-07-13 22:43:21 import socket HOST = '' PORT = 12345 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((HOST, PORT)) s.listen(1) conn, addr = s.accept() print 'Connected from', addr while True: data = conn.r...
0
0
0
0
0
0
0
0
0
af0d553ebdadd9238d2da4d94bac6dc43da400b3
1,820
py
Python
Generate_Data/data_gen_example.py
Sudip-Pandit/spark_book
199e803664696944b007db5c630c050e7b789698
[ "CC0-1.0" ]
1
2021-07-27T13:52:56.000Z
2021-07-27T13:52:56.000Z
Get_test_data/Generate_Data/data_gen_example.py
ghoshm21/spark_book
199e803664696944b007db5c630c050e7b789698
[ "CC0-1.0" ]
null
null
null
Get_test_data/Generate_Data/data_gen_example.py
ghoshm21/spark_book
199e803664696944b007db5c630c050e7b789698
[ "CC0-1.0" ]
1
2021-12-13T16:29:35.000Z
2021-12-13T16:29:35.000Z
# This is just an example how to use faker # faker is extrimly slow. # check out data_gen_saprk for fas code if __name__ == '__main__': records = 100000000 headers = ["Email Id", "Prefix", "Name", "Birth Date", "Phone Number", "Additional Email Id", "Address", "Zip Code", "City","State", "Co...
40.444444
104
0.502747
# This is just an example how to use faker # faker is extrimly slow. # check out data_gen_saprk for fas code import csv from faker import Faker import datetime def datagenerate(records, headers): fake = Faker('en_US') fake1 = Faker('en_GB') # To generate phone numbers with open("People_data.csv", 'wt') a...
0
0
0
0
0
1,314
0
-15
89
c378645bdc10fb05a172cee3d0f7845c73b21e2f
283
py
Python
{{cookiecutter.project_slug}}/backend/main.py
devalv/cookiecutter-fastapi
c7cfd3caa14b40dcc5d8ff6bdb6e25cfed3c9d00
[ "MIT" ]
2
2021-12-26T00:10:19.000Z
2022-01-30T21:24:31.000Z
backend/main.py
devalv/yawm
9f91b96cf6b9a9a1f2026d514ea24edda117e1ba
[ "MIT" ]
7
2020-11-07T16:42:47.000Z
2022-01-21T23:51:38.000Z
backend/main.py
devalv/yawm
9f91b96cf6b9a9a1f2026d514ea24edda117e1ba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Simple debug application runner.""" import uvicorn from core import config if __name__ == "__main__": uvicorn.run( "api:app", reload=True, host=f"{config.API_HOST}", port=config.API_PORT, loop="uvloop", )
17.6875
38
0.572438
# -*- coding: utf-8 -*- """Simple debug application runner.""" import uvicorn from core import config if __name__ == "__main__": uvicorn.run( "api:app", reload=True, host=f"{config.API_HOST}", port=config.API_PORT, loop="uvloop", )
0
0
0
0
0
0
0
0
0
50f82f3e58810dabad7aec2cc563b6880c9f27c3
318
py
Python
exercicios-Python/aula22c.py
pedrosimoes-programmer/exercicios-python
150de037496d63d76086678d87425a8ccfc74573
[ "MIT" ]
null
null
null
exercicios-Python/aula22c.py
pedrosimoes-programmer/exercicios-python
150de037496d63d76086678d87425a8ccfc74573
[ "MIT" ]
null
null
null
exercicios-Python/aula22c.py
pedrosimoes-programmer/exercicios-python
150de037496d63d76086678d87425a8ccfc74573
[ "MIT" ]
null
null
null
#Retorno de Variveis r1 = somar(2, 4) r2 = somar(3, 5, 4) r3 = somar(8) print(f'Os clculos foram {r1}, {r2} e {r3}.')
31.8
152
0.650943
#Retorno de Variáveis def somar(a=0, b=0, c=0): s = a + b + c return s #Usando o comando return, é possível retornar um valor a partir da função, e colocá-la numa variável, assim, usando-a da forma que desejar r1 = somar(2, 4) r2 = somar(3, 5, 4) r3 = somar(8) print(f'Os cálculos foram {r1}, {r2} e {r3}.')
16
0
0
0
0
169
0
0
23
df4e170ee9233a39c371120b69469a6f9e3bbe28
7,038
py
Python
qpython/_pandas.py
komsit37/sublime-q-2
a0371c820ad8c8040fbca12bdbf7d2cf90f3c346
[ "MIT" ]
2
2016-01-04T08:40:15.000Z
2016-09-16T21:16:26.000Z
qpython/_pandas.py
komsit37/sublime-q-2
a0371c820ad8c8040fbca12bdbf7d2cf90f3c346
[ "MIT" ]
null
null
null
qpython/_pandas.py
komsit37/sublime-q-2
a0371c820ad8c8040fbca12bdbf7d2cf90f3c346
[ "MIT" ]
null
null
null
# # Copyright (c) 2011-2014 Exxeleron GmbH # # 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 agre...
38.043243
145
0.613242
# # Copyright (c) 2011-2014 Exxeleron GmbH # # 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 agre...
0
5,240
0
843
0
0
0
126
225
4f317c7da3553e370baabd2f644193d2ce306d16
154,271
py
Python
SigProfilerTopography/Topography.py
AlexandrovLab/SigProfilerTopography
34c7cf24392bc77953370038a520ffc8d0bdee50
[ "BSD-2-Clause" ]
5
2021-04-02T14:03:45.000Z
2022-02-21T12:54:52.000Z
SigProfilerTopography/Topography.py
AlexandrovLab/SigProfilerTopography
34c7cf24392bc77953370038a520ffc8d0bdee50
[ "BSD-2-Clause" ]
null
null
null
SigProfilerTopography/Topography.py
AlexandrovLab/SigProfilerTopography
34c7cf24392bc77953370038a520ffc8d0bdee50
[ "BSD-2-Clause" ]
1
2022-01-22T06:27:49.000Z
2022-01-22T06:27:49.000Z
# This source code file is a part of SigProfilerTopography # SigProfilerTopography is a tool included as part of the SigProfiler # computational framework for comprehensive analysis of mutational # signatures from next-generation sequencing of cancer genomes. # SigProfilerTopography provides the downstream data analysi...
61.981117
350
0.555639
# This source code file is a part of SigProfilerTopography # SigProfilerTopography is a tool included as part of the SigProfiler # computational framework for comprehensive analysis of mutational # signatures from next-generation sequencing of cancer genomes. # SigProfilerTopography provides the downstream data analysi...
0
0
0
0
0
135,082
0
7,728
3,037
e6f0ae213c3940abf9a8efd1a6587d1fed9d63f7
5,782
py
Python
mincall/hyperparam/_hyperparam.py
nmiculinic/minion-basecaller
73a134c8ed3715e79319780e24a171dd21713408
[ "MIT" ]
7
2017-07-13T15:08:16.000Z
2021-04-24T16:39:11.000Z
mincall/hyperparam/_hyperparam.py
nmiculinic/minion-basecaller
73a134c8ed3715e79319780e24a171dd21713408
[ "MIT" ]
4
2018-01-09T13:50:57.000Z
2020-07-15T15:33:35.000Z
mincall/hyperparam/_hyperparam.py
nmiculinic/minion-basecaller
73a134c8ed3715e79319780e24a171dd21713408
[ "MIT" ]
1
2018-03-24T22:48:25.000Z
2018-03-24T22:48:25.000Z
import logging hyperparam_logger = logging.getLogger(".".join(__name__.split(".")[:-1]))
30.272251
115
0.576271
from typing import * from itertools import count import os from pprint import pformat import logging import cytoolz as toolz import numpy as np import yaml import argparse import voluptuous from mincall.common import * from mincall import train from mincall.train import DataDir, TrainConfig from voluptuous.humanize imp...
0
405
0
524
0
4,189
0
78
490
c09f34824761d6195efb3b06e107298407379d04
313
py
Python
zooapi/api/logout.py
ismyblue/zoo
b00d8af5a6d086369cf939e66884bd377fdf8333
[ "Apache-2.0" ]
2
2020-09-18T03:58:16.000Z
2021-03-15T12:28:57.000Z
zooapi/api/logout.py
ismyblue/zoo
b00d8af5a6d086369cf939e66884bd377fdf8333
[ "Apache-2.0" ]
null
null
null
zooapi/api/logout.py
ismyblue/zoo
b00d8af5a6d086369cf939e66884bd377fdf8333
[ "Apache-2.0" ]
null
null
null
# Name: logout.py # Author: HuangHao # Time: 2020/9/30 22:17 from django.http import JsonResponse def logout(request): """ GET @param request: @return: """ request.session.flush() return JsonResponse({'result': 'success', 'success': ''})
14.904762
65
0.642173
# Name: logout.py # Author: HuangHao # Time: 2020/9/30 22:17 from django.http import JsonResponse from zooapi.models import User def logout(request): """ 注销登录 GET @param request: @return: """ request.session.flush() return JsonResponse({'result': 'success', 'success': '注销成功'})
24
0
0
0
0
0
0
9
22
31838a3974e9a0840a5ede0588d72dbfa38aac4a
509
py
Python
token.py
punch872/EyeWarnYou
71ea21a8b3f1ae213478d735a10a240524b89702
[ "MIT" ]
1
2019-03-04T08:37:26.000Z
2019-03-04T08:37:26.000Z
token.py
punch872/EyeWarnYou
71ea21a8b3f1ae213478d735a10a240524b89702
[ "MIT" ]
null
null
null
token.py
punch872/EyeWarnYou
71ea21a8b3f1ae213478d735a10a240524b89702
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from pythainlp.tokenize import sent_tokenize, word_tokenize text = " " print(text) print(sent_tokenize(text)) # ['', '', ''] print(word_tokenize(text)) # ['', '', '', ' ', '', '', '', '', ' '] print(word_tokenize(text, whitespaces=False)) # ['', '', '', '', '', '', ''] text2 = "" print(te...
23.136364
71
0.644401
# -*- coding: utf-8 -*- from pythainlp.tokenize import sent_tokenize, word_tokenize text = "ฉันรักภาษาไทย เพราะฉันใช้ภาษาไทย " print(text) print(sent_tokenize(text)) # ['ฉันรักภาษาไทย', 'เพราะฉันใช้ภาษาไทย', ''] print(word_tokenize(text)) # ['ฉัน', 'รัก', 'ภาษาไทย', ' ', 'เพราะ', 'ฉัน', 'ใช้', 'ภาษาไทย', ' '] prin...
444
0
0
0
0
0
0
0
0
509f51d52a7396dba603ca6421f58b4f4987b20a
220
py
Python
setup.py
mareklovci/kky-zsur
c41fbce53aa790b1f280cbca8d274845993e74f9
[ "MIT" ]
null
null
null
setup.py
mareklovci/kky-zsur
c41fbce53aa790b1f280cbca8d274845993e74f9
[ "MIT" ]
null
null
null
setup.py
mareklovci/kky-zsur
c41fbce53aa790b1f280cbca8d274845993e74f9
[ "MIT" ]
null
null
null
from setuptools import setup setup(name='zsur', version='0.1.0', packages=['zsur'], entry_points={ 'console_scripts': [ 'zsur = zsur.__main__:main' ] }, )
18.333333
41
0.486364
from setuptools import setup setup(name='zsur', version='0.1.0', packages=['zsur'], entry_points={ 'console_scripts': [ 'zsur = zsur.__main__:main' ] }, )
0
0
0
0
0
0
0
0
0
2984265db5ad3dc8939f67e11869ee6efb92c666
839
py
Python
apex/__init__.py
bcbcbcbcbcl/apex
7b3ac7221367dc7b7527a68e34cf08b5eeb0fc47
[ "BSD-3-Clause" ]
2
2021-06-24T18:31:04.000Z
2021-06-24T20:34:44.000Z
apex/__init__.py
bcbcbcbcbcl/apex
7b3ac7221367dc7b7527a68e34cf08b5eeb0fc47
[ "BSD-3-Clause" ]
null
null
null
apex/__init__.py
bcbcbcbcbcl/apex
7b3ac7221367dc7b7527a68e34cf08b5eeb0fc47
[ "BSD-3-Clause" ]
null
null
null
# from . import RNN # from . import reparameterization try: except ImportError: # An attempt to fix https://github.com/NVIDIA/apex/issues/97. I'm not sure why 97 is even # happening because Python modules should only be imported once, even if import is called # multiple times. try: _ = warned_o...
32.269231
102
0.703218
# from . import RNN # from . import reparameterization from . import fp16_utils from . import parallel from . import amp try: from . import optimizers except ImportError: # An attempt to fix https://github.com/NVIDIA/apex/issues/97. I'm not sure why 97 is even # happening because Python modules should only...
0
0
0
0
0
0
0
9
118
edb94b58d1c26be7749ed87ed63953601befc353
8,454
py
Python
api/namex/resources/auto_analyse/issues/corporate_name_conflict.py
riyazuddinsyed/namex
c100ef4378794f509b738d38276e3b902d26067a
[ "Apache-2.0" ]
null
null
null
api/namex/resources/auto_analyse/issues/corporate_name_conflict.py
riyazuddinsyed/namex
c100ef4378794f509b738d38276e3b902d26067a
[ "Apache-2.0" ]
null
null
null
api/namex/resources/auto_analyse/issues/corporate_name_conflict.py
riyazuddinsyed/namex
c100ef4378794f509b738d38276e3b902d26067a
[ "Apache-2.0" ]
null
null
null
# Import DTOs
44.494737
161
0.577596
from datetime import date from string import Template from namex.services.name_request.auto_analyse import AnalysisIssueCodes # Import DTOs from .abstract import AnalysisResponseIssue from ..response_objects import NameAnalysisIssue from ..response_objects import NameAction, NameActions, Conflict class CorporateNam...
0
0
0
8,130
0
0
0
152
156
17b916fddb4cf1c13bf9e42996fa9b637ba98911
2,942
py
Python
fabfile/base.py
whatsthehubbub/rippleeffect
f33488e7a0dbeaadee5da5ddef7ce5f209fb3fd4
[ "MIT" ]
null
null
null
fabfile/base.py
whatsthehubbub/rippleeffect
f33488e7a0dbeaadee5da5ddef7ce5f209fb3fd4
[ "MIT" ]
null
null
null
fabfile/base.py
whatsthehubbub/rippleeffect
f33488e7a0dbeaadee5da5ddef7ce5f209fb3fd4
[ "MIT" ]
null
null
null
from fabric.colors import cyan from fabric.contrib import files packages = ( 'build-essential', 'git', 'mercurial', 'rsync', 'vim', ) def create_deploy_user(): "creates deployment user" username = 'deploy' # create deploy user & home without password if files.contains('/etc/p...
25.582609
108
0.655676
from fabric.api import * from fabric.colors import cyan from fabric.contrib import files packages = ( 'build-essential', 'git', 'mercurial', 'rsync', 'vim', ) def install_base_packages(): sudo('apt-get update') for package in packages: sudo('apt-get install %s --assume-yes' % packa...
0
0
0
0
0
948
0
3
137
1cb0b3487a0368915142350ccee98b2e55f028c8
4,894
py
Python
recipes/data/fisher/utils.py
lorenlugosch/wav2letter
0393ac7d451e99a3d70a0d78fc48ebc403fee0dc
[ "BSD-3-Clause" ]
337
2021-04-17T03:22:38.000Z
2022-03-28T18:01:10.000Z
recipes/data/fisher/utils.py
lorenlugosch/wav2letter
0393ac7d451e99a3d70a0d78fc48ebc403fee0dc
[ "BSD-3-Clause" ]
64
2021-04-16T16:50:47.000Z
2022-03-25T18:14:42.000Z
recipes/data/fisher/utils.py
lorenlugosch/wav2letter
0393ac7d451e99a3d70a0d78fc48ebc403fee0dc
[ "BSD-3-Clause" ]
63
2021-04-16T14:44:43.000Z
2022-03-29T13:43:18.000Z
""" Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. """ from __future__ import absolute_import, division, print_function, unicode_literals
33.067568
86
0.526972
""" Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. """ from __future__ import absolute_import, division, print_function, unicode_literals import os import sox def fi...
0
0
0
0
0
4,534
0
-23
92
65c559e5b5f51d6b87eee6d3d2659ee1b550c613
2,632
py
Python
fool/predictor.py
alanoooaao/FoolNLTK
1344c5aa1c2aabc1f4f6f2a492e1663928836325
[ "Apache-2.0" ]
1,718
2017-12-15T06:14:10.000Z
2022-03-28T02:31:56.000Z
fool/predictor.py
alanoooaao/FoolNLTK
1344c5aa1c2aabc1f4f6f2a492e1663928836325
[ "Apache-2.0" ]
73
2017-12-22T03:04:17.000Z
2021-11-15T15:38:18.000Z
fool/predictor.py
alanoooaao/FoolNLTK
1344c5aa1c2aabc1f4f6f2a492e1663928836325
[ "Apache-2.0" ]
421
2017-12-17T08:32:11.000Z
2022-03-11T03:02:29.000Z
#!/usr/bin/env python # -*-coding:utf-8-*-
33.316456
119
0.640578
#!/usr/bin/env python # -*-coding:utf-8-*- import tensorflow as tf import numpy as np from tensorflow.contrib.crf import viterbi_decode def decode(logits, trans, sequence_lengths, tag_num): viterbi_sequences = [] small = -1000.0 start = np.asarray([[small] * tag_num + [0]]) for logit, length in zip...
0
0
0
1,543
0
853
0
27
159
db1f10790ae19b9c1c9518e37dc69cd4f610f4b8
904
py
Python
src/chembl_webservices/core/fpsim2_helper.py
BNext-IQT/chembl_webservices_py3
42ccb39f0121835ca7ee9ac8ddd04cb513998079
[ "Apache-2.0" ]
5
2020-10-23T11:56:59.000Z
2021-06-05T16:30:10.000Z
src/chembl_webservices/core/fpsim2_helper.py
BNext-IQT/chembl_webservices_py3
42ccb39f0121835ca7ee9ac8ddd04cb513998079
[ "Apache-2.0" ]
9
2020-02-11T08:01:40.000Z
2021-06-10T19:41:03.000Z
src/chembl_webservices/core/fpsim2_helper.py
BNext-IQT/chembl_webservices_py3
42ccb39f0121835ca7ee9ac8ddd04cb513998079
[ "Apache-2.0" ]
4
2020-02-11T10:45:22.000Z
2021-06-07T01:48:02.000Z
# Variable loaded from the Settings to prevent circular references FPSIM2_FILE_PATH = None FPSIM_ENGINE = None def get_similar_molregnos(query_string, similarity=0.7): """ :param query_string: the smiles, inchi or molfile representation of the query :param similarity: the minimum similarity threshold ...
34.769231
81
0.733407
from FPSim2 import FPSim2Engine import time # Variable loaded from the Settings to prevent circular references FPSIM2_FILE_PATH = None FPSIM_ENGINE = None def get_fpsim_engine(): global FPSIM_ENGINE, FPSIM2_FILE_PATH if FPSIM_ENGINE is None: t_ini = time.time() FPSIM_ENGINE = FPSim2Engine(FPSI...
0
0
0
0
0
253
0
0
67
fa18948df120f9cec960c87761e0e375fe726424
8,025
py
Python
tests/unit_config.py
rohank63/htsinfer
2067ed67bdc9b4208efa3d2080c3fe541607e5fb
[ "Apache-2.0" ]
1
2020-05-28T21:10:57.000Z
2020-05-28T21:10:57.000Z
tests/unit_config.py
rohank63/htsinfer
2067ed67bdc9b4208efa3d2080c3fe541607e5fb
[ "Apache-2.0" ]
null
null
null
tests/unit_config.py
rohank63/htsinfer
2067ed67bdc9b4208efa3d2080c3fe541607e5fb
[ "Apache-2.0" ]
null
null
null
""" Unit tests for '.config'. """ import os from myproj.config import ConfigParser # Test parameters FILE_OK = os.path.join( os.path.dirname(__file__), "files", "yaml", ) FILE_UNAVAILABLE = "xyz/zyx/123" FILE_NOT_YAML = __file__ FILE_EMPTY = os.path.join( os.path.dirname(__file__), "files", "e...
22.542135
66
0.681246
""" Unit tests for '.config'. """ import os import pytest from yaml.parser import ParserError from yaml.representer import RepresenterError from myproj.config import ConfigParser from myproj.models import Parameters # Test parameters FILE_OK = os.path.join( os.path.dirname(__file__), "files", "yaml", ) F...
0
0
0
0
0
5,609
0
45
1,140
0250a0c2744104558e0af87746c740e94fbfa427
5,347
py
Python
otio.py
eric-with-a-c/resolve-otio
7e5bcfbf1025042368a3e53547cafbe437d14e9d
[ "Apache-2.0" ]
10
2020-10-02T06:12:22.000Z
2021-11-03T02:34:21.000Z
otio.py
eric-with-a-c/resolve-otio
7e5bcfbf1025042368a3e53547cafbe437d14e9d
[ "Apache-2.0" ]
1
2021-11-19T00:58:52.000Z
2022-01-01T20:27:27.000Z
otio.py
eric-with-a-c/resolve-otio
7e5bcfbf1025042368a3e53547cafbe437d14e9d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import sys # CHANGE THE LINE BELOW TO POINT TO YOUR PYTHON SITE PACKAGES sys.path.append("/path/to/site-packages") import opentimelineio as otio resolve = bmd.scriptapp("Resolve") fu = resolve.Fusion() ui = fu.UIManager disp = bmd.UIDispatcher(fu.UIManager) TRACK_TYPES = { "video": otio.sche...
28.441489
78
0.586684
#!/usr/bin/env python import os import sys # CHANGE THE LINE BELOW TO POINT TO YOUR PYTHON SITE PACKAGES sys.path.append("/path/to/site-packages") import opentimelineio as otio resolve = bmd.scriptapp("Resolve") fu = resolve.Fusion() ui = fu.UIManager disp = bmd.UIDispatcher(fu.UIManager) TRACK_TYPES = { "video"...
0
0
0
0
0
3,704
0
-12
253
19b96d53355eb51d4df2f87f15d58f7f8764f9d3
1,833
py
Python
Python_Script/Insert_Data_To_MongoDB/Insertdata_to withoutDuplication.py
amolkokare/FinTech-Flair-NSE-data
46941078299dbb63ef35875b3851458b3538c87d
[ "MIT" ]
null
null
null
Python_Script/Insert_Data_To_MongoDB/Insertdata_to withoutDuplication.py
amolkokare/FinTech-Flair-NSE-data
46941078299dbb63ef35875b3851458b3538c87d
[ "MIT" ]
null
null
null
Python_Script/Insert_Data_To_MongoDB/Insertdata_to withoutDuplication.py
amolkokare/FinTech-Flair-NSE-data
46941078299dbb63ef35875b3851458b3538c87d
[ "MIT" ]
null
null
null
import pymongo import os import pandas as pd import glob import shutil dflist=[] m=[] os.chdir(r"D:\NSEDATA\2021") myclient = pymongo.MongoClient("mongodb://localhost:27017/") mydb = myclient["NSEDATA2020FinalDataCopy"] mycol = mydb["BHAVCOPY1"] #mydb.mycol.create_index([{"TIMESTAMP"}], unique=True ) filelist=glob.gl...
22.353659
82
0.687943
import pymongo import os import datetime,time import pandas as pd import glob import zipfile import json,codecs import shutil dflist=[] m=[] os.chdir(r"D:\NSEDATA\2021") myclient = pymongo.MongoClient("mongodb://localhost:27017/") mydb = myclient["NSEDATA2020FinalDataCopy"] mycol = mydb["BHAVCOPY1"] #mydb.mycol.creat...
0
0
0
0
0
0
0
-11
66
29fa78a1a4370e7989dd486a303fe7ecc0c6b1ad
7,015
py
Python
nablapps/podcast/migrations/0001_squashed_0014_podcast_content_type.py
Amund211/nablaweb
8105c34615d4b67637e982545fbc6489a131c1f3
[ "MIT" ]
17
2019-10-07T15:10:58.000Z
2022-01-21T14:18:07.000Z
nablapps/podcast/migrations/0001_squashed_0014_podcast_content_type.py
Amund211/nablaweb
8105c34615d4b67637e982545fbc6489a131c1f3
[ "MIT" ]
222
2019-10-07T15:04:51.000Z
2022-03-24T12:14:16.000Z
nablapps/podcast/migrations/0001_squashed_0014_podcast_content_type.py
Amund211/nablaweb
8105c34615d4b67637e982545fbc6489a131c1f3
[ "MIT" ]
7
2019-10-10T18:53:42.000Z
2021-10-18T02:13:09.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals
35.251256
126
0.380328
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import image_cropping.fields class Migration(migrations.Migration): replaces = [ ("podcast", "0001_initial"), ("podcast", "0002_auto_20150214_2044"), ("podcast", "0003_auto_20150521_...
14
0
0
6,848
0
0
0
26
69
98c34a669c73592ded3bf286d8c834e4cf773fce
3,501
py
Python
python/paddle/fluid/tests/unittests/ir/inference/test_mkldnn_prelu_op.py
zhenlin-work/Paddle
ed7a21dea0ddcffb6f7f33ce21c5c368f5c7866b
[ "Apache-2.0" ]
2
2018-12-27T07:13:55.000Z
2021-06-16T09:30:09.000Z
python/paddle/fluid/tests/unittests/ir/inference/test_mkldnn_prelu_op.py
zhenlin-work/Paddle
ed7a21dea0ddcffb6f7f33ce21c5c368f5c7866b
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/ir/inference/test_mkldnn_prelu_op.py
zhenlin-work/Paddle
ed7a21dea0ddcffb6f7f33ce21c5c368f5c7866b
[ "Apache-2.0" ]
1
2020-11-25T10:41:52.000Z
2020-11-25T10:41:52.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
36.852632
80
0.61611
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
0
291
0
2,121
0
0
0
190
223
51911ce7576e67a254f3a2879abf32c2a39ea806
5,055
py
Python
vision/applications/vision_detection_app.py
lcmonteiro/space-vision-py
38022c99218de0e1e93ec0bae8d143fa0c787f1d
[ "MIT" ]
1
2019-12-14T20:00:17.000Z
2019-12-14T20:00:17.000Z
vision/applications/vision_detection_app.py
lcmonteiro/space-vision-py
38022c99218de0e1e93ec0bae8d143fa0c787f1d
[ "MIT" ]
null
null
null
vision/applications/vision_detection_app.py
lcmonteiro/space-vision-py
38022c99218de0e1e93ec0bae8d143fa0c787f1d
[ "MIT" ]
null
null
null
# ################################################################################################ # ------------------------------------------------------------------------------------------------ # File: vision_detection_app.py # Author: Luis Monteiro # # Created on nov 8, 2019, 22:00 PM # -------------------------...
38.007519
99
0.314144
# ################################################################################################ # ------------------------------------------------------------------------------------------------ # File: vision_detection_app.py # Author: Luis Monteiro # # Created on nov 8, 2019, 22:00 PM # -------------------------...
0
206
0
0
0
873
0
134
132
195b8629b6c5b96f8b0420012e11e13bd47a5abc
26,645
py
Python
z_laser_viz/src/z_laser_viz/zlp_viz.py
fada-catec/z_laser_projector
79be087febbdc721734031fdf0b3289817be92ce
[ "Apache-2.0" ]
null
null
null
z_laser_viz/src/z_laser_viz/zlp_viz.py
fada-catec/z_laser_projector
79be087febbdc721734031fdf0b3289817be92ce
[ "Apache-2.0" ]
null
null
null
z_laser_viz/src/z_laser_viz/zlp_viz.py
fada-catec/z_laser_projector
79be087febbdc721734031fdf0b3289817be92ce
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020, FADA-CATEC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing,...
41.24613
128
0.630662
# Copyright (c) 2020, FADA-CATEC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing,...
0
0
0
25,077
0
0
0
526
378
93784d658a8932e10e2b9b65c44f56cbe38aa0e9
6,302
py
Python
models/backbones/wideresnet.py
wutong16/Adversarial_Long-Tail
ab2f3a792aede2bd2a3e57657c787ec542165be1
[ "FSFAP" ]
78
2021-04-05T15:58:03.000Z
2022-03-30T02:42:42.000Z
models/backbones/wideresnet.py
wutong16/Adversarial_Long-Tail
ab2f3a792aede2bd2a3e57657c787ec542165be1
[ "FSFAP" ]
1
2022-03-08T04:11:02.000Z
2022-03-18T04:11:17.000Z
models/backbones/wideresnet.py
wutong16/Adversarial_Long-Tail
ab2f3a792aede2bd2a3e57657c787ec542165be1
[ "FSFAP" ]
9
2021-04-13T09:51:51.000Z
2022-03-09T02:45:20.000Z
import torch.nn as nn
37.963855
131
0.608854
import math import torch import torch.nn as nn import torch.nn.functional as F from .non_local import NonLocal_Direct from .custom_activations import build_custom_activation from .custom_norm import select_norm class BasicBlock(nn.Module): def __init__(self, in_planes, out_planes, stride, dropRate=0.0, activatio...
0
0
0
5,496
0
452
0
57
271
4d75a406dd259cb5ae2939364c8f7e00ee590ceb
17,358
py
Python
hdf_compass/hdf5rest_model/hdf5dtype.py
HDFGroup/hdf-compass
050e05aeb491d9d8f79b36529c7c8e9eebf4fd71
[ "IJG" ]
124
2015-06-12T02:01:12.000Z
2022-03-26T20:10:01.000Z
hdf_compass/hdf5rest_model/hdf5dtype.py
giumas/hdf-compass
945d9acd6d4d676db8bf81e0af694b6eefb7dc25
[ "IJG" ]
152
2015-04-17T04:38:08.000Z
2022-03-27T16:19:05.000Z
hdf_compass/hdf5rest_model/hdf5dtype.py
giumas/hdf-compass
945d9acd6d4d676db8bf81e0af694b6eefb7dc25
[ "IJG" ]
42
2015-04-24T19:28:30.000Z
2021-11-25T08:01:32.000Z
############################################################################## # Copyright by The HDF Group. # # All rights reserved. # # # # Th...
37.816993
89
0.549833
############################################################################## # Copyright by The HDF Group. # # All rights reserved. # # # # Th...
0
0
0
0
0
15,331
0
45
291
4a59bff9ab2c447e1f0b633f0189f010a153ef26
1,645
py
Python
raydockop/large_csv_to_parquet.py
abazabaaa/dockop
6985d1296ef6f076e702db3403bd52f045c7ad1d
[ "MIT" ]
null
null
null
raydockop/large_csv_to_parquet.py
abazabaaa/dockop
6985d1296ef6f076e702db3403bd52f045c7ad1d
[ "MIT" ]
null
null
null
raydockop/large_csv_to_parquet.py
abazabaaa/dockop
6985d1296ef6f076e702db3403bd52f045c7ad1d
[ "MIT" ]
null
null
null
from pyarrow import Table from pyarrow.parquet import ParquetWriter import pyarrow as pa import pandas as pd from pyarrow import csv include_columns = ['zincid', 'smiles', 'dockscore'] delimiter = str(',') chunksize = 1048576*1000 file_stream = '/data/dockop_data/AmpC_screen_table.csv' input_stream_reader = InputStrea...
36.555556
133
0.657751
from pyarrow import Table from pyarrow.parquet import ParquetWriter import pyarrow as pa import pandas as pd from pyarrow import csv class InputStreamReader: def __init__(self, file_stream): self.file_stream = file_stream self._stream = None def batches(self): i = tries = 0 while...
0
501
0
442
0
0
0
0
22
a1eb1c3ce20dc24e214298373cbc3c3153fbb4c6
2,933
py
Python
hathor/conf/testnet.py
luislhl/hathor-core
9fe53b5a6ecb6efd3f4e8ce2ba21d591f0402cc6
[ "Apache-2.0" ]
null
null
null
hathor/conf/testnet.py
luislhl/hathor-core
9fe53b5a6ecb6efd3f4e8ce2ba21d591f0402cc6
[ "Apache-2.0" ]
null
null
null
hathor/conf/testnet.py
luislhl/hathor-core
9fe53b5a6ecb6efd3f4e8ce2ba21d591f0402cc6
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Hathor Labs # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
56.403846
105
0.800205
# Copyright 2021 Hathor Labs # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
0
0
0
0
0
0
0
0
0
d3aaba5da0c90d09dc983a2b34ef38ae2721d5fd
1,812
py
Python
iPadAir.py
hagridblack/appium-sample-code-for-ios
022e2013841ba29cdf77c04ff03652f33cc5abfc
[ "MIT" ]
null
null
null
iPadAir.py
hagridblack/appium-sample-code-for-ios
022e2013841ba29cdf77c04ff03652f33cc5abfc
[ "MIT" ]
null
null
null
iPadAir.py
hagridblack/appium-sample-code-for-ios
022e2013841ba29cdf77c04ff03652f33cc5abfc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import unittest if __name__ == '__main__': unittest.main()
31.789474
90
0.629691
# -*- coding: utf-8 -*- import unittest import time from appium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions class Untitled(unittest.TestCase): reportDirectory = 'reports' report...
21
0
0
1,483
0
0
0
90
133
72fc23d17d0df2ff2741845d0adba79435790ef9
13,691
py
Python
rapid/workflow/data/dal/pipeline_dal.py
m2bright/rapid
fd66515105ca9773c5da8562a878c6b0bfa4487a
[ "Apache-2.0" ]
null
null
null
rapid/workflow/data/dal/pipeline_dal.py
m2bright/rapid
fd66515105ca9773c5da8562a878c6b0bfa4487a
[ "Apache-2.0" ]
null
null
null
rapid/workflow/data/dal/pipeline_dal.py
m2bright/rapid
fd66515105ca9773c5da8562a878c6b0bfa4487a
[ "Apache-2.0" ]
null
null
null
""" Copyright (c) 2015 Michael Bright and Bamboo HR LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
44.307443
165
0.62815
""" Copyright (c) 2015 Michael Bright and Bamboo HR LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
0
0
0
12,124
0
0
0
449
381
d8e66d1f432b5d05594739faf75414a48bafafa6
168
py
Python
bardhub/artist/admin.py
migdotcom/music-library
4648ea02e4b071c4a287eba09202045963992873
[ "MIT" ]
null
null
null
bardhub/artist/admin.py
migdotcom/music-library
4648ea02e4b071c4a287eba09202045963992873
[ "MIT" ]
null
null
null
bardhub/artist/admin.py
migdotcom/music-library
4648ea02e4b071c4a287eba09202045963992873
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Artist # Register your models here. admin.site.register(Artist) admin.site.site_header = 'Bardhub Administration'
24
49
0.809524
from django.contrib import admin from .models import Artist # Register your models here. admin.site.register(Artist) admin.site.site_header = 'Bardhub Administration'
0
0
0
0
0
0
0
0
0
34a885fd5c4c664b0eb7e713dcb670d1dd910411
823
py
Python
sortByMTime.py
nightjuggler/pig
24284ce9fec67b28445bf0d15754928ecc888fc6
[ "MIT" ]
null
null
null
sortByMTime.py
nightjuggler/pig
24284ce9fec67b28445bf0d15754928ecc888fc6
[ "MIT" ]
null
null
null
sortByMTime.py
nightjuggler/pig
24284ce9fec67b28445bf0d15754928ecc888fc6
[ "MIT" ]
null
null
null
import os if __name__ == '__main__': main()
27.433333
78
0.671932
import os import os.path import sys def main(): time_name_pairs = [(os.stat(name).st_mtime, name) for name in os.listdir('.') if name[:4] == 'IMG_' and name[-4:] == '.JPG'] time_name_pairs.sort() names = [] for i, (mtime, oldname) in enumerate(time_name_pairs, start=1): newname = 'IMG_{:04d}.JPG'.format(i) ...
0
0
0
0
0
728
0
-18
67
428b8c0635f5c971145cee47479b955994e649a4
1,608
py
Python
main.py/lab07.py
sofilaulia/Lab-python
114cc30acd324212b7b4b6708ee65aefcc68baa0
[ "MIT" ]
null
null
null
main.py/lab07.py
sofilaulia/Lab-python
114cc30acd324212b7b4b6708ee65aefcc68baa0
[ "MIT" ]
null
null
null
main.py/lab07.py
sofilaulia/Lab-python
114cc30acd324212b7b4b6708ee65aefcc68baa0
[ "MIT" ]
null
null
null
# Nama: Sofil Muna Aulia # NIM: 0110120115 # Kelas: Sistem Informasi 05 # Mulai baris ini hingga baris paling bawah # digunakan untuk mengetes fungsi yang telah dibuat. # Tidak perlu mengubah bagian ini. # Ketika dijalankan, program akan menampilkan contoh # pemanggilan fungsi dan solusi yang seharusnya. # Cocokkan ...
28.714286
84
0.651741
# Nama: Sofil Muna Aulia # NIM: 0110120115 # Kelas: Sistem Informasi 05 def convert_list(multilist): # Tulis kode fungsi convert_list() di bawah ini # Hapus pass jika implementasi sudah dibuat gabung = sum(multilist, []) return gabung def get_nilai(filename, nama): # Tulis kode fungsi get_nilai() di b...
0
0
0
0
0
1,097
0
0
95
1427e4f5aadf989968cb0c8ef88292b0fc3d4ad2
10,129
py
Python
data/unified_emotion.py
IvoOVerhoeven/meta-learning-emotion-detection
fb076d7644173b13eb62d6301544af9e98352512
[ "Apache-2.0" ]
3
2021-04-21T15:44:50.000Z
2021-05-28T15:53:23.000Z
data/unified_emotion.py
IvoOVerhoeven/meta-learning-emotion-detection
fb076d7644173b13eb62d6301544af9e98352512
[ "Apache-2.0" ]
null
null
null
data/unified_emotion.py
IvoOVerhoeven/meta-learning-emotion-detection
fb076d7644173b13eb62d6301544af9e98352512
[ "Apache-2.0" ]
1
2021-09-10T18:13:28.000Z
2021-09-10T18:13:28.000Z
""" def get_dataloader(self, source_name, device, k=4, tokenizer=None, shuffle=True): Generates a dataloader from a specified dataset. See MetaStratifiedLoader for more. Args: source_name(str): a dataset from one of the processed ones. k(int, optional): the k-shot....
46.677419
160
0.541317
from collections import defaultdict import torch import jsonlines def unified_emotion_info(): return [{'source': 'affectivetext', 'size': 250, 'domain': 'headlines', 'classes': 6, 'special': 'non-discrete, multiple labels'}, {'source': 'crowdflower', 'size': 40000, 'domain': 'tweets', 'classes': 14, ...
0
101
0
6,924
0
1,509
0
0
113
7e69166a97cfa5210984f7711d7e1be3be68117e
1,864
py
Python
main.py
heyitswither/Discord-Matrix
b566c6413f787849ea6e805c80e31612b2bad6cd
[ "MIT" ]
null
null
null
main.py
heyitswither/Discord-Matrix
b566c6413f787849ea6e805c80e31612b2bad6cd
[ "MIT" ]
null
null
null
main.py
heyitswither/Discord-Matrix
b566c6413f787849ea6e805c80e31612b2bad6cd
[ "MIT" ]
null
null
null
from matrix_bot_api.matrix_bot_api import MatrixBotAPI import yaml config = yaml.safe_load(open('config.yml')) matrix_client = MatrixBotAPI(config.get('matrix').get('username'), config.get('matrix').get('password'), config.get('matrix').get('homeserver')) discord_client = DiscordClient() discord_client.run(config.ge...
43.348837
144
0.690451
from matrix_bot_api.matrix_bot_api import MatrixBotAPI from matrix_bot_api.mhandler import MHandler import discord import yaml config = yaml.safe_load(open('config.yml')) class DiscordClient(discord.Client): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.bg_task = self...
0
0
928
243
0
217
0
16
113
fbe8a1f8f0a1776d58881439c433f53f8f7188c9
3,667
py
Python
face_one_shot_learing/dataset_multiplefaces.py
kornellewy/face_one_shot_learing
4cd8c8b1807717f921853043858a6f7ad5259917
[ "MIT" ]
null
null
null
face_one_shot_learing/dataset_multiplefaces.py
kornellewy/face_one_shot_learing
4cd8c8b1807717f921853043858a6f7ad5259917
[ "MIT" ]
null
null
null
face_one_shot_learing/dataset_multiplefaces.py
kornellewy/face_one_shot_learing
4cd8c8b1807717f921853043858a6f7ad5259917
[ "MIT" ]
null
null
null
import albumentations as A from albumentations.pytorch import ToTensorV2 from torchvision.utils import save_image if __name__=='__main__': img_transform = A.Compose( [ A.Resize(100, 100), A.RGBShift(), ...
45.271605
121
0.612762
import os import cv2 from PIL import Image import numpy as np from random import randint, choice, sample import albumentations as A from albumentations.pytorch import ToTensorV2 import torch from torch import nn from torch import optim from torchvision import datasets,transforms from torchvision.utils import save_imag...
0
0
0
1,878
0
0
0
99
289
a6bad8bbe3f547b619f58cb0a3c1a513a492db92
8,515
py
Python
selvpcclient/util.py
selectel/python-selvpcclient
99955064215c2be18b568e5e9b34f17087ec304f
[ "Apache-2.0" ]
7
2017-07-15T12:44:23.000Z
2020-03-24T09:45:11.000Z
selvpcclient/util.py
selectel/python-selvpcclient
99955064215c2be18b568e5e9b34f17087ec304f
[ "Apache-2.0" ]
13
2017-07-05T09:34:09.000Z
2021-04-20T08:18:46.000Z
selvpcclient/util.py
selectel/python-selvpcclient
99955064215c2be18b568e5e9b34f17087ec304f
[ "Apache-2.0" ]
9
2017-06-29T13:51:35.000Z
2021-06-26T21:00:49.000Z
import base64 import json import logging import requests log = logging.getLogger(__name__) SENSITIVE_HEADERS = ['X-Token'] FILES_EXTENSIONS = ("png", "jpg", "svg", "txt") def resource_filter(func): """This decorator allows to you filter answer from RESOURCE.list() by project_id and region. Both param...
28.289037
79
0.57569
import base64 import hashlib import json import logging import requests import os import sys import six log = logging.getLogger(__name__) SENSITIVE_HEADERS = ['X-Token'] FILES_EXTENSIONS = ("png", "jpg", "svg", "txt") def parse_headers(headers): result = {} for header in headers: if ':' in header:...
0
0
0
0
0
4,045
0
-41
335
e01203521ab7224d47fd68eef13a0101657fdec3
3,551
py
Python
lib/galaxy/util/script.py
rikeshi/galaxy
c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a
[ "CC-BY-3.0" ]
4
2015-05-12T20:36:41.000Z
2017-06-26T15:34:02.000Z
lib/galaxy/util/script.py
rikeshi/galaxy
c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a
[ "CC-BY-3.0" ]
52
2015-03-16T14:02:14.000Z
2021-12-24T09:50:23.000Z
lib/galaxy/util/script.py
rikeshi/galaxy
c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a
[ "CC-BY-3.0" ]
7
2016-11-03T19:11:01.000Z
2020-05-11T14:23:52.000Z
"""Utilities for Galaxy scripts """ import sys DESCRIPTION = None ACTIONS = None ARGUMENTS = None DEFAULT_ACTION = None ARG_HELP_CONFIG_FILE = """ Galaxy config file (defaults to $GALAXY_ROOT/config/galaxy.yml if that file exists or else to ./config/galaxy.ini if that exists). If this isn't set on the command line it...
39.455556
118
0.713039
"""Utilities for Galaxy scripts """ import argparse import os import sys from galaxy.util.properties import find_config_file, load_app_properties DESCRIPTION = None ACTIONS = None ARGUMENTS = None DEFAULT_ACTION = None ARG_HELP_CONFIG_FILE = """ Galaxy config file (defaults to $GALAXY_ROOT/config/galaxy.yml if that ...
0
0
0
0
0
2,294
0
33
182
7c9d732fb03b774eb87f41e39cc63dcae1a824dc
10,106
py
Python
ic3po/utils.py
will62794/ic3po
56d355fd69e15f99cd778d1d5c8f63295fd1baba
[ "Apache-2.0" ]
null
null
null
ic3po/utils.py
will62794/ic3po
56d355fd69e15f99cd778d1d5c8f63295fd1baba
[ "Apache-2.0" ]
null
null
null
ic3po/utils.py
will62794/ic3po
56d355fd69e15f99cd778d1d5c8f63295fd1baba
[ "Apache-2.0" ]
null
null
null
# ------------------------------------------ # IC3PO: IC3 for Proving Protocol Properties # ------------------------------------------ # Copyright (c) 2021 Aman Goel and Karem Sakallah, University of Michigan. # All rights reserved. # # Author: Aman Goel (amangoel@umich.edu), University of Michigan # ----------------...
29.899408
76
0.552246
# ------------------------------------------ # IC3PO: IC3 for Proving Protocol Properties # ------------------------------------------ # Copyright (c) 2021 Aman Goel and Karem Sakallah, University of Michigan. # All rights reserved. # # Author: Aman Goel (amangoel@umich.edu), University of Michigan # ----------------...
0
0
0
0
0
8,310
0
-3
722
12162cb891dd942d662731a380e3c5db9aedddcc
1,989
py
Python
src/models/metrics.py
AC297R-Wayfair-NLP/wayfair_nlp_public
9d3628f14f0e3e75f386a2c2f63aed93681ef686
[ "MIT" ]
2
2021-01-11T21:16:54.000Z
2021-12-16T16:39:14.000Z
src/models/metrics.py
AC297R-Wayfair-NLP/wayfair_nlp_public
9d3628f14f0e3e75f386a2c2f63aed93681ef686
[ "MIT" ]
null
null
null
src/models/metrics.py
AC297R-Wayfair-NLP/wayfair_nlp_public
9d3628f14f0e3e75f386a2c2f63aed93681ef686
[ "MIT" ]
null
null
null
import numpy as np # Asymmetric mean squared error def bootstrap(full_model, non_nlp_model, X_full, y, score_func, n_boot=100, nlp_cols=None): """Resamples X to calculate `n_boot` pairs of full and non-nlp model scores Args: full_model (model): must have .predict method non_nlp_model (mo...
42.319149
91
0.668175
import tensorflow as tf import numpy as np # Asymmetric mean squared error def asymmetric_mse(y_actual,y_pred): y_true = tf.cast(y_actual, y_pred.dtype) asymmetric_mse=tf.square(y_pred-y_actual)*tf.square(tf.sign(y_pred-y_actual)+0.3) return asymmetric_mse def bootstrap(full_model, non_nlp_model, X_full,...
0
0
0
0
0
172
0
2
44
141c4481eeacdbde53d983fcf75ec8624dc36750
29
py
Python
raven/config.py
fossabot/raven
b5ed6258a4c09ac4d132873d6b8b4a1d82d2131b
[ "MIT" ]
29
2018-08-13T20:16:41.000Z
2022-03-17T02:31:38.000Z
raven/config.py
fossabot/raven
b5ed6258a4c09ac4d132873d6b8b4a1d82d2131b
[ "MIT" ]
359
2018-05-31T00:37:53.000Z
2022-03-26T04:35:43.000Z
raven/config.py
fossabot/raven
b5ed6258a4c09ac4d132873d6b8b4a1d82d2131b
[ "MIT" ]
10
2019-06-17T18:07:46.000Z
2022-02-15T02:01:32.000Z
max_parallel_processes = 100
14.5
28
0.862069
max_parallel_processes = 100
0
0
0
0
0
0
0
0
0
adb8e2db68eb4d9a88043c7a3f96e022d2ba9993
4,934
py
Python
pycps.py
matt-saenz/PyCPS
510ac1764d472299ec87756b34b97b7b6b737a23
[ "MIT" ]
null
null
null
pycps.py
matt-saenz/PyCPS
510ac1764d472299ec87756b34b97b7b6b737a23
[ "MIT" ]
null
null
null
pycps.py
matt-saenz/PyCPS
510ac1764d472299ec87756b34b97b7b6b737a23
[ "MIT" ]
null
null
null
import pandas as pd # type: ignore BASE_URL = "http://api.census.gov/data/" # Core functions def get_asec(year: int, vars: list[str], show_url: bool = False) -> pd.DataFrame: """Get CPS ASEC microdata using the Census API.""" key = _get_key() _check_year(year, dataset="asec") formatted_vars =...
25.832461
85
0.622213
import os import re import pandas as pd # type: ignore import requests BASE_URL = "http://api.census.gov/data/" # Core functions def get_asec(year: int, vars: list[str], show_url: bool = False) -> pd.DataFrame: """Get CPS ASEC microdata using the Census API.""" key = _get_key() _check_year(year, d...
0
0
0
133
0
2,334
0
-30
226
d5e7ea9e23dee658abe41f2297d8e47b50c79219
11,451
py
Python
cmframework/src/cmframework/server/cmprocessor.py
akraino-edge-stack/ta-config-manager
8a3f88d0dbf6afdb0130b9d35e563f8a54d15d44
[ "Apache-2.0" ]
null
null
null
cmframework/src/cmframework/server/cmprocessor.py
akraino-edge-stack/ta-config-manager
8a3f88d0dbf6afdb0130b9d35e563f8a54d15d44
[ "Apache-2.0" ]
null
null
null
cmframework/src/cmframework/server/cmprocessor.py
akraino-edge-stack/ta-config-manager
8a3f88d0dbf6afdb0130b9d35e563f8a54d15d44
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Nokia # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
36.123028
99
0.643088
# Copyright 2019 Nokia # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
0
0
0
10,579
0
0
0
125
178
7c748b5474de8d8145eba39fbd9a309eb5402848
26,358
py
Python
astute-dashboard/astutedashboard/dashboards/billing/type_mappings/workflows.py
sreenathmenon/astute-project
00590f769742c44460ef892a803c601a5403e165
[ "Apache-2.0" ]
null
null
null
astute-dashboard/astutedashboard/dashboards/billing/type_mappings/workflows.py
sreenathmenon/astute-project
00590f769742c44460ef892a803c601a5403e165
[ "Apache-2.0" ]
null
null
null
astute-dashboard/astutedashboard/dashboards/billing/type_mappings/workflows.py
sreenathmenon/astute-project
00590f769742c44460ef892a803c601a5403e165
[ "Apache-2.0" ]
1
2018-02-24T10:32:41.000Z
2018-02-24T10:32:41.000Z
# -*- coding: utf-8 -*- #from openstack_dashboard.api import neutron try: import simplejson as json except ImportError: except: raise ACCOUNT_MAPPING_FIELDS = ( "domain_id", "domain_name", "project_mapping", "project_name", "description", "username", "password", "confirm_pass...
37.07173
163
0.601298
# -*- coding: utf-8 -*- from django.conf import settings from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from horizon import exce...
0
0
0
22,141
0
882
0
1,363
881
41b84f06ae65c97f8376b64688e0ea2b2d1f0ac7
1,399
py
Python
budgethelper/clients/databaseabc.py
Preocts/budgethelper
160fc575e969a3cd009874bf295c50421cdcd999
[ "MIT" ]
null
null
null
budgethelper/clients/databaseabc.py
Preocts/budgethelper
160fc575e969a3cd009874bf295c50421cdcd999
[ "MIT" ]
null
null
null
budgethelper/clients/databaseabc.py
Preocts/budgethelper
160fc575e969a3cd009874bf295c50421cdcd999
[ "MIT" ]
null
null
null
""" Abstract Base Class """
22.206349
78
0.604003
""" Abstract Base Class """ import sqlite3 from abc import ABC from abc import abstractmethod from typing import Any from typing import List from budgethelper.models.database import Database class DatabaseABC(ABC): def __init__(self, database: Database) -> None: super().__init__() self.database =...
0
699
0
484
0
0
0
31
156
33d4990b1e1849b6a3e28cc44e92397a72436f5c
7,250
py
Python
contrib/MedicalSeg/medicalseg/core/infer_window.py
sun222/PaddleSeg
6019dd164d873e455255500fa3d7ff197f04e95e
[ "Apache-2.0" ]
null
null
null
contrib/MedicalSeg/medicalseg/core/infer_window.py
sun222/PaddleSeg
6019dd164d873e455255500fa3d7ff197f04e95e
[ "Apache-2.0" ]
null
null
null
contrib/MedicalSeg/medicalseg/core/infer_window.py
sun222/PaddleSeg
6019dd164d873e455255500fa3d7ff197f04e95e
[ "Apache-2.0" ]
null
null
null
import paddle as torch import paddle import paddle.nn.functional as F import math def dense_patch_slices(image_size, patch_size, scan_interval): """ Enumerate all slices defining 2D/3D patches of size `patch_size` from an `image_size` input image. Args: image_size (tuple of int): dimensions of im...
42.647059
119
0.646759
import paddle as torch import paddle import paddle.nn.functional as F import math def dense_patch_slices(image_size, patch_size, scan_interval): """ Enumerate all slices defining 2D/3D patches of size `patch_size` from an `image_size` input image. Args: image_size (tuple of int): dimensions of im...
0
0
0
0
0
606
0
0
23
4db6da118a90fca9dc471472d096300c298fbc86
3,469
py
Python
examples/adspygoogle/adwords/v201306/campaign_management/add_location_extension_override.py
cherry-wb/googleads-python-lib
24a1ecb7c1cca5af3624a3b03ebaa7f5147b4a04
[ "Apache-2.0" ]
null
null
null
examples/adspygoogle/adwords/v201306/campaign_management/add_location_extension_override.py
cherry-wb/googleads-python-lib
24a1ecb7c1cca5af3624a3b03ebaa7f5147b4a04
[ "Apache-2.0" ]
null
null
null
examples/adspygoogle/adwords/v201306/campaign_management/add_location_extension_override.py
cherry-wb/googleads-python-lib
24a1ecb7c1cca5af3624a3b03ebaa7f5147b4a04
[ "Apache-2.0" ]
2
2020-04-02T19:00:31.000Z
2020-08-06T03:28:38.000Z
#!/usr/bin/python # -*- coding: UTF-8 -*- # # Copyright 2012 Google 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...
32.726415
80
0.595272
#!/usr/bin/python # -*- coding: UTF-8 -*- # # Copyright 2012 Google 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
0
0
0
2,119
0
0
23
ccfc7c0b942763e165b178211e1cc550da2d0c4b
10,401
py
Python
escnn/group/irrep.py
QUVA-Lab/escnn
59ed6b96f61f8616f87b3f25aa2f8abdb6f1a882
[ "BSD-3-Clause" ]
4
2022-03-16T22:51:39.000Z
2022-03-18T18:45:49.000Z
escnn/group/irrep.py
QUVA-Lab/escnn
59ed6b96f61f8616f87b3f25aa2f8abdb6f1a882
[ "BSD-3-Clause" ]
null
null
null
escnn/group/irrep.py
QUVA-Lab/escnn
59ed6b96f61f8616f87b3f25aa2f8abdb6f1a882
[ "BSD-3-Clause" ]
null
null
null
from __future__ import annotations from typing import List, Tuple import numpy as np __all__ = [ "IrreducibleRepresentation", "build_irrep_from_generators", "generate_irrep_matrices_from_generators", "restrict_irrep" ] from joblib import Memory # import os # cache = Memory(os.path.join(os.path.d...
36.114583
199
0.52418
from __future__ import annotations import escnn.group from escnn.group import Representation, GroupElement, Group from escnn.group._numerical import decompose_representation_finitegroup from escnn.group._numerical import decompose_representation_general from typing import Callable, Any, List, Union, Dict, Tuple, Type...
0
1,535
0
5,634
0
2,057
0
165
181
60545ecac254eb41fc5a27c74d5339601d92c65d
6,018
py
Python
src/pyams_file_views/widget/__init__.py
Py-AMS/pyams-file-views
f5ed508ca62d1b39f8387da44f601fca1bf9120a
[ "ZPL-2.1" ]
null
null
null
src/pyams_file_views/widget/__init__.py
Py-AMS/pyams-file-views
f5ed508ca62d1b39f8387da44f601fca1bf9120a
[ "ZPL-2.1" ]
null
null
null
src/pyams_file_views/widget/__init__.py
Py-AMS/pyams-file-views
f5ed508ca62d1b39f8387da44f601fca1bf9120a
[ "ZPL-2.1" ]
null
null
null
# # Copyright (c) 2015-2020 Thierry Florac <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRAN...
37.148148
101
0.694084
# # Copyright (c) 2015-2020 Thierry Florac <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRAN...
0
4,128
0
0
0
0
0
587
602
dc4bc736dbb873816bd20c425a93adc0c3bdee0f
298
py
Python
Day2/python_network_programming/remote_machine_info.py
nuSapb/basic-python
df6b15e922db7a27a8931143f8dc8ca4fb198b6b
[ "MIT" ]
null
null
null
Day2/python_network_programming/remote_machine_info.py
nuSapb/basic-python
df6b15e922db7a27a8931143f8dc8ca4fb198b6b
[ "MIT" ]
null
null
null
Day2/python_network_programming/remote_machine_info.py
nuSapb/basic-python
df6b15e922db7a27a8931143f8dc8ca4fb198b6b
[ "MIT" ]
null
null
null
if __name__ == '__main__': get_remote_machine_info()
27.090909
66
0.674497
import socket def get_remote_machine_info(): remote_host = 'www.python.org' try: print('IP address: %s' %socket.gethostbyname(remote_host)) except socket.error as err_msg: print("%s: %s" %(remote_host, err_msg)) if __name__ == '__main__': get_remote_machine_info()
0
0
0
0
0
204
0
-8
45
dcf8949b095d33434aeec30bd6f9cc8d28dd2587
10,493
py
Python
SassifiParser/old/parse_sassifi_fault_injection.py
UFRGS-CAROL/radiation-benchmarks-parsers
a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b
[ "Apache-2.0" ]
null
null
null
SassifiParser/old/parse_sassifi_fault_injection.py
UFRGS-CAROL/radiation-benchmarks-parsers
a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b
[ "Apache-2.0" ]
null
null
null
SassifiParser/old/parse_sassifi_fault_injection.py
UFRGS-CAROL/radiation-benchmarks-parsers
a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import include import os import csv import sys import re from collections import Counter ERROR_MODEL_SIZE = len(include.EM_STR) INSTRUCTION_SIZE = len(include.ASID_STR) inst_type="rf" MAX_LOGS_SIZE=9999999999 # except: # e = sys.exc_info()[0] # #write_to_page( "<p>Error: %s</p>" % e )...
35.449324
141
0.62089
#!/usr/bin/python import include import os import csv import sys import re from collections import Counter ERROR_MODEL_SIZE = len(include.EM_STR) INSTRUCTION_SIZE = len(include.ASID_STR) inst_type="rf" MAX_LOGS_SIZE=9999999999 def check_crash(log_filename): log_file = open(log_filename) regexp = re.compile(r...
0
0
0
0
0
9,582
0
0
114
9e26b5dfa815bc12723da707b2340b11e565861e
39,683
py
Python
tests/conftest.py
neuro-inc/neuro-admin-client
b67702912c92f9caf579e5c3b3869fe567064164
[ "Apache-2.0" ]
null
null
null
tests/conftest.py
neuro-inc/neuro-admin-client
b67702912c92f9caf579e5c3b3869fe567064164
[ "Apache-2.0" ]
41
2021-09-02T12:36:24.000Z
2022-02-21T16:44:18.000Z
tests/conftest.py
neuro-inc/neuro-admin-client
b67702912c92f9caf579e5c3b3869fe567064164
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations import aiohttp
37.901624
88
0.560265
from __future__ import annotations import asyncio import datetime from collections.abc import AsyncIterator from contextlib import asynccontextmanager from dataclasses import dataclass, field, replace from decimal import Decimal from typing import Any import aiohttp import aiohttp.web import pytest from yarl import U...
0
37,962
510
430
0
82
0
212
428
83b201d9467d745f1f90c3d612f0fd43a4d2c97b
225
py
Python
talkademic-client/src/test.py
Nouran-Soliman/Talkademic
e81f1a109f25886d10354698bb6852ba9f5fd4f3
[ "MIT" ]
null
null
null
talkademic-client/src/test.py
Nouran-Soliman/Talkademic
e81f1a109f25886d10354698bb6852ba9f5fd4f3
[ "MIT" ]
null
null
null
talkademic-client/src/test.py
Nouran-Soliman/Talkademic
e81f1a109f25886d10354698bb6852ba9f5fd4f3
[ "MIT" ]
null
null
null
import requests URL = 'https://scholar.googleusercontent.com/citations?view_op=export_citations&user=JtSAIqgAAAAJ&citsig=AMD79ooAAAAAYEerXzdIALaAeL3goamu28BB1p8NLHDg&hl=en' page = requests.get(URL) print(type(page.content))
37.5
156
0.84
import requests URL = 'https://scholar.googleusercontent.com/citations?view_op=export_citations&user=JtSAIqgAAAAJ&citsig=AMD79ooAAAAAYEerXzdIALaAeL3goamu28BB1p8NLHDg&hl=en' page = requests.get(URL) print(type(page.content))
0
0
0
0
0
0
0
0
0
492648709453b7d1ab3f201690d87e7c3c581022
1,432
py
Python
uploadfilehandler.py
DivinaThomas/dropBoxReplica_CloudComputing
684f54881fd168d6293f06d76f21520915affe38
[ "MIT" ]
null
null
null
uploadfilehandler.py
DivinaThomas/dropBoxReplica_CloudComputing
684f54881fd168d6293f06d76f21520915affe38
[ "MIT" ]
null
null
null
uploadfilehandler.py
DivinaThomas/dropBoxReplica_CloudComputing
684f54881fd168d6293f06d76f21520915affe38
[ "MIT" ]
null
null
null
import jinja2 import os JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), extensions=['jinja2.ext.autoescape'], autoescape=True )
28.078431
67
0.75419
from google.appengine.ext import blobstore from google.appengine.ext import ndb from google.appengine.ext.webapp import blobstore_handlers from directory import Directory import webapp2 import jinja2 import os from google.appengine.api import users JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader...
0
0
0
1,000
0
0
0
93
155
e10a22e7135c076fab89283de23346148ddbc424
11,468
py
Python
tutorial/test/visualize.py
alexpostnikov/waymo-open-dataset
efe74553dfab813450a1f9070cd14f72d83a40bc
[ "Apache-2.0" ]
null
null
null
tutorial/test/visualize.py
alexpostnikov/waymo-open-dataset
efe74553dfab813450a1f9070cd14f72d83a40bc
[ "Apache-2.0" ]
null
null
null
tutorial/test/visualize.py
alexpostnikov/waymo-open-dataset
efe74553dfab813450a1f9070cd14f72d83a40bc
[ "Apache-2.0" ]
null
null
null
import uuid import numpy as np from matplotlib import pyplot as plt, cm def create_figure_and_axes(size_pixels): """Initializes a unique figure and axes for plotting.""" fig, ax = plt.subplots(1, 1, num=uuid.uuid4()) # Sets output image to pixel resolution. dpi = 100 size_inches = size_pixels / ...
35.504644
121
0.595396
import uuid import numpy as np from matplotlib import pyplot as plt, cm def create_figure_and_axes(size_pixels): """Initializes a unique figure and axes for plotting.""" fig, ax = plt.subplots(1, 1, num=uuid.uuid4()) # Sets output image to pixel resolution. dpi = 100 size_inches = size_pixels / ...
0
0
0
0
0
2,759
0
0
46
21f462d39e36c18101dd3311b03b9725f2b56199
2,415
py
Python
api.py
Gimu/chancl
f8b6e319f6b3f0f4e165bfa025b917c43fad0a83
[ "MIT" ]
33
2017-05-07T08:06:45.000Z
2021-04-06T04:40:22.000Z
api.py
gimu/chancli
f8b6e319f6b3f0f4e165bfa025b917c43fad0a83
[ "MIT" ]
null
null
null
api.py
gimu/chancli
f8b6e319f6b3f0f4e165bfa025b917c43fad0a83
[ "MIT" ]
1
2020-05-31T11:11:35.000Z
2020-05-31T11:11:35.000Z
#!/usr/bin/env python3 import urllib.error
37.153846
139
0.601242
#!/usr/bin/env python3 import urllib.error import urllib.request class ApiError(object): @staticmethod def get_error(target, error): """Return error message.""" return {'content': "\nCould not generate {}\nFull error code: {}".format(target, error), 'status': "Error occured"} class Api(object...
0
186
0
2,091
0
0
0
0
95
b24cf5ddcfa475be657b5972e647ee20784e2ced
2,708
py
Python
build/lib/ringity/plots.py
kiri93/ringity
3fc7990ce42219236235e41b9eeec6cd2477e477
[ "MIT" ]
7
2021-03-02T17:51:40.000Z
2022-01-31T00:31:06.000Z
build/lib/ringity/plots.py
kiri93/ringity
3fc7990ce42219236235e41b9eeec6cd2477e477
[ "MIT" ]
null
null
null
build/lib/ringity/plots.py
kiri93/ringity
3fc7990ce42219236235e41b9eeec6cd2477e477
[ "MIT" ]
1
2021-03-02T17:52:00.000Z
2021-03-02T17:52:00.000Z
CEMM_COL1 = ( 0/255, 85/255, 100/255) CEMM_COL2 = ( 0/255, 140/255, 160/255) CEMM_COL3 = ( 64/255, 185/255, 212/255) CEMM_COL4 = (212/255, 236/255, 242/255) DARK_CEMM_COL1 = (0/255, 43/255, 50/255) BAR_COL = (0.639, 0.639, 0.639) # -------------------------------- ACTUAL PLOTS --------------------------------
27.917526
80
0.509232
import networkx as nx import matplotlib.pyplot as plt CEMM_COL1 = ( 0/255, 85/255, 100/255) CEMM_COL2 = ( 0/255, 140/255, 160/255) CEMM_COL3 = ( 64/255, 185/255, 212/255) CEMM_COL4 = (212/255, 236/255, 242/255) DARK_CEMM_COL1 = (0/255, 43/255, 50/255) BAR_COL = (0.639, 0.639, 0.639) def set(): #sns.set() <--...
0
0
0
0
0
2,221
0
10
158
d94019710e3a00ceb6d7adda682f4c33170b887d
324
py
Python
{{cookiecutter.project_slug}}/src/users/tests/test_whoami.py
nvo87/django
fd07fb74ab59e868c73512cd0ca4952129b44cd8
[ "MIT" ]
98
2020-04-21T20:22:16.000Z
2021-06-07T12:33:51.000Z
{{cookiecutter.project_slug}}/src/users/tests/test_whoami.py
nvo87/django
fd07fb74ab59e868c73512cd0ca4952129b44cd8
[ "MIT" ]
70
2020-04-21T21:59:49.000Z
2021-06-13T13:35:01.000Z
{{cookiecutter.project_slug}}/src/users/tests/test_whoami.py
ginsenghillock/django
65ab4f52897ca7efdfde347383153fca4f2d2c14
[ "MIT" ]
23
2020-04-23T06:03:13.000Z
2021-06-09T06:59:34.000Z
import pytest pytestmark = [pytest.mark.django_db]
19.058824
60
0.66358
import pytest pytestmark = [pytest.mark.django_db] def test_ok(as_user, user): got = as_user.get('/api/v1/users/me/') assert got['id'] == user.pk assert got['username'] == user.username def test_anon(as_anon): got = as_anon.get('/api/v1/users/me/', as_response=True) assert got.status_code == ...
0
0
0
0
0
224
0
0
46
c2b33a793ad163ec1d6be7cac26ed7a94c6f9d30
1,559
py
Python
aiosmf/smf/rpc/dynamic_header.py
noahdesu/aiosmf
72ff874a2750c253cf7c0154c2a676e521bea7ce
[ "Apache-2.0" ]
1
2019-03-30T17:22:08.000Z
2019-03-30T17:22:08.000Z
aiosmf/smf/rpc/dynamic_header.py
senior7515/aiosmf
72ff874a2750c253cf7c0154c2a676e521bea7ce
[ "Apache-2.0" ]
6
2019-03-30T17:58:52.000Z
2019-04-09T13:09:49.000Z
aiosmf/smf/rpc/dynamic_header.py
noahdesu/aiosmf
72ff874a2750c253cf7c0154c2a676e521bea7ce
[ "Apache-2.0" ]
2
2019-03-31T14:09:40.000Z
2022-03-22T16:51:18.000Z
# automatically generated by the FlatBuffers compiler, do not modify # namespace: rpc # /// \brief used for extra headers, ala HTTP # /// The use case for the core is to support # /// zipkin/google-Dapper style tracing
35.431818
140
0.704298
# automatically generated by the FlatBuffers compiler, do not modify # namespace: rpc import flatbuffers # /// \brief used for extra headers, ala HTTP # /// The use case for the core is to support # /// zipkin/google-Dapper style tracing class dynamic_header(object): __slots__ = ['_tab'] @classmethod de...
0
196
0
707
0
304
0
-3
134
f20094ac6ecfc85b1a237048817b89f64de8c4f5
4,898
py
Python
tools/evaluate/track_proto_evaluate.py
myfavouritekk/TPN
b346774cddeb0b9e0c1d8ed1f91a69f00436456d
[ "MIT" ]
74
2017-04-07T04:06:52.000Z
2022-01-30T01:40:10.000Z
tools/evaluate/track_proto_evaluate.py
wulongyuan/TPN
b346774cddeb0b9e0c1d8ed1f91a69f00436456d
[ "MIT" ]
8
2017-07-19T06:54:02.000Z
2018-08-28T07:38:52.000Z
tools/evaluate/track_proto_evaluate.py
wulongyuan/TPN
b346774cddeb0b9e0c1d8ed1f91a69f00436456d
[ "MIT" ]
28
2017-04-07T03:50:52.000Z
2019-02-28T04:18:15.000Z
#!/usr/bin/env python import argparse import os import os.path as osp import glob import numpy as np import sys import cPickle from time import time this_dir = osp.dirname(__file__) sys.path.insert(0, osp.join(this_dir, '../../external/py-faster-rcnn/lib/')) sys.path.insert(0, osp.join(this_dir, '../../src')) sys.path...
41.508475
92
0.606778
#!/usr/bin/env python import argparse import os import os.path as osp import glob import numpy as np import sys import cPickle from time import time this_dir = osp.dirname(__file__) sys.path.insert(0, osp.join(this_dir, '../../external/py-faster-rcnn/lib/')) sys.path.insert(0, osp.join(this_dir, '../../src')) sys.path...
0
0
0
0
0
816
0
0
23
1c60b18e5b2ea2aef181e331209ccde98b184675
451
py
Python
mindhome_alpha/erpnext/patches/v13_0/add_po_to_global_search.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
mindhome_alpha/erpnext/patches/v13_0/add_po_to_global_search.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
null
null
null
mindhome_alpha/erpnext/patches/v13_0/add_po_to_global_search.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
from __future__ import unicode_literals
25.055556
82
0.738359
from __future__ import unicode_literals import frappe def execute(): global_search_settings = frappe.get_single("Global Search Settings") if "Purchase Order" in ( dt.document_type for dt in global_search_settings.allowed_in_global_search ): return global_search_settings.append( ...
0
0
0
0
0
373
0
-8
45
d0c87b6684335749368b5ef0252dbf7af689cfa3
366
py
Python
tools/is_prime.py
lucasayres/python-tools
686b84986aae1b1714fa5645b1f2a3fd6ef8355d
[ "MIT" ]
71
2018-06-28T17:38:15.000Z
2022-02-08T17:42:42.000Z
tools/is_prime.py
DalavanCloud/python-tools
686b84986aae1b1714fa5645b1f2a3fd6ef8355d
[ "MIT" ]
null
null
null
tools/is_prime.py
DalavanCloud/python-tools
686b84986aae1b1714fa5645b1f2a3fd6ef8355d
[ "MIT" ]
14
2018-07-08T03:29:29.000Z
2022-03-22T21:04:39.000Z
# -*- coding: utf-8 -*- def is_prime(number): """Check if a number is a prime number. Args: number (int): Number. Returns: bool: Return True if number is a prime number and False if not. """ if number <= 1: return False for x in range(2, number): if not number ...
20.333333
71
0.54918
# -*- coding: utf-8 -*- def is_prime(number): """Check if a number is a prime number. Args: number (int): Number. Returns: bool: Return True if number is a prime number and False if not. """ if number <= 1: return False for x in range(2, number): if not number ...
0
0
0
0
0
0
0
0
0
81d055c649c5fd50879a07d7ea549d30ab3fdf38
2,884
py
Python
runfile/appstore.py
mhdahsan2000/AppScraper2.0
3bc53273ace6f2fe772d2c0c379a6a254cfa05b2
[ "MIT" ]
2
2021-11-12T08:28:21.000Z
2021-11-27T02:17:07.000Z
runfile/appstore.py
mhdahsan2000/AppScraper2.0
3bc53273ace6f2fe772d2c0c379a6a254cfa05b2
[ "MIT" ]
null
null
null
runfile/appstore.py
mhdahsan2000/AppScraper2.0
3bc53273ace6f2fe772d2c0c379a6a254cfa05b2
[ "MIT" ]
null
null
null
""" Created on Thu Aug 2 19:42:10 2021 @author: Mohammed Ahsan ------------------------------------------------------- APP REVIEW SCRAPER - ioS and google Store. version : 1.0 Build name : RedSparrow ----- ------------------------------------------------------- """ from app_store_scraper import AppStore import json...
26.458716
253
0.668169
""" Created on Thu Aug 2 19:42:10 2021 @author: Mohammed Ahsan ------------------------------------------------------- APP REVIEW SCRAPER - ioS and google Store. version : 1.0 Build name : RedSparrow ----- ------------------------------------------------------- """ from app_store_scraper import AppStore from pprint...
0
0
0
0
0
0
0
-2
44