hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
63aad93e1350667c6ea3104ec3e6a0686257c3aa
11,263
py
Python
pet_mk_viii/pet_potentiometer_node.py
Pet-Series/Pet-Mk-VII
4f14d8af46d6a3f4d9838028a6ac0d3c37695ab2
[ "MIT" ]
null
null
null
pet_mk_viii/pet_potentiometer_node.py
Pet-Series/Pet-Mk-VII
4f14d8af46d6a3f4d9838028a6ac0d3c37695ab2
[ "MIT" ]
1
2022-03-30T20:40:19.000Z
2022-03-30T20:40:19.000Z
pet_mk_viii/pet_potentiometer_node.py
Pet-Series/Pet-Mk-VIII
4f14d8af46d6a3f4d9838028a6ac0d3c37695ab2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3' # coding = utf-8 ######################################################################################## ## ## Maintainer: stefan.kull@gmail.com ## Inspired by: https://github.com/somervda/ourbotmanager_ros.git ## ## Input: Analog potentiometer 1 + 2 + 3 (+4 ) ## Output: micro-ROS node (ROS2) ...
46.159836
206
0.648584
#!/usr/bin/env python3' # coding = utf-8 ######################################################################################## ## ## Maintainer: stefan.kull@gmail.com ## Inspired by: https://github.com/somervda/ourbotmanager_ros.git ## ## Input: Analog potentiometer 1 + 2 + 3 (+4 ) ## Output: micro-ROS node (ROS2) ...
12
0
0
8,933
0
322
0
27
381
e294e0268e0b169ee1d20bb1135f8707589d4ce5
171
py
Python
examples/timed_set/config.py
fredstro/mrq
eec5dfb425c765afa1ab5b41ca1e6f76869a6726
[ "MIT" ]
745
2015-01-02T06:54:37.000Z
2022-03-27T13:23:33.000Z
examples/timed_set/config.py
fredstro/mrq
eec5dfb425c765afa1ab5b41ca1e6f76869a6726
[ "MIT" ]
175
2015-01-01T20:46:08.000Z
2022-01-24T09:40:55.000Z
examples/timed_set/config.py
fredstro/mrq
eec5dfb425c765afa1ab5b41ca1e6f76869a6726
[ "MIT" ]
143
2015-01-06T06:55:26.000Z
2021-09-13T19:47:12.000Z
RAW_QUEUES = { "example_timed_set": { "job_factory": lambda rawparam: { "path": "example.Print", "params": { "test": rawparam } } } }
17.1
37
0.502924
RAW_QUEUES = { "example_timed_set": { "job_factory": lambda rawparam: { "path": "example.Print", "params": { "test": rawparam } } } }
0
0
0
0
0
0
0
0
0
32b8c3e29d61e4ef123b1d590e376a697da3489d
24,380
py
Python
dmriprep/data.py
akeshavan/dmriprep
c2829fff51e499ea68e5416f336a0bc53bae10e0
[ "BSD-3-Clause" ]
null
null
null
dmriprep/data.py
akeshavan/dmriprep
c2829fff51e499ea68e5416f336a0bc53bae10e0
[ "BSD-3-Clause" ]
1
2018-12-07T13:45:33.000Z
2018-12-07T13:45:33.000Z
dmriprep/data.py
akeshavan/dmriprep
c2829fff51e499ea68e5416f336a0bc53bae10e0
[ "BSD-3-Clause" ]
null
null
null
""" Functions to download example data from public repositories. """ from .base import InputFiles, InputFilesWithSession import os.path as op def get_s3_register(subject_id, site, raw_keys, deriv_keys): """Get the S3 keys for a single subject's input files Parameters ---------- subject_id : strin...
34.241573
118
0.555701
""" Functions to download example data from public repositories. """ from .base import InputFiles, InputFilesWithSession import os import os.path as op from pathlib import Path def get_dataset(output_dir, source='HBN'): if source in ['HBN']: get_hbn_data(output_dir) else: raise ValueError('In...
0
0
0
0
0
2,587
0
-9
223
e033f9fd73d722ddff5f01e01c531a7ab26d7f5f
483
py
Python
ec2_lambda/lambda_function.py
thiagop-o/python-automacao_lambda_aws
d5db1f37b898a422a500dff392e0da0bbeef1fc6
[ "MIT" ]
null
null
null
ec2_lambda/lambda_function.py
thiagop-o/python-automacao_lambda_aws
d5db1f37b898a422a500dff392e0da0bbeef1fc6
[ "MIT" ]
null
null
null
ec2_lambda/lambda_function.py
thiagop-o/python-automacao_lambda_aws
d5db1f37b898a422a500dff392e0da0bbeef1fc6
[ "MIT" ]
null
null
null
import os import boto3 AMI = os.environ['AMI'] INSTANCE_TYPE = os.environ['INSTANCE_TYPE'] KEY_NAME = os.environ['KEY_NAME'] SUBNET_ID = os.environ['SUBNET_ID'] ec2 = boto3.resource('ec2')
21
51
0.652174
import os import boto3 AMI = os.environ['AMI'] INSTANCE_TYPE = os.environ['INSTANCE_TYPE'] KEY_NAME = os.environ['KEY_NAME'] SUBNET_ID = os.environ['SUBNET_ID'] ec2 = boto3.resource('ec2') def lambda_handler(event, context): instance = ec2.create_instances( ImageId=AMI, InstanceType=INSTANC...
0
0
0
0
0
269
0
0
23
d5a445a9060d6cd20ce9d7173af9483d4cbd7c1e
8,837
py
Python
tests/unit_tests/logic/camera/test_cameraAscom.py
mworion/MountWizzard4
4e06b29ec2ef70be40e114b911b7bdf2f858a4b1
[ "Apache-2.0" ]
16
2020-01-11T22:32:26.000Z
2022-03-31T15:18:14.000Z
tests/unit_tests/logic/camera/test_cameraAscom.py
mworion/MountWizzard4
4e06b29ec2ef70be40e114b911b7bdf2f858a4b1
[ "Apache-2.0" ]
196
2020-01-16T13:56:01.000Z
2022-03-29T02:06:51.000Z
tests/unit_tests/logic/camera/test_cameraAscom.py
mworion/MountWizzard4
4e06b29ec2ef70be40e114b911b7bdf2f858a4b1
[ "Apache-2.0" ]
6
2019-12-01T19:39:33.000Z
2021-05-27T13:14:20.000Z
############################################################ # -*- coding: utf-8 -*- # # # # # # # # # ## ## # ## # # # # # # # # # # # # # # # ## # ## ## ###### # # # # # # # # # Python-based Tool for interaction with the 10micron mounts # GUI with PyQT5 fo...
27.024465
115
0.602806
############################################################ # -*- coding: utf-8 -*- # # # # # # # # # ## ## # ## # # # # # # # # # # # # # # # ## # ## ## ###### # # # # # # # # # Python-based Tool for interaction with the 10micron mounts # GUI with PyQT5 fo...
0
1,827
0
0
0
5,339
0
154
750
c9fdf87a145b69062ebfc4b957e7c6b7fad9824a
475
py
Python
renderers/linkRenderer.py
bgporter/wastebook
79885a8d503452e1fbeb8ff445cedd2daafff2a0
[ "MIT" ]
null
null
null
renderers/linkRenderer.py
bgporter/wastebook
79885a8d503452e1fbeb8ff445cedd2daafff2a0
[ "MIT" ]
null
null
null
renderers/linkRenderer.py
bgporter/wastebook
79885a8d503452e1fbeb8ff445cedd2daafff2a0
[ "MIT" ]
null
null
null
import re LINK_PATTERN = re.compile(r'(^|\s)(http(?:s)?://[^ \<]+\w)')
17.592593
71
0.612632
import re import renderer LINK_PATTERN = re.compile(r'(^|\s)(http(?:s)?://[^ \<]+\w)') class LinkRenderer(renderer.RenderBase): ''' Converts standalone http or https links in text into the Markdown equivalent, so lorem ipsum http://www.example.com, etc becomes lorem ipsum [h...
0
0
0
359
0
0
0
-6
46
19a1c00cdc6dcf513c84d6a0bc85980dea271cba
4,913
py
Python
py/feasability.py
andrewmkeller/niDelayGraph
41aa0a9e17b6e3c59ef9e7103f8333047e7745e0
[ "MIT" ]
null
null
null
py/feasability.py
andrewmkeller/niDelayGraph
41aa0a9e17b6e3c59ef9e7103f8333047e7745e0
[ "MIT" ]
null
null
null
py/feasability.py
andrewmkeller/niDelayGraph
41aa0a9e17b6e3c59ef9e7103f8333047e7745e0
[ "MIT" ]
null
null
null
import networkx.algorithms.shortest_paths.dense as dense graphsDir = "..\DataSets" # print("Topological sort took " + str(durationTime) + " seconds") # pyplot.loglog(sizes, times, "o") # pyplot.xscale("log") # pyplot.yscale("log") # pyplot.show() if __name__ == "__main__": main()
28.398844
94
0.607572
import niGraphParser import niGraph import sys import glob import os import random import time import re from matplotlib import pyplot import networkx as nx import networkx.algorithms.shortest_paths.dense as dense import xml.etree.ElementTree as ET import networkx.algorithms.simple_paths as nxPaths graphsDir = "..\Da...
0
0
0
0
0
4,216
0
-21
403
e6b2b01c8bd75ea94536fbb79633083633929b0b
1,452
py
Python
utils/draw_utils.py
takurooo/Python-YOLOv3_in_OpneCV
8f722cdd86e360d557a539431c84636d369549f5
[ "MIT" ]
null
null
null
utils/draw_utils.py
takurooo/Python-YOLOv3_in_OpneCV
8f722cdd86e360d557a539431c84636d369549f5
[ "MIT" ]
1
2018-09-16T05:54:13.000Z
2018-09-16T05:54:13.000Z
utils/draw_utils.py
takurooo/Python-YOLOv3_in_OpneCV
8f722cdd86e360d557a539431c84636d369549f5
[ "MIT" ]
null
null
null
#------------------------------------------------------ # import #------------------------------------------------------ import cv2 #------------------------------------------------------ # global #------------------------------------------------------ LINE_COLOR = (0, 0, 255) LINE_THICKNESS = 10 FONT_STYLE = cv2.FON...
32.266667
74
0.495868
#------------------------------------------------------ # import #------------------------------------------------------ import os import cv2 #------------------------------------------------------ # global #------------------------------------------------------ LINE_COLOR = (0, 0, 255) LINE_THICKNESS = 10 FONT_STYLE...
0
0
0
0
0
834
0
-12
67
2c75071e74d6ac4f4af2e29dd45f88f7b19f3318
2,194
py
Python
cleaner.py
Riviere123/csv_cleaner
944ec7337232fcc246c276cad7588fda824306d3
[ "MIT" ]
null
null
null
cleaner.py
Riviere123/csv_cleaner
944ec7337232fcc246c276cad7588fda824306d3
[ "MIT" ]
null
null
null
cleaner.py
Riviere123/csv_cleaner
944ec7337232fcc246c276cad7588fda824306d3
[ "MIT" ]
null
null
null
import argparse parser = argparse.ArgumentParser(description='parameters for cleaning a csv file') parser.add_argument( '--columns', type=int, nargs="+", default=[], help="The columns to remove. Usage: --rows 0 1 10 25", ) parser.add_argument( '--file', type=str, default=None, h...
25.511628
82
0.573838
import csv import argparse class Cleaner: def __init__(self, file, columns, rows, strip) -> None: self.file = open(f"{file}") self.columns = columns self.rows = rows self.data = csv.reader(self.file) self.strip = strip self.cleaned_data = self.data self.clean...
0
0
0
1,453
0
0
0
-11
45
b6f38ce362b5ee22034139f490ad8c25fc8886c6
3,370
py
Python
Scripts/Face2.py
LiuSeeker/Robotica-projeto-1
425795d51232470ac840faf9dc7d97863d801554
[ "CECILL-B" ]
null
null
null
Scripts/Face2.py
LiuSeeker/Robotica-projeto-1
425795d51232470ac840faf9dc7d97863d801554
[ "CECILL-B" ]
null
null
null
Scripts/Face2.py
LiuSeeker/Robotica-projeto-1
425795d51232470ac840faf9dc7d97863d801554
[ "CECILL-B" ]
null
null
null
#! /usr/bin/env python # -*- coding:utf-8 -*- __author__ = ["Rachel P. B. Moraes", "Igor Montagner", "Fabio Miranda"] import cv2 from cv_bridge import CvBridge face_cascade = cv2.CascadeClassifier('haarcascade_frontalcatface.xml') bridge = CvBridge() global cv_image global dif_x global media global centro global...
21.883117
132
0.692285
#! /usr/bin/env python # -*- coding:utf-8 -*- __author__ = ["Rachel P. B. Moraes", "Igor Montagner", "Fabio Miranda"] import rospy import numpy as np import tf import math import cv2 import time from geometry_msgs.msg import Twist, Vector3, Pose from nav_msgs.msg import Odometry from sensor_msgs.msg import Image, Co...
4
0
0
1,006
0
1,430
0
27
289
c6a49fd8eae1a073336f9014b2bd4874e8b1295d
1,277
py
Python
PyCode/Modules/ServoModule.py
busing/RaspberryPi_SmartCarV1
1d7761c7f1e6bc385392c6178d9ba1266c28dc2a
[ "Apache-2.0" ]
49
2018-05-20T11:43:42.000Z
2022-02-22T01:15:01.000Z
PyCode/Modules/ServoModule.py
qq38061481/RaspberryPi_SmartCarV1
1d7761c7f1e6bc385392c6178d9ba1266c28dc2a
[ "Apache-2.0" ]
1
2018-05-16T09:38:28.000Z
2018-05-16T09:38:47.000Z
PyCode/Modules/ServoModule.py
qq38061481/RaspberryPi_SmartCarV1
1d7761c7f1e6bc385392c6178d9ba1266c28dc2a
[ "Apache-2.0" ]
22
2018-05-16T09:33:04.000Z
2021-07-05T07:02:43.000Z
################################################### # 1.0 -- # # @author chenph # @date 2018/5/15 ################################################### import RPi.GPIO as GPIO import time if __name__ == "__main__": try: # 19,21,23 m = ServoModule(19) ...
23.218182
56
0.497259
################################################### # 智能小车1.0 -- 舵机模块 # # @author chenph # @date 2018/5/15 ################################################### import RPi.GPIO as GPIO import time class ServoModule: # 初始模块 def __init__(self, PIN): print('Servo...
60
0
0
792
0
0
0
0
23
e8d8d764446c6ce93834ee77f987452347e579e1
810
py
Python
tests/test_coverage.py
UC-Mind-Lab/Darjeeling
61dc4fd3c62f43bb7fcfafce6f964f82144e293e
[ "Apache-2.0" ]
null
null
null
tests/test_coverage.py
UC-Mind-Lab/Darjeeling
61dc4fd3c62f43bb7fcfafce6f964f82144e293e
[ "Apache-2.0" ]
1
2021-04-16T16:53:05.000Z
2021-07-23T15:21:52.000Z
tests/test_coverage.py
UC-Mind-Lab/Darjeeling
61dc4fd3c62f43bb7fcfafce6f964f82144e293e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*-
24.545455
56
0.512346
# -*- coding: utf-8 -*- import pytest from darjeeling.core import (TestOutcome, TestCoverage, FileLine, FileLineSet) def ln(num: int) -> FileLine: return FileLine('file.c', num) @pytest.fixture def coverage() -> TestCoverage...
0
360
0
0
0
149
0
136
137
5d973a361af88b11163f87ccf03a9de8c21ac4fc
20,012
py
Python
pretrain_bert.py
initc/gpt-lm
941f2816d7a749ea3a3e0c574b35fc3fc67e94e3
[ "Apache-2.0" ]
2
2019-10-17T04:03:06.000Z
2020-05-22T13:27:50.000Z
pretrain_bert.py
initc/gpt-lm
941f2816d7a749ea3a3e0c574b35fc3fc67e94e3
[ "Apache-2.0" ]
1
2020-05-22T13:36:27.000Z
2020-05-22T13:36:27.000Z
pretrain_bert.py
initc/gpt-lm
941f2816d7a749ea3a3e0c574b35fc3fc67e94e3
[ "Apache-2.0" ]
1
2019-10-17T04:03:08.000Z
2019-10-17T04:03:08.000Z
# coding=utf-8 # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
38.70793
158
0.613382
# coding=utf-8 # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
0
0
0
0
0
189
0
-11
76
3ed529d99d20a681fda72fb1b468f10bdf3deffc
1,907
py
Python
molsys/fileIO/freq.py
MOFplus/molsys_rel
ff8b181fefc0ba03c5dd14fe2dde613298155203
[ "MIT" ]
null
null
null
molsys/fileIO/freq.py
MOFplus/molsys_rel
ff8b181fefc0ba03c5dd14fe2dde613298155203
[ "MIT" ]
null
null
null
molsys/fileIO/freq.py
MOFplus/molsys_rel
ff8b181fefc0ba03c5dd14fe2dde613298155203
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ @author: julian Read (and write?) molden .freq files """
30.269841
92
0.521762
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ @author: julian Read (and write?) molden .freq files """ import numpy import string from molsys.util.constants import angstrom, kcalmol def read(mol, f): # missing docstring! try: f.readline ### do nothing except AttributeError: raise IO...
0
0
0
0
0
1,694
0
13
90
7b9ece5aa05ac3e689b66154aa1aba97c512c468
1,049
py
Python
week9-10/week10/hw41/gas_prices.py
fac33/py_intro_exercise
e2c3f3044537b5cc8980bf7aa7651fd16c5fd34b
[ "MIT" ]
null
null
null
week9-10/week10/hw41/gas_prices.py
fac33/py_intro_exercise
e2c3f3044537b5cc8980bf7aa7651fd16c5fd34b
[ "MIT" ]
null
null
null
week9-10/week10/hw41/gas_prices.py
fac33/py_intro_exercise
e2c3f3044537b5cc8980bf7aa7651fd16c5fd34b
[ "MIT" ]
null
null
null
################################################################################ # Author: Fanyang Cheng # Date: 04/07/2021 # Description: This program read the weekly gas average price txt file as input # and draw a graph for to show the data. ###########################################################################...
34.966667
88
0.550048
################################################################################ # Author: Fanyang Cheng # Date: 04/07/2021 # Description: This program read the weekly gas average price txt file as input # and draw a graph for to show the data. ###########################################################################...
0
0
0
0
0
582
0
0
44
941c88f15910a8e3d82889e5756ebb4771e44f69
18,566
py
Python
brainspell/json_api.py
akeshavan/brainspell-neo
05259770a9928d01adaaa028e9d2115750c4fe03
[ "MIT" ]
null
null
null
brainspell/json_api.py
akeshavan/brainspell-neo
05259770a9928d01adaaa028e9d2115750c4fe03
[ "MIT" ]
null
null
null
brainspell/json_api.py
akeshavan/brainspell-neo
05259770a9928d01adaaa028e9d2115750c4fe03
[ "MIT" ]
null
null
null
# JSON API classes # For GitHub OAuth import os REQ_DESC = "The fields to search through. 'x' is experiments, 'p' is PMID, 'r' is reference, and 't' is title + authors + abstract." START_DESC = "The offset of the articles to show; e.g., start = 10 would return results 11 - 20." assert "github_frontend_client_id" in ...
28.345038
176
0.556932
# JSON API classes import brainspell from article_helpers import * from base_handler import * from search_helpers import * from user_account_helpers import * # For GitHub OAuth import requests import urllib.parse import os import hashlib REQ_DESC = "The fields to search through. 'x' is experiments, 'p' is PMID, 'r' ...
0
0
0
16,977
0
0
0
14
683
75a1b42150f0c5930166b72169d17038f84dd12f
8,419
py
Python
train/tasks/semantic/modules/user.py
Crowbar97/SalsaNext
789968bf702367b7f004ccc058d3cdce53ee385c
[ "MIT" ]
null
null
null
train/tasks/semantic/modules/user.py
Crowbar97/SalsaNext
789968bf702367b7f004ccc058d3cdce53ee385c
[ "MIT" ]
null
null
null
train/tasks/semantic/modules/user.py
Crowbar97/SalsaNext
789968bf702367b7f004ccc058d3cdce53ee385c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # This file is covered by the LICENSE file in the root of this project. import torch.backends.cudnn as cudnn
39.712264
156
0.503742
#!/usr/bin/env python3 # This file is covered by the LICENSE file in the root of this project. import imp import os import time import numpy as np from matplotlib import pyplot as plt import torch import torch.backends.cudnn as cudnn from torch import nn import __init__ as booger from tasks.semantic.modules.segment...
0
0
0
7,890
0
97
0
22
270
b28113f9144fb0be437e13f608eef1bfa90e636b
6,220
py
Python
main.py
farhannysf/vitruvina
f4d9512c80c928001543a0852332a512ab602591
[ "MIT" ]
5
2018-11-04T08:46:38.000Z
2021-03-09T21:50:54.000Z
main.py
farhannysf/vitruvina
f4d9512c80c928001543a0852332a512ab602591
[ "MIT" ]
null
null
null
main.py
farhannysf/vitruvina
f4d9512c80c928001543a0852332a512ab602591
[ "MIT" ]
null
null
null
from sanic import Sanic app = Sanic() if __name__ == '__main__': app.run(host='0.0.0.0', port=80)
46.41791
281
0.671704
import random import settings import finance_utils import asyncio import aiohttp from time import strftime from datetime import date from sanic import Sanic, response from sanic.response import json app = Sanic() async def aioGet(*args, **kwargs): async with aiohttp.ClientSession() as client: async w...
0
377
5,372
0
0
0
0
-1
362
94eced0ae6d8038942ea21908a77c26af1240b78
1,769
py
Python
okta/models/application_accessibility.py
corylevine/okta-sdk-python
c86b8fdc4525e84199143c27213c0aebc6b2af8f
[ "Apache-2.0" ]
145
2017-06-13T21:54:04.000Z
2022-02-25T05:44:34.000Z
okta/models/application_accessibility.py
corylevine/okta-sdk-python
c86b8fdc4525e84199143c27213c0aebc6b2af8f
[ "Apache-2.0" ]
146
2017-06-02T17:46:12.000Z
2022-03-29T15:52:15.000Z
okta/models/application_accessibility.py
corylevine/okta-sdk-python
c86b8fdc4525e84199143c27213c0aebc6b2af8f
[ "Apache-2.0" ]
98
2017-06-27T03:44:51.000Z
2022-03-23T04:58:18.000Z
# flake8: noqa """ Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
32.759259
72
0.687394
# flake8: noqa """ Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
0
0
0
1,047
0
0
0
18
46
495e8adc4d26507ba4b761349caac57cd7210956
1,391
py
Python
joels_scripts/constants.py
DelparteLabs/WCWAVE_ClimateInterp
dce7ddf4f6025ae96b864767c198af78f4ee3c0a
[ "MIT" ]
null
null
null
joels_scripts/constants.py
DelparteLabs/WCWAVE_ClimateInterp
dce7ddf4f6025ae96b864767c198af78f4ee3c0a
[ "MIT" ]
null
null
null
joels_scripts/constants.py
DelparteLabs/WCWAVE_ClimateInterp
dce7ddf4f6025ae96b864767c198af78f4ee3c0a
[ "MIT" ]
null
null
null
#Import necessary modules import arcpy #Check-out necessary extensions arcpy.CheckOutExtension('Spatial') #Set input parameters elevation_raster = arcpy.GetParameterAsText(0) conRL = arcpy.GetParameter(1) conRL_ouRaster = arcpy.GetParameterAsText(2) conH2OSat = arcpy.GetParameter(3) conH2OSat_outRaster = arcpy.GetPar...
33.926829
82
0.833932
#Import necessary modules import arcpy from arcpy.sa import * import numpy #Check-out necessary extensions arcpy.CheckOutExtension('Spatial') #Set input parameters elevation_raster = arcpy.GetParameterAsText(0) conRL = arcpy.GetParameter(1) conRL_ouRaster = arcpy.GetParameterAsText(2) conH2OSat = arcpy.GetParameter(3...
0
0
0
0
0
0
0
-8
44
9a76e6b847a5af542c69c4a2ca4ade2eecfda813
2,920
py
Python
caffe2/python/operator_test/pack_rnn_sequence_op_test.py
jsun94/nimble
e5c899a69677818b1becc58100577441e15ede13
[ "BSD-3-Clause" ]
206
2020-11-28T22:56:38.000Z
2022-03-27T02:33:04.000Z
caffe2/python/operator_test/pack_rnn_sequence_op_test.py
jsun94/nimble
e5c899a69677818b1becc58100577441e15ede13
[ "BSD-3-Clause" ]
19
2020-12-09T23:13:14.000Z
2022-01-24T23:24:08.000Z
caffe2/python/operator_test/pack_rnn_sequence_op_test.py
jsun94/nimble
e5c899a69677818b1becc58100577441e15ede13
[ "BSD-3-Clause" ]
28
2020-11-29T15:25:12.000Z
2022-01-20T02:16:27.000Z
if __name__ == "__main__": import unittest unittest.main()
31.73913
75
0.560616
from caffe2.python import core from hypothesis import given import caffe2.python.hypothesis_test_util as hu import caffe2.python.serialized_test.serialized_test_util as serial import hypothesis.strategies as st import numpy as np class TestPackRNNSequenceOperator(serial.SerializedTestCase): @serial.given(n=...
0
2,498
0
40
0
0
0
98
210
7cd8c313e001a8189aed96f414569f874d893c5a
1,682
py
Python
lib/spack/spack/cmd/common/__init__.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2020-09-10T22:50:08.000Z
2021-01-12T22:18:54.000Z
lib/spack/spack/cmd/common/__init__.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
17
2019-03-21T15:54:00.000Z
2022-03-29T19:34:28.000Z
lib/spack/spack/cmd/common/__init__.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-04-07T18:27:09.000Z
2022-03-31T22:52:38.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import llnl.util.tty as tty import llnl.util.tty.color as color import spack.paths def shell_init_instructions(cmd, equ...
31.148148
73
0.577289
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import llnl.util.tty as tty import llnl.util.tty.color as color import spack.paths def shell_init_instructions(cmd, equ...
0
0
0
0
0
0
0
0
0
3d91f9e590b81b179ff1c3782708adf0d1a80c4b
8,815
py
Python
src/parse_utils.py
dockimbel/RGB
3dbb999cecc1fc60cd0f9a064723cc5d967c0688
[ "MIT" ]
null
null
null
src/parse_utils.py
dockimbel/RGB
3dbb999cecc1fc60cd0f9a064723cc5d967c0688
[ "MIT" ]
null
null
null
src/parse_utils.py
dockimbel/RGB
3dbb999cecc1fc60cd0f9a064723cc5d967c0688
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2018 Samuel Wilder 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, modify, merge, publish,...
26.15727
158
0.680091
""" MIT License Copyright (c) 2018 Samuel Wilder 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, modify, merge, publish,...
0
0
0
0
0
0
0
2
23
6737b1610023ce55da9d1f5659e9fb729bfa0f76
2,150
py
Python
code/plots5_airlines_cereal.py
msinkinson/CommonOwnerReplication
59a4b275464521623c6bfc22738959c27a534504
[ "MIT" ]
null
null
null
code/plots5_airlines_cereal.py
msinkinson/CommonOwnerReplication
59a4b275464521623c6bfc22738959c27a534504
[ "MIT" ]
null
null
null
code/plots5_airlines_cereal.py
msinkinson/CommonOwnerReplication
59a4b275464521623c6bfc22738959c27a534504
[ "MIT" ]
null
null
null
# %% # %% import pandas as pd import matplotlib.pyplot as plt from our_plot_config import derived_dir, fig_dir, raw_dir, setplotstyle setplotstyle() # %% # Input files f_cereal = raw_dir / 'cereal.parquet' f_airlines = raw_dir / 'airlines.parquet' f_firm_info = derived_dir / 'firm-info.parquet' f_kappas = derived_di...
30.28169
135
0.686047
# %% # %% import pandas as pd import numpy as np import pathlib import matplotlib import matplotlib.pyplot as plt from our_plot_config import derived_dir, fig_dir, raw_dir, setplotstyle from kappas import do_one_period setplotstyle() # %% # Input files f_cereal = raw_dir / 'cereal.parquet' f_airlines = raw_dir / 'a...
0
0
0
0
0
273
0
-3
112
fd53c1c1df9cfa4e457e6510b0e6228f6d83ad69
722
py
Python
python/popart.ir/python_files/module.py
gglin001/popart
3225214343f6d98550b6620e809a3544e8bcbfc6
[ "MIT" ]
61
2020-07-06T17:11:46.000Z
2022-03-12T14:42:51.000Z
python/popart.ir/python_files/module.py
gglin001/popart
3225214343f6d98550b6620e809a3544e8bcbfc6
[ "MIT" ]
1
2021-02-25T01:30:29.000Z
2021-11-09T11:13:14.000Z
python/popart.ir/python_files/module.py
gglin001/popart
3225214343f6d98550b6620e809a3544e8bcbfc6
[ "MIT" ]
6
2020-07-15T12:33:13.000Z
2021-11-07T06:55:00.000Z
# Copyright (c) 2021 Graphcore Ltd. All rights reserved.
36.1
79
0.709141
# Copyright (c) 2021 Graphcore Ltd. All rights reserved. class Module: """ Callable class from which user-defined layers can inherit. The #build method should be overriden and should build the subgraph. The benefit of inheriting from this class rather than passing a function is that you can save input ten...
0
0
0
643
0
0
0
0
22
d101b444025d87e58fca07c5c91baf0669f48075
4,736
py
Python
benchmarks/oxuva/examples/track.py
willtwr/iSiam-TF
c9c1d0f49cc80f7a5549155fb220b6dce6b6516b
[ "MIT" ]
2
2020-03-28T20:48:34.000Z
2021-09-22T02:54:12.000Z
benchmarks/oxuva/examples/track.py
willtwr/iSiam-TF
c9c1d0f49cc80f7a5549155fb220b6dce6b6516b
[ "MIT" ]
1
2020-03-28T20:59:30.000Z
2020-04-03T20:09:53.000Z
benchmarks/oxuva/examples/track.py
willtwr/iSiam-TF
c9c1d0f49cc80f7a5549155fb220b6dce6b6516b
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function if __name__ == '__main__': main()
34.318841
90
0.636824
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import cv2 import os import time import oxuva from scripts import * def main(): parser = argparse.ArgumentParser() parser.add_argument('data_dir') parser.add_argument('predictions...
0
0
0
846
0
3,535
0
-48
249
47ab914c592973fc14facd627639938d32460452
908
py
Python
test.py
Gibbsdavidl/naive_tree
02f69b83b97832a33e5008f85cae50d9286415cc
[ "MIT" ]
null
null
null
test.py
Gibbsdavidl/naive_tree
02f69b83b97832a33e5008f85cae50d9286415cc
[ "MIT" ]
1
2021-08-10T22:19:22.000Z
2021-08-10T22:19:22.000Z
test.py
Gibbsdavidl/naive_tree
02f69b83b97832a33e5008f85cae50d9286415cc
[ "MIT" ]
null
null
null
# Import classes from your brand new package from naive_tree import GeneTree # Create an object of Mammals class & call a method of it myTree = GeneTree() myTree.build_network() myTree.print_gene_network_summary() myTree.gene_network.print_test_edge(4140) # then get network between source and list-of-leaves. vs = myT...
28.375
72
0.748899
# Import classes from your brand new package from naive_tree import GeneTree from naive_tree import GeneNetwork # Create an object of Mammals class & call a method of it myTree = GeneTree() myTree.build_network() myTree.print_gene_network_summary() myTree.gene_network.print_test_edge(4140) # then get network between ...
0
0
0
0
0
0
0
13
22
cba575fe3c4d860e5b0b8717de6d7e6e18647762
7,080
py
Python
codes/dgmpm_stability/CFL_comparison_random.py
adRenaud/research
2f0062a1800d7a17577bbfc2393b084253d567f4
[ "MIT" ]
1
2021-06-18T14:52:03.000Z
2021-06-18T14:52:03.000Z
codes/dgmpm_stability/CFL_comparison_random.py
adRenaud/research
2f0062a1800d7a17577bbfc2393b084253d567f4
[ "MIT" ]
1
2019-01-07T13:11:11.000Z
2019-01-07T13:11:11.000Z
codes/dgmpm_stability/CFL_comparison_random.py
adRenaud/research
2f0062a1800d7a17577bbfc2393b084253d567f4
[ "MIT" ]
null
null
null
#!/usr/bin/python import numpy as np from scipy import optimize import matplotlib.pyplot as plt import pdb import random import os # Symbolic function to evaluate shape functions shape_functions=lambda x: np.matrix([(1-x)/DX,x/DX]) xn = np.array([0.,1.]) DX = 1. ## required for plotting residual CFL=np.linspace(0...
36.307692
232
0.642655
#!/usr/bin/python import numpy as np from scipy import optimize from sympy import * import matplotlib.pyplot as plt import pdb import random import os def export2DTeXFile(fileName,bins,fields,*kwargs): TeXFile=open(fileName,"w") n_fields = np.shape(fields)[0] n_labels = np.shape(kwargs)[1] # Defi...
0
0
0
0
0
3,547
0
-2
137
b40a82670ea346149aaf3640009134ba1053fa90
37,795
py
Python
ag/orbit/node/db.py
AlphaGriffin/orbit-node
6e330a2734a6a5dfbb52d984fe0b2f8dff4755cd
[ "MIT" ]
null
null
null
ag/orbit/node/db.py
AlphaGriffin/orbit-node
6e330a2734a6a5dfbb52d984fe0b2f8dff4755cd
[ "MIT" ]
null
null
null
ag/orbit/node/db.py
AlphaGriffin/orbit-node
6e330a2734a6a5dfbb52d984fe0b2f8dff4755cd
[ "MIT" ]
null
null
null
# Copyright (C) 2018 Alpha Griffin # @%@~LICENSE~@%@
41.854928
126
0.485673
# Copyright (C) 2018 Alpha Griffin # @%@~LICENSE~@%@ from . import config, TokenError from bitcash.format import public_key_to_address from os import path import sqlite3 from hashlib import sha256 class TokenDB: def __init__(self, auto_commit=True): isolation = 'EXCLUSIVE' if not auto_commit else None...
0
183
0
37,387
0
0
0
34
136
81003cc2b9becec46691667317615c5a7f7d2cda
2,105
py
Python
test_status_endpoints/test_status_tweet.py
RSMuthu/Twitter_API-Pytest
b272d8ead3d51bbd0d5a4720f67905dccee27d7c
[ "MIT" ]
null
null
null
test_status_endpoints/test_status_tweet.py
RSMuthu/Twitter_API-Pytest
b272d8ead3d51bbd0d5a4720f67905dccee27d7c
[ "MIT" ]
null
null
null
test_status_endpoints/test_status_tweet.py
RSMuthu/Twitter_API-Pytest
b272d8ead3d51bbd0d5a4720f67905dccee27d7c
[ "MIT" ]
null
null
null
# status list to tweet status_list = {"We welcome you to MSD family :)", "Hello World !!"}
46.777778
110
0.709264
import pytest from conftest import twitter_session, BASE_URL from utils import get_home_tweets # status list to tweet status_list = {"We welcome you to MSD family :)", "Hello World !!"} @pytest.mark.run(order=1) ## ording test cases -- make tweet first as first test case @pytest.mark.parametrize("status_text", status...
0
1,872
0
0
0
0
0
29
112
5d39942b02ac6f8ea852e08d75c444f2f2c627d5
1,776
py
Python
compil_to_csv.py
bliiben/sha256SquaredPrecompilCSV
752aa981299f1f06abf92ad76228926aa9267934
[ "MIT" ]
null
null
null
compil_to_csv.py
bliiben/sha256SquaredPrecompilCSV
752aa981299f1f06abf92ad76228926aa9267934
[ "MIT" ]
null
null
null
compil_to_csv.py
bliiben/sha256SquaredPrecompilCSV
752aa981299f1f06abf92ad76228926aa9267934
[ "MIT" ]
null
null
null
import pickle import re prog = re.compile( r"^([\^\~\&\|])\((\w+),?(\w+)?\)$" ) with open("sha_decoded.pp", "r") as file: _h, _REFERENCES_, _DEPENDENCY_ ,_INV_DEP_, _COST_ = pickle.load( file ) inv_refs = {v: k for k, v in _REFERENCES_.iteritems()} #sorted_COST = sorted(_COST_.items(), key=operator.itemgetter(1)) o...
21.39759
72
0.552365
import pickle import operator import re prog = re.compile( r"^([\^\~\&\|])\((\w+),?(\w+)?\)$" ) def getElements( op ): m= prog.search(op) ref1 = m.group(2) ref2 = m.group(3) return (ref1,ref2) with open("sha_decoded.pp", "r") as file: _h, _REFERENCES_, _DEPENDENCY_ ,_INV_DEP_, _COST_ = pickle.load( file ) inv_re...
0
0
0
0
0
218
0
-6
67
1f46c1bbb19eae64d53cea40d5922ff06d116ac8
474
py
Python
notifs/asgi.py
gaybro8777/django-notifs
f349fdf2dc87f2b579055c4e2abd95832ad9df5b
[ "MIT" ]
145
2017-06-22T20:37:14.000Z
2022-02-03T21:18:28.000Z
notifs/asgi.py
gaybro8777/django-notifs
f349fdf2dc87f2b579055c4e2abd95832ad9df5b
[ "MIT" ]
67
2017-06-23T06:53:32.000Z
2021-11-13T04:00:27.000Z
notifs/asgi.py
gaybro8777/django-notifs
f349fdf2dc87f2b579055c4e2abd95832ad9df5b
[ "MIT" ]
24
2017-06-22T20:37:17.000Z
2022-02-17T19:52:35.000Z
import os from channels.routing import ChannelNameRouter, ProtocolTypeRouter from django.core.asgi import get_asgi_application from notifications import consumers os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'notifs.settings') application = ProtocolTypeRouter( { 'http': get_asgi_application(), ...
23.7
74
0.685654
import os from channels.routing import ChannelNameRouter, ProtocolTypeRouter from django.core.asgi import get_asgi_application from notifications import consumers os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'notifs.settings') application = ProtocolTypeRouter( { 'http': get_asgi_application(), ...
0
0
0
0
0
0
0
0
0
1524f6da34655de1d60bbc96022b5edd80ee87e4
615
py
Python
demo/python/multi-threading/demo4.py
dark-w/sokoban
98cd76dd94ae0c7d1beaaca47f0d3598998bb43b
[ "Apache-2.0" ]
null
null
null
demo/python/multi-threading/demo4.py
dark-w/sokoban
98cd76dd94ae0c7d1beaaca47f0d3598998bb43b
[ "Apache-2.0" ]
9
2021-01-24T05:26:31.000Z
2021-04-07T07:03:02.000Z
demo/python/multi-threading/demo4.py
dark-w/sokoban
98cd76dd94ae0c7d1beaaca47f0d3598998bb43b
[ "Apache-2.0" ]
null
null
null
import threading # pls thinking about if there not use mutex... # you must try it, comment the line 12 and the line 14... mutex = threading.Lock() num = 0 if __name__ == "__main__": main()
20.5
59
0.560976
import threading # pls thinking about if there not use mutex... # you must try it, comment the line 12 and the line 14... mutex = threading.Lock() num = 0 def fun1(n): global num for i in range(n): mutex.acquire() num += 1 mutex.release() print("num result: {}".format(num)) ...
0
0
0
0
0
349
0
0
62
7ed241bdc8a02c16e6ea477e0032b989c2862ec7
14,833
py
Python
decofre/infer.py
LoicGrobol/decofre
68e12c8da4a6c032bb5ea3edff9e8484344e94e2
[ "MIT" ]
9
2021-01-15T10:34:02.000Z
2021-12-24T13:58:36.000Z
decofre/infer.py
LoicGrobol/decofre
68e12c8da4a6c032bb5ea3edff9e8484344e94e2
[ "MIT" ]
8
2020-03-13T10:52:48.000Z
2022-02-06T22:15:28.000Z
decofre/infer.py
LoicGrobol/decofre
68e12c8da4a6c032bb5ea3edff9e8484344e94e2
[ "MIT" ]
null
null
null
import typing as ty import numpy as np import spacy spacy.tokens.Doc.set_extension("clusters", default=None) spacy.tokens.Span.set_extension("cluster", default=None) spacy.tokens.Span.set_extension("singleton", default=True) def antecedents_from_mentions( mentions: ty.Iterable[ty.Dict[str, ty.Any]], max_...
32.6
104
0.569945
import contextlib import pathlib import shutil import sys import tempfile import typing as ty import click import click_pathlib import jsonlines import numpy as np import spacy import ujson as json from typing import Any, Dict, List, Literal, Optional, TextIO from typing_extensions import TypedDict from decofre.form...
0
5,641
0
160
0
5,667
0
49
496
82b98750a07e2cf2bdd895c8151af601bd05d953
1,233
py
Python
lib/galaxy/model/migrate/versions/0124_job_state_history.py
lawrence14701/galaxy
7eb2fcb708e7b63e17800c87613ddfa5497c0654
[ "CC-BY-3.0" ]
2
2017-03-28T12:11:41.000Z
2017-04-22T02:58:25.000Z
lib/galaxy/model/migrate/versions/0124_job_state_history.py
lawrence14701/galaxy
7eb2fcb708e7b63e17800c87613ddfa5497c0654
[ "CC-BY-3.0" ]
12
2020-07-24T23:55:19.000Z
2021-12-19T11:40:06.000Z
lib/galaxy/model/migrate/versions/0124_job_state_history.py
lawrence14701/galaxy
7eb2fcb708e7b63e17800c87613ddfa5497c0654
[ "CC-BY-3.0" ]
1
2018-05-30T07:38:54.000Z
2018-05-30T07:38:54.000Z
""" Migration script for the job state history table """ from __future__ import print_function import datetime import logging from sqlalchemy import Column, DateTime, ForeignKey, Integer, MetaData, String, Table from galaxy.model.custom_types import TrimmedString now = datetime.datetime.utcnow log = logging.getLogg...
30.825
90
0.660989
""" Migration script for the job state history table """ from __future__ import print_function import datetime import logging from sqlalchemy import Column, DateTime, ForeignKey, Integer, MetaData, String, Table from galaxy.model.custom_types import TrimmedString from galaxy.model.migrate.versions.util import create...
0
0
0
0
0
231
0
50
68
d38193783eb4aa254cd51a4fcd972a92d001a8ae
3,595
py
Python
deploy_dst.py
CiscoDevNet/dst-automation
dffcde76f1bd7dc4dd4350c7a224f8ad9679ad4a
[ "BSD-3-Clause" ]
4
2020-04-28T16:38:18.000Z
2021-06-09T08:45:24.000Z
deploy_dst.py
CiscoDevNet/dst-automation
dffcde76f1bd7dc4dd4350c7a224f8ad9679ad4a
[ "BSD-3-Clause" ]
6
2020-11-04T16:35:42.000Z
2021-04-25T13:38:56.000Z
deploy_dst.py
CiscoDevNet/dst-automation
dffcde76f1bd7dc4dd4350c7a224f8ad9679ad4a
[ "BSD-3-Clause" ]
3
2020-05-13T22:43:50.000Z
2021-05-01T22:30:33.000Z
#!/usr/bin/env python3 """ Deploy DST configuration using Ansible. Copyright (c) 2020, Copyright (c) 2020, Cisco Systems, Inc. or its affiliates All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redis...
32.387387
122
0.708484
#!/usr/bin/env python3 """ Deploy DST configuration using Ansible. Copyright (c) 2020, Copyright (c) 2020, Cisco Systems, Inc. or its affiliates All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redis...
0
0
0
0
0
1,547
0
-23
291
d80b042bdf0e393b2fc4472e860104feb09f75f7
647
py
Python
list_class.py
jmb462/rst-to-mediawiki
2d32f1659593bf6a49668a471f091450526201b9
[ "MIT" ]
null
null
null
list_class.py
jmb462/rst-to-mediawiki
2d32f1659593bf6a49668a471f091450526201b9
[ "MIT" ]
null
null
null
list_class.py
jmb462/rst-to-mediawiki
2d32f1659593bf6a49668a471f091450526201b9
[ "MIT" ]
null
null
null
####################################################################### # Godot RST File to MediaWiki converter # ####################################################################### import sys source=sys.argv[1] with open(source) as file: file_contents = file.read() ...
34.052632
146
0.48068
####################################################################### # Godot RST File to MediaWiki converter # ####################################################################### import re import pandas as pd import sys source=sys.argv[1] with open(source) as file: ...
0
0
0
0
0
0
0
-14
48
e6443582a8702368766317174ba425fb2305a214
2,261
py
Python
code/lab2_code/two_collide.py
YuYanzy/Lab_ECE_5725
1eb0ebbd3e1aa00a850f6d5ad7f3676386e2fb1b
[ "Apache-2.0" ]
null
null
null
code/lab2_code/two_collide.py
YuYanzy/Lab_ECE_5725
1eb0ebbd3e1aa00a850f6d5ad7f3676386e2fb1b
[ "Apache-2.0" ]
null
null
null
code/lab2_code/two_collide.py
YuYanzy/Lab_ECE_5725
1eb0ebbd3e1aa00a850f6d5ad7f3676386e2fb1b
[ "Apache-2.0" ]
null
null
null
# Yu Zhang yz2729 # Lab 2 Date: 09/23/21 import RPi.GPIO as GPIO import pygame # Import pygame graphics library import time import os # for OS calls CODERUN = True GPIO.setmode(GPIO.BCM) GPIO.setup(17,GPIO.IN,pull_up_down = GPIO.PUD_UP) GPIO.add_event_detect(17, GPIO.FALLING, callback=GPIO17_callback, bo...
30.972603
87
0.673596
# Yu Zhang yz2729 # Lab 2 Date: 09/23/21 import RPi.GPIO as GPIO import pygame # Import pygame graphics library import time import os # for OS calls CODERUN = True GPIO.setmode(GPIO.BCM) GPIO.setup(17,GPIO.IN,pull_up_down = GPIO.PUD_UP) def GPIO17_callback(channel): global CODERUN CODERUN = Fal...
0
0
0
0
0
49
0
0
22
881a2e37024566fd7ac36f53a1f9885400a09b73
9,151
py
Python
uplift/tree/_tree.py
Antiguru11/uplift
ffaa5bcd20d6aa264fa3b2d191327c86384e4f7c
[ "Apache-2.0" ]
null
null
null
uplift/tree/_tree.py
Antiguru11/uplift
ffaa5bcd20d6aa264fa3b2d191327c86384e4f7c
[ "Apache-2.0" ]
null
null
null
uplift/tree/_tree.py
Antiguru11/uplift
ffaa5bcd20d6aa264fa3b2d191327c86384e4f7c
[ "Apache-2.0" ]
null
null
null
import numpy as np _epsilon = np.finfo('double').eps
32.335689
82
0.460059
from abc import ABCMeta, abstractmethod import numpy as np _epsilon = np.finfo('double').eps class Tree(): def __init__(self, n_groups): self.n_groups = n_groups self.reset() def reset(self): self.nodes = list() self.leaf_ids = list() def add_node(self, ...
0
689
0
8,217
0
0
0
18
167
791006d4cf920590caf78ae89fb7b395283728f7
1,778
py
Python
mysql_autoxtrabackup/utils/mysql_cli.py
icy1900/MySQL-AutoXtraBackup
dfdf86ba4d1fe15a35cececa4934cb7f247e448f
[ "MIT" ]
134
2015-04-17T15:05:13.000Z
2022-01-06T20:51:37.000Z
mysql_autoxtrabackup/utils/mysql_cli.py
icy1900/MySQL-AutoXtraBackup
dfdf86ba4d1fe15a35cececa4934cb7f247e448f
[ "MIT" ]
316
2015-04-22T07:40:46.000Z
2021-11-08T12:09:02.000Z
mysql_autoxtrabackup/utils/mysql_cli.py
icy1900/MySQL-AutoXtraBackup
dfdf86ba4d1fe15a35cececa4934cb7f247e448f
[ "MIT" ]
80
2015-04-30T19:25:24.000Z
2021-11-09T10:32:54.000Z
# This file will consist of some wrapper for using MySQL # It is mainly used for preparing and calling mysql cli import logging logger = logging.getLogger(__name__)
40.409091
79
0.669291
# This file will consist of some wrapper for using MySQL # It is mainly used for preparing and calling mysql cli import logging from mysql_autoxtrabackup.general_conf import path_config from mysql_autoxtrabackup.general_conf.generalops import GeneralClass from mysql_autoxtrabackup.process_runner.process_runner import ...
0
0
0
1,382
0
0
0
139
90
98e6f77a0bdec0402472f82795c8851852f675eb
817
py
Python
ExerciciosPython/Analisador de Lista.py
NathanSoares25/ExerciciosPython
718a47ad26690355807b4ec1412e386b02acd098
[ "MIT" ]
2
2021-03-19T00:27:55.000Z
2021-03-24T01:24:08.000Z
ExerciciosPython/Analisador de Lista.py
NathanSoares25/ExerciciosPython
718a47ad26690355807b4ec1412e386b02acd098
[ "MIT" ]
null
null
null
ExerciciosPython/Analisador de Lista.py
NathanSoares25/ExerciciosPython
718a47ad26690355807b4ec1412e386b02acd098
[ "MIT" ]
null
null
null
# Faa um programa que leia 5 valores e guarde-os em uma lista, no final mostre qual o maior e o menor valor e qual # A sua posio na lista valores = list() # cria uma lista for c in range(0, 5): valores.append(int(input(f'Digite um valor para a posio {c}: '))) # inserindo os nmeros dentro da lista print(f'Os val...
40.85
117
0.684211
# Faça um programa que leia 5 valores e guarde-os em uma lista, no final mostre qual é o maior e o menor valor e qual # A sua posição na lista valores = list() # cria uma lista for c in range(0, 5): valores.append(int(input(f'Digite um valor para a posição {c}: '))) # inserindo os números dentro da lista print(f...
56
0
0
0
0
0
0
0
0
ab724ee8ffa9e2aff66290fce867acf596434d97
2,430
py
Python
scripts/sources/S_EllipsoidTestSVI.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
6
2021-04-10T13:24:30.000Z
2022-03-26T08:20:42.000Z
scripts/sources/S_EllipsoidTestSVI.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
null
null
null
scripts/sources/S_EllipsoidTestSVI.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
6
2019-08-13T22:02:17.000Z
2022-02-09T17:49:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.4' # jupytext_version: 1.1.4 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # # S_El...
27.613636
207
0.70535
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.4' # jupytext_version: 1.1.4 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # # S_El...
0
0
0
0
0
0
0
11
22
05a5f6749f1319f6551e4027aec3c982e8778867
823
py
Python
example/search-author.py
dollodart/gssa
078ff1e8c2d103d871f6f0e4c50f961384127a3c
[ "MIT" ]
null
null
null
example/search-author.py
dollodart/gssa
078ff1e8c2d103d871f6f0e4c50f961384127a3c
[ "MIT" ]
null
null
null
example/search-author.py
dollodart/gssa
078ff1e8c2d103d871f6f0e4c50f961384127a3c
[ "MIT" ]
null
null
null
from gssa.core import search from gssa.graph_search import breadth_first_search from gssa.secretenv import author_first, author_last author = author_first + ' ' + author_last publist = search(author, nres=100, overwrite=False) breadth_first_search(publist[:100], levels=2, filters=(has_author, special))
30.481481
76
0.746051
from gssa.core import search from gssa.graph_search import breadth_first_search from gssa.secretenv import author_first, author_last, vancouver_author author = author_first + ' ' + author_last publist = search(author, nres=100, overwrite=False) def has_author(pub): if author_last in ''.join(x.lower() for x in pu...
0
0
0
0
0
426
0
18
69
d8eb1bf097980e7748dab7e27729f783c74750f9
893
py
Python
PyParadise/__init__.py
brandherd/PyParadise
1c65bf634e17931f165fd88b9938f604b9371e2e
[ "MIT" ]
1
2021-06-01T13:07:54.000Z
2021-06-01T13:07:54.000Z
PyParadise/__init__.py
brandherd/PyParadise
1c65bf634e17931f165fd88b9938f604b9371e2e
[ "MIT" ]
3
2021-11-03T02:07:38.000Z
2022-03-14T20:35:04.000Z
PyParadise/__init__.py
brandherd/PyParadise
1c65bf634e17931f165fd88b9938f604b9371e2e
[ "MIT" ]
null
null
null
import copyreg as copy_reg copy_reg.pickle(MethodType, _pickle_method, _unpickle_method)
24.135135
67
0.671892
from . import data from . import cube from . import rss from . import spectrum1d from . import ssplibrary from . import parameters from . import fit_profile from . import header import copyreg as copy_reg from types import * def _pickle_method(method): func_name = method.__func__.__name__ obj = method.__self...
0
0
0
0
0
555
0
0
244
d90a4713ede40d909bddd90975cd6377a1d93ec8
3,789
py
Python
NEAT/neat/attributes.py
ShangtongZhang/DataMining
f72a17694ca971dffc80ee6251ab47327c87492c
[ "Apache-2.0" ]
1
2018-02-22T15:40:22.000Z
2018-02-22T15:40:22.000Z
NEAT/neat/attributes.py
ShangtongZhang/DataMining
f72a17694ca971dffc80ee6251ab47327c87492c
[ "Apache-2.0" ]
null
null
null
NEAT/neat/attributes.py
ShangtongZhang/DataMining
f72a17694ca971dffc80ee6251ab47327c87492c
[ "Apache-2.0" ]
3
2017-03-31T03:38:36.000Z
2019-04-27T15:58:26.000Z
# TODO: There is probably a lot of room for simplification of these classes using metaprogramming.
31.31405
98
0.61441
from random import choice, gauss, random from neat.config import ConfigParameter # TODO: There is probably a lot of room for simplification of these classes using metaprogramming. class BaseAttribute(object): def __init__(self, name): self.name = name for n, cname in zip(self.__config_items__, se...
0
0
0
3,513
0
0
0
37
136
7dffe231c31a4be0d60223846b10ded3b3382b58
1,938
py
Python
test.py
hidevn/sphere-face-py
5b85431b038ac0e196b53ed7e19e2540133132d3
[ "MIT" ]
null
null
null
test.py
hidevn/sphere-face-py
5b85431b038ac0e196b53ed7e19e2540133132d3
[ "MIT" ]
null
null
null
test.py
hidevn/sphere-face-py
5b85431b038ac0e196b53ed7e19e2540133132d3
[ "MIT" ]
null
null
null
import caffe image_folder = './images' output_folder = './features' model = './train/code/sphereface_deploy.prototxt' weights = './train/result/sphereface_model.caffemodel' net = caffe.Net(model, weights, caffe.TEST) if __name__ == '__main__': #save_feature_vectors() print(detect_from_img('./Aaron_Peirsol_000...
34.607143
110
0.691434
import numpy as np import cv2 import os import caffe from scipy.spatial.distance import cosine image_folder = './images' output_folder = './features' model = './train/code/sphereface_deploy.prototxt' weights = './train/result/sphereface_model.caffemodel' net = caffe.Net(model, weights, caffe.TEST) def extract_deep_fe...
0
0
0
0
0
1,358
0
-6
180
d86e121283842502e8b415f5c5bb7b8769d03bc1
1,806
py
Python
beast/physicsmodel/helpers/gridhelpers.py
marthaboyer/beast
1ca71fb64ab60827e4e4e1937b64f319a98166c3
[ "BSD-3-Clause" ]
null
null
null
beast/physicsmodel/helpers/gridhelpers.py
marthaboyer/beast
1ca71fb64ab60827e4e4e1937b64f319a98166c3
[ "BSD-3-Clause" ]
null
null
null
beast/physicsmodel/helpers/gridhelpers.py
marthaboyer/beast
1ca71fb64ab60827e4e4e1937b64f319a98166c3
[ "BSD-3-Clause" ]
null
null
null
""" Common helpers in the grid package """ __all__ = ['isNestedInstance', 'pretty_size_print'] def isNestedInstance(obj, cl): """ Test for sub-classes types I could not find a universal test keywords -------- obj: object instance object to test cl: Class ...
24.08
72
0.54485
""" Common helpers in the grid package """ __all__ = ['isNestedInstance', 'pretty_size_print'] def isNestedInstance(obj, cl): """ Test for sub-classes types I could not find a universal test keywords -------- obj: object instance object to test cl: Class ...
0
0
0
0
0
0
0
0
0
4484d154e370a6956803f8544b3ec654031a14f2
317
py
Python
tests/test_showers.py
deepjets/deepjets
fc9c610d4fd80975d8d25eb0d7cd41d7dd318c75
[ "BSD-3-Clause" ]
23
2016-11-13T02:48:32.000Z
2021-11-13T01:02:20.000Z
tests/test_showers.py
deepjets/deepjets
fc9c610d4fd80975d8d25eb0d7cd41d7dd318c75
[ "BSD-3-Clause" ]
null
null
null
tests/test_showers.py
deepjets/deepjets
fc9c610d4fd80975d8d25eb0d7cd41d7dd318c75
[ "BSD-3-Clause" ]
7
2016-12-02T16:58:33.000Z
2021-09-02T12:36:46.000Z
from deepjets.generate import generate_events for event in generate_events('w_vincia.config', 1, write_to='vincia.hepmc', shower='vincia', random_state=1, verbosity=0): pass for event, weight in generate_events('w.config', 1, write_to='dire.hepmc', shower='dire', random_state=1, verbosity=0): print weight
39.625
122
0.753943
from deepjets.generate import generate_events for event in generate_events('w_vincia.config', 1, write_to='vincia.hepmc', shower='vincia', random_state=1, verbosity=0): pass for event, weight in generate_events('w.config', 1, write_to='dire.hepmc', shower='dire', random_state=1, verbosity=0): print weight
0
0
0
0
0
0
0
0
0
431546551b4d409bb50114ac36a7a15e82717c34
2,518
py
Python
test/python/test_loss.py
slin004/incubator-singa
09c8a2e65927d6405262bbb969e6dab96809df07
[ "Apache-2.0" ]
1
2019-11-15T12:46:10.000Z
2019-11-15T12:46:10.000Z
test/python/test_loss.py
slin004/incubator-singa
09c8a2e65927d6405262bbb969e6dab96809df07
[ "Apache-2.0" ]
8
2020-01-16T06:56:23.000Z
2020-01-18T03:46:04.000Z
test/python/test_loss.py
slin004/incubator-singa
09c8a2e65927d6405262bbb969e6dab96809df07
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
34.027027
74
0.602462
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
0
0
0
1,540
0
0
0
1
90
41866b837dfda3d810db4eccfdd0ab68717e6db9
1,492
py
Python
src/SortingSim/test.py
berkayaslan/Sorting_Simulation
16cfcd404063b060191dab244025012271edacd8
[ "MIT" ]
2
2020-01-26T09:42:03.000Z
2020-05-26T13:57:02.000Z
src/SortingSim/test.py
berkayaslan/Sorting_Simulation
16cfcd404063b060191dab244025012271edacd8
[ "MIT" ]
null
null
null
src/SortingSim/test.py
berkayaslan/Sorting_Simulation
16cfcd404063b060191dab244025012271edacd8
[ "MIT" ]
null
null
null
import pygame pygame.init() board = pygame.display.set_mode((400, 400)) while 1: for e in pygame.event.get(): if e.type == pygame.KEYDOWN and e.key == pygame.K_TAB: print("pressed tab") """ # ///---=== FIND STICK TEST ===--- ex1 = Sticks.Sticks() ex1.new_sticks(10) a = [i.length for i in ex...
27.62963
68
0.626676
import Sticks import stick import time import pygame pygame.init() board = pygame.display.set_mode((400, 400)) while 1: for e in pygame.event.get(): if e.type == pygame.KEYDOWN and e.key == pygame.K_TAB: print("pressed tab") """ # ///---=== FIND STICK TEST ===--- ex1 = Sticks.Sticks() ex1.n...
8
0
0
0
0
0
0
-27
66
279fc711c62428d8edd7bb25202187627d94fc62
581
py
Python
website/volunteers/migrations/0010_auto_20201129_2152.py
tibet5/website
937e1941aaadbf7cd0a404a2655858451c01dd54
[ "MIT" ]
null
null
null
website/volunteers/migrations/0010_auto_20201129_2152.py
tibet5/website
937e1941aaadbf7cd0a404a2655858451c01dd54
[ "MIT" ]
null
null
null
website/volunteers/migrations/0010_auto_20201129_2152.py
tibet5/website
937e1941aaadbf7cd0a404a2655858451c01dd54
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-11-30 02:52
24.208333
56
0.598967
# Generated by Django 3.1.2 on 2020-11-30 02:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('volunteers', '0009_auto_20201128_2348'), ] operations = [ migrations.AddField( model_name='volunteer', name='anonymi...
0
0
0
467
0
0
0
19
46
1ceb29a6e7813b27c5a606e336c81ea0d60d0dfc
4,088
py
Python
examples/external_isolation/plot_both_pol_sweep_results.py
JBHilton/covid-19-in-households-public
42fb31a3c581a3d5b6b6959078a5f6bf4f25212e
[ "Apache-2.0" ]
4
2020-04-17T13:19:43.000Z
2021-12-02T19:56:27.000Z
examples/external_isolation/plot_both_pol_sweep_results.py
JBHilton/covid-19-in-households-public
42fb31a3c581a3d5b6b6959078a5f6bf4f25212e
[ "Apache-2.0" ]
6
2020-06-16T17:06:52.000Z
2021-02-08T18:32:39.000Z
examples/external_isolation/plot_both_pol_sweep_results.py
JBHilton/covid-19-in-households-public
42fb31a3c581a3d5b6b6959078a5f6bf4f25212e
[ "Apache-2.0" ]
3
2020-05-12T12:09:48.000Z
2021-06-07T09:16:09.000Z
'''This plots the results of the parameter sweep for the OOHI example. ''' from os import mkdir from os.path import isdir from pickle import load from matplotlib.pyplot import close, colorbar, subplots from mpl_toolkits.axes_grid1 import make_axes_locatable if isdir('plots/oohi') is False: mkdir('plots/oohi') wit...
29.410072
73
0.630871
'''This plots the results of the parameter sweep for the OOHI example. ''' from os import mkdir from os.path import isdir from pickle import load from numpy import arange, array, atleast_2d, hstack, sum, where, zeros from matplotlib.pyplot import close, colorbar, imshow, set_cmap, subplots from mpl_toolkits.axes_grid1 ...
0
0
0
0
0
0
0
73
44
d9c3702c2b8b268d50c3dceb6e958e4b9a10cc86
1,515
py
Python
on Raspberry/DHTPub.py
NourS-d/Smart-GreenHouse-Programming_For_IoT
18632759c80c87b6343e70aac20b1dbdd3fb6503
[ "MIT" ]
null
null
null
on Raspberry/DHTPub.py
NourS-d/Smart-GreenHouse-Programming_For_IoT
18632759c80c87b6343e70aac20b1dbdd3fb6503
[ "MIT" ]
null
null
null
on Raspberry/DHTPub.py
NourS-d/Smart-GreenHouse-Programming_For_IoT
18632759c80c87b6343e70aac20b1dbdd3fb6503
[ "MIT" ]
null
null
null
from DHT import DHT_Read import paho.mqtt.client as mqtt import json import requests import time try: file=open("config.json", "r") json_str = file.read() file.close() except: raise KeyError("Error opening config file. Please check.") config_json = json.loads(json_str) url = config_jso...
19.423077
93
0.673927
from DHT import DHT_Read import paho.mqtt.client as mqtt import json import requests import time class DHT_Pub: def __init__(self, clientID, broker, port = 1883): self.clientID = clientID self.port = port self.pub=mqtt.Client(self.clientID, port) self.broker = broker def start(self): self.pub.conne...
0
0
0
379
0
0
0
0
23
614756d04575afdd61b6db9c917c997966809450
1,303
py
Python
apps/views.py
Jayson7/django-weather-app
91931cb59de07213739a95019918f7d91f42e2b2
[ "MIT" ]
null
null
null
apps/views.py
Jayson7/django-weather-app
91931cb59de07213739a95019918f7d91f42e2b2
[ "MIT" ]
null
null
null
apps/views.py
Jayson7/django-weather-app
91931cb59de07213739a95019918f7d91f42e2b2
[ "MIT" ]
null
null
null
# Create your views here.
34.289474
165
0.521105
from django.shortcuts import render import json from urllib.error import HTTPError import urllib # Create your views here. def homepage(request): if request.method == 'POST': city = request.POST['city'] try: url = urllib.request.urlopen('https://api.openweathermap.org/data/2.5/weather...
2
0
0
0
0
1,156
0
9
111
86a5fc8774ef271374e84a2219191c1c7929b948
1,959
py
Python
uta_tools/data_sources/mane_transcript_mappings.py
cancervariants/uta_tools
daa3fcbaabcc8aaeef8f2b0c7080bacd928d97d6
[ "MIT" ]
1
2022-01-19T18:17:56.000Z
2022-01-19T18:17:56.000Z
uta_tools/data_sources/mane_transcript_mappings.py
cancervariants/uta-tools
9d102ea96e5f7b07a862113ee07eca2ce3412ad4
[ "MIT" ]
25
2021-10-13T19:57:39.000Z
2022-03-29T17:56:32.000Z
uta_tools/data_sources/mane_transcript_mappings.py
cancervariants/uta-tools
9d102ea96e5f7b07a862113ee07eca2ce3412ad4
[ "MIT" ]
null
null
null
"""The module for loading MANE Transcript mappings to genes."""
36.962264
78
0.646759
"""The module for loading MANE Transcript mappings to genes.""" from typing import Dict, Optional, List import pandas as pd from uta_tools import MANE_SUMMARY_PATH, logger class MANETranscriptMappings: """The MANE Transcript mappings class.""" def __init__(self, mane_data_path: str = MANE_SUMMARY_PATH) -> ...
0
0
0
1,761
0
0
0
42
91
fda805b8612fa20791d43e89fb3298b7f7ab2ab3
1,253
py
Python
lib/datasets/__init__.py
hudmgy/HRNet-Facial-Landmark-Detection
fe95d4b19e92fe267201d38648635b9beffba77a
[ "MIT" ]
1
2021-06-22T07:58:24.000Z
2021-06-22T07:58:24.000Z
lib/datasets/__init__.py
hudmgy/HRNet-Facial-Landmark-Detection
fe95d4b19e92fe267201d38648635b9beffba77a
[ "MIT" ]
null
null
null
lib/datasets/__init__.py
hudmgy/HRNet-Facial-Landmark-Detection
fe95d4b19e92fe267201d38648635b9beffba77a
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Tianheng Cheng(tianhengcheng@gmail.com) # ------------------------------------------------------------------------------ from .aflw import AFLW from .cofw import COF...
29.139535
80
0.592977
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Tianheng Cheng(tianhengcheng@gmail.com) # ------------------------------------------------------------------------------ from .aflw import AFLW from .cofw import COF...
0
0
0
0
0
644
0
35
133
cd5f236ac6ba3563921c41b0487c9111fcce775b
3,306
py
Python
tests/test_ntree.py
awoods/ocfl-py
ef4ff9d6b9a950088ff5373c4f1dfeec339f034d
[ "MIT" ]
14
2018-09-10T20:08:04.000Z
2022-03-29T18:10:43.000Z
tests/test_ntree.py
awoods/ocfl-py
ef4ff9d6b9a950088ff5373c4f1dfeec339f034d
[ "MIT" ]
73
2019-02-13T20:35:09.000Z
2022-03-24T15:21:34.000Z
tests/test_ntree.py
awoods/ocfl-py
ef4ff9d6b9a950088ff5373c4f1dfeec339f034d
[ "MIT" ]
3
2019-02-13T18:39:50.000Z
2021-05-04T15:39:04.000Z
"""Digest tests."""
47.228571
85
0.635209
"""Digest tests.""" import unittest from ocfl.ntree import Ntree class TestAll(unittest.TestCase): """TestAll class to run tests.""" def test01_encode(self): """Test encode.""" nt = Ntree() self.assertEqual(nt.encode(''), '') self.assertEqual(nt.encode('a'), 'a') self....
0
0
0
3,217
0
0
0
1
67
5575aa3a08f72b6233406337d9b98d6034623d01
26,482
py
Python
tests/unit_tests/test_set_dropin.py
realead/cykhash
b1a45843c3be49cd232d3c78315d2291a830284f
[ "MIT" ]
18
2019-03-13T08:20:06.000Z
2021-06-22T08:03:01.000Z
tests/unit_tests/test_set_dropin.py
realead/cykhash
b1a45843c3be49cd232d3c78315d2291a830284f
[ "MIT" ]
6
2020-04-13T10:11:45.000Z
2021-11-14T15:59:55.000Z
tests/unit_tests/test_set_dropin.py
realead/cykhash
b1a45843c3be49cd232d3c78315d2291a830284f
[ "MIT" ]
7
2019-05-19T22:24:57.000Z
2020-08-26T23:01:23.000Z
from cykhash import Int64Set, Int32Set, Float64Set, Float32Set, PyObjectSet SUFFIX={Int64Set : "int64", Int32Set : "int32", Float64Set : "float64", Float32Set : "float32", PyObjectSet : "pyobject"}
32.099394
85
0.601088
import pytest from unittestmock import UnitTestMock from cykhash import Int64Set, Int32Set, Float64Set, Float32Set, PyObjectSet import cykhash SUFFIX={Int64Set : "int64", Int32Set : "int32", Float64Set : "float64", Float32Set : "float32", PyObjectSet : "pyobject"} def pick_fun...
0
25,751
0
0
0
155
0
1
318
a1fba859af22a9a1b8fc1410806c26c08f872a7f
6,478
py
Python
lib/airflow/tests/contrib/jobs/test_dag_trigger.py
ideax-business/ai-flow
0a7797a093beddf827f68cad7a11e0babf1b5059
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
lib/airflow/tests/contrib/jobs/test_dag_trigger.py
ideax-business/ai-flow
0a7797a093beddf827f68cad7a11e0babf1b5059
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
lib/airflow/tests/contrib/jobs/test_dag_trigger.py
ideax-business/ai-flow
0a7797a093beddf827f68cad7a11e0babf1b5059
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
42.064935
113
0.706082
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
0
316
0
4,223
0
0
0
516
399
db967d18b0150b9b46f807e4175b670ec1cd835a
1,063
py
Python
tests/test_model_registry.py
murthyn/composer
2a04cf387dd8558556500f7ef2bc6d3d131043d5
[ "Apache-2.0" ]
null
null
null
tests/test_model_registry.py
murthyn/composer
2a04cf387dd8558556500f7ef2bc6d3d131043d5
[ "Apache-2.0" ]
null
null
null
tests/test_model_registry.py
murthyn/composer
2a04cf387dd8558556500f7ef2bc6d3d131043d5
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MosaicML. All Rights Reserved.
26.575
61
0.686736
# Copyright 2021 MosaicML. All Rights Reserved. import pytest from composer.models import ModelHparams from composer.trainer.trainer_hparams import model_registry @pytest.mark.parametrize("model_name", model_registry.keys()) def test_model_registry(model_name, request): if model_name in ['timm']: pytest...
0
874
0
0
0
0
0
49
91
6d2e3d350112bf5ba43f5eeb7294864da2a45653
1,290
py
Python
src/lab2rgb.py
ytyaru/Python.ColorSpace.Converter.20210606081641
7cd88aa12eb23ac26785ad1bff3a3e8034947c65
[ "CC0-1.0" ]
null
null
null
src/lab2rgb.py
ytyaru/Python.ColorSpace.Converter.20210606081641
7cd88aa12eb23ac26785ad1bff3a3e8034947c65
[ "CC0-1.0" ]
null
null
null
src/lab2rgb.py
ytyaru/Python.ColorSpace.Converter.20210606081641
7cd88aa12eb23ac26785ad1bff3a3e8034947c65
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 # coding: utf8 if __name__ == '__main__': import argparse parser = argparse.ArgumentParser(description='Lab->RGB', formatter_class=argparse.RawTextHelpFormatter) parser.add_argument('lab', help="\n 0.0 <= l <= 100.0\n -86.18463 <= a <= 98.25422\n -107.863686 <= b <= 94.48248") ...
33.076923
134
0.589147
#!/usr/bin/env python3 # coding: utf8 from labconstants import LabConstants def lab2rgb(lab): import math l, a, b = lab y = (l + 16) / 116 x = y if math.isnan(a) else y + a / 500 z = y if math.isnan(b) else y - b / 200 y = LabConstants.Yn * lab_xyz(y) x = LabConstants.Xn * lab_xyz(x) z...
63
0
0
0
0
642
0
16
90
0300076d66cbcef4d8deb5912fdfdb704586b6be
23,969
py
Python
app/model.py
Princessgladys/googleresourcefinder
7715276b3c588f7c457de04944559052c8170f7e
[ "Apache-2.0" ]
null
null
null
app/model.py
Princessgladys/googleresourcefinder
7715276b3c588f7c457de04944559052c8170f7e
[ "Apache-2.0" ]
null
null
null
app/model.py
Princessgladys/googleresourcefinder
7715276b3c588f7c457de04944559052c8170f7e
[ "Apache-2.0" ]
null
null
null
# Copyright 2009-2010 by Ka-Ping Yee # # 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 w...
49.217659
80
0.683925
# Copyright 2009-2010 by Ka-Ping Yee # # 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 w...
0
3,414
0
17,221
0
0
0
0
321
d9b6dacb47bb3bb1903c75fd6a311e2b090af877
12,452
py
Python
rllib/policy/torch_policy.py
brechtmann/ray
0c76ebd676f794847ea990aecced22b88717d09e
[ "Apache-2.0" ]
null
null
null
rllib/policy/torch_policy.py
brechtmann/ray
0c76ebd676f794847ea990aecced22b88717d09e
[ "Apache-2.0" ]
null
null
null
rllib/policy/torch_policy.py
brechtmann/ray
0c76ebd676f794847ea990aecced22b88717d09e
[ "Apache-2.0" ]
null
null
null
from ray.rllib.utils.framework import try_import_torch torch, _ = try_import_torch()
37.963415
79
0.608336
import numpy as np import time from ray.rllib.policy.policy import Policy, LEARNER_STATS_KEY, ACTION_PROB, \ ACTION_LOGP from ray.rllib.policy.sample_batch import SampleBatch from ray.rllib.utils.annotations import override, DeveloperAPI from ray.rllib.utils.framework import try_import_torch from ray.rllib.utils.s...
0
7,845
0
4,008
0
0
0
264
246
3788688439f869905b054a77ecac95a103f926f6
1,297
py
Python
sshd_telegram_alert/__main__.py
nanih98/sshd-telegram-alert
7f5adb662658bcf3dc9020113f6133b1184a971b
[ "MIT" ]
null
null
null
sshd_telegram_alert/__main__.py
nanih98/sshd-telegram-alert
7f5adb662658bcf3dc9020113f6133b1184a971b
[ "MIT" ]
null
null
null
sshd_telegram_alert/__main__.py
nanih98/sshd-telegram-alert
7f5adb662658bcf3dc9020113f6133b1184a971b
[ "MIT" ]
null
null
null
from .parser import parse_args from .logger import Logger from .configuration import Configuration from .requester import Requester import platform def main() -> None: """Main function where the program start""" args = parse_args() config_path = check_os_path() log = Logger(debug_flag=True) log...
25.94
86
0.656901
import os from .parser import parse_args from .logger import Logger from .configuration import Configuration from .requester import Requester import platform def check_os_path(): if platform.system() == "Darwin": print(os.path.join(os.environ.get('HOME'), ".sshd-telegram-credentials.json")) ...
2
0
0
0
0
293
0
-12
45
077847e78c05efc885c4770c62e1e3d7fa340596
6,461
py
Python
azure-mgmt-search/azure/mgmt/search/models/search_service.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-search/azure/mgmt/search/models/search_service.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-search/azure/mgmt/search/models/search_service.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.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 ...
52.959016
99
0.67358
# 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 ...
0
0
0
5,932
0
0
0
9
46
a50e62be14975592aef74c3fa5ad879365e37cfa
1,893
py
Python
Prediction.py
sarthak25/Google-Stock-Price-Prediction
017f78b20def5ca5a3e2727051bcbc735b9dc33c
[ "MIT" ]
1
2021-07-04T12:09:35.000Z
2021-07-04T12:09:35.000Z
Prediction.py
sarthak25/Google-Stock-Price-Prediction
017f78b20def5ca5a3e2727051bcbc735b9dc33c
[ "MIT" ]
null
null
null
Prediction.py
sarthak25/Google-Stock-Price-Prediction
017f78b20def5ca5a3e2727051bcbc735b9dc33c
[ "MIT" ]
1
2020-11-16T18:31:57.000Z
2020-11-16T18:31:57.000Z
# A PREDICTIVE MODEL FOR GOOGLE STOCK PRICES USING LINEAR REGRESSION # IMPORTING ALL THE MODULES import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression # READING THE DATASET AND VISUALIZING A FEW ENTRIES dt=pd.read_csv("Dataset/Google_Stock_...
27.042857
69
0.725304
# A PREDICTIVE MODEL FOR GOOGLE STOCK PRICES USING LINEAR REGRESSION # IMPORTING ALL THE MODULES import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression # READING THE DATASET AND VISUALIZING A FEW ENTRIES dt=pd.read_csv...
0
0
0
0
0
0
0
0
23
f95e1333ac543570c7afc2700e11021923f0fd0f
579
py
Python
torchtools/test.py
Takezo87/torchtools
4230305d9063dabee3614f0dcd8557739b90f817
[ "Apache-2.0" ]
null
null
null
torchtools/test.py
Takezo87/torchtools
4230305d9063dabee3614f0dcd8557739b90f817
[ "Apache-2.0" ]
1
2022-02-26T06:23:52.000Z
2022-02-26T06:23:52.000Z
torchtools/test.py
Takezo87/torchtools
4230305d9063dabee3614f0dcd8557739b90f817
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: 100_test.ipynb (unless otherwise specified). __all__ = ['items_to_arrays'] # Cell # Cell def items_to_arrays(items): '''convert list of item tuples into X,y numpy arrays (for use with numpy dataloader)''' # return np.stack([x[0] for x in items]), np.stack([x[1] for...
32.166667
91
0.704663
# AUTOGENERATED! DO NOT EDIT! File to edit: 100_test.ipynb (unless otherwise specified). __all__ = ['items_to_arrays'] # Cell from .core import * from .data import * from .models import * from .datasets import * from .augmentations import * from .datablock import * from .dataloader import * # Cell def items_to_array...
0
0
0
0
0
0
0
12
154
13d97300471566ef042dc75cbe53f61f814fbf4a
28,681
py
Python
sopel/tools/__init__.py
cottongin/sopel
54e42747959d86ddc1ba40bc02098cb3ab7d9439
[ "EFL-2.0" ]
null
null
null
sopel/tools/__init__.py
cottongin/sopel
54e42747959d86ddc1ba40bc02098cb3ab7d9439
[ "EFL-2.0" ]
null
null
null
sopel/tools/__init__.py
cottongin/sopel
54e42747959d86ddc1ba40bc02098cb3ab7d9439
[ "EFL-2.0" ]
null
null
null
# coding=utf-8 """Useful miscellaneous tools and shortcuts for Sopel plugins *Availability: 3+* """ # tools.py - Sopel misc tools # Copyright 2008, Sean B. Palmer, inamidst.com # Copyright 2012, Elad Alfassa <elad@fedoraproject.org> # Copyright 2012, Elsie Powell, embolalia.com # Licensed under the Eiffel Forum Lice...
34.103448
87
0.62055
# coding=utf-8 """Useful miscellaneous tools and shortcuts for Sopel plugins *Availability: 3+* """ # tools.py - Sopel misc tools # Copyright 2008, Sean B. Palmer, inamidst.com # Copyright © 2012, Elad Alfassa <elad@fedoraproject.org> # Copyright 2012, Elsie Powell, embolalia.com # Licensed under the Eiffel Forum Lic...
5
4,065
0
8,751
0
220
0
34
475
22713b1b406683d4ed6ad898aa63ba71a1a28ac4
3,520
py
Python
oracle-runs.py
fair-trec/trec2021-fair-public
d9f16bd7d70c350fa6e5906fac36c4f1af837573
[ "MIT" ]
3
2021-07-28T09:10:48.000Z
2022-03-23T15:08:48.000Z
oracle-runs.py
fair-trec/trec2021-fair-public
d9f16bd7d70c350fa6e5906fac36c4f1af837573
[ "MIT" ]
null
null
null
oracle-runs.py
fair-trec/trec2021-fair-public
d9f16bd7d70c350fa6e5906fac36c4f1af837573
[ "MIT" ]
null
null
null
""" Produce TREC fair ranking runs from an oracle. This script assumes the data lives in a directory 'data'. It loads the training topics and uses them as an oracle for producing rankings. Usage: oracle-runs.py --task1 [options] oracle-runs.py --task2 [options] Options: -v, --verbose Write verbo...
27.716535
95
0.641477
""" Produce TREC fair ranking runs from an oracle. This script assumes the data lives in a directory 'data'. It loads the training topics and uses them as an oracle for producing rankings. Usage: oracle-runs.py --task1 [options] oracle-runs.py --task2 [options] Options: -v, --verbose Write verbo...
0
0
0
0
0
2,641
0
-13
250
4b44ab6318cc359b020659d482e8f114bcd8d62d
6,394
py
Python
scan_list.py
jeremyng123/cobaltstrike
51a67ec918904d8a3b7ea07ab62a10b58183eb8f
[ "MIT" ]
193
2020-12-21T03:20:27.000Z
2022-02-28T11:11:08.000Z
scan_list.py
jeremyng123/cobaltstrike
51a67ec918904d8a3b7ea07ab62a10b58183eb8f
[ "MIT" ]
4
2021-01-09T11:27:57.000Z
2021-12-06T13:38:17.000Z
scan_list.py
jeremyng123/cobaltstrike
51a67ec918904d8a3b7ea07ab62a10b58183eb8f
[ "MIT" ]
54
2020-12-20T20:24:54.000Z
2022-02-28T11:11:09.000Z
import argparse import csv import urllib3 import datetime if __name__ == "__main__": parser = argparse.ArgumentParser(description='Extract Cobalt Strike beacon and configuration from a list of server') parser.add_argument('HOSTLIST', help='List of IP addresses or domains from a file') parser.add_argumen...
43.202703
174
0.542853
import argparse import csv import requests import urllib3 from urllib.parse import urljoin from lib import decrypt_beacon, decode_config, JsonEncoder import multiprocessing from functools import partial import datetime import pandas as pd def mp_worker( BITS, PORT, HTTP,output_list, host ): print("Checking {}".fo...
0
0
0
0
0
3,961
0
49
178
30ce9806dbf6f7dbafe0f568c2b2657bff6791b5
9,140
py
Python
ar-cnn/utils/midi_utils.py
carniblood/aws-deepcomposer-retrogame
6876eedd2a128362baff4daace73ee4f254676c3
[ "MIT-0" ]
null
null
null
ar-cnn/utils/midi_utils.py
carniblood/aws-deepcomposer-retrogame
6876eedd2a128362baff4daace73ee4f254676c3
[ "MIT-0" ]
null
null
null
ar-cnn/utils/midi_utils.py
carniblood/aws-deepcomposer-retrogame
6876eedd2a128362baff4daace73ee4f254676c3
[ "MIT-0" ]
null
null
null
# The MIT-Zero License # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # 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 limit...
42.511628
101
0.659956
# The MIT-Zero License # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # 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 limit...
0
0
0
0
0
1,093
0
0
23
958a3b3c3c8bbbf71fdafc826be947de6c1e562c
2,740
py
Python
core/constraints/__init__.py
AluBhorta/UCSPy-Engine
917eea6ab98338c5763c9fd07e24da7fa2ee1cda
[ "MIT" ]
6
2021-09-29T06:18:55.000Z
2021-09-29T18:56:13.000Z
core/constraints/__init__.py
AluBhorta/UCSPy-Engine
917eea6ab98338c5763c9fd07e24da7fa2ee1cda
[ "MIT" ]
1
2021-10-01T00:00:15.000Z
2021-10-01T00:14:24.000Z
core/constraints/__init__.py
AluBhorta/UCSPy-Engine
917eea6ab98338c5763c9fd07e24da7fa2ee1cda
[ "MIT" ]
3
2020-06-26T05:59:56.000Z
2021-09-29T06:25:23.000Z
from core.constraints.hard.hard_constraint_1 import violates_hard_constraint_1 from core.constraints.hard.hard_constraint_2 import violates_hard_constraint_2 from core.constraints.soft.soft_constraint_1 import penalty_of_soft_constraint_1 from core.constraints.soft.soft_constraint_2 import penalty_of_soft_constraint_...
44.193548
143
0.712409
from core.constraints.hard.hard_constraint_1 import violates_hard_constraint_1 from core.constraints.hard.hard_constraint_2 import violates_hard_constraint_2 from core.constraints.soft.soft_constraint_1 import penalty_of_soft_constraint_1 from core.constraints.soft.soft_constraint_2 import penalty_of_soft_constraint_...
0
0
0
0
0
0
0
0
0
b38add5b43c8c288b94da71185957d3fc3fad700
963
py
Python
extras/scripts/convert_pronto_codes.py
aneisch/home-assistant
d8a866d75f512d23ffa7b9e5d82d7c575ece3c76
[ "Apache-2.0" ]
18
2016-08-10T01:02:27.000Z
2017-10-26T04:19:49.000Z
extras/scripts/convert_pronto_codes.py
aneisch/home-assistant
d8a866d75f512d23ffa7b9e5d82d7c575ece3c76
[ "Apache-2.0" ]
null
null
null
extras/scripts/convert_pronto_codes.py
aneisch/home-assistant
d8a866d75f512d23ffa7b9e5d82d7c575ece3c76
[ "Apache-2.0" ]
4
2017-04-20T19:41:21.000Z
2017-05-16T17:10:05.000Z
#!/usr/bin/env python # Provide code as arg: ./whatever.py "0000 ... ..." import binascii import struct if __name__ == '__main__': import sys for code in sys.argv[1:]: pronto = bytearray.fromhex(code) pulses = pronto2lirc(pronto) output = "" count = 0 for pulse in ...
27.514286
90
0.554517
#!/usr/bin/env python # Provide code as arg: ./whatever.py "0000 ... ..." import binascii import struct def pronto2lirc(pronto): codes = [long(binascii.hexlify(pronto[i:i+2]), 16) for i in xrange(0, len(pronto), 2)] if codes[0]: raise ValueError('Pronto code should start with 0000') if len(code...
0
0
0
0
0
413
0
0
23
2585b1efefd1186d26a369a8a60b9ee6612d3e1c
1,302
py
Python
cards/turret.py
MrCoft/EngiMod
65c90bd9231ac388d8af7849a1835914f1eefc78
[ "MIT" ]
null
null
null
cards/turret.py
MrCoft/EngiMod
65c90bd9231ac388d8af7849a1835914f1eefc78
[ "MIT" ]
null
null
null
cards/turret.py
MrCoft/EngiMod
65c90bd9231ac388d8af7849a1835914f1eefc78
[ "MIT" ]
null
null
null
Card( name = "Turret", type = "power", target = "self", rarity = "uncommon", cost = 1, const = dict( DAMAGE = 6, DAMAGE_UPGRADE = 3, MAGIC_NUMBER = "DAMAGE", ), desc = "At the end of your turn, deal !M! damage to a random enemy.", upgrade_code = """ u...
28.933333
123
0.554531
from engi_mod import * Card( name = "Turret", type = "power", target = "self", rarity = "uncommon", cost = 1, const = dict( DAMAGE = 6, DAMAGE_UPGRADE = 3, MAGIC_NUMBER = "DAMAGE", ), desc = "At the end of your turn, deal !M! damage to a random enemy.", upgra...
0
0
0
0
0
0
0
1
22
d31cdcc12511cabf5ac61c6151db8886c0888504
494
py
Python
0x0F-python-object_relational_mapping/model_city.py
C-distin/alx-higher_level_programming
ee018135b24ac07d40f2309a4febf21b8a25aee4
[ "MIT" ]
null
null
null
0x0F-python-object_relational_mapping/model_city.py
C-distin/alx-higher_level_programming
ee018135b24ac07d40f2309a4febf21b8a25aee4
[ "MIT" ]
null
null
null
0x0F-python-object_relational_mapping/model_city.py
C-distin/alx-higher_level_programming
ee018135b24ac07d40f2309a4febf21b8a25aee4
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """ Define a class City that inherits from Base """
24.7
71
0.686235
#!/usr/bin/python3 """ Define a class City that inherits from Base """ from sqlalchemy import Column, Integer, String, ForeignKey from model_state import Base class City(Base): """ A class City that inherits from Base """ __tablename__ = "cities" id = Column(Integer, primary_key=True, nullable=F...
0
0
0
310
0
0
0
44
68
86d16852ee15057e22545a2d7257027440ff9f5d
2,857
py
Python
static_grouper/templatetags/static_grouper.py
adrienlachaize/dezede
584ec30cedab95152e2f95595b7691a04e6736e2
[ "BSD-3-Clause" ]
15
2015-02-10T21:16:31.000Z
2021-03-25T16:46:20.000Z
static_grouper/templatetags/static_grouper.py
adrienlachaize/dezede
584ec30cedab95152e2f95595b7691a04e6736e2
[ "BSD-3-Clause" ]
4
2021-02-10T15:42:08.000Z
2022-03-11T23:20:38.000Z
static_grouper/templatetags/static_grouper.py
adrienlachaize/dezede
584ec30cedab95152e2f95595b7691a04e6736e2
[ "BSD-3-Clause" ]
6
2016-07-10T14:20:48.000Z
2022-01-19T18:34:02.000Z
from django.template import (Library) register = Library() CONTEXT_VARIABLE_NAME = 'static_grouper_dict' register.tag('addstatic', AddStaticNode) register.tag('static_list', StaticListNode)
32.465909
83
0.621281
from collections import defaultdict from compressor.templatetags.compress import CompressorNode from django.template import ( Library, Node, Template, TemplateSyntaxError, Context) register = Library() CONTEXT_VARIABLE_NAME = 'static_grouper_dict' class AddStaticNode(Node): def __init__(self, parser, toke...
0
0
0
2,466
0
0
0
103
90
b9d69527abbd1d87104316935718861ead22d02c
549
py
Python
solfasol/issues/migrations/0009_auto_20200918_0020.py
rekognize/solfasol
c960c3364c753d75161242eccac4f085d800c843
[ "MIT" ]
null
null
null
solfasol/issues/migrations/0009_auto_20200918_0020.py
rekognize/solfasol
c960c3364c753d75161242eccac4f085d800c843
[ "MIT" ]
1
2020-06-18T13:08:47.000Z
2020-06-18T13:08:47.000Z
solfasol/issues/migrations/0009_auto_20200918_0020.py
Solfasol/solfasol
c960c3364c753d75161242eccac4f085d800c843
[ "MIT" ]
null
null
null
# Generated by Django 3.1.1 on 2020-09-17 21:20
23.869565
109
0.591985
# Generated by Django 3.1.1 on 2020-09-17 21:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('issues', '0008_auto_20200918_0006'), ] operations = [ migrations.RemoveField( model_name='issue', name='file_data', ...
0
0
0
435
0
0
0
19
46
c7e38cb251d253e29429b6f992fbff071d6adf2c
627
py
Python
osm_austria_building_coverage/urls.py
thomaskonrad/osm_austria_building_coverage
3f678837b6800adfdd165f9b8424d1a258ca63de
[ "MIT" ]
2
2015-06-21T19:39:05.000Z
2015-06-22T10:54:17.000Z
osm_austria_building_coverage/urls.py
thomaskonrad/osm-austria-building-coverage
3f678837b6800adfdd165f9b8424d1a258ca63de
[ "MIT" ]
2
2018-02-17T16:51:06.000Z
2018-02-23T07:11:13.000Z
osm_austria_building_coverage/urls.py
thomaskonrad/osm_austria_building_coverage
3f678837b6800adfdd165f9b8424d1a258ca63de
[ "MIT" ]
3
2019-10-16T08:46:13.000Z
2021-04-14T23:49:07.000Z
from django.conf.urls import url from coverage_score_viewer.views import index, states, districts, municipalities, details, search, coverage_chart from map.views import map urlpatterns = [ url(r'^$', index, name='index'), url(r'^states/$', states, name='states'), url(r'^districts/$', districts, name='dist...
33
113
0.673046
from django.conf.urls import url from coverage_score_viewer.views import index, states, districts, municipalities, details, search, coverage_chart from map.views import map urlpatterns = [ url(r'^$', index, name='index'), url(r'^states/$', states, name='states'), url(r'^districts/$', districts, name='dist...
0
0
0
0
0
0
0
0
0
3cc7f8fa749c9cf61233fe046871543a9e762b27
672
py
Python
PythonApps/hanoi_tower.py
zactsiap/SB4-sample
b9a70d267db3a330170a5cd6aa2c0bf37bfdd5d2
[ "MIT" ]
1
2018-03-28T08:55:10.000Z
2018-03-28T08:55:10.000Z
PythonApps/hanoi_tower.py
zactsiap/Python
b9a70d267db3a330170a5cd6aa2c0bf37bfdd5d2
[ "MIT" ]
null
null
null
PythonApps/hanoi_tower.py
zactsiap/Python
b9a70d267db3a330170a5cd6aa2c0bf37bfdd5d2
[ "MIT" ]
null
null
null
#Hanoi tower import time diskNumber = 1 while diskNumber != 0: print("============================") diskNumber = input("Give how many disk you have.\nGive 0 to end.\n============================\n") print("============================") diskNumber=int(diskNumber) moveTower(diskNumber,"A...
28
103
0.552083
#Hanoi tower import time def moveTower(height,fromPole, toPole, withPole): if height >= 1: moveTower(height-1,fromPole,withPole,toPole) moveDisk(fromPole,toPole) moveTower(height-1,withPole,toPole,fromPole) def moveDisk(fp,tp): print("Moving disk from",fp,"to",tp) ...
0
0
0
0
0
233
0
0
58
0c47d0dab31b2f5af3dda0da867f4d530e0f3323
8,665
py
Python
build/lib/Pythactyl/client.py
IAmGadget/Pythactyl
b0cca838d434e8ceba1a90328708b9cde3d9fbcc
[ "MIT" ]
2
2021-07-13T21:43:44.000Z
2021-09-06T08:05:35.000Z
build/lib/Pythactyl/client.py
IAmGadget/Pythactyl
b0cca838d434e8ceba1a90328708b9cde3d9fbcc
[ "MIT" ]
1
2021-09-11T16:08:43.000Z
2021-10-30T16:10:56.000Z
build/lib/Pythactyl/client.py
IAmGadget/Pythactyl
b0cca838d434e8ceba1a90328708b9cde3d9fbcc
[ "MIT" ]
null
null
null
if __name__ == "__main__": print("I dont run. No use in trying to make me lol")
36.716102
130
0.552222
import requests from errors import PermissionsMissing class PterodactylClient(object): def __init__(self, url, api_key): self.url = url + "/api/client" self.api_key = api_key def account(self): headers = { "Authorization": "Bearer {}".format(self.api_key), "Acce...
0
0
0
8,503
0
0
0
10
67
2958aa609c7322fec1b8dd23a67c95f349cb1219
1,110
py
Python
terse/Grammar/Command_Assign.py
talipovm/Terse
e6bfd3ac0d411b18d5167019623d5451695e787c
[ "MIT" ]
2
2015-04-08T21:28:35.000Z
2015-04-08T23:25:04.000Z
terse/Grammar/Command_Assign.py
talipovm/Terse
e6bfd3ac0d411b18d5167019623d5451695e787c
[ "MIT" ]
null
null
null
terse/Grammar/Command_Assign.py
talipovm/Terse
e6bfd3ac0d411b18d5167019623d5451695e787c
[ "MIT" ]
1
2015-04-08T21:29:22.000Z
2015-04-08T21:29:22.000Z
import logging log = logging.getLogger(__name__)
32.647059
101
0.667568
from Containers.ParsedStructure import ParsedElement from Tools.misc import strip_all from Grammar.Top_Grammar import Top_Grammar from Grammar.Functions import ExpressionFactory import logging log = logging.getLogger(__name__) class Command_Assign(Top_Grammar): def __init__(self, GI, FI, parsed_container, trouble...
0
0
0
860
0
0
0
90
111
80ccd07a50d9e26f0f3c296670920b067e2d2e5e
1,043
py
Python
Algorithms/0097_Interleaving_String/Python/Interleaving_String_Solution_1.py
lht19900714/Leetcode_Solutions
dac7a038329a5c1f8a78e86cc6f49116b963f1fb
[ "MIT" ]
null
null
null
Algorithms/0097_Interleaving_String/Python/Interleaving_String_Solution_1.py
lht19900714/Leetcode_Solutions
dac7a038329a5c1f8a78e86cc6f49116b963f1fb
[ "MIT" ]
null
null
null
Algorithms/0097_Interleaving_String/Python/Interleaving_String_Solution_1.py
lht19900714/Leetcode_Solutions
dac7a038329a5c1f8a78e86cc6f49116b963f1fb
[ "MIT" ]
null
null
null
# Space: O(n) # Time: O(n)
28.972222
99
0.540748
# Space: O(n) # Time: O(n) class Solution: def isInterleave(self, s1: str, s2: str, s3: str) -> bool: length_1, length_2, length_3 = len(s1), len(s2), len(s3) if length_1 == length_2 == length_3 == 0: return True if length_1 + length_2 != length_3: return False cache = [[None for ...
0
0
0
984
0
0
0
0
23
a2cfb3dd847c2c2f892bf3b4da52f1a13e5ade61
338
py
Python
carProject/carApp/models.py
cs-fullstack-2019-spring/django-validation-cw-cgarciapieto
51df6fbd8d4e5ad878c4a620ca822ecd9df55711
[ "Apache-2.0" ]
null
null
null
carProject/carApp/models.py
cs-fullstack-2019-spring/django-validation-cw-cgarciapieto
51df6fbd8d4e5ad878c4a620ca822ecd9df55711
[ "Apache-2.0" ]
null
null
null
carProject/carApp/models.py
cs-fullstack-2019-spring/django-validation-cw-cgarciapieto
51df6fbd8d4e5ad878c4a620ca822ecd9df55711
[ "Apache-2.0" ]
null
null
null
# car Model with input/attributes make, model, year, mpg
28.166667
56
0.718935
from django.db import models # car Model with input/attributes make, model, year, mpg class CarModel(models.Model): make = models.CharField(max_length=200) model = models.CharField(max_length=200) year = models.IntegerField(default=0) mpg = models.IntegerField(default=0) def __str__(self): ...
0
0
0
229
0
0
0
7
45
e8525b400d730f96fedff9ad040d2992ff14e0fd
193
py
Python
ecfactory/mnt_cycles/mnt_cycles_examples.py
weikengchen/ecfactory
f509c00b7cf66f4b8dbe9540599a4c95b9742bfd
[ "MIT" ]
39
2016-06-09T13:47:57.000Z
2022-02-10T14:06:20.000Z
ecfactory/mnt_cycles/mnt_cycles_examples.py
frevson/ecfactory-A-SageMath-Library-for-Constructing-Elliptic-Curves
f509c00b7cf66f4b8dbe9540599a4c95b9742bfd
[ "MIT" ]
3
2019-04-26T14:15:34.000Z
2021-02-03T09:21:37.000Z
ecfactory/mnt_cycles/mnt_cycles_examples.py
frevson/ecfactory-A-SageMath-Library-for-Constructing-Elliptic-Curves
f509c00b7cf66f4b8dbe9540599a4c95b9742bfd
[ "MIT" ]
13
2017-09-27T08:08:49.000Z
2022-03-28T12:11:20.000Z
import ecfactory.mnt_cycles as mnt_cycles # Example (find an MNT cycle with D = -19) cycles = mnt_cycles.make_cycle(-19) print('Found a cycle: ' + str(cycles[0][0]) + ', ' + str(cycles[0][1]))
38.6
71
0.678756
import ecfactory.mnt_cycles as mnt_cycles # Example (find an MNT cycle with D = -19) cycles = mnt_cycles.make_cycle(-19) print('Found a cycle: ' + str(cycles[0][0]) + ', ' + str(cycles[0][1]))
0
0
0
0
0
0
0
0
0
19600211c81f047065f97d9d51dc1a3189acd673
4,107
py
Python
data_collector_app.py
durgeshsamariya/foodify.ai
c058996fb095103f3b28e1d439073cf4ddbd26b0
[ "MIT" ]
2
2022-02-17T06:25:10.000Z
2022-02-20T03:57:37.000Z
data_collector_app.py
durgeshsamariya/foodify.ai
c058996fb095103f3b28e1d439073cf4ddbd26b0
[ "MIT" ]
null
null
null
data_collector_app.py
durgeshsamariya/foodify.ai
c058996fb095103f3b28e1d439073cf4ddbd26b0
[ "MIT" ]
null
null
null
import PIL import streamlit as st import datetime import uuid from streamlit.uploaded_file_manager import UploadedFile from utils.utils import upload_image, create_unique_filename, save_to_google_sheet st.title("Foodify.ai Data Collection ") st.write( "Upload or take a photo of your food and help us to build the w...
33.390244
110
0.600195
import PIL import streamlit as st import datetime import uuid from streamlit.uploaded_file_manager import UploadedFile from utils.utils import upload_image, create_unique_filename, save_to_google_sheet st.title("Foodify.ai Data Collection 🍔🌯🍫") st.write( "Upload or take a photo of your food and help us to build...
12
0
0
0
0
0
0
0
0
62c7d6156a97c6551bc35203a263f248aed6d089
2,525
py
Python
libs/orm.py
BreakUnrealGod/TanTan
043454a76ee27d61e7d9aede7818f9127e34aaf2
[ "MIT" ]
null
null
null
libs/orm.py
BreakUnrealGod/TanTan
043454a76ee27d61e7d9aede7818f9127e34aaf2
[ "MIT" ]
10
2019-12-04T23:38:04.000Z
2022-02-10T09:53:59.000Z
swiper/libs/orm.py
lijiaqipy/test1
ab628a794ab67e153b929c819c876c5a676ab068
[ "MIT" ]
null
null
null
from django.core.cache import cache from common import config # class ModelToDictMixin(object): def get(cls, *args, **kwargs): """ objects get Model.get(pk=123) :param self: :param args: :param kwargs: :return: """ # 1 # pk id if 'pk' in kwargs: pk = kwa...
22.954545
75
0.636832
from django.db import models from django.core.cache import cache from common import config # class ModelToDictMixin(object): def to_dict(self, exclude=[]): attr_dict = {} for field in self._meta.fields: field_name = field.attname if field_name not in exclude: attr_dict[field_name...
576
0
0
0
0
731
0
7
90
a3a6bcc50693cebd7f3c061c9e8471bb491ad207
3,142
py
Python
airbyte-integrations/connectors/source-trello/unit_tests/test_control_rate_limit.py
OTRI-Unipd/OTRI-airbyte
50eeeb773f75246e86c6e167b0cd7d2dda6efe0d
[ "MIT" ]
6,215
2020-09-21T13:45:56.000Z
2022-03-31T21:21:45.000Z
airbyte-integrations/connectors/source-trello/unit_tests/test_control_rate_limit.py
OTRI-Unipd/OTRI-airbyte
50eeeb773f75246e86c6e167b0cd7d2dda6efe0d
[ "MIT" ]
8,448
2020-09-21T00:43:50.000Z
2022-03-31T23:56:06.000Z
airbyte-integrations/connectors/source-trello/unit_tests/test_control_rate_limit.py
OTRI-Unipd/OTRI-airbyte
50eeeb773f75246e86c6e167b0cd7d2dda6efe0d
[ "MIT" ]
1,251
2020-09-20T05:48:47.000Z
2022-03-31T10:41:29.000Z
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import requests # Define standard timings in seconds SLEEP_ON_HIGH_LOAD: float = 9.0 TEST_DATA_FIELD = "some_data_field" TEST_RATE_LIMIT_THRESHOLD = 0.1 TEST_HEADERS_NAME = [ ("x-rate-limit-api-key-remaining", "x-rate-limit-api-key-max"), ("x-rate-...
34.911111
116
0.668046
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # from functools import wraps import requests # Define standard timings in seconds SLEEP_ON_HIGH_LOAD: float = 9.0 TEST_DATA_FIELD = "some_data_field" TEST_RATE_LIMIT_THRESHOLD = 0.1 TEST_HEADERS_NAME = [ ("x-rate-limit-api-key-remaining", "x-rate-limit...
0
1,438
0
0
0
80
0
6
72
d9d1654b34f40e0c7abcc17dff20fa72909b9f64
8,810
py
Python
xmonitor/db/sqlalchemy/migrate_repo/versions/017_quote_encrypted_swift_credentials.py
froyobin/xmonitor
092dcaa01f834353ffd8dd3c40edf9e97543bfe8
[ "Apache-2.0" ]
null
null
null
xmonitor/db/sqlalchemy/migrate_repo/versions/017_quote_encrypted_swift_credentials.py
froyobin/xmonitor
092dcaa01f834353ffd8dd3c40edf9e97543bfe8
[ "Apache-2.0" ]
null
null
null
xmonitor/db/sqlalchemy/migrate_repo/versions/017_quote_encrypted_swift_credentials.py
froyobin/xmonitor
092dcaa01f834353ffd8dd3c40edf9e97543bfe8
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
36.106557
78
0.632123
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
0
0
0
0
0
297
0
3
145
54fcba5a90b30f291e1a2fab18963885b8029fe5
1,885
py
Python
cm/cm_dhexppot/CM/CM_TUW19/array2raster.py
historeno/enermaps
ad3a97636baa153a56367e374d0fef7f009bf19d
[ "Apache-2.0" ]
null
null
null
cm/cm_dhexppot/CM/CM_TUW19/array2raster.py
historeno/enermaps
ad3a97636baa153a56367e374d0fef7f009bf19d
[ "Apache-2.0" ]
null
null
null
cm/cm_dhexppot/CM/CM_TUW19/array2raster.py
historeno/enermaps
ad3a97636baa153a56367e374d0fef7f009bf19d
[ "Apache-2.0" ]
null
null
null
""" Created on August 14 2018 @author: fallahnejad@eeg.tuwien.ac.at """ import os import sys from osgeo import gdal, osr path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) if path not in sys.path: sys.path.append(path) def array2raster( outRasterPath, geo_transform, dataTyp...
29.920635
86
0.646154
""" Created on August 14 2018 @author: fallahnejad@eeg.tuwien.ac.at """ import os import sys from osgeo import gdal, osr path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) if path not in sys.path: sys.path.append(path) def array2raster( outRasterPath, geo_transform, dataTyp...
0
0
0
0
0
0
0
0
0
9ba66ac0118865fada74771be7bf4006b25265ce
5,286
py
Python
util/scripts/stack-depth-info.py
systems-nuts/popcorn-compiler-alpine
5c225c7d3055db83dc654b6b5525c34bbdacded1
[ "Linux-OpenIB" ]
30
2019-04-07T14:58:31.000Z
2021-05-24T19:07:20.000Z
util/scripts/stack-depth-info.py
XRDevIEEE/popcorn-compiler
2cb2eccc0c75b5963d9fec26ad80a7b881316b1d
[ "Linux-OpenIB" ]
11
2018-07-24T19:31:26.000Z
2020-09-03T08:56:23.000Z
util/scripts/stack-depth-info.py
XRDevIEEE/popcorn-compiler
2cb2eccc0c75b5963d9fec26ad80a7b881316b1d
[ "Linux-OpenIB" ]
17
2018-08-26T12:43:15.000Z
2022-03-18T12:08:40.000Z
#!/usr/bin/python3 import sys ############################################################################### # Config ############################################################################### dataFile = None binFile = None onlyFunc = False verbose = False #####################################################...
30.732558
104
0.574915
#!/usr/bin/python3 import sys, subprocess ############################################################################### # Config ############################################################################### dataFile = None binFile = None onlyFunc = False verbose = False #########################################...
0
0
0
0
0
3,657
0
12
115
d6d71f011810b5ff2754627d1771f5d19d8fd950
178
py
Python
examples/get_user_info.py
suyashjawale/InstagramCLI
56b7f8e1f97ad723c41a15874d5ab5c8967d08c3
[ "MIT" ]
5
2022-01-26T00:15:52.000Z
2022-03-16T17:18:29.000Z
examples/get_user_info.py
suyashjawale/InstagramCLI
56b7f8e1f97ad723c41a15874d5ab5c8967d08c3
[ "MIT" ]
1
2021-11-03T17:26:11.000Z
2021-11-14T05:06:20.000Z
examples/get_user_info.py
suyashjawale/InstagramCLI
56b7f8e1f97ad723c41a15874d5ab5c8967d08c3
[ "MIT" ]
1
2022-01-02T03:50:29.000Z
2022-01-02T03:50:29.000Z
from InstagramCLI import InstagramCLI cli = InstagramCLI(username="", password="") data= cli.get_user_info(target_username="usnjsi77",save_to_device=True) print(data) cli.close()
35.6
71
0.803371
from InstagramCLI import InstagramCLI cli = InstagramCLI(username="", password="") data= cli.get_user_info(target_username="usnjsi77",save_to_device=True) print(data) cli.close()
0
0
0
0
0
0
0
0
0
6a8f79a8e7bb2e7ba26110a94905fe82627d84c0
8,592
py
Python
pymatgen/analysis/molecule_structure_comparator.py
exenGT/pymatgen
a8ffb820ab8fc3f60251099e38c8888f45eae618
[ "MIT" ]
1
2022-03-22T22:08:16.000Z
2022-03-22T22:08:16.000Z
pymatgen/analysis/molecule_structure_comparator.py
exenGT/pymatgen
a8ffb820ab8fc3f60251099e38c8888f45eae618
[ "MIT" ]
null
null
null
pymatgen/analysis/molecule_structure_comparator.py
exenGT/pymatgen
a8ffb820ab8fc3f60251099e38c8888f45eae618
[ "MIT" ]
null
null
null
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module provides classes to comparsion the structures of the two molecule. As long as the two molecule have the same bond connection tables, the molecules are deemed to be same. The atom in the two molecule must be pa...
28.54485
119
0.516527
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module provides classes to comparsion the structures of the two molecule. As long as the two molecule have the same bond connection tables, the molecules are deemed to be same. The atom in the two molecule must be pa...
0
1,009
0
6,709
0
0
0
5
92
f836aea2e60665ebbee4033654498c2a4b470d74
1,858
py
Python
ThenWhatTree/execute_tree.py
intel/ThenWhatTree
ddcd5af58e55705ba2dd6a824828f3fc48bd68da
[ "BSD-3-Clause" ]
3
2018-05-23T17:15:39.000Z
2019-03-17T18:44:19.000Z
ThenWhatTree/execute_tree.py
intel/ThenWhatTree
ddcd5af58e55705ba2dd6a824828f3fc48bd68da
[ "BSD-3-Clause" ]
null
null
null
ThenWhatTree/execute_tree.py
intel/ThenWhatTree
ddcd5af58e55705ba2dd6a824828f3fc48bd68da
[ "BSD-3-Clause" ]
4
2019-11-02T01:15:21.000Z
2021-09-16T11:01:29.000Z
#!/usr/bin/env python3 # Copyright (C) 2018 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause """Function for evaluating the nodes of a decision tree and extracting out the results from each of the nodes.""" # Import built in modules import argparse import sys import os # Import 3rd party modules # Import...
25.108108
113
0.703983
#!/usr/bin/env python3 # Copyright (C) 2018 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause """Function for evaluating the nodes of a decision tree and extracting out the results from each of the nodes.""" # Import built in modules import argparse import sys import os # Import 3rd party modules # Import...
0
0
0
0
0
0
0
0
0
2773a2b5fb1ba7a66e740bb2804aab93cde6bb13
10,125
py
Python
sfw_torch.py
bwilder0/tb_code_release
e0994116cff1ec0c04e0297f2b558ec5dd53f765
[ "MIT" ]
null
null
null
sfw_torch.py
bwilder0/tb_code_release
e0994116cff1ec0c04e0297f2b558ec5dd53f765
[ "MIT" ]
null
null
null
sfw_torch.py
bwilder0/tb_code_release
e0994116cff1ec0c04e0297f2b558ec5dd53f765
[ "MIT" ]
null
null
null
import torch def run_sis(T, G, S, I, newI, nu, mu, d, beta, N): ''' Runs the linearized SIS model, returning the total number of infected agents summed over all time steps. ''' #duplicate these variables along an additional axis to match the batch size nu = torch.diag(1 - nu).expand_as(beta) ...
37.5
169
0.618469
import torch import numpy as np def run_sis(T, G, S, I, newI, nu, mu, d, beta, N): ''' Runs the linearized SIS model, returning the total number of infected agents summed over all time steps. ''' #duplicate these variables along an additional axis to match the batch size nu = torch.diag(1 - nu)...
0
0
0
599
0
1,429
0
-3
114
886d846b1bd5e2c59d450a892dc2cfd09102c8c5
3,042
py
Python
cj_2nd/problem_2/problem2.py
yskang/AlgorithmPracticeWithPython
f7129bd1924a7961489198f0ee052d2cd1e9cf40
[ "MIT" ]
null
null
null
cj_2nd/problem_2/problem2.py
yskang/AlgorithmPracticeWithPython
f7129bd1924a7961489198f0ee052d2cd1e9cf40
[ "MIT" ]
1
2019-11-04T06:44:04.000Z
2019-11-04T06:46:55.000Z
cj_2nd/problem_2/problem2.py
yskang/AlgorithmPractice
31b76e38b4c2f1e3e29fb029587662a745437912
[ "MIT" ]
null
null
null
import sys filename = sys.argv[1] test_input = open(filename, 'r') numberOfTest = int(test_input.readline().replace('\n', '').replace('\r', '').strip()) nodesR = [] distanceR = [] nodesC = [] distanceC = [] branchPoint = 0 output = open(filename.replace('in', 'out'), 'w') for i in range(numberOfTest): initDat...
28.698113
87
0.606838
import sys filename = sys.argv[1] test_input = open(filename, 'r') numberOfTest = int(test_input.readline().replace('\n', '').replace('\r', '').strip()) nodesR = [] distanceR = [] nodesC = [] distanceC = [] branchPoint = 0 def initData(): nodesR[:] = [] distanceR[:] = [] nodesC[:] = [] distanceC[:]...
0
0
0
0
0
1,696
0
0
161
ece9c2de7d3783b49ddc26cdb15385cc57ba75f8
1,094
py
Python
LinearRegression/pcr.py
jayshonzs/ESL
2b51b1e01cb204d17588b7a2a8f765daa0a1e0c5
[ "MIT" ]
9
2016-09-26T15:56:16.000Z
2019-10-21T05:59:14.000Z
LinearRegression/pcr.py
jayshonzs/ESL
2b51b1e01cb204d17588b7a2a8f765daa0a1e0c5
[ "MIT" ]
null
null
null
LinearRegression/pcr.py
jayshonzs/ESL
2b51b1e01cb204d17588b7a2a8f765daa0a1e0c5
[ "MIT" ]
3
2016-08-15T00:18:22.000Z
2019-02-28T14:54:55.000Z
''' Created on 2014-5-25 @author: xiajie ''' import numpy as np import prostate import preprocess if __name__ == '__main__': inputs, output, Ttype = prostate.loaddata() train_data, train_out, test_data, test_out = prostate.cookdata2(inputs, output, Ttype) X, X_mean, Y_mean, X_std = preprocess.center_data(...
26.682927
90
0.617002
''' Created on 2014-5-25 @author: xiajie ''' import numpy as np import prostate import preprocess def theta(z, y): return np.transpose(z).dot(y)/np.transpose(z).dot(z) def PCR(X,Y,m=7): z = [] thetas = [] beta = np.zeros(len(X[0])) U, S, V = np.linalg.svd(X, full_matrices=True) for i in range...
0
0
0
0
0
400
0
0
69
46fd6c109844df9a60a301cc1c15e3eb17f850a2
11,188
py
Python
tests/unit/profiles/test_views.py
etienne86/oc_p13_team_spirit
fd3d45618d349ecd0a03e63c4a7e9c1044eeffaa
[ "MIT" ]
null
null
null
tests/unit/profiles/test_views.py
etienne86/oc_p13_team_spirit
fd3d45618d349ecd0a03e63c4a7e9c1044eeffaa
[ "MIT" ]
null
null
null
tests/unit/profiles/test_views.py
etienne86/oc_p13_team_spirit
fd3d45618d349ecd0a03e63c4a7e9c1044eeffaa
[ "MIT" ]
null
null
null
"""Contain the unit tests related to the views in app ``profiles``."""
36.442997
79
0.611459
"""Contain the unit tests related to the views in app ``profiles``.""" from django.http.request import HttpRequest from django.test import TestCase from teamspirit.core.models import Address from teamspirit.profiles.models import Personal from teamspirit.profiles.views import ( add_id_file_view, add_medical_f...
34
0
0
10,532
0
0
0
410
157
6ad8ac63ac2ca2e4e626cb985983826a1b89907e
10,317
py
Python
bin/vrc_ssh.py
osrf/cloudsim-legacy
01ea7dd2708ed9797a860ac839028ec62fd96a23
[ "Apache-2.0" ]
null
null
null
bin/vrc_ssh.py
osrf/cloudsim-legacy
01ea7dd2708ed9797a860ac839028ec62fd96a23
[ "Apache-2.0" ]
null
null
null
bin/vrc_ssh.py
osrf/cloudsim-legacy
01ea7dd2708ed9797a860ac839028ec62fd96a23
[ "Apache-2.0" ]
1
2021-03-16T15:00:51.000Z
2021-03-16T15:00:51.000Z
#!/usr/bin/env python """ Program that runs a script or copy a file into a set of machines. """ import argparse import os import sys from threading import Thread import abc import subprocess import getpass import Queue NORMAL = '\033[00m' RED = '\033[0;31m' CLOUDSIM_PREFIX = 'OSRF_CloudSim_' CONST_PREFIX = 'OSRF_VRC...
34.275748
85
0.583794
#!/usr/bin/env python """ Program that runs a script or copy a file into a set of machines. """ import argparse import os import sys from threading import Thread import abc import subprocess import getpass import Queue NORMAL = '\033[00m' RED = '\033[0;31m' CLOUDSIM_PREFIX = 'OSRF_CloudSim_' CONST_PREFIX = 'OSRF_VRC...
0
0
0
4,722
0
0
0
0
92
d4cd314bd47d95820381415300f80a6c264fbc93
10,264
py
Python
sandbox/finetuning/algos/concurrent_continuous_ppo.py
andrewli77/rllab-finetuning
2dae9141d0fdc284d04f18931907131d66b43023
[ "MIT" ]
23
2020-04-27T23:53:44.000Z
2022-03-10T03:13:16.000Z
sandbox/finetuning/algos/concurrent_continuous_ppo.py
WeiChengTseng/rllab-finetuning
2dae9141d0fdc284d04f18931907131d66b43023
[ "MIT" ]
1
2021-11-14T13:30:22.000Z
2021-11-14T13:30:22.000Z
sandbox/finetuning/algos/concurrent_continuous_ppo.py
WeiChengTseng/rllab-finetuning
2dae9141d0fdc284d04f18931907131d66b43023
[ "MIT" ]
8
2020-06-17T03:28:34.000Z
2022-03-09T03:13:03.000Z
import rllab.misc.logger as logger
48.87619
118
0.667771
import theano import theano.tensor as TT from rllab.misc import ext import numpy as np import copy import rllab.misc.logger as logger from rllab.spaces.box import Box from rllab.envs.env_spec import EnvSpec from sandbox.finetuning.policies.concurrent_hier_policy2 import HierarchicalPolicy from sandbox.finetuning.algos....
0
0
0
9,459
0
0
0
389
380
db8d1e3d87eeb6f3a0f5a5bfe9414cd167fe9148
1,064
py
Python
test/perspective.py
cburggie/py3D
d0fe21aae1d5ab77ec80f85533e941c902dad6f4
[ "MIT" ]
null
null
null
test/perspective.py
cburggie/py3D
d0fe21aae1d5ab77ec80f85533e941c902dad6f4
[ "MIT" ]
null
null
null
test/perspective.py
cburggie/py3D
d0fe21aae1d5ab77ec80f85533e941c902dad6f4
[ "MIT" ]
null
null
null
import pytrace import py3D filename = 'perspective.png' ppu = 400 passes = 16 S = py3D.Sphere C = py3D.Color V = py3D.Vector cam = pytrace.Camera(V(0.0,10.0,0.0), V(0.0,0.0,0.0), 2.0, 2.0, V(0.0,0.0,1.0)) cam.set_ppu(ppu) center = S(V(0.0,0.0,0.0), 1.0, C(0.99,0.99,0.99)).set_reflectivity(0.8) bodies = [] bodies...
30.4
79
0.596805
import pytrace import py3D filename = 'perspective.png' ppu = 400 passes = 16 S = py3D.Sphere C = py3D.Color V = py3D.Vector cam = pytrace.Camera(V(0.0,10.0,0.0), V(0.0,0.0,0.0), 2.0, 2.0, V(0.0,0.0,1.0)) cam.set_ppu(ppu) center = S(V(0.0,0.0,0.0), 1.0, C(0.99,0.99,0.99)).set_reflectivity(0.8) bodies = [] bodies...
0
0
0
0
0
0
0
0
0