hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
a3e94aaf2ba8b29f18246022b8839532755798d7
399
py
Python
Socket/Socket/udp/udp_unix_server.py
RolandBalabekyan1994/socket-socketserver
94ca247d1aa0e84b970d49b7e974e67932440b11
[ "MIT" ]
null
null
null
Socket/Socket/udp/udp_unix_server.py
RolandBalabekyan1994/socket-socketserver
94ca247d1aa0e84b970d49b7e974e67932440b11
[ "MIT" ]
null
null
null
Socket/Socket/udp/udp_unix_server.py
RolandBalabekyan1994/socket-socketserver
94ca247d1aa0e84b970d49b7e974e67932440b11
[ "MIT" ]
null
null
null
import os import socket unix_sock_name = 'unix.sock' sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) if os.path.exists(unix_sock_name): os.remove(unix_sock_name) sock.bind(unix_sock_name) while True: try: result = sock.recv(1024) except KeyboardInterrupt: sock.clos...
21
56
0.646617
import os import socket unix_sock_name = 'unix.sock' sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) if os.path.exists(unix_sock_name): os.remove(unix_sock_name) sock.bind(unix_sock_name) while True: try: result = sock.recv(1024) except KeyboardInterrupt: sock.clos...
0
0
0
41e5f26182ee6fa14c39f6a5d6ad43f8cf72626e
6,764
py
Python
tests/unit/services/test_power_control.py
intel-hpdd/-intel-manager-for-lustre
f8a6f61205b42cc62f4bbcb8d81214ad4f215cd6
[ "MIT" ]
52
2018-09-13T03:26:23.000Z
2022-03-25T16:51:37.000Z
tests/unit/services/test_power_control.py
intel-hpdd/-intel-manager-for-lustre
f8a6f61205b42cc62f4bbcb8d81214ad4f215cd6
[ "MIT" ]
1,264
2018-06-15T19:50:57.000Z
2022-03-28T08:19:04.000Z
tests/unit/services/test_power_control.py
whamcloud/intel-manager-for-lustre
f8a6f61205b42cc62f4bbcb8d81214ad4f215cd6
[ "MIT" ]
27
2018-06-18T08:51:59.000Z
2022-03-16T15:35:34.000Z
import threading import mock from tests.unit.lib.iml_unit_test_case import IMLUnitTestCase from chroma_core.models.power_control import PowerControlType, PowerControlDevice, PowerControlDeviceOutlet from chroma_core.services.power_control.manager import PowerControlManager from chroma_core.services.power_control.moni...
40.023669
118
0.709639
import threading import mock from tests.unit.lib.iml_unit_test_case import IMLUnitTestCase from chroma_core.models.power_control import PowerControlType, PowerControlDevice, PowerControlDeviceOutlet from chroma_core.services.power_control.manager import PowerControlManager from chroma_core.services.power_control.moni...
4,891
1,177
174
404774bf77d62bdadccc27d36999abd6da5f3fcc
1,638
py
Python
src/nlp/classification/tf1/traditional_cls/model.py
wu-uw/OpenCompetition
9aa9d7a50ada1deb653d295dd8a7fe46321b9094
[ "Apache-2.0" ]
15
2019-12-22T14:26:47.000Z
2020-11-02T10:57:37.000Z
src/nlp/classification/tf1/traditional_cls/model.py
GT-JLU/OpenCompetition
5262fc5fa7efd7b483c1dc09cb7747dd75e37175
[ "Apache-2.0" ]
2
2020-02-03T07:10:11.000Z
2020-02-11T16:38:56.000Z
src/nlp/classification/tf1/traditional_cls/model.py
GT-JLU/OpenCompetition
5262fc5fa7efd7b483c1dc09cb7747dd75e37175
[ "Apache-2.0" ]
12
2020-01-06T14:16:52.000Z
2020-05-23T14:12:30.000Z
# -- coding: utf-8 -- # @Time : 2019/7/23 # @Author : lha # @File : main.py import os import sys import torch import torch.nn as nn import argparse from crf import CRF from file_utils import TaskModelBase
33.428571
117
0.642857
# -- coding: utf-8 -- # @Time : 2019/7/23 # @Author : lha # @File : main.py import os import sys import torch import torch.nn as nn import argparse from crf import CRF from file_utils import TaskModelBase class Bilstm_Crf(TaskModelBase): def __init__(self, args, vocab_size, embed_dim, vec_list, l...
1,267
11
139
d0109285ff74203e1ac678ac988e931be887496e
5,150
py
Python
example_project/compile_with_cython.py
Yuriy-Leonov/cython_imports_limit_issue
2f9e7c02798fb52185dabfe6ce3811c439ca2839
[ "MIT" ]
null
null
null
example_project/compile_with_cython.py
Yuriy-Leonov/cython_imports_limit_issue
2f9e7c02798fb52185dabfe6ce3811c439ca2839
[ "MIT" ]
null
null
null
example_project/compile_with_cython.py
Yuriy-Leonov/cython_imports_limit_issue
2f9e7c02798fb52185dabfe6ce3811c439ca2839
[ "MIT" ]
null
null
null
"""python compile_with_cython.py build_ext --inplace""" # import setuptools # important import os from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext from Cython.Build import cythonize import shutil import multiprocessing sep = os.path.sep DISTRIBUTE_DIR_...
29.261364
78
0.641553
"""python compile_with_cython.py build_ext --inplace""" # import setuptools # important import os from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext from Cython.Build import cythonize import shutil import multiprocessing sep = os.path.sep DISTRIBUTE_DIR_...
4,396
0
230
3c5db155e6603f36d24ecf906217e6e9f933fa26
1,251
py
Python
Face_detector.py
sm1216/python
ccb78875dcb95cc18bf8d2a66896dedbb0fe7b41
[ "MIT" ]
null
null
null
Face_detector.py
sm1216/python
ccb78875dcb95cc18bf8d2a66896dedbb0fe7b41
[ "MIT" ]
null
null
null
Face_detector.py
sm1216/python
ccb78875dcb95cc18bf8d2a66896dedbb0fe7b41
[ "MIT" ]
null
null
null
#pip install pip install opencv-python import cv2 from random import randrange #load some pretrained data on face frontals from open cv (haar cascade algotithm (git hub opencv the data )) trained_face_data = cv2.CascadeClassifier("haarcascade_frontalface_default.xml") #choose an image to detect faces #img = ...
29.093023
110
0.714628
#pip install pip install opencv-python import cv2 from random import randrange #load some pretrained data on face frontals from open cv (haar cascade algotithm (git hub opencv the data )) trained_face_data = cv2.CascadeClassifier("haarcascade_frontalface_default.xml") #choose an image to detect faces #img = ...
0
0
0
c7dc43aac8dd8cc24847ba1a0567de0c676e9a82
13,711
py
Python
src/OFS/userfolder.py
tseaver/Zope-RFA
08634f39b0f8b56403a2a9daaa6ee4479ef0c625
[ "ZPL-2.1" ]
2
2015-12-21T10:34:56.000Z
2017-09-24T11:07:58.000Z
src/OFS/userfolder.py
MatthewWilkes/Zope
740f934fc9409ae0062e8f0cd6dcfd8b2df00376
[ "ZPL-2.1" ]
null
null
null
src/OFS/userfolder.py
MatthewWilkes/Zope
740f934fc9409ae0062e8f0cd6dcfd8b2df00376
[ "ZPL-2.1" ]
null
null
null
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # 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 I...
38.84136
79
0.588651
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # 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 I...
4,032
0
186
c7db55fcc2e9454e9eb4b3411553c8fe577a71b6
5,969
py
Python
pde/grids/operators/tests/test_cylindrical_operators.py
deephog/py-pde
2b9cf5ecf90d33f484b6f2fb61437199ca66b25c
[ "MIT" ]
null
null
null
pde/grids/operators/tests/test_cylindrical_operators.py
deephog/py-pde
2b9cf5ecf90d33f484b6f2fb61437199ca66b25c
[ "MIT" ]
null
null
null
pde/grids/operators/tests/test_cylindrical_operators.py
deephog/py-pde
2b9cf5ecf90d33f484b6f2fb61437199ca66b25c
[ "MIT" ]
null
null
null
""" .. codeauthor:: David Zwicker <david.zwicker@ds.mpg.de> """ import numpy as np from pde import CartesianGrid, CylindricalGrid, ScalarField, VectorField from pde.grids.operators import cylindrical as ops def test_laplace_cyl(): """ test the implementation of the laplace operator """ for boundary_z in ["p...
40.060403
87
0.611325
""" .. codeauthor:: David Zwicker <david.zwicker@ds.mpg.de> """ import numpy as np from pde import CartesianGrid, CylindricalGrid, ScalarField, VectorField from pde.grids.operators import cylindrical as ops def test_laplace_cyl(): """ test the implementation of the laplace operator """ for boundary_z in ["p...
0
0
0
e0dea529f19214b6b7ff3fadfff77516707f254b
2,251
py
Python
engine/core/FeatureEntity.py
owlvey/archon
99811d830a709756c7a62e9d75a38e2b87549b7b
[ "Apache-2.0" ]
1
2021-04-15T21:55:08.000Z
2021-04-15T21:55:08.000Z
engine/core/FeatureEntity.py
owlvey/archon
99811d830a709756c7a62e9d75a38e2b87549b7b
[ "Apache-2.0" ]
null
null
null
engine/core/FeatureEntity.py
owlvey/archon
99811d830a709756c7a62e9d75a38e2b87549b7b
[ "Apache-2.0" ]
null
null
null
from engine.core.SquadEntity import SquadEntity from engine.core.SourceEntity import SourceEntity from typing import Collection, List from numpy.lib.utils import source import pandas as pd
32.623188
110
0.596179
from engine.core.SquadEntity import SquadEntity from engine.core.SourceEntity import SourceEntity from typing import Collection, List from numpy.lib.utils import source import pandas as pd class FeatureEntity: def __init__(self) -> None: self.description = None self.feature = None self.jour...
1,924
-1
126
5fc4d1ed42ff01b57e29a35e30b3ae2d3a42bfc2
4,445
py
Python
myspider/myspider/downloaders/myrequests.py
yanyaming/yxf_myspider_py_scrapy
9c06b8b88b13ca31ecb7f6004b88f7fe5f78eeb4
[ "MIT" ]
2
2019-03-05T01:00:46.000Z
2020-11-18T09:53:47.000Z
myspider/myspider/downloaders/myrequests.py
yanyaming/yxf_myspider_py_scrapy
9c06b8b88b13ca31ecb7f6004b88f7fe5f78eeb4
[ "MIT" ]
null
null
null
myspider/myspider/downloaders/myrequests.py
yanyaming/yxf_myspider_py_scrapy
9c06b8b88b13ca31ecb7f6004b88f7fe5f78eeb4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import requests ''' 用于替代scrapy原生下载器(过于简陋),在尽量不渲染css/js,不访问附带文件的情况下,高度模拟真实访问,反反爬。 ''' def my_requests_request(method, url, **kwargs): """ :param method: method for the new :class:`Request` object. :param url: URL for the new :class:`Request` object. :para...
44.45
133
0.688639
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import requests ''' 用于替代scrapy原生下载器(过于简陋),在尽量不渲染css/js,不访问附带文件的情况下,高度模拟真实访问,反反爬。 ''' def my_requests_request(method, url, **kwargs): """ :param method: method for the new :class:`Request` object. :param url: URL for the new :class:`Request` object. :para...
48
0
26
d9f420b753af169a63dae84b49acfa4284279119
50
py
Python
access/__init__.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
13
2015-11-29T12:19:12.000Z
2021-02-21T15:42:11.000Z
access/__init__.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
23
2015-04-29T19:43:34.000Z
2021-02-10T05:50:17.000Z
access/__init__.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
11
2015-09-20T18:59:00.000Z
2020-02-07T08:47:34.000Z
default_app_config = 'access.apps.AccessAppConfig'
50
50
0.86
default_app_config = 'access.apps.AccessAppConfig'
0
0
0
4a101969796f8f85101b2e165550375c8761f404
12,952
py
Python
src/data_loaders/attribute_annotation_data_loader.py
shigashiyama/seikanlp_sematt
b192c2568dc27cba497245a334baaa175b73270c
[ "MIT" ]
null
null
null
src/data_loaders/attribute_annotation_data_loader.py
shigashiyama/seikanlp_sematt
b192c2568dc27cba497245a334baaa175b73270c
[ "MIT" ]
null
null
null
src/data_loaders/attribute_annotation_data_loader.py
shigashiyama/seikanlp_sematt
b192c2568dc27cba497245a334baaa175b73270c
[ "MIT" ]
null
null
null
import sys import constants, constants_sematt import dictionary from data_loaders import data_loader from data_loaders.data_loader import DataLoader, Data, RestorableData DELIM = ',' COLON = ':' COLON_ALT = '^'
37.760933
111
0.555435
import sys import constants, constants_sematt import dictionary from data_loaders import data_loader from data_loaders.data_loader import DataLoader, Data, RestorableData DELIM = ',' COLON = ':' COLON_ALT = '^' class AttributeAnnotationDataLoader(DataLoader): def __init__(self, token_index=1, ...
12,469
27
234
e336b0c302f586aa2073b6bcb9cdfe2b5c14c9ae
1,548
py
Python
entrada.py
thiagosouzalink/Jogo_Adivinhacao-Python
8cc1272f78ca90e2037c39d6ba286dcff83b3fcf
[ "MIT" ]
null
null
null
entrada.py
thiagosouzalink/Jogo_Adivinhacao-Python
8cc1272f78ca90e2037c39d6ba286dcff83b3fcf
[ "MIT" ]
null
null
null
entrada.py
thiagosouzalink/Jogo_Adivinhacao-Python
8cc1272f78ca90e2037c39d6ba286dcff83b3fcf
[ "MIT" ]
null
null
null
""" Pacote de funções Autor: Thiago Souza """ def ler_letra(txt): """ Função que valida letra digitada pelo usuário. :param txt: Caracter digitado pelo usuário :return: Letra validada corretamente. """ while True: letra = input(txt).strip() if not letra: pr...
22.434783
74
0.585271
""" Pacote de funções Autor: Thiago Souza """ def ler_letra(txt): """ Função que valida letra digitada pelo usuário. :param txt: Caracter digitado pelo usuário :return: Letra validada corretamente. """ while True: letra = input(txt).strip() if not letra: pr...
0
0
0
6f0aafbad793a54544e32d76badbd0d62477c6ed
514
py
Python
2021/13/day13.py
caryhooper/adventofcode
70d142780a7d8c742c97448fb2287abe735c2f9c
[ "MIT" ]
null
null
null
2021/13/day13.py
caryhooper/adventofcode
70d142780a7d8c742c97448fb2287abe735c2f9c
[ "MIT" ]
null
null
null
2021/13/day13.py
caryhooper/adventofcode
70d142780a7d8c742c97448fb2287abe735c2f9c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 #Advent of Code Day 13 "Transparent Oragami" import sys sys.path.append("..") import submarine sub = submarine.Submarine() #Part 1 thermal = sub.navigator.thermal_camera file = open('input.txt','r') #Activate camera by feeding input from manual thermal.activate(file.readlines()) #Fold once the...
22.347826
75
0.7607
#!/usr/bin/env python3 #Advent of Code Day 13 "Transparent Oragami" import sys sys.path.append("..") import submarine sub = submarine.Submarine() #Part 1 thermal = sub.navigator.thermal_camera file = open('input.txt','r') #Activate camera by feeding input from manual thermal.activate(file.readlines()) #Fold once the...
0
0
0
284f2c801bb7045564592466112c5f75c4265ad1
2,169
py
Python
reproschema/models/protocol.py
sanuann/reproschema-py
ece78068b185018ec3d7f56ef9498e6e366d1e70
[ "Apache-2.0" ]
3
2020-06-22T06:58:46.000Z
2021-04-19T03:59:47.000Z
reproschema/models/protocol.py
sanuann/reproschema-py
ece78068b185018ec3d7f56ef9498e6e366d1e70
[ "Apache-2.0" ]
10
2020-07-02T08:56:21.000Z
2021-08-03T15:38:25.000Z
reproschema/models/protocol.py
Remi-Gau/reproschema-py
9597b24d0a63210508911d152f1e94175138c32e
[ "Apache-2.0" ]
3
2020-06-21T19:28:40.000Z
2020-07-03T06:53:08.000Z
from .base import SchemaBase class Protocol(SchemaBase): """ class to deal with reproschema protocols """ schema_type = "reproschema:Protocol" # TODO # def add_landing_page(self, landing_page_url, lang="en"): # preamble # compute
27.455696
82
0.557861
from .base import SchemaBase class Protocol(SchemaBase): """ class to deal with reproschema protocols """ schema_type = "reproschema:Protocol" def __init__(self, version=None): super().__init__(version) self.schema["ui"] = { "allow": [], "shuffle": [], ...
1,687
0
216
a7756a85f988515cb667fc6f3bacc216d04d519f
252
py
Python
Website Scanner/nmap.py
noamts/Malware
099577f87abdca76910dcf4f1debc234a9f67c9b
[ "MIT" ]
47
2020-03-19T00:08:21.000Z
2022-03-31T02:32:16.000Z
Website Scanner/nmap.py
sidwashere/Malware
1eeb374b1ee992a3dabd00420916dcbd277c66db
[ "MIT" ]
null
null
null
Website Scanner/nmap.py
sidwashere/Malware
1eeb374b1ee992a3dabd00420916dcbd277c66db
[ "MIT" ]
14
2020-03-18T22:22:15.000Z
2022-03-29T05:39:25.000Z
import os
22.909091
45
0.710317
import os def get_nmap(options,ip): print("[+]Scanning for Nmap Results") try: command="nmap "+options+" "+ip process=os.popen(command) scan_result=str(process.read()) return scan_result except: print("[!]Unable to Retreive Nmap Results")
220
0
23
aeb18942dff0e7646e277a08051e5b1f9a2eadd8
4,462
py
Python
detoxify/model.py
Borda/detoxify
bb96b78b98285e996392b633d3e682abc2cc7e39
[ "Apache-2.0" ]
7
2021-11-22T20:21:00.000Z
2022-01-03T06:20:25.000Z
detoxify/model.py
Borda/detoxify
bb96b78b98285e996392b633d3e682abc2cc7e39
[ "Apache-2.0" ]
null
null
null
detoxify/model.py
Borda/detoxify
bb96b78b98285e996392b633d3e682abc2cc7e39
[ "Apache-2.0" ]
null
null
null
import torch import transformers DOWNLOAD_URL = "https://github.com/unitaryai/detoxify/releases/download/" MODEL_URLS = { "original": DOWNLOAD_URL + "v0.1-alpha/toxic_original-c1212f89.ckpt", "unbiased": DOWNLOAD_URL + "v0.3-alpha/toxic_debiased-c7548aa0.ckpt", "multilingual": DOWNLOAD_URL + "v0.4-alpha/mu...
37.183333
116
0.679964
import torch import transformers DOWNLOAD_URL = "https://github.com/unitaryai/detoxify/releases/download/" MODEL_URLS = { "original": DOWNLOAD_URL + "v0.1-alpha/toxic_original-c1212f89.ckpt", "unbiased": DOWNLOAD_URL + "v0.3-alpha/toxic_debiased-c7548aa0.ckpt", "multilingual": DOWNLOAD_URL + "v0.4-alpha/mu...
2,541
0
237
97c9a923d0e13d1348154fc6b73527c9f73b1797
143
py
Python
onesignalapi/config/settings.py
alexromer0/onesignal-api
a5fb3acfd2fe81bc70fcf6c7b8a9216f207b409f
[ "MIT" ]
1
2018-08-14T16:32:29.000Z
2018-08-14T16:32:29.000Z
onesignalapi/config/settings.py
alexromer0/onesignal-api
a5fb3acfd2fe81bc70fcf6c7b8a9216f207b409f
[ "MIT" ]
2
2018-11-20T22:38:43.000Z
2018-11-20T22:42:35.000Z
onesignalapi/config/settings.py
alexromer0/onesignal-api
a5fb3acfd2fe81bc70fcf6c7b8a9216f207b409f
[ "MIT" ]
null
null
null
ONESIGNAL_APP_ID = False ONESIGNAL_API_KEY = False ONESIGNAL_BASE_URL = 'https://onesignal.com/api/' ONESIGNAL_VERSION = 'v1' TIMEZONE = 'UTC'
23.833333
49
0.776224
ONESIGNAL_APP_ID = False ONESIGNAL_API_KEY = False ONESIGNAL_BASE_URL = 'https://onesignal.com/api/' ONESIGNAL_VERSION = 'v1' TIMEZONE = 'UTC'
0
0
0
c268536a8b2591b5027d107caca87981be1bf5c2
733
py
Python
public/client/init.py
petrkruntorad/bachelors-thesis-kruntorad
d340e799f5a657fd7092fa4b76984a762681c3bc
[ "MIT" ]
1
2022-03-02T17:38:56.000Z
2022-03-02T17:38:56.000Z
public/client/init.py
petrkruntorad/bachelors-thesis-kruntorad
d340e799f5a657fd7092fa4b76984a762681c3bc
[ "MIT" ]
null
null
null
public/client/init.py
petrkruntorad/bachelors-thesis-kruntorad
d340e799f5a657fd7092fa4b76984a762681c3bc
[ "MIT" ]
null
null
null
import json import logging from functions import setCronJob logging.basicConfig(filename='log.txt', encoding='utf-8', level=logging.ERROR) try: # variable init configFile = open('config.json') sensors = [] writeInterval = None # loads config configData = json.load(configFile) # if write i...
27.148148
78
0.703956
import json import logging from functions import setCronJob logging.basicConfig(filename='log.txt', encoding='utf-8', level=logging.ERROR) try: # variable init configFile = open('config.json') sensors = [] writeInterval = None # loads config configData = json.load(configFile) # if write i...
0
0
0
0461261d17b93eb451030594fc2554e3e299e1f7
17,722
py
Python
src/engine_test.py
mapto/-
532ec719c44eaad405d1bd7b339e92ecbdbe9021
[ "MIT" ]
2
2020-04-02T19:44:12.000Z
2020-04-08T19:18:17.000Z
src/engine_test.py
mapto/-
532ec719c44eaad405d1bd7b339e92ecbdbe9021
[ "MIT" ]
5
2020-04-26T15:36:52.000Z
2020-05-14T19:21:29.000Z
src/engine_test.py
mapto/-
532ec719c44eaad405d1bd7b339e92ecbdbe9021
[ "MIT" ]
2
2020-04-07T18:03:25.000Z
2020-04-21T09:05:34.000Z
#!/usr/bin/env python3 # coding: utf-8 import pytest # type: ignore from state import Board, Piece, GameState, GameMove from engine import GameEngine, Dice
32.818519
89
0.632096
#!/usr/bin/env python3 # coding: utf-8 import pytest # type: ignore from state import Board, Piece, GameState, GameMove from engine import GameEngine, Dice def test_initial_gate_state(monkeypatch): # Given board = Board.create(players=[1, 3]) state = GameState.create(board) # When game = GameEn...
17,324
0
230
94274230307b116cd38973824accfc173644c49f
40,540
py
Python
unanalysed.py
CAST-Extend/com.castsoftware.uc.checkanalysiscompleteness
cdf64262422728e7fc64ac2e5012173d277e0d7a
[ "MIT" ]
1
2017-06-16T12:04:10.000Z
2017-06-16T12:04:10.000Z
unanalysed.py
CAST-Extend/com.castsoftware.uc.checkanalysiscompleteness
cdf64262422728e7fc64ac2e5012173d277e0d7a
[ "MIT" ]
14
2017-02-02T18:13:32.000Z
2021-07-29T10:38:35.000Z
unanalysed.py
CAST-Extend/com.castsoftware.uc.checkanalysiscompleteness
cdf64262422728e7fc64ac2e5012173d277e0d7a
[ "MIT" ]
1
2017-01-31T10:48:19.000Z
2017-01-31T10:48:19.000Z
''' Created on 23 déc. 2015 Take an application and add a worksheet to an excell for unanalyzed files @todo : add also existing analyzer for some languages (name and url) @todo : what to do with project files ? pom, .eclipse, .csproj etc... @author: MRO ''' import os, re, logging import math from sortedcontainers ...
35.190972
136
0.427134
''' Created on 23 déc. 2015 Take an application and add a worksheet to an excell for unanalyzed files @todo : add also existing analyzer for some languages (name and url) @todo : what to do with project files ? pom, .eclipse, .csproj etc... @author: MRO ''' import os, re, logging import math from sortedcontainers ...
10,617
3,563
437
7247dd7c684789a49b97c0b21c3bdbfc5281e3f3
176
py
Python
brain.py
codeinvolute/Capoeta
918b133b5014821125a6aad606b3cb377329d6ee
[ "MIT" ]
null
null
null
brain.py
codeinvolute/Capoeta
918b133b5014821125a6aad606b3cb377329d6ee
[ "MIT" ]
null
null
null
brain.py
codeinvolute/Capoeta
918b133b5014821125a6aad606b3cb377329d6ee
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Oct 25 05:23:53 2018 @author: manoj """ heart = {"www.github.com" : {"nothing here":"never here"} }
16
35
0.573864
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Oct 25 05:23:53 2018 @author: manoj """ heart = {"www.github.com" : {"nothing here":"never here"} }
0
0
0
c01c618e04466bd6963b15afbacc7dd8bb0981d2
2,538
py
Python
constants/bezirke.py
WhereIsTheExit/HeinzBot
1e35f1706d03b47dddfa8b8a04cede6a7c4be301
[ "Apache-2.0" ]
6
2019-05-12T13:30:48.000Z
2020-07-30T08:58:10.000Z
constants/bezirke.py
WhereIsTheExit/HeinzBot
1e35f1706d03b47dddfa8b8a04cede6a7c4be301
[ "Apache-2.0" ]
16
2019-05-11T14:07:06.000Z
2021-11-29T22:13:35.000Z
constants/bezirke.py
WhereIsTheExit/HeinzBot
1e35f1706d03b47dddfa8b8a04cede6a7c4be301
[ "Apache-2.0" ]
5
2019-05-11T13:29:47.000Z
2020-01-15T12:18:40.000Z
BEZIRKE = { "AT": "oesterreich", "W": "wien", "B": "burgenland", "SBG": "salzburg", "T": "tirol", "V": "vorarlberg", "KTN": "kaernten", "OÖ": "oberoesterreich", "NÖ": "niederoesterreich", "STMK": "steiermark", "AM": "amstetten", "BN": "baden", "BZ": "bludenz", "B...
23.943396
37
0.485422
BEZIRKE = { "AT": "oesterreich", "W": "wien", "B": "burgenland", "SBG": "salzburg", "T": "tirol", "V": "vorarlberg", "KTN": "kaernten", "OÖ": "oberoesterreich", "NÖ": "niederoesterreich", "STMK": "steiermark", "AM": "amstetten", "BN": "baden", "BZ": "bludenz", "B...
0
0
0
164073324857721be8db1d6d9dad7b4f8c194e56
664
py
Python
nngen/verify/__init__.py
m1kit/nngen
c96457aa0f1681a8ba7c12881ea3d455eccffde0
[ "Apache-2.0" ]
7
2020-06-08T13:36:13.000Z
2021-12-24T06:55:30.000Z
nngen/verify/__init__.py
m1kit/nngen
c96457aa0f1681a8ba7c12881ea3d455eccffde0
[ "Apache-2.0" ]
null
null
null
nngen/verify/__init__.py
m1kit/nngen
c96457aa0f1681a8ba7c12881ea3d455eccffde0
[ "Apache-2.0" ]
1
2021-03-12T03:51:56.000Z
2021-03-12T03:51:56.000Z
from __future__ import absolute_import from __future__ import print_function from __future__ import division from .basic import * from .relu import relu, relu6 from .leaky_relu import leaky_relu, get_leaky_relu_op from .matmul import matmul from .conv2d import conv2d from .log_weight_conv2d import log_weight_conv2d fr...
33.2
57
0.85241
from __future__ import absolute_import from __future__ import print_function from __future__ import division from .basic import * from .relu import relu, relu6 from .leaky_relu import leaky_relu, get_leaky_relu_op from .matmul import matmul from .conv2d import conv2d from .log_weight_conv2d import log_weight_conv2d fr...
0
0
0
bc6c7c07f9e074cff9fe14167620f50fa7a794bb
531
py
Python
src/ezcode/string/__init__.py
zheng-gao/ez_code
fbf48990291aa57d6436d4548b0a6c25dfb8f82d
[ "MIT" ]
null
null
null
src/ezcode/string/__init__.py
zheng-gao/ez_code
fbf48990291aa57d6436d4548b0a6c25dfb8f82d
[ "MIT" ]
null
null
null
src/ezcode/string/__init__.py
zheng-gao/ez_code
fbf48990291aa57d6436d4548b0a6c25dfb8f82d
[ "MIT" ]
null
null
null
def rotate_char(char: str, rotation_factor: int): """ special characters won't rotate """ if len(char) != 1: raise ValueError(f"Invalid char: \"{char}\"") start, end = "", "" if "0" <= char and char <= "9": start, end = "0", "9" elif "a" <= char and char <= "z": start, end =...
31.235294
101
0.508475
def rotate_char(char: str, rotation_factor: int): """ special characters won't rotate """ if len(char) != 1: raise ValueError(f"Invalid char: \"{char}\"") start, end = "", "" if "0" <= char and char <= "9": start, end = "0", "9" elif "a" <= char and char <= "z": start, end =...
0
0
0
06580a80c33054817fd284c92900b8255e56115c
1,724
py
Python
spider_smooc/spider/parser.py
MisterZhouZhou/pythonLearn
8933c7a6d444d3d86a173984e6cf4c08dbf84039
[ "Apache-2.0" ]
1
2019-07-09T09:59:39.000Z
2019-07-09T09:59:39.000Z
spider_smooc/spider/parser.py
MisterZhouZhou/pythonLearn
8933c7a6d444d3d86a173984e6cf4c08dbf84039
[ "Apache-2.0" ]
null
null
null
spider_smooc/spider/parser.py
MisterZhouZhou/pythonLearn
8933c7a6d444d3d86a173984e6cf4c08dbf84039
[ "Apache-2.0" ]
null
null
null
# coding:utf-8 import re from bs4 import BeautifulSoup from config import DOWNLOAD_URL from entity.fileinfor import FileInfor from spider.downloader import Downloader class Parser(object): ''' html解析器:从中提取出视频信息 ''' def parser(self, html_cont, ID): ''' :param html_cont: html内容 ...
37.478261
131
0.567285
# coding:utf-8 import re from bs4 import BeautifulSoup from config import DOWNLOAD_URL from entity.fileinfor import FileInfor from spider.downloader import Downloader class Parser(object): ''' html解析器:从中提取出视频信息 ''' def __init__(self): self.res_data = [] # 用来存放视频信息 def parser(self, html_c...
53
0
26
f67055f5da53d262c2cb9c3a024880cf87fa3864
2,318
py
Python
setup.py
dimensigon/dimensigon
079d7c91a66e10f13510d89844fbadb27e005b40
[ "Apache-2.0" ]
2
2020-11-20T10:27:14.000Z
2021-02-21T13:57:56.000Z
setup.py
dimensigon/dimensigon
079d7c91a66e10f13510d89844fbadb27e005b40
[ "Apache-2.0" ]
null
null
null
setup.py
dimensigon/dimensigon
079d7c91a66e10f13510d89844fbadb27e005b40
[ "Apache-2.0" ]
null
null
null
import re from setuptools import setup, find_packages INIT_FILE = 'dimensigon/__init__.py' with open("README.md", "r") as fh: long_description = fh.read() author, email = find_author_email() setup( name='dimensigon', version=find_version(), package_dir={"": "."}, packages=find_packages(wher...
32.194444
117
0.600518
import re from setuptools import setup, find_packages INIT_FILE = 'dimensigon/__init__.py' with open("README.md", "r") as fh: long_description = fh.read() def find_version(): with open(INIT_FILE) as fp: for line in fp: # __version__ = '0.1.0' match = re.search(r"__version__\...
1,062
0
92
9f54e11f0ffdeec4083e0d6c2285301556dd85c0
1,716
py
Python
mtda/usb/rpi_gpio.py
LevyForchh/mtda
c5f2255216777287fb453be821e6fb6e1bfdbf8e
[ "MIT" ]
null
null
null
mtda/usb/rpi_gpio.py
LevyForchh/mtda
c5f2255216777287fb453be821e6fb6e1bfdbf8e
[ "MIT" ]
null
null
null
mtda/usb/rpi_gpio.py
LevyForchh/mtda
c5f2255216777287fb453be821e6fb6e1bfdbf8e
[ "MIT" ]
null
null
null
# System imports import abc import RPi.GPIO as GPIO # Local imports from mtda.usb.switch import UsbSwitch
26.8125
72
0.549534
# System imports import abc import RPi.GPIO as GPIO # Local imports from mtda.usb.switch import UsbSwitch class RPiGpioUsbSwitch(UsbSwitch): def __init__(self): self.dev = None self.pin = 0 self.enable = GPIO.HIGH self.disable = GPIO.LOW GPIO.setwarnings(False) ...
369
1,194
46
436089557f21334b2141cc47cdb7ed62a4c56575
647
py
Python
azure/upscale_service/score_upscale.py
FreddyMurphy/MLOpsProject
176d91636ad2ba6da565bba8df5745e9d65a9137
[ "MIT" ]
null
null
null
azure/upscale_service/score_upscale.py
FreddyMurphy/MLOpsProject
176d91636ad2ba6da565bba8df5745e9d65a9137
[ "MIT" ]
3
2021-06-20T17:07:06.000Z
2021-06-22T16:32:56.000Z
azure/upscale_service/score_upscale.py
FreddyMurphy/MLOpsProject
176d91636ad2ba6da565bba8df5745e9d65a9137
[ "MIT" ]
null
null
null
import json import pickle import numpy as np import torch from azureml.core.model import Model from src.models.model import SRCNN
20.870968
72
0.64915
import json import pickle import numpy as np import torch from azureml.core.model import Model from src.models.model import SRCNN def init(): global model model_path = Model.get_model_path('div2k_model') model = SRCNN() with open(model_path, 'rb') as f: obj = f.read() state_dict = {...
467
0
46
292d542fb32071bae497c918254f743167f40823
486
py
Python
practice/classes/ex6.py
recursivelycurious/wordnik-repl
9d9e96a8ebc79b95f135d5bc871602b65d2d2b79
[ "MIT" ]
null
null
null
practice/classes/ex6.py
recursivelycurious/wordnik-repl
9d9e96a8ebc79b95f135d5bc871602b65d2d2b79
[ "MIT" ]
8
2017-12-29T21:19:00.000Z
2018-04-01T05:05:05.000Z
practice/classes/ex6.py
recursivelycurious/wordnik-repl
9d9e96a8ebc79b95f135d5bc871602b65d2d2b79
[ "MIT" ]
1
2017-12-27T23:45:58.000Z
2017-12-27T23:45:58.000Z
class Animal(object): """Makes cute animals.""" is_alive = True health = "good" hippo = Animal("Sally", 22) hippo.description() sloth = Animal("Minnie", 47) ocelot = Animal("Mike", 32) print hippo.health print sloth.health print ocelot.health # member variables are variables that are available to all membe...
21.130435
91
0.6893
class Animal(object): """Makes cute animals.""" is_alive = True health = "good" def __init__(self, name, age): self.name = name self.age = age def description(self): print self.name print self.age hippo = Animal("Sally", 22) hippo.description() sloth = Animal("Minnie", 47) ocelot = Anima...
89
0
49
348b5f40d6803019d333e4a0adc0d670258a3517
348
py
Python
src/brands/migrations/0008_auto_20200511_1102.py
Bakhtiyar-Habib/CSE327-Project
4126b40eb398e4cf13b49136e552775c5f3b0635
[ "bzip2-1.0.6" ]
null
null
null
src/brands/migrations/0008_auto_20200511_1102.py
Bakhtiyar-Habib/CSE327-Project
4126b40eb398e4cf13b49136e552775c5f3b0635
[ "bzip2-1.0.6" ]
null
null
null
src/brands/migrations/0008_auto_20200511_1102.py
Bakhtiyar-Habib/CSE327-Project
4126b40eb398e4cf13b49136e552775c5f3b0635
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 2.0.7 on 2020-05-11 05:02 from django.db import migrations
19.333333
47
0.614943
# Generated by Django 2.0.7 on 2020-05-11 05:02 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('brands', '0007_auto_20200511_1057'), ] operations = [ migrations.RenameModel( old_name='Levis_brand_detail', new_name='Brand...
0
242
23
9920b65ecb8cee900435ac3949b2707b76e5dfe6
2,836
py
Python
pe/actions.py
goodmami/pe
ea2ff69742c7f76f370cdfa8e3f7ae0860d5e6fa
[ "MIT" ]
18
2020-03-25T09:10:24.000Z
2022-02-21T02:46:10.000Z
pe/actions.py
goodmami/pe
ea2ff69742c7f76f370cdfa8e3f7ae0860d5e6fa
[ "MIT" ]
21
2020-03-18T08:03:04.000Z
2021-10-11T04:29:09.000Z
pe/actions.py
goodmami/pe
ea2ff69742c7f76f370cdfa8e3f7ae0860d5e6fa
[ "MIT" ]
1
2021-09-02T16:09:29.000Z
2021-09-02T16:09:29.000Z
from typing import Sequence, Tuple, Dict, Optional import warnings from pe._errors import ParseError, GrammarWarning from pe._match import determine
19.694444
73
0.575811
from typing import Sequence, Tuple, Dict, Optional import warnings from pe._errors import ParseError, GrammarWarning from pe._match import determine class Action: __slots__ = 'arg', def __init__(self): self.arg = None def __repr__(self): return f'{type(self).__name__}({self.arg!r})' ...
1,564
857
253
3ecd982f4906b77d8ce5569bf9f3ad048233d31e
729
py
Python
skins/alphaflow/af_assign_process.py
gocept/alphaflow
4b797cb12fb52254b1884159fd9a8b899c739f7c
[ "ZPL-2.1", "ZPL-2.0" ]
null
null
null
skins/alphaflow/af_assign_process.py
gocept/alphaflow
4b797cb12fb52254b1884159fd9a8b899c739f7c
[ "ZPL-2.1", "ZPL-2.0" ]
null
null
null
skins/alphaflow/af_assign_process.py
gocept/alphaflow
4b797cb12fb52254b1884159fd9a8b899c739f7c
[ "ZPL-2.1", "ZPL-2.0" ]
1
2021-11-01T07:58:18.000Z
2021-11-01T07:58:18.000Z
##parameters=process_uid # Copyright (c) 2004-2006 gocept gmbh & co. kg # See also LICENSE.txt # af_assign_process.py,v 1.5.6.2 2005/05/02 10:08:52 zagy Exp from Products.CMFCore.utils import getToolByName from Products.Archetypes.config import UID_CATALOG from Products.AlphaFlow.interfaces import ILifeCycleController ...
40.5
75
0.748971
##parameters=process_uid # Copyright (c) 2004-2006 gocept gmbh & co. kg # See also LICENSE.txt # af_assign_process.py,v 1.5.6.2 2005/05/02 10:08:52 zagy Exp from Products.CMFCore.utils import getToolByName from Products.Archetypes.config import UID_CATALOG from Products.AlphaFlow.interfaces import ILifeCycleController ...
0
0
0
1feada181e174b393d109780804b6611169a772d
1,185
py
Python
AlbertUnruhUtils/utils/logger.py
AlbertUnruh/AlbertUnruhUtils.py
33f28752195f4b759d1c97fd49c62eda36adce72
[ "MIT" ]
1
2022-01-29T21:27:13.000Z
2022-01-29T21:27:13.000Z
AlbertUnruhUtils/utils/logger.py
AlbertUnruh/AlbertUnruhUtils.py
33f28752195f4b759d1c97fd49c62eda36adce72
[ "MIT" ]
1
2022-02-01T18:44:13.000Z
2022-02-01T18:44:13.000Z
AlbertUnruhUtils/utils/logger.py
AlbertUnruh/AlbertUnruhUtils.py
33f28752195f4b759d1c97fd49c62eda36adce72
[ "MIT" ]
null
null
null
__all__ = ("get_logger",) import sys import typing from logging import ( getLogger, Formatter, StreamHandler, ) _LOG_LEVEL_STR = typing.Literal[ "CRITICAL", "FATAL", "ERROR", "WARN", "WARNING", "INFO", "DEBUG", "NOTSET", ] _F = "\033[33m{asctime} \t{name: <15} {levelname:...
20.431034
73
0.612658
__all__ = ("get_logger",) import sys import typing from logging import ( getLogger, Formatter, StreamHandler, ) _LOG_LEVEL_STR = typing.Literal[ "CRITICAL", "FATAL", "ERROR", "WARN", "WARNING", "INFO", "DEBUG", "NOTSET", ] _F = "\033[33m{asctime} \t{name: <15} {levelname:...
0
0
0
4fe040fc7709ef85a097ca7c5e007401b4d116d1
55,436
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/network/network_editor.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
4
2020-11-13T02:35:56.000Z
2021-03-29T20:15:54.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/network/network_editor.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
9
2020-12-09T02:12:39.000Z
2021-02-18T00:15:28.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/network/network_editor.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others. # SUMOPy module # Copyright (C) 2012-2017 University of Bologna - DICAM # This program and the accompanying materials are made available under the # terms of the Eclipse Public ...
39.540656
209
0.576196
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others. # SUMOPy module # Copyright (C) 2012-2017 University of Bologna - DICAM # This program and the accompanying materials are made available under the # terms of the Eclipse Public ...
26,870
15,350
987
c370eeeff94edaa16aded9cf5ad8193dddc65920
1,459
py
Python
scripts/convert_nametag.py
Jwink3101/notefile
3ed7b94597ea972f9193d3ef3e9c2dee656a81db
[ "MIT" ]
7
2020-01-05T18:24:32.000Z
2022-03-08T18:04:25.000Z
scripts/convert_nametag.py
Jwink3101/notefile
3ed7b94597ea972f9193d3ef3e9c2dee656a81db
[ "MIT" ]
null
null
null
scripts/convert_nametag.py
Jwink3101/notefile
3ed7b94597ea972f9193d3ef3e9c2dee656a81db
[ "MIT" ]
1
2020-01-05T18:25:23.000Z
2020-01-05T18:25:23.000Z
""" Convert from filename_[tag1,tag2].ext format to notefile """ import sys import os import re import shutil #sys.path.append(os.path.abspath('..')) import notefile print(notefile.__version__) # 20200103 SOURCE = '/full/path/to/source' retags = re.compile('^(.*)[\_|-][\[|\(](.*?)[\]|\)]$') def get_tag(filename):...
20.263889
66
0.516792
""" Convert from filename_[tag1,tag2].ext format to notefile """ import sys import os import re import shutil #sys.path.append(os.path.abspath('..')) import notefile print(notefile.__version__) # 20200103 SOURCE = '/full/path/to/source' retags = re.compile('^(.*)[\_|-][\[|\(](.*?)[\]|\)]$') def get_tag(filename):...
0
0
0
ed097a275599aae6db09e636b36e79177610a40e
3,018
py
Python
modules/lib/mp_elevation.py
a-wing/mavelous
eef41c096cc282bb3acd33a747146a88d2bd1eee
[ "MIT" ]
80
2015-01-02T23:23:19.000Z
2021-11-02T16:03:07.000Z
modules/lib/mp_elevation.py
Y-H-T/mavelous
eef41c096cc282bb3acd33a747146a88d2bd1eee
[ "MIT" ]
1
2016-04-13T15:44:23.000Z
2016-04-13T15:44:23.000Z
modules/lib/mp_elevation.py
Y-H-T/mavelous
eef41c096cc282bb3acd33a747146a88d2bd1eee
[ "MIT" ]
63
2015-01-03T19:35:39.000Z
2022-02-08T17:15:44.000Z
#!/usr/bin/python ''' Wrapper for the SRTM module (srtm.py) It will grab the altitude of a long,lat pair from the SRTM database Created by Stephen Dade (stephen_dade@hotmail.com) ''' import numpy, os, time, sys, srtm, GAreader class ElevationModel(): '''Elevation Model. Only SRTM for now''' def __init__(self...
36.361446
119
0.616302
#!/usr/bin/python ''' Wrapper for the SRTM module (srtm.py) It will grab the altitude of a long,lat pair from the SRTM database Created by Stephen Dade (stephen_dade@hotmail.com) ''' import numpy, os, time, sys, srtm, GAreader class ElevationModel(): '''Elevation Model. Only SRTM for now''' def __init__(self...
0
0
0
991454e6d673baa6abac87ff4870af30f6d9a3fb
1,499
py
Python
stepik_selenium_final/conftest.py
vshagur/stepik-selenium-final
86842dc5c23f87c846a02a3d6f18c89c94935f23
[ "MIT" ]
null
null
null
stepik_selenium_final/conftest.py
vshagur/stepik-selenium-final
86842dc5c23f87c846a02a3d6f18c89c94935f23
[ "MIT" ]
null
null
null
stepik_selenium_final/conftest.py
vshagur/stepik-selenium-final
86842dc5c23f87c846a02a3d6f18c89c94935f23
[ "MIT" ]
1
2020-07-12T11:57:17.000Z
2020-07-12T11:57:17.000Z
import pytest from selenium import webdriver from selenium.webdriver.chrome.options import Options BROWSERS_LIST = ("chrome", "firefox") BASE_URL = 'http://selenium1py.pythonanywhere.com/' @pytest.fixture(scope='session') @pytest.fixture(scope='class')
27.254545
85
0.661775
import pytest from selenium import webdriver from selenium.webdriver.chrome.options import Options BROWSERS_LIST = ("chrome", "firefox") BASE_URL = 'http://selenium1py.pythonanywhere.com/' def pytest_addoption(parser): parser.addoption( '--browser_name', action='store', default="chrome", ...
1,173
0
67
cb2b0d243f0e1bb09a45dfd69d785d65afccf59a
2,172
py
Python
CNN_model/train_CNN.py
Tejasteju/Sudoku-Solver
d00e158d9ce7cb07c7059421bd471990352fdaf5
[ "MIT" ]
2
2020-10-06T20:07:17.000Z
2021-08-13T14:15:00.000Z
CNN_model/train_CNN.py
Tejasteju/Sudoku-Solver
d00e158d9ce7cb07c7059421bd471990352fdaf5
[ "MIT" ]
null
null
null
CNN_model/train_CNN.py
Tejasteju/Sudoku-Solver
d00e158d9ce7cb07c7059421bd471990352fdaf5
[ "MIT" ]
null
null
null
## importing the required libraries ## import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D import h5py import numpy as np import keras.utils as kut import cv2 import matplotlib.pyplot as plt ## get the dat...
28.96
98
0.72744
## importing the required libraries ## import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D import h5py import numpy as np import keras.utils as kut import cv2 import matplotlib.pyplot as plt ## get the dat...
333
0
23
76a49ae592bdd7c23027228750cbf03cb5e01b2e
1,957
py
Python
sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2020-07-31T16:33:51.000Z
2020-07-31T16:33:51.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
34.946429
81
0.600409
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
247
0
27
61c42051b0f9be215db7243b7aaf4699d6a4cfa4
3,480
py
Python
annotator/stopwords.py
LLCampos/radlex_annotator
dcc6338f7554987b7d2e810dce6dece6cd9b0565
[ "MIT" ]
null
null
null
annotator/stopwords.py
LLCampos/radlex_annotator
dcc6338f7554987b7d2e810dce6dece6cd9b0565
[ "MIT" ]
null
null
null
annotator/stopwords.py
LLCampos/radlex_annotator
dcc6338f7554987b7d2e810dce6dece6cd9b0565
[ "MIT" ]
null
null
null
STOPWORDS = ['I', 'A', 'ABOVE', 'AFTER', 'AGAINST', 'ALL', 'ALONE', 'ALWAYS', 'AM', 'AMOUNT', 'AN', 'AND', 'ANY', 'ARE', 'AROUND', ...
20.838323
28
0.191092
STOPWORDS = ['I', 'A', 'ABOVE', 'AFTER', 'AGAINST', 'ALL', 'ALONE', 'ALWAYS', 'AM', 'AMOUNT', 'AN', 'AND', 'ANY', 'ARE', 'AROUND', ...
0
0
0
43a1c9dd8eb272303c149f11f8f121bf3108e57a
16,623
py
Python
virt/ansible-2.3.0/lib/python2.7/site-packages/ansible/playbook/task.py
lakhlaifi/RedHat-Ansible
27c5077cced9d416081fcd5d69ea44bca0317fa4
[ "Apache-2.0" ]
null
null
null
virt/ansible-2.3.0/lib/python2.7/site-packages/ansible/playbook/task.py
lakhlaifi/RedHat-Ansible
27c5077cced9d416081fcd5d69ea44bca0317fa4
[ "Apache-2.0" ]
null
null
null
virt/ansible-2.3.0/lib/python2.7/site-packages/ansible/playbook/task.py
lakhlaifi/RedHat-Ansible
27c5077cced9d416081fcd5d69ea44bca0317fa4
[ "Apache-2.0" ]
1
2020-02-13T14:24:57.000Z
2020-02-13T14:24:57.000Z
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
37.439189
141
0.60699
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
3,333
0
269
e39bd32f67d3845311499fcd8a0e052f6424fc9f
1,175
py
Python
summarization/cover.py
telescopic/stampify
95f95ec98aa3f0b05d8ad39ce5dd3d89858b4488
[ "Apache-2.0" ]
2
2020-07-26T03:24:33.000Z
2020-12-19T15:40:31.000Z
summarization/cover.py
telescopic/stampify
95f95ec98aa3f0b05d8ad39ce5dd3d89858b4488
[ "Apache-2.0" ]
65
2020-06-09T09:31:53.000Z
2020-07-23T08:26:04.000Z
summarization/cover.py
telescopic/stampify
95f95ec98aa3f0b05d8ad39ce5dd3d89858b4488
[ "Apache-2.0" ]
9
2020-06-04T13:48:24.000Z
2022-01-03T02:42:09.000Z
''' Module to define the Cover object used in budgeted max cover solver ''' class Cover: ''' Boiled down representation of a stamp page consists of only the cover of elements along with the cost and id. All elements are considered to have equal weight. Attributes: * cover : a list of size...
31.756757
61
0.627234
''' Module to define the Cover object used in budgeted max cover solver ''' class Cover: ''' Boiled down representation of a stamp page consists of only the cover of elements along with the cost and id. All elements are considered to have equal weight. Attributes: * cover : a list of size...
180
0
27
464d67ef641c33ea08164bf3e346050b87477926
1,765
py
Python
substream/tempbucket/__init__.py
mdegans/substream
60a329c1d12acbcf1d73586071b371ee8535ef8f
[ "MIT" ]
9
2020-09-14T09:58:34.000Z
2022-03-18T20:40:21.000Z
substream/tempbucket/__init__.py
aniket-amagi/substream
2b5e41c96a30541e8f7210de87551030a4bf45d9
[ "MIT" ]
2
2020-02-05T16:48:39.000Z
2020-12-12T21:31:41.000Z
substream/tempbucket/__init__.py
aniket-amagi/substream
2b5e41c96a30541e8f7210de87551030a4bf45d9
[ "MIT" ]
5
2019-08-19T20:57:03.000Z
2021-02-24T05:42:38.000Z
import contextlib import logging import uuid import six from google.cloud import storage, exceptions name = 'substream.tempbucket' class TemporaryBucket(contextlib.AbstractContextManager): """Functions much like tempfile.TemporaryDirectory() context manager, only it returns a google.storage.Bucket instead o...
31.517857
80
0.64136
import contextlib import logging import uuid import six from google.cloud import storage, exceptions name = 'substream.tempbucket' class TemporaryBucket(contextlib.AbstractContextManager): """Functions much like tempfile.TemporaryDirectory() context manager, only it returns a google.storage.Bucket instead o...
1,260
0
81
8a2c12b54779e102fabafd2fedf70f56d191c952
234
py
Python
it.py
xiaohh007/speech
48b2661bccbe9882bd8591866f60581f03cfa6ec
[ "Apache-2.0" ]
null
null
null
it.py
xiaohh007/speech
48b2661bccbe9882bd8591866f60581f03cfa6ec
[ "Apache-2.0" ]
null
null
null
it.py
xiaohh007/speech
48b2661bccbe9882bd8591866f60581f03cfa6ec
[ "Apache-2.0" ]
null
null
null
import numpy as np import math,librosa import sys y, sr = librosa.load(sys.argv[1], sr=16000) frame_size = 256 frmae_shift = 128 mfccs = librosa.feature.mfcc(y, sr, n_mfcc=12, hop_length=frmae_shift, n_fft=frame_size) print(mfccs)
21.272727
88
0.75641
import numpy as np import math,librosa import sys y, sr = librosa.load(sys.argv[1], sr=16000) frame_size = 256 frmae_shift = 128 mfccs = librosa.feature.mfcc(y, sr, n_mfcc=12, hop_length=frmae_shift, n_fft=frame_size) print(mfccs)
0
0
0
956204a97a220c27e3ae0b79db48714a03a27e28
5,046
py
Python
app/auth/forms.py
chinmaya-dev/ttbdonation
1ea4cb2c279db86465040b68f1fa48dbb5f7e17c
[ "MIT" ]
null
null
null
app/auth/forms.py
chinmaya-dev/ttbdonation
1ea4cb2c279db86465040b68f1fa48dbb5f7e17c
[ "MIT" ]
11
2019-12-26T17:21:03.000Z
2022-03-21T22:17:07.000Z
app/auth/forms.py
chinmaya-dev/ttbdonation
1ea4cb2c279db86465040b68f1fa48dbb5f7e17c
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm, RecaptchaField from flask_wtf.file import FileField, FileAllowed from wtforms import StringField, PasswordField, SubmitField, BooleanField, RadioField, IntegerField, SelectField from wtforms.fields.html5 import DateField from wtforms.validators import DataRequired, Length, Email, EqualT...
53.680851
390
0.674197
from flask_wtf import FlaskForm, RecaptchaField from flask_wtf.file import FileField, FileAllowed from wtforms import StringField, PasswordField, SubmitField, BooleanField, RadioField, IntegerField, SelectField from wtforms.fields.html5 import DateField from wtforms.validators import DataRequired, Length, Email, EqualT...
1,007
3,375
229
7828b076e8d358798ac9144fbfef852fc41dd4ec
4,460
py
Python
cogs/greeting.py
scriptgalih/re-direct-discord-message
5f720a205fd331814b68611d56088f1742be74c6
[ "MIT" ]
null
null
null
cogs/greeting.py
scriptgalih/re-direct-discord-message
5f720a205fd331814b68611d56088f1742be74c6
[ "MIT" ]
null
null
null
cogs/greeting.py
scriptgalih/re-direct-discord-message
5f720a205fd331814b68611d56088f1742be74c6
[ "MIT" ]
null
null
null
from discord.ext import commands import discord import pymongo import json import asyncio with open('cogs/dbCred.json') as json_file: db_cred = json.load(json_file) myClient = pymongo.MongoClient(db_cred['client']) myDB = myClient[db_cred['db_name']] col_botinfo = myDB['botinfo'] col_serverinfo = myDB['serverinfo...
38.448276
104
0.629148
from discord.ext import commands import discord import pymongo import json import asyncio with open('cogs/dbCred.json') as json_file: db_cred = json.load(json_file) myClient = pymongo.MongoClient(db_cred['client']) myDB = myClient[db_cred['db_name']] col_botinfo = myDB['botinfo'] col_serverinfo = myDB['serverinfo...
3,652
397
46
2f8d942dc127f66ceeafebb5755d1196fbefdd3d
304
py
Python
infrabbitmq/exceptions.py
aleasoluciones/infrabbitmq3
5a5f5cf7e4fbcdae659855edcbf1b8c2d007f69f
[ "MIT" ]
null
null
null
infrabbitmq/exceptions.py
aleasoluciones/infrabbitmq3
5a5f5cf7e4fbcdae659855edcbf1b8c2d007f69f
[ "MIT" ]
null
null
null
infrabbitmq/exceptions.py
aleasoluciones/infrabbitmq3
5a5f5cf7e4fbcdae659855edcbf1b8c2d007f69f
[ "MIT" ]
1
2019-04-15T06:38:30.000Z
2019-04-15T06:38:30.000Z
# ------------------------------------- # RabbitMQClient Errors # ------------------------------------- # ------------------------------------- # PikaClientWrapper Errors # -------------------------------------
17.882353
39
0.361842
# ------------------------------------- # RabbitMQClient Errors # ------------------------------------- class RabbitMQError(Exception): pass # ------------------------------------- # PikaClientWrapper Errors # ------------------------------------- class ClientWrapperError(Exception): pass
0
43
46
4b5c18953260076e95409c1c873ce5f3eae609ca
1,809
py
Python
src/superfit/correlation/correlationmodel.py
awacha/superfit
a95d346c4b38f61173c7434eb7389e2cf1ccae9c
[ "BSD-3-Clause" ]
null
null
null
src/superfit/correlation/correlationmodel.py
awacha/superfit
a95d346c4b38f61173c7434eb7389e2cf1ccae9c
[ "BSD-3-Clause" ]
null
null
null
src/superfit/correlation/correlationmodel.py
awacha/superfit
a95d346c4b38f61173c7434eb7389e2cf1ccae9c
[ "BSD-3-Clause" ]
null
null
null
from PyQt5 import QtCore, QtGui import numpy as np from typing import List
36.918367
100
0.625207
from PyQt5 import QtCore, QtGui import numpy as np from typing import List class CorrelationCoefficientsModel(QtCore.QAbstractItemModel): def __init__(self, matrix:np.ndarray, names:List[str]): super().__init__() self._matrix = matrix self._names = names assert matrix.shape[0] == m...
1,428
41
265
87034caaa4f4c903a863843450bcfe5e99404b23
485
py
Python
CoolPlot/Util/__init__.py
CoolProp/CoolPlot
0967e243934c0970ef830b43befeabacc688cdfd
[ "MIT" ]
9
2019-05-23T08:13:43.000Z
2022-03-02T11:37:39.000Z
CoolPlot/Util/__init__.py
CoolProp/CoolPlot
0967e243934c0970ef830b43befeabacc688cdfd
[ "MIT" ]
1
2019-06-28T16:57:32.000Z
2019-07-17T20:49:23.000Z
CoolPlot/Util/__init__.py
CoolProp/CoolPlot
0967e243934c0970ef830b43befeabacc688cdfd
[ "MIT" ]
3
2020-10-29T01:49:59.000Z
2022-02-21T17:43:11.000Z
# -*- coding: utf-8 -*- import CoolProp
25.526316
100
0.645361
# -*- coding: utf-8 -*- import CoolProp def is_string(in_obj): try: return isinstance(in_obj, basestring) except NameError: return isinstance(in_obj, str) # except: # return False def _get_index(prop): if is_string(prop): return CoolProp.CoolProp.get_parameter_index(pro...
399
0
46
5fbc73f58f4c967d8d6abe408aec9582be8906a2
2,085
py
Python
02-evolution/compare.py
MKuranowski/STUD-WSI
f0d39c73d918a20933f745378cddfdbb321b68a7
[ "MIT" ]
null
null
null
02-evolution/compare.py
MKuranowski/STUD-WSI
f0d39c73d918a20933f745378cddfdbb321b68a7
[ "MIT" ]
null
null
null
02-evolution/compare.py
MKuranowski/STUD-WSI
f0d39c73d918a20933f745378cddfdbb321b68a7
[ "MIT" ]
null
null
null
# cSpell:words stdev import multiprocessing.pool import os from statistics import mean, stdev from typing import Any, NamedTuple from cec2017.functions import f4 from evolution import Evolution ROUNDS_OF_ALGO = 50 INITIAL_POINT_BOUND = 100 SEPARATOR = os.getenv("SEP", "\t") if __name__ == "__main__": main()...
30.217391
91
0.629257
# cSpell:words stdev import multiprocessing.pool import os from statistics import mean, stdev from typing import Any, NamedTuple from cec2017.functions import f4 from evolution import Evolution ROUNDS_OF_ALGO = 50 INITIAL_POINT_BOUND = 100 SEPARATOR = os.getenv("SEP", "\t") class Result(NamedTuple): min: float...
1,558
137
69
38d1944ffd42849898f6d3320dae46bbf2626b12
863
py
Python
ros/src/tl_detector/light_classification/tl_classifier.py
xueran1991/CarND-Capstone
ed0fe33b5c9b8590788ae9def2d0ea5d9c7439ff
[ "MIT" ]
null
null
null
ros/src/tl_detector/light_classification/tl_classifier.py
xueran1991/CarND-Capstone
ed0fe33b5c9b8590788ae9def2d0ea5d9c7439ff
[ "MIT" ]
8
2020-09-26T00:43:15.000Z
2022-02-10T01:12:34.000Z
ros/src/tl_detector/light_classification/tl_classifier.py
xueran1991/CarND-Capstone
ed0fe33b5c9b8590788ae9def2d0ea5d9c7439ff
[ "MIT" ]
null
null
null
from styx_msgs.msg import TrafficLight
27.83871
80
0.531866
from styx_msgs.msg import TrafficLight class TLClassifier(object): def __init__(self): #TODO load classifier self.classes = {0: TrafficLight.RED, 1: TrafficLight.YELLOW, 2: TrafficLight.GREEN, 4: TrafficLight.UNKNOWN}...
227
574
23
0a686e67039c86e26fa0f5cafd4d711b37c9a831
1,593
py
Python
calvinextras/calvinsys/ui/PollingSensor.py
gabrielcercel/calvin-base
c0315f100643230d65aed1745e1c22df3e7a7c2c
[ "Apache-2.0" ]
334
2015-06-04T15:14:28.000Z
2022-02-09T11:14:17.000Z
calvinextras/calvinsys/ui/PollingSensor.py
gabrielcercel/calvin-base
c0315f100643230d65aed1745e1c22df3e7a7c2c
[ "Apache-2.0" ]
89
2015-06-13T19:15:35.000Z
2019-12-03T19:23:20.000Z
calvinextras/calvinsys/ui/PollingSensor.py
gabrielcercel/calvin-base
c0315f100643230d65aed1745e1c22df3e7a7c2c
[ "Apache-2.0" ]
112
2015-06-06T19:16:54.000Z
2020-10-19T01:27:55.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2017 Ericsson AB # # 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 ...
27
75
0.646579
# -*- coding: utf-8 -*- # Copyright (c) 2017 Ericsson AB # # 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 ...
163
0
108
54e892fbf15c2ace4b30f0f0d961e8bfe0a68ee9
762
py
Python
lectures/lecture06/code/contours_demo.py
mateusza/Introduction-to-Python-Numerical-Analysis-for-Engineers-and-Scientist
a27144cc8742e67af215e8de781bd208cc1f7436
[ "MIT" ]
101
2017-11-28T15:08:25.000Z
2022-03-26T13:59:49.000Z
lectures/lecture06/code/contours_demo.py
mateusza/Introduction-to-Python-Numerical-Analysis-for-Engineers-and-Scientist
a27144cc8742e67af215e8de781bd208cc1f7436
[ "MIT" ]
1
2017-12-16T19:41:39.000Z
2017-12-16T19:41:39.000Z
lectures/lecture06/code/contours_demo.py
mateusza/Introduction-to-Python-Numerical-Analysis-for-Engineers-and-Scientist
a27144cc8742e67af215e8de781bd208cc1f7436
[ "MIT" ]
54
2017-12-15T19:19:53.000Z
2022-03-01T23:36:55.000Z
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D x = np.linspace(-2,2,100) y = np.linspace(-1,3,100) #x,y = np.meshgrid(x,y) f = (1.0-x)**2 + (100.0*((y-(x**2))**2)) # plt.figure() # plt.plot(x,y,'ok') # plt.show() plt.figure() plt.contourf(x,y,f,100) plt.colorbar()...
21.771429
64
0.587927
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D x = np.linspace(-2,2,100) y = np.linspace(-1,3,100) #x,y = np.meshgrid(x,y) f = (1.0-x)**2 + (100.0*((y-(x**2))**2)) # plt.figure() # plt.plot(x,y,'ok') # plt.show() plt.figure() plt.contourf(x,y,f,100) plt.colorbar()...
0
0
0
9eb15173c59da128b4256d5127c7999ec40929e8
57
py
Python
__init__.py
Xarrow/tan
b801eb814d767a62df899f9facc2d1bcd3b02d0f
[ "MIT" ]
null
null
null
__init__.py
Xarrow/tan
b801eb814d767a62df899f9facc2d1bcd3b02d0f
[ "MIT" ]
null
null
null
__init__.py
Xarrow/tan
b801eb814d767a62df899f9facc2d1bcd3b02d0f
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- from tan import tancp_cli,tan_cli
19
33
0.684211
# -*- coding:utf-8 -*- from tan import tancp_cli,tan_cli
0
0
0
4a4f0d0d46e7908a0651a785d65a77ce951d30f7
3,469
py
Python
opensand-testbed/configurator.py
jhuwyler/qpep
3b06f02f749cbc14ff9988ad6d9411f0a666f5f9
[ "Unlicense" ]
68
2020-05-09T14:43:20.000Z
2022-01-19T05:26:47.000Z
opensand-testbed/configurator.py
jhuwyler/qpep
3b06f02f749cbc14ff9988ad6d9411f0a666f5f9
[ "Unlicense" ]
6
2020-06-01T11:54:07.000Z
2022-01-18T19:38:10.000Z
opensand-testbed/configurator.py
jhuwyler/qpep
3b06f02f749cbc14ff9988ad6d9411f0a666f5f9
[ "Unlicense" ]
11
2020-05-10T12:40:00.000Z
2022-02-01T23:08:58.000Z
import fileinput import os from dotenv import load_dotenv load_dotenv() if __name__ == '__main__': configure_gateway_container() configure_proxy_st_container() configure_satellite_container() configure_terminal_container() configure_ws_ovpn_container() configure_ws_st_container() configu...
43.3625
144
0.683482
import fileinput import os from dotenv import load_dotenv load_dotenv() def configure_gateway_container(): base_path = 'gateway/config/' conf_file = base_path + 'gw.conf' change_line(conf_file, 22, 'emu_ipv4 = ' + str(os.getenv("EMU_NETWORK_HEAD")) + ".0.3/24") change_line(conf_file, 25, 'lan_ipv4 = ' ...
2,922
0
207
b806de62599e63bdeb512a8d441a43706003e5e9
4,108
py
Python
asm/contrib/middleware.py
fbigun/asm_leancloud
9c52bd7c7eea1cd5f1c60b73ce668e87a60c7b33
[ "MIT" ]
null
null
null
asm/contrib/middleware.py
fbigun/asm_leancloud
9c52bd7c7eea1cd5f1c60b73ce668e87a60c7b33
[ "MIT" ]
null
null
null
asm/contrib/middleware.py
fbigun/asm_leancloud
9c52bd7c7eea1cd5f1c60b73ce668e87a60c7b33
[ "MIT" ]
null
null
null
# coding: utf-8 import os from werkzeug.wrappers import Request, Response from werkzeug.utils import redirect from werkzeug.exceptions import HTTPException, NotFound from . import utils class HTTPMethodOverrideMiddleware(object): """ 使用中间件以接受标准 HTTP 方法 详见:https://gist.github.com/nervouna/47cf9b69484213...
35.721739
113
0.62999
# coding: utf-8 import os from werkzeug.wrappers import Request, Response from werkzeug.utils import redirect from werkzeug.exceptions import HTTPException, NotFound from . import utils class HTTPMethodOverrideMiddleware(object): """ 使用中间件以接受标准 HTTP 方法 详见:https://gist.github.com/nervouna/47cf9b69484213...
2,307
964
206
ddacdab55fdd88b5b8bf51a381aa55b84c9b8415
30,691
py
Python
app/views/dash.py
davideguidobene/cinema-web-app
1a83576a1e37ea69bec2b2a80f584912cfc9b264
[ "MIT" ]
null
null
null
app/views/dash.py
davideguidobene/cinema-web-app
1a83576a1e37ea69bec2b2a80f584912cfc9b264
[ "MIT" ]
null
null
null
app/views/dash.py
davideguidobene/cinema-web-app
1a83576a1e37ea69bec2b2a80f584912cfc9b264
[ "MIT" ]
null
null
null
""" Modulo contenente le route della dashboard amministratori. Le route sono registrate nel Blueprint 'dash', con prefisso '/dashboard'. """ from datetime import datetime, date, timedelta from flask import Blueprint, render_template, abort, request, current_app, flash, redirect, url_for from sqlalchemy.sql import sel...
47.362654
137
0.594865
""" Modulo contenente le route della dashboard amministratori. Le route sono registrate nel Blueprint 'dash', con prefisso '/dashboard'. """ from datetime import datetime, date, timedelta from flask import Blueprint, render_template, abort, request, current_app, flash, redirect, url_for from sqlalchemy.sql import sel...
0
0
0
cecdb9b16325aea86e592d272d691fde9449c2e5
5,528
py
Python
virtualscreening/vina/python/zinc_db.py
rodrigofaccioli/drugdesign
de15880af361a010729b1f4fbc8a75a2b36688a6
[ "Apache-2.0" ]
3
2015-01-19T20:12:59.000Z
2019-02-21T18:43:04.000Z
virtualscreening/vina/python/zinc_db.py
rodrigofaccioli/drugdesign
de15880af361a010729b1f4fbc8a75a2b36688a6
[ "Apache-2.0" ]
22
2015-01-05T16:48:54.000Z
2017-01-21T16:36:10.000Z
virtualscreening/vina/python/zinc_db.py
rodrigofaccioli/drugdesign
de15880af361a010729b1f4fbc8a75a2b36688a6
[ "Apache-2.0" ]
11
2015-03-03T13:32:24.000Z
2020-04-03T11:22:24.000Z
#! /usr/bin/env python """ Routines to extract compounds from ZINC Database: http://zinc.docking.org/ These routines were developed by: Rodrigo Antonio Faccioli - rodrigo.faccioli@usp.br / rodrigo.faccioli@gmail.com Leandro Oliveira Bortot - leandro.bortot@usp.br / leandro.obt@gmail.com """ import...
34.335404
87
0.7339
#! /usr/bin/env python """ Routines to extract compounds from ZINC Database: http://zinc.docking.org/ These routines were developed by: Rodrigo Antonio Faccioli - rodrigo.faccioli@usp.br / rodrigo.faccioli@gmail.com Leandro Oliveira Bortot - leandro.bortot@usp.br / leandro.obt@gmail.com """ import...
1,071
0
94
d4ee3dba7be61d0dbb4a37ed1592777494c8d39b
453
py
Python
spherpro/bromodules/io.py
BodenmillerGroup/spherpro
0bcbc76942c7bae82deddcdc4fa5239e04442553
[ "BSD-3-Clause" ]
1
2020-07-28T13:53:15.000Z
2020-07-28T13:53:15.000Z
spherpro/bromodules/io.py
BodenmillerGroup/spherpro
0bcbc76942c7bae82deddcdc4fa5239e04442553
[ "BSD-3-Clause" ]
null
null
null
spherpro/bromodules/io.py
BodenmillerGroup/spherpro
0bcbc76942c7bae82deddcdc4fa5239e04442553
[ "BSD-3-Clause" ]
null
null
null
import spherpro.bromodules.io_anndata as io_ann import spherpro.bromodules.io_imcfolder as io_imc import spherpro.bromodules.io_masks as io_masks import spherpro.bromodules.io_stackimage as io_stackimage
34.846154
60
0.766004
import spherpro.bromodules.io_anndata as io_ann import spherpro.bromodules.io_imcfolder as io_imc import spherpro.bromodules.io_masks as io_masks import spherpro.bromodules.io_stackimage as io_stackimage class Io(object): def __init__(self, bro): self.masks = io_masks.IoMasks(bro) self.imcimg = io...
203
-4
49
feed07ae1a04187a706f943e8684878a4ff2f736
1,563
py
Python
lab4/evaluate.py
PiotrGrzybowski/SocialMediaAnalysis
b341f7a9134220398cdb65b01ec50c837600d604
[ "Apache-2.0" ]
null
null
null
lab4/evaluate.py
PiotrGrzybowski/SocialMediaAnalysis
b341f7a9134220398cdb65b01ec50c837600d604
[ "Apache-2.0" ]
null
null
null
lab4/evaluate.py
PiotrGrzybowski/SocialMediaAnalysis
b341f7a9134220398cdb65b01ec50c837600d604
[ "Apache-2.0" ]
null
null
null
import numpy as np from keras.models import load_model from keras_preprocessing.sequence import pad_sequences from keras_preprocessing.text import Tokenizer from lab4.utils import clean_text model = load_model('my_model.h5') texts = ['It was my fault I let you control me', 'If I was gone tomorrow would you ...
42.243243
207
0.726807
import numpy as np from keras.models import load_model from keras_preprocessing.sequence import pad_sequences from keras_preprocessing.text import Tokenizer from lab4.utils import clean_text model = load_model('my_model.h5') texts = ['It was my fault I let you control me', 'If I was gone tomorrow would you ...
0
0
0
0a1e6258a9a01cfd78422e6aba910aa5fcd1bed3
6,481
py
Python
monai/networks/nets/regressor.py
function2-llx/MONAI
4cddaa830b61b88ec78e089bb5f21e05bb1a78f4
[ "Apache-2.0" ]
3
2020-06-22T20:59:14.000Z
2021-04-09T21:24:45.000Z
monai/networks/nets/regressor.py
Borda/MONAI
e0db5a564225a7cb62e7a23df97267019006302f
[ "Apache-2.0" ]
null
null
null
monai/networks/nets/regressor.py
Borda/MONAI
e0db5a564225a7cb62e7a23df97267019006302f
[ "Apache-2.0" ]
1
2020-06-22T19:22:59.000Z
2020-06-22T19:22:59.000Z
# Copyright (c) MONAI Consortium # 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, so...
42.638158
118
0.666872
# Copyright (c) MONAI Consortium # 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, so...
1,877
0
81
603db62efc3b52f04d810e4b8a22a29ae849a752
759
py
Python
fastmot/utils/profiler.py
taquanghung1705199/FastMOT
c822e0154a8cb541fa9a9a5015090058c04622bb
[ "MIT" ]
1
2021-07-13T07:01:30.000Z
2021-07-13T07:01:30.000Z
fastmot/utils/profiler.py
taquanghung1705199/FastMOT
c822e0154a8cb541fa9a9a5015090058c04622bb
[ "MIT" ]
1
2021-12-23T07:26:12.000Z
2021-12-23T07:26:12.000Z
fastmot/utils/profiler.py
taquanghung1705199/FastMOT
c822e0154a8cb541fa9a9a5015090058c04622bb
[ "MIT" ]
1
2021-06-24T13:49:09.000Z
2021-06-24T13:49:09.000Z
import time from collections import Counter
26.172414
59
0.633729
import time from collections import Counter class Profiler: __call_count = Counter() __time_elapsed = Counter() def __init__(self, name, aggregate=False): self.name = name if not aggregate: Profiler.__call_count[self.name] += 1 def __enter__(self): self.start = ti...
512
179
23
1d64b2a42ad57672defc16a4a878fa3ecad0782c
5,219
py
Python
perc_tester.py
gregtucker/percolator
9e699c8ab485369e762590d83583a5bc31ec23be
[ "MIT" ]
null
null
null
perc_tester.py
gregtucker/percolator
9e699c8ab485369e762590d83583a5bc31ec23be
[ "MIT" ]
null
null
null
perc_tester.py
gregtucker/percolator
9e699c8ab485369e762590d83583a5bc31ec23be
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Jun 21 20:22:37 2018 @author: gtucker """ import sys import numpy as np from percolation import Percolator FULL = 1 # code for full cell in 'cell' array, used for plotting (only) class PercTester(object): """A PercTester implements testing of ...
29.320225
78
0.538609
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Jun 21 20:22:37 2018 @author: gtucker """ import sys import numpy as np from percolation import Percolator FULL = 1 # code for full cell in 'cell' array, used for plotting (only) class PercTester(object): """A PercTester implements testing of ...
0
0
0
75c033e16bfe37cd9fafd00b21361d4380e4b526
1,134
py
Python
pype/standalonepublish/standalonepublish_module.py
tws0002/pype
80b1aad9990f6c7efabf0430a3da6633054bf4a8
[ "MIT" ]
null
null
null
pype/standalonepublish/standalonepublish_module.py
tws0002/pype
80b1aad9990f6c7efabf0430a3da6633054bf4a8
[ "MIT" ]
null
null
null
pype/standalonepublish/standalonepublish_module.py
tws0002/pype
80b1aad9990f6c7efabf0430a3da6633054bf4a8
[ "MIT" ]
null
null
null
import os from .app import show from .widgets import QtWidgets import pype import pyblish.api
28.35
64
0.645503
import os from .app import show from .widgets import QtWidgets import pype import pyblish.api class StandAlonePublishModule: PUBLISH_PATHS = [] def __init__(self, main_parent=None, parent=None): self.main_parent = main_parent self.parent_widget = parent self.PUBLISH_PATHS.append(os.pa...
849
167
23
6593eb8058ea16808750452054b11e25b63d5aa0
23,643
py
Python
rplugin/python3/deoplete/resources/meld_mj_refman.py
poppyschmo/deoplete-latex
0118ade4e2e8ca7dd5b162a92dfb238b0817ca3e
[ "MIT" ]
18
2017-04-24T09:35:47.000Z
2020-03-23T02:55:22.000Z
rplugin/python3/deoplete/resources/meld_mj_refman.py
poppyschmo/deoplete-latex
0118ade4e2e8ca7dd5b162a92dfb238b0817ca3e
[ "MIT" ]
4
2017-02-03T08:57:02.000Z
2019-12-12T07:54:05.000Z
rplugin/python3/deoplete/resources/meld_mj_refman.py
poppyschmo/deoplete-latex
0118ade4e2e8ca7dd5b162a92dfb238b0817ca3e
[ "MIT" ]
null
null
null
#!/bin/python3 # The aim of this script is to reorganize everything from ``update_mathjax.js`` # and ``get_refman`` by package, roughly mimicking the layout exported by # ``get_cwl``. Anything not in a known package can follow two routes: If # tagged with a ``KaTeX`` or ``MathJax`` meta tag, it'll get dumped in the #...
44.110075
79
0.534069
#!/bin/python3 # The aim of this script is to reorganize everything from ``update_mathjax.js`` # and ``get_refman`` by package, roughly mimicking the layout exported by # ``get_cwl``. Anything not in a known package can follow two routes: If # tagged with a ``KaTeX`` or ``MathJax`` meta tag, it'll get dumped in the #...
16,800
0
182
c43a3c2450e4c6b2008b231c0677034e7c91ce2e
6,815
py
Python
others/planck.py
nineties/planckforth
4337cedd5f8fb9a900f823a3b5ef2263a854caaf
[ "MIT" ]
225
2021-01-13T15:27:28.000Z
2022-03-20T22:19:31.000Z
others/planck.py
eblanton/planckforth
725b09d3faf7e6292b35afe5d2286fd440ccfb7c
[ "MIT" ]
3
2021-01-20T22:40:31.000Z
2021-12-06T14:00:02.000Z
others/planck.py
eblanton/planckforth
725b09d3faf7e6292b35afe5d2286fd440ccfb7c
[ "MIT" ]
9
2021-01-20T15:37:09.000Z
2022-02-16T01:21:16.000Z
#!/usr/bin/env python3 # planck - # Copyright (C) 2021 nineties # import os import sys import operator import array import ctypes import platform RUNTIME_NAME = "Python {}".format(platform.python_version()) COPYRIGHT = "Copyright (c) 2021 Koichi Nakamura <koichi@idein.jp>" VERSION = "{}:{}".format(RUNTIME_NAME, COP...
22.792642
73
0.633309
#!/usr/bin/env python3 # planck - # Copyright (C) 2021 nineties # import os import sys import operator import array import ctypes import platform RUNTIME_NAME = "Python {}".format(platform.python_version()) COPYRIGHT = "Copyright (c) 2021 Koichi Nakamura <koichi@idein.jp>" VERSION = "{}:{}".format(RUNTIME_NAME, COP...
2,895
0
814
1e436623a443d39d0f88b9cdb14e9c2756899a54
1,317
py
Python
vhs_stitcher/image_editing.py
babichjacob/vhs-stitcher
b09793c951949475dc6a6ff24b3178b13d355a9b
[ "MIT" ]
null
null
null
vhs_stitcher/image_editing.py
babichjacob/vhs-stitcher
b09793c951949475dc6a6ff24b3178b13d355a9b
[ "MIT" ]
3
2022-01-13T02:37:59.000Z
2022-03-16T23:39:51.000Z
vhs_stitcher/image_editing.py
babichjacob/vhs-stitcher
b09793c951949475dc6a6ff24b3178b13d355a9b
[ "MIT" ]
null
null
null
from typing import Dict from uuid import uuid4 from imageio import imread, imwrite from numpy import array, hstack, ndarray, subtract from PIL import Image from PIL.Image import Image as ImageType from PIL.ImageFilter import FIND_EDGES, GaussianBlur from tqdm import tqdm from . import IMAGE_SIZE_LARGE, IMAGE_SIZE_SMA...
28.021277
70
0.732726
from typing import Dict from uuid import uuid4 from imageio import imread, imwrite from numpy import array, hstack, ndarray, subtract from PIL import Image from PIL.Image import Image as ImageType from PIL.ImageFilter import FIND_EDGES, GaussianBlur from tqdm import tqdm from . import IMAGE_SIZE_LARGE, IMAGE_SIZE_SMA...
54
0
23
daf0edb1e825a66a3475a509fd7bca5a4ed45f98
1,115
py
Python
try_controls/try5_frame/try2_frame_layout.py
ashidagithub/HJDS201909LB
9e78b3cf4904f9f8af841db0032b66bc2f4f6fea
[ "Apache-2.0" ]
null
null
null
try_controls/try5_frame/try2_frame_layout.py
ashidagithub/HJDS201909LB
9e78b3cf4904f9f8af841db0032b66bc2f4f6fea
[ "Apache-2.0" ]
null
null
null
try_controls/try5_frame/try2_frame_layout.py
ashidagithub/HJDS201909LB
9e78b3cf4904f9f8af841db0032b66bc2f4f6fea
[ "Apache-2.0" ]
null
null
null
# -*- coding: UTF-8 -*- # ------------------------(max to 80 columns)----------------------------------- # author by : (学员ID) # created: 2019.11 # Description: # 初步学习 WinForm 编程 ( Frame ) # ------------------------(max to 80 columns)----------------------------------- import tkinter as tk from tkinter import ttk ...
23.723404
88
0.573991
# -*- coding: UTF-8 -*- # ------------------------(max to 80 columns)----------------------------------- # author by : (学员ID) # created: 2019.11 # Description: # 初步学习 WinForm 编程 ( Frame ) # ------------------------(max to 80 columns)----------------------------------- import tkinter as tk from tkinter import ttk ...
0
0
0
36726aae0d193cfa6543569ed4cf296c0756dec1
7,704
py
Python
py-worker/lib/worker.py
pwegrzyn/wegpat-gmail.com
3fce9d0bc32c1d6be94cd664eb13a69255975fd0
[ "MIT" ]
null
null
null
py-worker/lib/worker.py
pwegrzyn/wegpat-gmail.com
3fce9d0bc32c1d6be94cd664eb13a69255975fd0
[ "MIT" ]
5
2021-09-02T12:22:08.000Z
2022-03-02T09:15:20.000Z
py-worker/lib/worker.py
pwegrzyn/wegpat-gmail.com
3fce9d0bc32c1d6be94cd664eb13a69255975fd0
[ "MIT" ]
null
null
null
import json import pickle import logging import datetime import time from datetime import timedelta from geopy.distance import great_circle import requests logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class PyWorker: """ Represents a Python process acting as worker (listening for job...
43.039106
129
0.596314
import json import pickle import logging import datetime import time from datetime import timedelta from geopy.distance import great_circle import requests logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class PyWorker: """ Represents a Python process acting as worker (listening for job...
7,186
0
162
ade988b1282385a6b1e0d7ef57621bf4895b5d5f
5,022
py
Python
lib/topology_test.py
724686158/cisot_network_monitor
aeed862ce044aa65baa815f7c25ee4a650add432
[ "MIT" ]
1
2021-12-22T07:18:43.000Z
2021-12-22T07:18:43.000Z
lib/topology_test.py
724686158/cisot_network_monitor
aeed862ce044aa65baa815f7c25ee4a650add432
[ "MIT" ]
null
null
null
lib/topology_test.py
724686158/cisot_network_monitor
aeed862ce044aa65baa815f7c25ee4a650add432
[ "MIT" ]
null
null
null
# # Copyright (c) 2020 by Ilya Tsyganov, Ryazan State Radio Engineering University. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rig...
33.704698
81
0.644962
# # Copyright (c) 2020 by Ilya Tsyganov, Ryazan State Radio Engineering University. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rig...
3,264
82
385
eb6aef4e5460cbbb2cec761cb41ef3aae550bdf1
1,127
py
Python
mhn_api/stats.py
pcodes/mhn_interface
d9082b0be709c3de9effee6fad25f4df376bbc07
[ "MIT" ]
null
null
null
mhn_api/stats.py
pcodes/mhn_interface
d9082b0be709c3de9effee6fad25f4df376bbc07
[ "MIT" ]
null
null
null
mhn_api/stats.py
pcodes/mhn_interface
d9082b0be709c3de9effee6fad25f4df376bbc07
[ "MIT" ]
null
null
null
import requests from django.conf import settings
23.978723
66
0.681455
import requests from django.conf import settings def get_request(params): if settings.DEBUG: api_key = {'api_key': settings.MHN_DEV_KEY} else: api_key = {'api_key': settings.MHN_API_KEY} base_url = settings.MHN_URL if not params: request = api_key else: request = {...
956
0
115
55a3c93070b621c0b7fb7c198286f5b653537268
1,704
py
Python
spdlog/conanfile.py
kapilsh/conan-scripts
31c55397a2d721c80da5dbd6a6c738accfdbb241
[ "MIT" ]
null
null
null
spdlog/conanfile.py
kapilsh/conan-scripts
31c55397a2d721c80da5dbd6a6c738accfdbb241
[ "MIT" ]
null
null
null
spdlog/conanfile.py
kapilsh/conan-scripts
31c55397a2d721c80da5dbd6a6c738accfdbb241
[ "MIT" ]
null
null
null
import sys import os import shutil from conans import ConanFile, CMake from conans.tools import download, unzip sys.path.append( os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
29.37931
76
0.643192
import sys import os import shutil from conans import ConanFile, CMake from conans.tools import download, unzip sys.path.append( os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) class SpdLogConan(ConanFile): with open(os.path.join(os.path.dirname(os.path.realpath( __file__)), "VER...
849
632
23
3bfcfcfcc87907df2ad5394bf1ceff7df5e07fe0
950
py
Python
basic/m_unittest/prac_unittest.py
plerin/playground_with_python
221362b47e456656749455d82bb3c611fa8f4440
[ "MIT" ]
null
null
null
basic/m_unittest/prac_unittest.py
plerin/playground_with_python
221362b47e456656749455d82bb3c611fa8f4440
[ "MIT" ]
null
null
null
basic/m_unittest/prac_unittest.py
plerin/playground_with_python
221362b47e456656749455d82bb3c611fa8f4440
[ "MIT" ]
null
null
null
import unittest import os import for_unittest if __name__ == '__main__': unittest.main()
21.111111
66
0.626316
import unittest import os import for_unittest class MyCalcTest(unittest.TestCase): def test_add(self): c = for_unittest.add(20, 10) self.assertEqual(c, 30) def test_substract(self): c = for_unittest.substract(20, 10) self.assertEqual(c, 10) class MyUtilTest(unittest.TestCas...
521
232
100
05d5cfdbbe3c961ee304c3907a509a6901453052
629
py
Python
balances.py
sangminem/bitcoin_auto_trade_with_ai
6f630e5e8c88c3c91feb224377740a6117443710
[ "MIT" ]
1
2022-03-23T10:47:35.000Z
2022-03-23T10:47:35.000Z
balances.py
sangminem/bitcoin_auto_trade_with_ai
6f630e5e8c88c3c91feb224377740a6117443710
[ "MIT" ]
null
null
null
balances.py
sangminem/bitcoin_auto_trade_with_ai
6f630e5e8c88c3c91feb224377740a6117443710
[ "MIT" ]
null
null
null
from util import get_index balances = [{'currency':'KRW','balance':50000000}]
26.208333
66
0.643879
from util import get_index balances = [{'currency':'KRW','balance':50000000}] def get_balances(): return balances def get_balance_index(ticker, balances): value = 'KRW' if ticker != 'KRW': value = ticker[4:] return get_index(balances, 'currency', value) def get_krw_balance(balances): ret...
459
0
92
4e426555fde991826ad3086a4d8d6d84be416838
6,132
py
Python
src/panoptes/pocs/focuser/astromechanics.py
ASTROGBAE/POCS
ddbc716ba375be92c7af1c8ebd536f9cdbc899da
[ "MIT" ]
null
null
null
src/panoptes/pocs/focuser/astromechanics.py
ASTROGBAE/POCS
ddbc716ba375be92c7af1c8ebd536f9cdbc899da
[ "MIT" ]
null
null
null
src/panoptes/pocs/focuser/astromechanics.py
ASTROGBAE/POCS
ddbc716ba375be92c7af1c8ebd536f9cdbc899da
[ "MIT" ]
null
null
null
from panoptes.pocs.focuser.serial import AbstractSerialFocuser class Focuser(AbstractSerialFocuser): """ Focuser class for control of a Canon DSLR lens via an Astromechanics Engineering Canon EF/EF-S adapter. Args: name (str, optional): default 'Astromechanics Focuser' model (str, optiona...
36.284024
107
0.561155
from panoptes.pocs.focuser.serial import AbstractSerialFocuser class Focuser(AbstractSerialFocuser): """ Focuser class for control of a Canon DSLR lens via an Astromechanics Engineering Canon EF/EF-S adapter. Args: name (str, optional): default 'Astromechanics Focuser' model (str, optiona...
1,315
0
135
9886f6ef61ce8671578994a8e3555d6131699f26
444
py
Python
jp.atcoder/abc129/abc129_c/10071155.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc129/abc129_c/10071155.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc129/abc129_c/10071155.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import sys MOD = 10 ** 9 + 7 n, m, *a = map(int, sys.stdin.read().split()) broken = set(a) if __name__ == '__main__': ans = main() print(ans)
17.76
46
0.432432
import sys MOD = 10 ** 9 + 7 n, m, *a = map(int, sys.stdin.read().split()) broken = set(a) def main(): res = [None] * (n + 1) res[0] = 1 res[1] = 0 if 1 in broken else 1 for i in range(2, n+1): if i in broken: res[i] = 0 else: res[i] = res[i-2]...
257
0
25
9ed89eff6be6e5103bb75d986d93c4932e9935d4
4,772
py
Python
spider/spider/spiders/customer_report.py
wederribas/bigpy-crawler
58cef9a0dbaf327d7fc18503d30b821b5f9b07f7
[ "MIT" ]
null
null
null
spider/spider/spiders/customer_report.py
wederribas/bigpy-crawler
58cef9a0dbaf327d7fc18503d30b821b5f9b07f7
[ "MIT" ]
4
2021-03-31T18:45:45.000Z
2022-03-02T14:55:24.000Z
spider/spider/spiders/customer_report.py
wederribas/bigpy-customer-reports-spider
58cef9a0dbaf327d7fc18503d30b821b5f9b07f7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import scrapy from scrapy.loader import ItemLoader from scrapy.exceptions import CloseSpider from spider.items import Report class CustomerReports(scrapy.Spider): """Spider that retrieves raw customer reports about companies. This spider reaches the consumidor.gov.br website to craw...
37.28125
86
0.583403
# -*- coding: utf-8 -*- import scrapy from scrapy.loader import ItemLoader from scrapy.exceptions import CloseSpider from spider.items import Report class CustomerReports(scrapy.Spider): """Spider that retrieves raw customer reports about companies. This spider reaches the consumidor.gov.br website to craw...
0
0
0
c065b5aa259b99c2bd6329f5cb3052beebc1d768
4,107
py
Python
episcan/database.py
eliottness/episcan
aee955fa87488a0945f4e8947b49b9dc9b37a0ba
[ "MIT" ]
3
2020-07-14T15:07:27.000Z
2021-09-06T09:50:10.000Z
episcan/database.py
eliottness/episcan
aee955fa87488a0945f4e8947b49b9dc9b37a0ba
[ "MIT" ]
1
2020-07-30T16:32:55.000Z
2020-08-03T12:37:08.000Z
episcan/database.py
eliottness/episcan
aee955fa87488a0945f4e8947b49b9dc9b37a0ba
[ "MIT" ]
null
null
null
import sqlite3 import time import datetime as dt from episcan.manga import Manga __doc__ = r''' CREATE TABLE "manga_list" ( "filename" TEXT NOT NULL, "name" TEXT NOT NULL, "nb_chap" INTEGER NOT NULL, "last_update" TEXT NOT NULL, "added_date" TEXT NOT NULL, "image_path" TEXT,...
28.72028
102
0.557828
import sqlite3 import time import datetime as dt from episcan.manga import Manga __doc__ = r''' CREATE TABLE "manga_list" ( "filename" TEXT NOT NULL, "name" TEXT NOT NULL, "nb_chap" INTEGER NOT NULL, "last_update" TEXT NOT NULL, "added_date" TEXT NOT NULL, "image_path" TEXT,...
1,727
2,000
23
1f3ec2a0571c3f4999908f398af1800792cf9cd9
53
py
Python
docker/axonius/verify.py
MySMBTech/dockerfiles
6bdd4c874b4d2c33114b917cad4cf9d6d267dd97
[ "MIT" ]
48
2018-12-12T12:18:09.000Z
2022-03-05T02:23:42.000Z
docker/axonius/verify.py
Axonius/dockerfiles
f2135e9abb468ee8db339ec27b2ba737acbbaef6
[ "MIT" ]
7,201
2018-12-24T17:14:17.000Z
2022-03-31T13:39:12.000Z
docker/axonius/verify.py
Axonius/dockerfiles
f2135e9abb468ee8db339ec27b2ba737acbbaef6
[ "MIT" ]
94
2018-12-17T10:59:21.000Z
2022-03-29T12:59:30.000Z
import axonius_api_client as axonapi print(axonapi)
13.25
36
0.849057
import axonius_api_client as axonapi print(axonapi)
0
0
0
2e3d9f4ce43db864ff7b33e2aca93317fdf49b8c
1,481
py
Python
YTools/experiment_helper/logger.py
FFTYYY/YTools
f1de3ebd913a1c66e5a82d53562cef2ab71f3255
[ "MIT" ]
1
2020-05-31T08:12:54.000Z
2020-05-31T08:12:54.000Z
YTools/experiment_helper/logger.py
FFTYYY/YTools
f1de3ebd913a1c66e5a82d53562cef2ab71f3255
[ "MIT" ]
null
null
null
YTools/experiment_helper/logger.py
FFTYYY/YTools
f1de3ebd913a1c66e5a82d53562cef2ab71f3255
[ "MIT" ]
null
null
null
from .watch_time import my_clock from ..universe.strlen import last_len import time class Logger: '''自动日志。 参数: mode:一个函数,代表输出方向。"write"表示向文件写 log_path:日志文件的位置。如果选了"write"的话必须填此项。如果打开了文件最后一定要调用close() append:往末尾添加哪些信息。clock表示当前运行秒数,time表示当前时间,也可以用其他函数 方法: log:输出一个字符串 close:关闭文件 ''' def add_line(self , n...
20.569444
95
0.634031
from .watch_time import my_clock from ..universe.strlen import last_len import time class Logger: '''自动日志。 参数: mode:一个函数,代表输出方向。"write"表示向文件写 log_path:日志文件的位置。如果选了"write"的话必须填此项。如果打开了文件最后一定要调用close() append:往末尾添加哪些信息。clock表示当前运行秒数,time表示当前时间,也可以用其他函数 方法: log:输出一个字符串 close:关闭文件 ''' def __init__(self , mo...
960
0
95
ecc8cd95821dfca0cf57884f78f249761decfdae
1,724
py
Python
Scripts/Python/ip_info/ip_info.py
hajdaini/Docker
a8a72a52aef4b8296a5ec74d8f3e1fe960ca50d8
[ "Apache-2.0" ]
null
null
null
Scripts/Python/ip_info/ip_info.py
hajdaini/Docker
a8a72a52aef4b8296a5ec74d8f3e1fe960ca50d8
[ "Apache-2.0" ]
null
null
null
Scripts/Python/ip_info/ip_info.py
hajdaini/Docker
a8a72a52aef4b8296a5ec74d8f3e1fe960ca50d8
[ "Apache-2.0" ]
null
null
null
import os import subprocess subnet = cmd(['docker', 'network', 'inspect', 'bridge' ,"--format", "'{{range .IPAM.Config}}{{.Subnet}}{{end}}'"]) gateway = cmd(['docker', 'network', 'inspect', 'bridge' ,"--format", "'{{range .IPAM.Config}}{{.Gateway}}{{end}}'"]) bridge_name = get_bridge_name() ids = cmd(["docker", "...
38.311111
117
0.596868
import os import subprocess def cmd(cmd, listed=False): output = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) correct_output = output.communicate()[0].decode().replace('\'', '').splitlines() if listed: return correct_output else: return correct_output[0] ...
459
0
46
539ad2411e0e6ed3afbfa7b8ed9cd40fdadf7bee
651
py
Python
services/core-api/app/api/parties/party/models/sub_division_code.py
bcgov/mds
6c427a66a5edb4196222607291adef8fd6677038
[ "Apache-2.0" ]
25
2018-07-09T19:04:37.000Z
2022-03-15T17:27:10.000Z
services/core-api/app/api/parties/party/models/sub_division_code.py
areyeslo/mds
e8c38e593e09b78e2a57009c0d003d6c4bfa32e6
[ "Apache-2.0" ]
983
2018-04-25T20:08:07.000Z
2022-03-31T21:45:20.000Z
services/core-api/app/api/parties/party/models/sub_division_code.py
areyeslo/mds
e8c38e593e09b78e2a57009c0d003d6c4bfa32e6
[ "Apache-2.0" ]
58
2018-05-15T22:35:50.000Z
2021-11-29T19:40:52.000Z
from app.extensions import db from app.api.utils.models_mixins import AuditMixin, Base from sqlalchemy.schema import FetchedValue
32.55
85
0.743472
from app.extensions import db from app.api.utils.models_mixins import AuditMixin, Base from sqlalchemy.schema import FetchedValue class SubDivisionCode(AuditMixin, Base): __tablename__ = 'sub_division_code' sub_division_code = db.Column(db.String, nullable=False, primary_key=True) description = db.Column...
88
408
23
72cbed733a08fd3cddda49b710f07f7fe47b5fad
3,182
py
Python
examples/model_persistence.py
alexlib/piecewise_linear_fit_py
cb32e331690e668b374a54f890eac549d884b2fe
[ "MIT" ]
199
2017-10-31T10:26:15.000Z
2022-03-30T09:16:52.000Z
examples/model_persistence.py
alexlib/piecewise_linear_fit_py
cb32e331690e668b374a54f890eac549d884b2fe
[ "MIT" ]
79
2017-10-31T10:26:12.000Z
2022-03-31T18:46:24.000Z
examples/model_persistence.py
alexlib/piecewise_linear_fit_py
cb32e331690e668b374a54f890eac549d884b2fe
[ "MIT" ]
54
2017-11-09T06:50:34.000Z
2022-03-09T06:15:54.000Z
# import our libraries import numpy as np import pwlf # if you use Python 2.x you should import cPickle # import cPickle as pickle # if you use Python 3.x you can just use pickle import pickle # your data y = np.array([0.00000000e+00, 9.69801700e-03, 2.94350340e-02, 4.39052750e-02, 5.45343950e-02, 6.741...
46.115942
75
0.617536
# import our libraries import numpy as np import pwlf # if you use Python 2.x you should import cPickle # import cPickle as pickle # if you use Python 3.x you can just use pickle import pickle # your data y = np.array([0.00000000e+00, 9.69801700e-03, 2.94350340e-02, 4.39052750e-02, 5.45343950e-02, 6.741...
0
0
0
6a1f7c4e42ac93a73b4ec127f9f410189208c72f
8,016
py
Python
datasets/robot_car.py
liaojh1998/RNW
412764400a4a555fb8245ab51047019429d1141f
[ "MIT" ]
46
2021-07-28T11:09:24.000Z
2022-03-05T07:48:50.000Z
datasets/robot_car.py
liaojh1998/RNW
412764400a4a555fb8245ab51047019429d1141f
[ "MIT" ]
10
2021-09-27T00:26:26.000Z
2022-03-31T13:28:12.000Z
datasets/robot_car.py
liaojh1998/RNW
412764400a4a555fb8245ab51047019429d1141f
[ "MIT" ]
6
2021-11-18T08:06:12.000Z
2022-03-22T13:46:53.000Z
import os import numpy as np import cv2 import torch import torch.nn.functional as F from torch.utils.data import Dataset from utils import read_list_from_file from transforms import ResizeWithIntrinsic, RandomHorizontalFlipWithIntrinsic, CenterCropWithIntrinsic, EqualizeHist from torchvision.transforms import ToTenso...
34.551724
116
0.558009
import os import numpy as np import cv2 import torch import torch.nn.functional as F from torch.utils.data import Dataset from utils import read_list_from_file from transforms import ResizeWithIntrinsic, RandomHorizontalFlipWithIntrinsic, CenterCropWithIntrinsic, EqualizeHist from torchvision.transforms import ToTenso...
1,509
0
54
00a711daf1dd9eabeedd551a568acd0430c7d948
1,653
py
Python
tests/test_handlers.py
edaniszewski/sanic-healthcheck
25acc8c7fe71a9802ad83f95c5ed01354fc868fb
[ "MIT" ]
3
2020-07-17T05:19:17.000Z
2022-02-20T04:16:48.000Z
tests/test_handlers.py
edaniszewski/sanic-healthcheck
25acc8c7fe71a9802ad83f95c5ed01354fc868fb
[ "MIT" ]
null
null
null
tests/test_handlers.py
edaniszewski/sanic-healthcheck
25acc8c7fe71a9802ad83f95c5ed01354fc868fb
[ "MIT" ]
null
null
null
import json import math import time from sanic_healthcheck import handlers
22.643836
60
0.656382
import json import math import time from sanic_healthcheck import handlers def test_json_success_handler(): results = [ {'test': 'foo'}, {'test': 'bar'}, ] now = time.time() actual = handlers.json_success_handler(results) assert isinstance(actual, str) loaded = json.loads(...
1,480
0
92
86a69f5a2797be23c8b76b5db9d92f48a6c44ff9
3,721
py
Python
budget-rnn/src/test.py
tejaskannan/ml-models
ad5acad2c0ce75773062ffcdff088a6fbe5ffc17
[ "Apache-2.0" ]
1
2021-06-28T15:40:41.000Z
2021-06-28T15:40:41.000Z
budget-rnn/src/test.py
tejaskannan/ml-models
ad5acad2c0ce75773062ffcdff088a6fbe5ffc17
[ "Apache-2.0" ]
5
2021-03-04T19:42:15.000Z
2022-02-10T05:46:15.000Z
budget-rnn/src/test.py
tejaskannan/budget-rnn
ad5acad2c0ce75773062ffcdff088a6fbe5ffc17
[ "Apache-2.0" ]
null
null
null
import re import os import sys from argparse import ArgumentParser from typing import Optional from models.model_factory import get_model from dataset.dataset_factory import get_dataset from dataset.dataset import DataSeries from utils.hyperparameters import HyperParameters from utils.file_utils import extract_model_n...
45.378049
187
0.730986
import re import os import sys from argparse import ArgumentParser from typing import Optional from models.model_factory import get_model from dataset.dataset_factory import get_dataset from dataset.dataset import DataSeries from utils.hyperparameters import HyperParameters from utils.file_utils import extract_model_n...
2,392
0
46
53d019e7100270336744f17700a97396ec2731a0
14,557
py
Python
mindspore/python/mindspore/scipy/optimize/line_search.py
zimo-geek/mindspore
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
[ "Apache-2.0" ]
1
2021-12-27T13:42:29.000Z
2021-12-27T13:42:29.000Z
mindspore/python/mindspore/scipy/optimize/line_search.py
zimo-geek/mindspore
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
[ "Apache-2.0" ]
null
null
null
mindspore/python/mindspore/scipy/optimize/line_search.py
zimo-geek/mindspore
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
39.882192
105
0.553067
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
4,563
0
27
58d0c948fc8c5606d9536bb9d289ba5d2a086256
2,658
py
Python
src/viz_kamada.py
akcube/risk-averse-routing
bcf2e31dfb4043362dabd5fd243e536b1bb068cf
[ "MIT" ]
null
null
null
src/viz_kamada.py
akcube/risk-averse-routing
bcf2e31dfb4043362dabd5fd243e536b1bb068cf
[ "MIT" ]
null
null
null
src/viz_kamada.py
akcube/risk-averse-routing
bcf2e31dfb4043362dabd5fd243e536b1bb068cf
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import networkx as nx edgeListRaw = [] pathList = [] label = {} weights = [] col = [] edgeTraffic = {} maxw = 0 minw = 999999999 # Reading path from file textFile = open("src/data/path.txt", "r") data = textFile.read().split() for r in range(1,len(data)-1): pathList.append((int(d...
23.315789
91
0.63544
import matplotlib.pyplot as plt import networkx as nx edgeListRaw = [] pathList = [] label = {} weights = [] col = [] edgeTraffic = {} maxw = 0 minw = 999999999 # Reading path from file textFile = open("src/data/path.txt", "r") data = textFile.read().split() for r in range(1,len(data)-1): pathList.append((int(d...
0
0
0
c4a5d4cbc7dc387bb3a14363294e36a800ab3472
398
py
Python
tftutorials/tf.py
bahalbach/nbaproject
b2336452ebefa1251dee9ff19a6f189756c5a3dd
[ "MIT" ]
null
null
null
tftutorials/tf.py
bahalbach/nbaproject
b2336452ebefa1251dee9ff19a6f189756c5a3dd
[ "MIT" ]
null
null
null
tftutorials/tf.py
bahalbach/nbaproject
b2336452ebefa1251dee9ff19a6f189756c5a3dd
[ "MIT" ]
null
null
null
# %% from tensorflow import keras (x_train, y_train), (x_test, y_test) = keras.datasets.fashion_mnist.load_data() model = keras.models.Sequential([ keras.layers.Flatten(input_shape=[28, 28]), keras.layers.Dense(128, activation='relu'), keras.layers.Dense(10, activation='softmax') ]) model.compile(loss=ke...
24.875
79
0.731156
# %% from tensorflow import keras (x_train, y_train), (x_test, y_test) = keras.datasets.fashion_mnist.load_data() model = keras.models.Sequential([ keras.layers.Flatten(input_shape=[28, 28]), keras.layers.Dense(128, activation='relu'), keras.layers.Dense(10, activation='softmax') ]) model.compile(loss=ke...
0
0
0
7e9e9d6c80f0e952a1b3bf7194bdd45240a55a13
5,784
py
Python
b2sdk/account_info/in_memory.py
jhart-r7/b2-sdk-python
d995013768ee9816244d1a6ce49ea6d91014982f
[ "MIT" ]
null
null
null
b2sdk/account_info/in_memory.py
jhart-r7/b2-sdk-python
d995013768ee9816244d1a6ce49ea6d91014982f
[ "MIT" ]
null
null
null
b2sdk/account_info/in_memory.py
jhart-r7/b2-sdk-python
d995013768ee9816244d1a6ce49ea6d91014982f
[ "MIT" ]
null
null
null
###################################################################### # # File: b2sdk/account_info/in_memory.py # # Copyright 2019 Backblaze Inc. All Rights Reserved. # # License https://www.backblaze.com/using_b2_code.html # ###################################################################### from .exception impor...
27.674641
77
0.624827
###################################################################### # # File: b2sdk/account_info/in_memory.py # # Copyright 2019 Backblaze Inc. All Rights Reserved. # # License https://www.backblaze.com/using_b2_code.html # ###################################################################### from .exception impor...
1,321
0
107
5052f2f2e0f1ee20801e850ce72641f08f6fadf7
2,242
py
Python
core/views.py
hossainchisty/Multi-Vendor-eCommerce
42c5f62b8b098255cc9ea57858d3cc7de94bd76a
[ "MIT" ]
16
2021-09-22T19:08:28.000Z
2022-03-18T18:57:02.000Z
core/views.py
hossainchisty/Multi-Vendor-eCommerce
42c5f62b8b098255cc9ea57858d3cc7de94bd76a
[ "MIT" ]
6
2021-09-30T12:36:02.000Z
2022-03-18T22:18:00.000Z
core/views.py
hossainchisty/Multi-Vendor-eCommerce
42c5f62b8b098255cc9ea57858d3cc7de94bd76a
[ "MIT" ]
6
2021-12-06T02:04:51.000Z
2022-03-13T14:38:14.000Z
from django.contrib import messages from django.db.models import Q from django.http import Http404, JsonResponse from django.shortcuts import redirect, render from django.views.decorators.cache import cache_page from product.models import Product from .models import Contact @cache_page(60 * 60) def sear...
31.138889
84
0.614184
from django.contrib import messages from django.db.models import Q from django.http import Http404, JsonResponse from django.shortcuts import redirect, render from django.views.decorators.cache import cache_page from product.models import Product from .models import Contact def home(request): products...
150
0
50
00ed618645431bf8437d1eb81b128ff166b84cfb
570
py
Python
feed/spiders/day/nginx_spider.py
bzd111/oh-my-rss
e81beb66e5e51f8a7d100b2c506111138d17451a
[ "MIT" ]
2
2020-10-02T07:38:43.000Z
2021-06-29T07:32:15.000Z
feed/spiders/day/nginx_spider.py
virtual-emperor/oh-my-rss
3e04899aba4dec27026f67e44193ca8f1eca616a
[ "MIT" ]
null
null
null
feed/spiders/day/nginx_spider.py
virtual-emperor/oh-my-rss
3e04899aba4dec27026f67e44193ca8f1eca616a
[ "MIT" ]
null
null
null
from feed.spiders.spider import Spider
31.666667
91
0.445614
from feed.spiders.spider import Spider class NginxSpider(Spider): name = 'nginx' def __init__(self): Spider.__init__(self, start_urls=[ 'http://www.nginx.cn', ], index_xpath="//div[@class='post']/h2/a...
455
51
23
f2d69c4c18942c325518663c68c92a2b0083ae54
1,423
py
Python
us-states-game/main.py
dlouima/python_project
2f84c5131efccfa04a633a608605b957b20b5f7e
[ "Apache-2.0" ]
null
null
null
us-states-game/main.py
dlouima/python_project
2f84c5131efccfa04a633a608605b957b20b5f7e
[ "Apache-2.0" ]
null
null
null
us-states-game/main.py
dlouima/python_project
2f84c5131efccfa04a633a608605b957b20b5f7e
[ "Apache-2.0" ]
null
null
null
import turtle import pandas # creen setup correct_guess_list = [] screen = turtle.Screen() screen.title(" U.S State Game") image = 'blank_states_img.gif' screen.addshape(image) turtle.shape(image) # import the dataset as a csv data = pandas.read_csv('50_states.csv') state_list = data.state.to_list() # getting user...
29.645833
89
0.653549
import turtle import pandas # creen setup correct_guess_list = [] screen = turtle.Screen() screen.title(" U.S State Game") image = 'blank_states_img.gif' screen.addshape(image) turtle.shape(image) # import the dataset as a csv data = pandas.read_csv('50_states.csv') state_list = data.state.to_list() # getting user...
0
0
0
cf02f71664f592ab42649024661845c79373f6e9
91
py
Python
core/forms/CustomDateInput.py
PitKoro/4-course-budget-manager
5f16e1e566c6a44c30f9f791819a63821c7303aa
[ "MIT" ]
1
2020-09-18T13:23:21.000Z
2020-09-18T13:23:21.000Z
core/forms/CustomDateInput.py
PitKoro/4-course-budget-manager
5f16e1e566c6a44c30f9f791819a63821c7303aa
[ "MIT" ]
13
2020-09-18T13:08:30.000Z
2020-11-06T07:54:53.000Z
core/forms/CustomDateInput.py
PitKoro/4-course-budget-manager
5f16e1e566c6a44c30f9f791819a63821c7303aa
[ "MIT" ]
2
2020-11-17T12:12:29.000Z
2021-01-23T15:08:52.000Z
from django import forms
15.166667
39
0.758242
from django import forms class CustomDateInput(forms.DateInput): input_type = 'date'
0
42
23
694342ce6b5d2412b74bf152ec3145ef2b05573f
1,227
py
Python
1/test.py
AlecRosenbaum/adventofcode2018
9c24aff22420f8ac59b2c4045b86e3991332dfe0
[ "MIT" ]
null
null
null
1/test.py
AlecRosenbaum/adventofcode2018
9c24aff22420f8ac59b2c4045b86e3991332dfe0
[ "MIT" ]
null
null
null
1/test.py
AlecRosenbaum/adventofcode2018
9c24aff22420f8ac59b2c4045b86e3991332dfe0
[ "MIT" ]
null
null
null
import unittest from solution import solution_part_one, solution_part_two if __name__ == "__main__": unittest.main()
30.675
65
0.607987
import unittest from solution import solution_part_one, solution_part_two class TestPartOne(unittest.TestCase): def test_one(self): problem_input = "\n".join(["+1", "+1", "+1"]) self.assertEqual(3, solution_part_one(problem_input)) def test_two(self): problem_input = "\n".join(["+1",...
836
32
233
2f0733697eb9053c9f604adcdf375dcd8f7f0298
2,663
py
Python
tests/mdp_test.py
Duckie-town-isu/tulip-control
07de9f85591a36e9556c612a371e9c28693156d2
[ "BSD-3-Clause" ]
91
2015-01-28T10:18:48.000Z
2022-02-09T16:37:32.000Z
tests/mdp_test.py
Duckie-town-isu/tulip-control
07de9f85591a36e9556c612a371e9c28693156d2
[ "BSD-3-Clause" ]
166
2015-01-21T17:30:58.000Z
2022-01-31T19:42:24.000Z
tests/mdp_test.py
Duckie-town-isu/tulip-control
07de9f85591a36e9556c612a371e9c28693156d2
[ "BSD-3-Clause" ]
34
2015-08-25T01:04:23.000Z
2021-11-05T19:35:59.000Z
# This test includes unit tests for MarkovChain and MarkovDecisionProcess of # the tulip.transys module # # * mc_test(): a unit test for the MarkovChain class # * mdp_test(): a unit test for the MarkovDecisionProcess class from tulip.transys import MarkovChain as MC from tulip.transys import MarkovDecisionProcess as M...
28.634409
76
0.567405
# This test includes unit tests for MarkovChain and MarkovDecisionProcess of # the tulip.transys module # # * mc_test(): a unit test for the MarkovChain class # * mdp_test(): a unit test for the MarkovDecisionProcess class from tulip.transys import MarkovChain as MC from tulip.transys import MarkovDecisionProcess as M...
2,268
0
69
1657f1eeccce910339c59937a2950f7a1302aaf2
539
py
Python
pyrolysis_parallel_fran_model/ito_sde/2_param/prod_H2/clean.py
jcoheur/pybitup-examples
83bdb2a85f8bdeed7199feaf70fa17fc68263256
[ "MIT" ]
null
null
null
pyrolysis_parallel_fran_model/ito_sde/2_param/prod_H2/clean.py
jcoheur/pybitup-examples
83bdb2a85f8bdeed7199feaf70fa17fc68263256
[ "MIT" ]
null
null
null
pyrolysis_parallel_fran_model/ito_sde/2_param/prod_H2/clean.py
jcoheur/pybitup-examples
83bdb2a85f8bdeed7199feaf70fa17fc68263256
[ "MIT" ]
null
null
null
import os import pathlib import shutil import glob
21.56
40
0.660482
import os import pathlib import shutil import glob class CleanDir(): # Remove the output folder path_output = pathlib.Path('output') if path_output.exists(): shutil.rmtree('output') # Get all temporary (tmp_) filenames tmp_files = glob.glob('tmp_*') # Remove all tmp_files for t...
0
465
23
3d1d3371cbf08e3c3d4b3efa58d242b3d479084b
2,682
py
Python
python-algorithm/leetcode/problem_959.py
isudox/nerd-algorithm
c1fbe153953cf3fc24395f75d102016fdf9ea0fa
[ "MIT" ]
5
2017-06-11T09:19:34.000Z
2019-01-16T16:58:31.000Z
python-algorithm/leetcode/problem_959.py
isudox/leetcode-solution
60085e64deaf396a171367affc94b18114565c43
[ "MIT" ]
5
2020-03-22T13:53:54.000Z
2020-03-23T08:49:35.000Z
python-algorithm/leetcode/problem_959.py
isudox/nerd-algorithm
c1fbe153953cf3fc24395f75d102016fdf9ea0fa
[ "MIT" ]
1
2019-03-02T15:50:43.000Z
2019-03-02T15:50:43.000Z
"""959. Regions Cut By Slashes https://leetcode.com/problems/regions-cut-by-slashes/ In a N x N grid composed of 1 x 1 squares, each 1 x 1 square consists of a /, \, or blank space. These characters divide the square into contiguous regions. (Note that backslash characters are escaped, so a \ is represented as "\\"....
22.923077
80
0.486577
"""959. Regions Cut By Slashes https://leetcode.com/problems/regions-cut-by-slashes/ In a N x N grid composed of 1 x 1 squares, each 1 x 1 square consists of a /, \, or blank space. These characters divide the square into contiguous regions. (Note that backslash characters are escaped, so a \ is represented as "\\"....
1,447
-6
49
a8f979b85045b54a79fdb97fbaef39e0048bb18a
4,242
py
Python
http_server_livereload/__init__.py
paradoxxxzero/http-server-livereload
d6e2813ef2bc0315718675cdf64e4b464091093e
[ "MIT" ]
null
null
null
http_server_livereload/__init__.py
paradoxxxzero/http-server-livereload
d6e2813ef2bc0315718675cdf64e4b464091093e
[ "MIT" ]
null
null
null
http_server_livereload/__init__.py
paradoxxxzero/http-server-livereload
d6e2813ef2bc0315718675cdf64e4b464091093e
[ "MIT" ]
null
null
null
# *-* coding: utf-8 *-* # Copyright (c) 2015 Mounier Florian # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
37.539823
79
0.673032
# *-* coding: utf-8 *-* # Copyright (c) 2015 Mounier Florian # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
1,057
36
88
aec9fc334fddbacc0d62a22310f846863f3809d5
9,167
py
Python
medallion/backends/mongodb_backend.py
eiyuki/cti-taxii-server
55bde5ee8e20a19d6dad855c8d270c47725c68a1
[ "BSD-3-Clause" ]
null
null
null
medallion/backends/mongodb_backend.py
eiyuki/cti-taxii-server
55bde5ee8e20a19d6dad855c8d270c47725c68a1
[ "BSD-3-Clause" ]
null
null
null
medallion/backends/mongodb_backend.py
eiyuki/cti-taxii-server
55bde5ee8e20a19d6dad855c8d270c47725c68a1
[ "BSD-3-Clause" ]
null
null
null
import logging from pymongo import ASCENDING, MongoClient from pymongo.errors import ConnectionFailure, ServerSelectionTimeoutError from ..exceptions import MongoBackendError, ProcessingError from ..filters.mongodb_filter import MongoDBFilter from ..utils.common import (create_bundle, format_datetime, generate_status...
36.090551
103
0.564307
import logging from pymongo import ASCENDING, MongoClient from pymongo.errors import ConnectionFailure, ServerSelectionTimeoutError from ..exceptions import MongoBackendError, ProcessingError from ..filters.mongodb_filter import MongoDBFilter from ..utils.common import (create_bundle, format_datetime, generate_status...
7,962
606
50