hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
f1b7cdef9de310ce5a7fb0146da43f000e1ce55f
18,861
py
Python
gitflow/context.py
abacusresearch/gitflow
81ea7f5d468f9b128cd593f62972f13352bd3a63
[ "MIT" ]
null
null
null
gitflow/context.py
abacusresearch/gitflow
81ea7f5d468f9b128cd593f62972f13352bd3a63
[ "MIT" ]
null
null
null
gitflow/context.py
abacusresearch/gitflow
81ea7f5d468f9b128cd593f62972f13352bd3a63
[ "MIT" ]
null
null
null
import atexit import os import re import shutil from enum import Enum from typing import List, Optional import collections from gitflow import cli, const, repotools, _, utils from gitflow.common import Result from gitflow.const import VersioningScheme from gitflow.properties import PropertyIO from gitflow.repotools i...
38.64959
117
0.564233
18,444
0.977891
0
0
14,012
0.742909
0
0
2,061
0.109273
f1b87ee915b0b88ddd9829337e7a6f4316b55ca5
705
py
Python
LeetCode/1219_Path_with_Maximum_Gold/main.py
sungmen/Acmicpc_Solve
0298a6aec84993a4d8767bd2c00490b7201e06a4
[ "MIT" ]
1
2020-07-08T23:16:19.000Z
2020-07-08T23:16:19.000Z
LeetCode/1219_Path_with_Maximum_Gold/main.py
sungmen/Acmicpc_Solve
0298a6aec84993a4d8767bd2c00490b7201e06a4
[ "MIT" ]
1
2020-05-16T03:12:24.000Z
2020-05-16T03:14:42.000Z
LeetCode/1219_Path_with_Maximum_Gold/main.py
sungmen/Acmicpc_Solve
0298a6aec84993a4d8767bd2c00490b7201e06a4
[ "MIT" ]
2
2020-05-16T03:25:16.000Z
2021-02-10T16:51:25.000Z
class Solution: def __init__(self): self.m = 0 self.n = 0 def dfs(self, y, x, grid) -> int: if y < 0 or y >= self.m or x < 0 or x >= self.n or grid[y][x] == 0: return 0 res = 0 tmpGrid = grid[y][x] grid[y][x] = 0 for y_, x_ in ((y, x - 1),...
32.045455
85
0.453901
705
1
0
0
0
0
0
0
0
0
f1b884785bf603bff438ce57a6af789de6bc8891
2,307
py
Python
test/test_modify_contact.py
peruana80/python_training
0070bdc07b22d80594c029984c9967e56ba51951
[ "Apache-2.0" ]
null
null
null
test/test_modify_contact.py
peruana80/python_training
0070bdc07b22d80594c029984c9967e56ba51951
[ "Apache-2.0" ]
null
null
null
test/test_modify_contact.py
peruana80/python_training
0070bdc07b22d80594c029984c9967e56ba51951
[ "Apache-2.0" ]
null
null
null
from model.contact import Contact from random import randrange def test_modify_contact_name(app, db, check_ui): if len(db.get_group_list()) == 0: app.contact.create(Contact(firstname="test")) old_contacts = db.get_contact_list() index = randrange(len(old_contacts)) contact = Contact(first_name...
56.268293
186
0.702211
0
0
0
0
0
0
0
0
1,129
0.48938
f1b8db0ca9074a5d55378aaf5be9d198fcaa6a0b
734
py
Python
base.py
oknalv/linky
78fba19946e2212b10f3d1a5b27c7d9329556290
[ "MIT" ]
null
null
null
base.py
oknalv/linky
78fba19946e2212b10f3d1a5b27c7d9329556290
[ "MIT" ]
null
null
null
base.py
oknalv/linky
78fba19946e2212b10f3d1a5b27c7d9329556290
[ "MIT" ]
null
null
null
import webapp2 from webapp2_extras import sessions class BaseHandler(webapp2.RequestHandler): def dispatch(self): self.session_store = sessions.get_store(request=self.request) try: webapp2.RequestHandler.dispatch(self) finally: self.session_store.save_sessions(self.r...
29.36
69
0.647139
682
0.929155
0
0
95
0.129428
0
0
35
0.047684
f1b9ea9a68748f5299174c8b988d634a02fb6fda
6,999
py
Python
tests/test_helpers.py
albertoalcolea/dbhelpers
c65f77a750cf46874ae7b5b0e6d4930e9df729af
[ "Apache-2.0" ]
2
2015-10-31T20:36:22.000Z
2021-10-05T12:08:10.000Z
tests/test_helpers.py
albertoalcolea/dbhelpers
c65f77a750cf46874ae7b5b0e6d4930e9df729af
[ "Apache-2.0" ]
null
null
null
tests/test_helpers.py
albertoalcolea/dbhelpers
c65f77a750cf46874ae7b5b0e6d4930e9df729af
[ "Apache-2.0" ]
null
null
null
import unittest try: from unittest.mock import Mock, call except ImportError: from mock import Mock, call from dbhelpers import cm_cursor, fetchiter, fetchone_nt, fetchmany_nt, fetchall_nt, fetchiter_nt class HelpersTestCase(unittest.TestCase): def test_cm_cursor(self): """ Creates a cont...
38.456044
96
0.570796
6,784
0.969281
0
0
0
0
0
0
702
0.1003
f1baa95b451bcaf546bfb42baf9ea8122be52ea7
2,641
py
Python
scripts/joystick_node.py
kscottz/owi_arm
a08f1ed8a5bccfe8cca5a1fd1829beca15a1060f
[ "BSD-2-Clause" ]
null
null
null
scripts/joystick_node.py
kscottz/owi_arm
a08f1ed8a5bccfe8cca5a1fd1829beca15a1060f
[ "BSD-2-Clause" ]
null
null
null
scripts/joystick_node.py
kscottz/owi_arm
a08f1ed8a5bccfe8cca5a1fd1829beca15a1060f
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # THIS SHEBANG IS REALLY REALLY IMPORTANT import rospy import roscpp import numpy as np from sensor_msgs.msg import Joy from std_msgs.msg import Int16MultiArray class JoystickNode(object): def __init__(self): # put away our toys cleanly rospy.on_shutdown(self.shutdown) ...
31.440476
74
0.540704
2,229
0.843998
0
0
0
0
0
0
583
0.22075
f1bc287fa4269a85fe5cdf284f15691d29943f53
650
py
Python
nomiapp/nomiapp/doctype/configuracion_isr/configuracion_isr.py
YefriTavarez/NomiApp
a532ae7a3871ee91ec6f17b4b46ba67db7a056b5
[ "MIT" ]
1
2016-12-29T13:58:28.000Z
2016-12-29T13:58:28.000Z
nomiapp/nomiapp/doctype/configuracion_isr/configuracion_isr.py
YefriTavarez/NomiApp
a532ae7a3871ee91ec6f17b4b46ba67db7a056b5
[ "MIT" ]
null
null
null
nomiapp/nomiapp/doctype/configuracion_isr/configuracion_isr.py
YefriTavarez/NomiApp
a532ae7a3871ee91ec6f17b4b46ba67db7a056b5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, Soldeva, SRL and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class ConfiguracionISR(Document): pass @frappe.whitelist() def getRangosISR(): return frappe...
26
51
0.716923
39
0.06
0
0
384
0.590769
0
0
419
0.644615
f1be0f593e7493f91a2f96246f4cf8a9df42b366
1,367
py
Python
electrumsv_sdk/builtin_components/electrumsv_server/local_tools.py
electrumsv/electrumsv-sdk
2d4b9474b2e2fc5518bba10684c5d5130ffb6328
[ "OML" ]
4
2020-07-06T12:13:14.000Z
2021-07-29T12:45:27.000Z
electrumsv_sdk/builtin_components/electrumsv_server/local_tools.py
electrumsv/electrumsv-sdk
2d4b9474b2e2fc5518bba10684c5d5130ffb6328
[ "OML" ]
62
2020-07-04T04:50:27.000Z
2021-08-19T21:06:10.000Z
electrumsv_sdk/builtin_components/electrumsv_server/local_tools.py
electrumsv/electrumsv-sdk
2d4b9474b2e2fc5518bba10684c5d5130ffb6328
[ "OML" ]
3
2021-01-21T09:22:45.000Z
2021-06-12T10:16:03.000Z
import logging import typing from electrumsv_sdk.utils import get_directory_name COMPONENT_NAME = get_directory_name(__file__) logger = logging.getLogger(COMPONENT_NAME) if typing.TYPE_CHECKING: from .electrumsv_server import Plugin class LocalTools: """helper for operating on plugin-specific state (like...
34.175
96
0.686906
1,122
0.820775
0
0
0
0
0
0
238
0.174104
f1be97cb28ba644933394a127fc92f299492f132
4,955
py
Python
cluster/core/include/python/http_parser.py
JarryShaw/broapt
5a6253af862cb618718d8fad69343a23ef2ac9e4
[ "BSD-3-Clause" ]
3
2020-04-25T08:47:55.000Z
2020-11-04T11:18:21.000Z
cluster/core/include/python/http_parser.py
JarryShaw/broapt
5a6253af862cb618718d8fad69343a23ef2ac9e4
[ "BSD-3-Clause" ]
11
2020-06-15T16:28:15.000Z
2021-11-29T17:11:07.000Z
source/include/python/http_parser.py
JarryShaw/broapt
5a6253af862cb618718d8fad69343a23ef2ac9e4
[ "BSD-3-Clause" ]
3
2019-07-24T02:41:37.000Z
2021-12-06T09:38:58.000Z
# -*- coding: utf-8 -*- # pylint: disable=all import base64 import binascii import contextlib import math import os import textwrap import time import urllib.parse from const import LOGS_PATH from logparser import parse from utils import is_nan, print_file # from utils import IPAddressJSONEncoder, is_nan, print_file ...
30.030303
128
0.594147
0
0
0
0
0
0
0
0
1,582
0.319273
f1c021de79d124febfa8a831e976cd4dc12aeed9
1,647
py
Python
src/compute_trust_values.py
johndpope/FacialRetargeting
5fb0c1da6af6c3d59aef264f567bfa7a244d0764
[ "MIT" ]
21
2020-08-19T02:52:16.000Z
2022-02-25T12:35:04.000Z
src/compute_trust_values.py
johndpope/FacialRetargeting
5fb0c1da6af6c3d59aef264f567bfa7a244d0764
[ "MIT" ]
3
2020-10-16T07:11:25.000Z
2021-06-30T10:26:04.000Z
src/compute_trust_values.py
johndpope/FacialRetargeting
5fb0c1da6af6c3d59aef264f567bfa7a244d0764
[ "MIT" ]
7
2020-08-24T08:30:53.000Z
2022-03-28T15:55:24.000Z
import numpy as np from src.compute_corr_coef import compute_corr_coef from utils.plotting import plot_similarities def compute_trust_values(dsk, do_plot=False): """ Compute trust values following formula 6 k:= number of blendshapes n:= num_features (num_markers*3) :param dsk: delta_sk vector (k...
26.564516
123
0.651488
0
0
0
0
0
0
0
0
629
0.381906
f1c16c5d4d00c03eee3d9db1e1fe2c9c3aca5189
2,042
py
Python
test/core/test_constant.py
haikusw/jaqalpaq
d507e894cb897756a1e51c99582b736254995b4e
[ "Apache-2.0" ]
8
2021-02-19T23:25:28.000Z
2021-09-24T20:11:13.000Z
test/core/test_constant.py
haikusw/jaqalpaq
d507e894cb897756a1e51c99582b736254995b4e
[ "Apache-2.0" ]
null
null
null
test/core/test_constant.py
haikusw/jaqalpaq
d507e894cb897756a1e51c99582b736254995b4e
[ "Apache-2.0" ]
null
null
null
import unittest from jaqalpaq.core.parameter import ParamType from jaqalpaq.core.constant import Constant from . import randomize from . import common class ConstantTester(unittest.TestCase): def test_valid_types(self): """Test that a Constant can only be created from valid types.""" valid_values...
37.127273
82
0.669931
1,838
0.900098
0
0
0
0
0
0
442
0.216454
f1c26fda7f69a42db47f3f5783c055c679831e9b
8,035
py
Python
src/richard/videos/migrations/0001_initial.py
pyvideo/richard
894f5380e07d7e66453fe730891a21aca32d8edb
[ "Apache-2.0" ]
51
2015-01-24T07:53:56.000Z
2020-08-30T12:19:39.000Z
src/richard/videos/migrations/0001_initial.py
westurner/richard
894f5380e07d7e66453fe730891a21aca32d8edb
[ "Apache-2.0" ]
34
2015-02-23T11:15:00.000Z
2016-01-04T11:25:42.000Z
src/richard/videos/migrations/0001_initial.py
westurner/richard
894f5380e07d7e66453fe730891a21aca32d8edb
[ "Apache-2.0" ]
16
2015-03-20T17:36:09.000Z
2022-01-07T01:04:17.000Z
# -*- coding: utf-8 -*- # richard -- video index system # Copyright (C) 2012, 2013, 2014, 2015 richard contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, eithe...
49.598765
191
0.571873
7,161
0.891226
0
0
0
0
0
0
2,303
0.286621
f1c41c955777189a3b733180afda82b9ed458a7c
1,399
py
Python
descwl_shear_sims/tests/test_artifacts.py
LSSTDESC/descwl_shear_sims
1c696518104b7f301dd6c69571239431c6232110
[ "BSD-3-Clause" ]
null
null
null
descwl_shear_sims/tests/test_artifacts.py
LSSTDESC/descwl_shear_sims
1c696518104b7f301dd6c69571239431c6232110
[ "BSD-3-Clause" ]
11
2019-12-10T23:30:27.000Z
2019-12-24T13:59:32.000Z
descwl_shear_sims/tests/test_artifacts.py
LSSTDESC/wl-shear-testing-sims
6e4a0baa6f664b5bc52b08b55614eaa58c8b0748
[ "BSD-3-Clause" ]
null
null
null
""" copy-paste from my (beckermr) personal code here https://github.com/beckermr/metadetect-coadding-sims """ import numpy as np import galsim from descwl_shear_sims.masking import get_bmask_and_set_image from descwl_shear_sims.artifacts import ( generate_bad_columns, generate_cosmic_rays, ) def test_basic_m...
25.436364
68
0.719085
0
0
0
0
0
0
0
0
109
0.077913
f1c44279c1c78e6d3ae1d50d41837fb4c6fd7df0
2,270
py
Python
stylobate_mgmt/commands/init.py
digitaltembo/stylobate-mgmt
26483aab27d2496dcbd71d7de2f5780bc43a959e
[ "MIT" ]
null
null
null
stylobate_mgmt/commands/init.py
digitaltembo/stylobate-mgmt
26483aab27d2496dcbd71d7de2f5780bc43a959e
[ "MIT" ]
null
null
null
stylobate_mgmt/commands/init.py
digitaltembo/stylobate-mgmt
26483aab27d2496dcbd71d7de2f5780bc43a959e
[ "MIT" ]
null
null
null
from getpass import getpass import os from .utils import Command from .db import DB class Init(Command): name = 'init' description = "Initializes a new Stylobate project, forking the original" def add_args(self, parser): parser.add_argument( 'name', type=str, ...
33.382353
119
0.644934
2,178
0.959471
0
0
0
0
0
0
821
0.361674
f1c47788397390c41f153d775e370f60b472f99d
628
py
Python
leetcode_submissions/7.reverse-integer.18198620.ac.py
aenon/online_judge
bff3991519cd4f2d80dea9b17680dbc5d4c44b9b
[ "MIT" ]
null
null
null
leetcode_submissions/7.reverse-integer.18198620.ac.py
aenon/online_judge
bff3991519cd4f2d80dea9b17680dbc5d4c44b9b
[ "MIT" ]
null
null
null
leetcode_submissions/7.reverse-integer.18198620.ac.py
aenon/online_judge
bff3991519cd4f2d80dea9b17680dbc5d4c44b9b
[ "MIT" ]
1
2015-01-10T16:02:43.000Z
2015-01-10T16:02:43.000Z
#!/usr/bin/env python # Reverse Integer https://oj.leetcode.com/problems/reverse-integer/ # Reverse digits of an integer. # Example1: x = 123, return 321 # Example2: x = -123, return -321 #Math # Xilin SUN # Dec 7 2014 class Solution: # @return an integer def reverse(self, x): if x > 2147483646: ...
19.030303
68
0.593949
395
0.628981
0
0
0
0
0
0
240
0.382166
f1c529b5976d0a2cdf007169fc8e0ee8525206e1
1,400
py
Python
src/z3c/configurator/tests.py
zopefoundation/z3c.configurator
390416d2fa61ddf97c28e6af32eae3660bb725e2
[ "ZPL-2.1" ]
null
null
null
src/z3c/configurator/tests.py
zopefoundation/z3c.configurator
390416d2fa61ddf97c28e6af32eae3660bb725e2
[ "ZPL-2.1" ]
1
2021-01-08T15:34:08.000Z
2021-01-08T15:34:08.000Z
src/z3c/configurator/tests.py
zopefoundation/z3c.configurator
390416d2fa61ddf97c28e6af32eae3660bb725e2
[ "ZPL-2.1" ]
1
2015-04-03T05:49:32.000Z
2015-04-03T05:49:32.000Z
############################################################################## # # Copyright (c) 2005 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
31.818182
78
0.620714
0
0
0
0
0
0
0
0
835
0.596429
f1c67bf4245b574bcd2ed4dfcba7d08e3e6e8419
174
py
Python
example.py
LucasHazardous/SkinReaper
c910cebe2aed3dd8e442515e4415f3e253e5a4ac
[ "MIT" ]
null
null
null
example.py
LucasHazardous/SkinReaper
c910cebe2aed3dd8e442515e4415f3e253e5a4ac
[ "MIT" ]
null
null
null
example.py
LucasHazardous/SkinReaper
c910cebe2aed3dd8e442515e4415f3e253e5a4ac
[ "MIT" ]
null
null
null
from skin_reaper import SkinReaper if __name__ == "__main__": r = SkinReaper() data = r.harvestLinks(5) r.setSkinPreview() r.collectRandom(data) r.kill()
21.75
34
0.666667
0
0
0
0
0
0
0
0
10
0.057471
f1c6b2f9d9acd98dcef1131f691572e33395120a
528
py
Python
time_to_speech.py
besi/stereopi
c03a1ae990af67dde4e2cd832a20b49d697de230
[ "MIT" ]
2
2020-02-18T18:10:50.000Z
2020-08-04T21:00:29.000Z
time_to_speech.py
besi/stereopi
c03a1ae990af67dde4e2cd832a20b49d697de230
[ "MIT" ]
4
2020-02-19T10:46:02.000Z
2021-01-09T18:52:45.000Z
time_to_speech.py
besi/stereopi
c03a1ae990af67dde4e2cd832a20b49d697de230
[ "MIT" ]
null
null
null
# Credits go to <http://codereview.stackexchange.com/q/37522> import random import time def current_time(): '''Returns a tuple containing (hour, minute) for current local time.''' local_time = time.localtime(time.time()) return (local_time.tm_hour, local_time.tm_min) (hour, minute) = current_time() de...
22
75
0.657197
0
0
0
0
0
0
0
0
163
0.308712
f1c6e01e5913573733f519b9c5d164e6fed7195b
575
py
Python
setup.py
ckuzma/solar-viability-tester
c34d03d1914374279ca269ab402eb5074f7555a6
[ "MIT" ]
null
null
null
setup.py
ckuzma/solar-viability-tester
c34d03d1914374279ca269ab402eb5074f7555a6
[ "MIT" ]
2
2017-04-03T13:59:00.000Z
2017-04-06T04:57:50.000Z
setup.py
ckuzma/solar-viability-tester
c34d03d1914374279ca269ab402eb5074f7555a6
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='solar-viabili...
30.263158
89
0.707826
0
0
0
0
0
0
0
0
230
0.4
f1c78560c5fc55f8dc09c8791ab3fa9dcc1ccd67
31,028
py
Python
framework/framework.py
wbqhb/SEPC
1a5e03b70984b759b615424dc06f530d5de00f51
[ "MIT" ]
null
null
null
framework/framework.py
wbqhb/SEPC
1a5e03b70984b759b615424dc06f530d5de00f51
[ "MIT" ]
null
null
null
framework/framework.py
wbqhb/SEPC
1a5e03b70984b759b615424dc06f530d5de00f51
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2021/5/4 下午3:05 # @Author : godwaitup # @FileName: framework.py # original framework for joint extraction. import torch.optim as optim from torch import nn import os import data_loader import torch.nn.functional as F import numpy as np import json from functools import partial fro...
48.786164
223
0.561718
28,090
0.905195
0
0
0
0
0
0
2,322
0.074826
f1c88d2448c823f942e8276b943c094ce146f49b
799
py
Python
tests/settings.py
rjw57/componentsdb
7e5fd96d3afbbcde09d2f7fba1d6c86975e41272
[ "MIT" ]
null
null
null
tests/settings.py
rjw57/componentsdb
7e5fd96d3afbbcde09d2f7fba1d6c86975e41272
[ "MIT" ]
null
null
null
tests/settings.py
rjw57/componentsdb
7e5fd96d3afbbcde09d2f7fba1d6c86975e41272
[ "MIT" ]
null
null
null
""" Settings for application when being run in the test suite. """ import os import sys # Add the directory containing this file to the search path sys.path.append(os.path.dirname(os.path.abspath(__file__))) # Import function to generate a self-signed cert dynamically from x509cert import gen_self_signed_cert DEBUG...
26.633333
70
0.787234
0
0
0
0
0
0
0
0
394
0.493116
f1c8a2ea1e6774516b221761cec538d39be7d6c1
254
py
Python
learn-python/sort_with_key.py
barissimsek/gopython
7e2c1bdb20b2a908c601794ea9dbf71ea035a869
[ "Apache-2.0" ]
null
null
null
learn-python/sort_with_key.py
barissimsek/gopython
7e2c1bdb20b2a908c601794ea9dbf71ea035a869
[ "Apache-2.0" ]
null
null
null
learn-python/sort_with_key.py
barissimsek/gopython
7e2c1bdb20b2a908c601794ea9dbf71ea035a869
[ "Apache-2.0" ]
null
null
null
ips = [ '10.0.0.5', '10.5.3.1', '192.168.11.10', '2.2.2.2', '100.0.0.1', '20.3.2.4' ] def getKey(item): return tuple(int(part) for part in item.split('.')) def sort_ips(iplist): return sorted(ips, key=getKey) print(sort_ips(ips))
12.095238
52
0.566929
0
0
0
0
0
0
0
0
68
0.267717
f1c983b126df00c8a011720ca60d9fd2cfbf09df
5,330
py
Python
tbss_wm_atlas_stats.py
shanqing-cai/MRI_analysis
39b3d48e2158623ffd9a8a6ea47d16a4a7b83cd9
[ "BSD-4-Clause" ]
1
2016-02-08T18:31:36.000Z
2016-02-08T18:31:36.000Z
tbss_wm_atlas_stats.py
shanqing-cai/MRI_analysis
39b3d48e2158623ffd9a8a6ea47d16a4a7b83cd9
[ "BSD-4-Clause" ]
null
null
null
tbss_wm_atlas_stats.py
shanqing-cai/MRI_analysis
39b3d48e2158623ffd9a8a6ea47d16a4a7b83cd9
[ "BSD-4-Clause" ]
null
null
null
#!/usr/bin/python import os import sys import glob import argparse import tempfile import numpy as np from scipy.io import * from scipy import stats from subprocess import Popen, PIPE from scai_utils import * from get_qdec_info import get_qdec_info from read_xml_labels import read_xml_labels atlas_label_fn = \ "...
32.108434
149
0.547842
0
0
0
0
0
0
0
0
1,650
0.309568
f1cbb897fe4f7aa594e93ad56844d2bed4a73d65
1,995
py
Python
Alt_DE/psacard/psa_card/code/loadall_auction_items.py
royadityak94/Interview
40a7f7e2edddbb525bc6b71ea72d6cd2bda5708f
[ "MIT" ]
null
null
null
Alt_DE/psacard/psa_card/code/loadall_auction_items.py
royadityak94/Interview
40a7f7e2edddbb525bc6b71ea72d6cd2bda5708f
[ "MIT" ]
null
null
null
Alt_DE/psacard/psa_card/code/loadall_auction_items.py
royadityak94/Interview
40a7f7e2edddbb525bc6b71ea72d6cd2bda5708f
[ "MIT" ]
null
null
null
# Module to scrap all auction listings on the auction prices page from selenium import webdriver from bs4 import BeautifulSoup import csv import os # Utility to write as .csv file format def save_to_csv(data, SAVE_PATH, MODE): if not os.path.exists(SAVE_PATH.split('/')[0]): os.makedirs(SAVE_PATH.s...
37.641509
128
0.700752
0
0
0
0
0
0
0
0
616
0.308772
f1cbcf01c46f003c5909284f4d2d85198beda10f
96
py
Python
venv/lib/python3.8/site-packages/numpy/typing/tests/data/pass/numerictypes.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/numpy/typing/tests/data/pass/numerictypes.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/numpy/typing/tests/data/pass/numerictypes.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/7d/da/46/b543433b18dcfd975ecc18a25baa2105812baf0edc0bdbfae3890e1df2
96
96
0.895833
0
0
0
0
0
0
0
0
0
0
f1ccaa26614fd533c6b9140b49b0a5e2c602d313
3,343
py
Python
onirim/card/_location.py
cwahbong/onirim-py
d1110c4280d54e3b8b2d1dcef31ee433f32cb7e3
[ "MIT" ]
null
null
null
onirim/card/_location.py
cwahbong/onirim-py
d1110c4280d54e3b8b2d1dcef31ee433f32cb7e3
[ "MIT" ]
null
null
null
onirim/card/_location.py
cwahbong/onirim-py
d1110c4280d54e3b8b2d1dcef31ee433f32cb7e3
[ "MIT" ]
null
null
null
"""Location cards.""" import logging from onirim.card._base import ColorCard from onirim import exception from onirim import util LOGGER = logging.getLogger(__name__) class LocationKind(util.AutoNumberEnum): """ Enumerated kinds of locations. Attributes: sun moon key """ ...
23.055172
80
0.606342
2,142
0.640742
0
0
0
0
0
0
954
0.285372
f1ccfab0d2faebbdb592b40f848ee1bf3127a09c
4,247
py
Python
gitlabform/gitlabform/test/test_branches.py
rbartuzel/gitlabform
4027ef4d6bbbef7313ed6fcf07cef8fd1ad76d18
[ "MIT" ]
null
null
null
gitlabform/gitlabform/test/test_branches.py
rbartuzel/gitlabform
4027ef4d6bbbef7313ed6fcf07cef8fd1ad76d18
[ "MIT" ]
null
null
null
gitlabform/gitlabform/test/test_branches.py
rbartuzel/gitlabform
4027ef4d6bbbef7313ed6fcf07cef8fd1ad76d18
[ "MIT" ]
null
null
null
import pytest from gitlabform.gitlabform import GitLabForm from gitlabform.gitlabform.test import create_group, create_project_in_group, get_gitlab, create_readme_in_project, \ GROUP_NAME PROJECT_NAME = 'branches_project' GROUP_AND_PROJECT_NAME = GROUP_NAME + '/' + PROJECT_NAME @pytest.fixture(scope="module") d...
31.227941
117
0.721215
2,024
0.476572
0
0
733
0.172592
0
0
1,758
0.413939
f1cdf2cb5f5f7dc477b7b2cf95774b2b25e88788
2,543
py
Python
bespin/layers.py
delfick/bespin
4fa21875f0cdc32a70b33cdc90ce5196c0a2cbcd
[ "MIT" ]
5
2017-04-05T00:46:41.000Z
2017-11-09T01:21:44.000Z
bespin/layers.py
delfick/bespin
4fa21875f0cdc32a70b33cdc90ce5196c0a2cbcd
[ "MIT" ]
69
2016-10-11T04:40:09.000Z
2022-01-12T23:57:27.000Z
bespin/layers.py
delfick/bespin
4fa21875f0cdc32a70b33cdc90ce5196c0a2cbcd
[ "MIT" ]
7
2016-10-11T04:32:21.000Z
2017-12-18T05:59:17.000Z
from bespin.errors import StackDepCycle class Layers(object): """ Used to order the creation of many stacks. Usage:: layers = Layers({"stack1": stack1, "stack2": "stack2, "stack3": stack3, "stack4": stack4}) layers.add_to_layers("stack3") for layer in layers.layered: #...
31.012195
98
0.563508
2,500
0.983091
0
0
329
0.129375
0
0
769
0.302399
f1ce356bd1c13f7cdfe09167b87b3a43fdb85c66
6,851
py
Python
src/pulsebox/events.py
rhosak/pulsebox
f2ce859ac5cd968bcd85a1e0eedf320414602a40
[ "MIT" ]
3
2019-02-23T23:15:48.000Z
2020-03-23T12:33:15.000Z
src/pulsebox/events.py
rhosak/pulsebox
f2ce859ac5cd968bcd85a1e0eedf320414602a40
[ "MIT" ]
null
null
null
src/pulsebox/events.py
rhosak/pulsebox
f2ce859ac5cd968bcd85a1e0eedf320414602a40
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """events.py Pulse sequence events for the Arduino Due pulsebox. Radim Hošák <hosak(at)optics.upol.cz> 2021 Quantum Optics Lab Olomouc """ from functools import reduce from pulsebox.codeblocks import state_change, loop, channel_states_to_odsr from pulsebox.config impor...
34.084577
80
0.618888
2,461
0.359113
0
0
0
0
0
0
3,218
0.469575
f1d17c8b8c557bcd6739e64fad4920995078f733
160
py
Python
7KYU/words_to_sentence.py
yaznasivasai/python_codewars
25493591dde4649dc9c1ec3bece8191a3bed6818
[ "MIT" ]
4
2021-07-17T22:48:03.000Z
2022-03-25T14:10:58.000Z
7KYU/words_to_sentence.py
yaznasivasai/python_codewars
25493591dde4649dc9c1ec3bece8191a3bed6818
[ "MIT" ]
null
null
null
7KYU/words_to_sentence.py
yaznasivasai/python_codewars
25493591dde4649dc9c1ec3bece8191a3bed6818
[ "MIT" ]
3
2021-06-14T14:18:16.000Z
2022-03-16T06:02:02.000Z
def words_to_sentence(words: list) -> str: """ This function create a string from a list of strings, separated by space. """ return ' '.join(words)
40
85
0.6625
0
0
0
0
0
0
0
0
84
0.525
f1d2400def017bc7e08b7a2881ecb907828aa29c
1,839
py
Python
saber/postprocessing/blob_detect/blob_detect.py
elenimath/saber
71acab9798cf3aee1c4d64b09453e5234f8fdf1e
[ "Apache-2.0" ]
12
2018-05-14T17:43:18.000Z
2021-11-16T04:03:33.000Z
saber/postprocessing/blob_detect/blob_detect.py
elenimath/saber
71acab9798cf3aee1c4d64b09453e5234f8fdf1e
[ "Apache-2.0" ]
34
2019-05-06T19:13:36.000Z
2021-05-06T19:12:35.000Z
saber/postprocessing/blob_detect/blob_detect.py
elenimath/saber
71acab9798cf3aee1c4d64b09453e5234f8fdf1e
[ "Apache-2.0" ]
3
2019-10-08T17:42:17.000Z
2021-07-28T05:52:02.000Z
# Copyright 2020 The Johns Hopkins University Applied Physics Laboratory # # 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 ...
34.055556
86
0.707993
0
0
0
0
0
0
0
0
790
0.429581
f1d2cd28a494d8ac54d14b248cb64af3757ff63c
3,291
py
Python
tests/test_analyzer.py
kozajaku/spectra-analyzer
00de0d89fc4f210dca05249a2e823c6c49f3e917
[ "MIT" ]
null
null
null
tests/test_analyzer.py
kozajaku/spectra-analyzer
00de0d89fc4f210dca05249a2e823c6c49f3e917
[ "MIT" ]
null
null
null
tests/test_analyzer.py
kozajaku/spectra-analyzer
00de0d89fc4f210dca05249a2e823c6c49f3e917
[ "MIT" ]
null
null
null
import pytest import os from tests import test_analyzer from spectra_analyzer import analyzer def file_ref(name): """Helper function for getting paths to testing spectra.""" file = os.path.join(os.path.dirname(test_analyzer.__file__), "test_analyzer", name) return file def normal...
31.644231
96
0.696141
0
0
0
0
628
0.190823
0
0
739
0.224552
f1d3dc26cb6e1253349d57f3b6bf5b06931d5da6
774
py
Python
forms_app/views.py
sudee404/forms_project
ba60e41d13d72c80f412a7928e32000db200ea17
[ "Apache-2.0" ]
null
null
null
forms_app/views.py
sudee404/forms_project
ba60e41d13d72c80f412a7928e32000db200ea17
[ "Apache-2.0" ]
null
null
null
forms_app/views.py
sudee404/forms_project
ba60e41d13d72c80f412a7928e32000db200ea17
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render from .models import User from . import forms # Create your views here. def index(request): context = { 'django':'The Web Framework for Developers with a deadline' } return render(request,'index.html', context=context) def signup(request): sign_up = forms.User...
26.689655
67
0.639535
0
0
0
0
0
0
0
0
148
0.191214
f1d3eb9d9dab05a31381c38ed24576dd96752996
920
py
Python
python_submitty_utils/tests/test_string_utils.py
zeez2030/Submitty
7118944ff4adc6f15d76984eb10a1e862926d724
[ "BSD-3-Clause" ]
411
2016-06-14T20:52:25.000Z
2022-03-31T21:20:25.000Z
python_submitty_utils/tests/test_string_utils.py
KaelanWillauer/Submitty
cf9b6ceda15ec0a661e2ca81ea7864790094c64a
[ "BSD-3-Clause" ]
5,730
2016-05-23T21:04:32.000Z
2022-03-31T10:08:06.000Z
python_submitty_utils/tests/test_string_utils.py
KaelanWillauer/Submitty
cf9b6ceda15ec0a661e2ca81ea7864790094c64a
[ "BSD-3-Clause" ]
423
2016-09-22T21:11:30.000Z
2022-03-29T18:55:28.000Z
import unittest from submitty_utils import string_utils class TestUser(unittest.TestCase): def testNegativeLength(self): self.assertEqual(string_utils.generate_random_string(-1), '') def testZeroLength(self): self.assertEqual(string_utils.generate_random_string(0), '') def testPositiveL...
36.8
117
0.742391
812
0.882609
0
0
0
0
0
0
68
0.073913
f1d87b5f62ca7da3adff2398d764af03ea29ed10
486
py
Python
simple/file.py
asafonov/simple-backup
4e90162cb10219537da42c57d49f8f2409ba7148
[ "MIT" ]
null
null
null
simple/file.py
asafonov/simple-backup
4e90162cb10219537da42c57d49f8f2409ba7148
[ "MIT" ]
null
null
null
simple/file.py
asafonov/simple-backup
4e90162cb10219537da42c57d49f8f2409ba7148
[ "MIT" ]
null
null
null
import os class FileHandler: def __init__(self): self.directory = os.path.expanduser('~') + '/.simple_backup' if not os.path.exists(self.directory): os.mkdir(self.directory) def save (self, filename, data): f = open(self.directory + '/' + filename, 'w') f.write(da...
23.142857
68
0.549383
474
0.975309
0
0
0
0
0
0
29
0.059671
f1d9fe63dcda29a6aafbbbb348278fbcaa1eb8c3
3,449
py
Python
metrics.py
mksarker/data_preprocessing
dabdb7f3dbf1c4bf5ee49a39aef2cb258539b027
[ "MIT" ]
null
null
null
metrics.py
mksarker/data_preprocessing
dabdb7f3dbf1c4bf5ee49a39aef2cb258539b027
[ "MIT" ]
null
null
null
metrics.py
mksarker/data_preprocessing
dabdb7f3dbf1c4bf5ee49a39aef2cb258539b027
[ "MIT" ]
null
null
null
import os import argparse import logging import numpy as np import SimpleITK as sitk logging.basicConfig(level=logging.INFO) from tqdm import tqdm import cv2 import sys from PIL import Image from sklearn import metrics def Accuracy(y_true, y_pred): TP = np.sum(np.logical_and(y_pred == 255, y_true == 255)) TN =...
35.556701
114
0.643665
0
0
0
0
0
0
0
0
456
0.132212
f1db626c6c51f4c9710e0e6d1e887229859a9043
2,757
py
Python
src/app/parser/parser.py
IliaValov/SofiaAirPurity
71d0b005a9f8f5bfabfae99d1f4f8e1d11825adf
[ "MIT" ]
null
null
null
src/app/parser/parser.py
IliaValov/SofiaAirPurity
71d0b005a9f8f5bfabfae99d1f4f8e1d11825adf
[ "MIT" ]
1
2021-12-02T23:20:51.000Z
2021-12-02T23:20:51.000Z
src/app/parser/parser.py
IliaValov/SofiaAirPurity
71d0b005a9f8f5bfabfae99d1f4f8e1d11825adf
[ "MIT" ]
1
2022-01-10T15:18:27.000Z
2022-01-10T15:18:27.000Z
from app.models.enums.station import Station class Parser: def __init__(self, data): self.data = data def getDataByStation(self, station): airDataForStation = {"timeSet": [], "level": [], "airType": [], "invalid": []} for d in self.data: if int(d.station) == station: ...
50.127273
132
0.602466
2,710
0.982952
0
0
0
0
0
0
322
0.116794
f1dc37b00019bdcd4fd7800d93e149be0dfe2bdf
11,747
py
Python
synapse/tools/storm.py
vertexproject/synapse
9712e2aee63914441c59ce6cfc060fe06a2e5920
[ "Apache-2.0" ]
216
2017-01-17T18:52:50.000Z
2022-03-31T18:44:49.000Z
synapse/tools/storm.py
vertexproject/synapse
9712e2aee63914441c59ce6cfc060fe06a2e5920
[ "Apache-2.0" ]
2,189
2017-01-17T22:31:48.000Z
2022-03-31T20:41:45.000Z
synapse/tools/storm.py
vertexproject/synapse
9712e2aee63914441c59ce6cfc060fe06a2e5920
[ "Apache-2.0" ]
44
2017-01-17T16:50:57.000Z
2022-03-16T18:35:52.000Z
import os import sys import copy import asyncio import logging import argparse import synapse.exc as s_exc import synapse.common as s_common import synapse.telepath as s_telepath import synapse.lib.cli as s_cli import synapse.lib.cmd as s_cmd import synapse.lib.node as s_node import synapse.lib.time as s_time import ...
29.589421
125
0.556823
9,937
0.845918
0
0
0
0
7,154
0.609007
2,665
0.226866
f1dcbdb70b490e3b7a9741698dbd0c921ce6d7ff
374
py
Python
Feature Selection/variance-thresholding-binary-features.py
WyckliffeAluga/data-chronicles
5219fe9cdbafb9fd7be88727483952c4c13f2790
[ "MIT" ]
null
null
null
Feature Selection/variance-thresholding-binary-features.py
WyckliffeAluga/data-chronicles
5219fe9cdbafb9fd7be88727483952c4c13f2790
[ "MIT" ]
null
null
null
Feature Selection/variance-thresholding-binary-features.py
WyckliffeAluga/data-chronicles
5219fe9cdbafb9fd7be88727483952c4c13f2790
[ "MIT" ]
1
2021-02-09T12:22:55.000Z
2021-02-09T12:22:55.000Z
from sklearn.feature_selection import VarianceThreshold # Create feature matrix with: # Feature 0: 80% class 0 # Feature 1: 80% class 1 # Feature 2: 60% class 0, 40% class 1 X = [[0, 1, 0], [0, 1, 1], [0, 1, 0], [0, 1, 1], [1, 0, 0]] # Run threshold by variance thresholder = VarianceThreshold(thre...
23.375
60
0.628342
0
0
0
0
0
0
0
0
141
0.377005
f1dd06b091ae6fa97dc90f3e28bc1d5770af8082
1,677
py
Python
scripts/03_BuildLITypeModels/14_TrainLemmaModel.py
danielplatt/LemmInflect
7db0633098409800fbe7056bdab7d6f5f144cebb
[ "MIT" ]
157
2019-05-11T21:17:20.000Z
2022-03-21T12:05:12.000Z
scripts/03_BuildLITypeModels/14_TrainLemmaModel.py
danielplatt/LemmInflect
7db0633098409800fbe7056bdab7d6f5f144cebb
[ "MIT" ]
10
2019-05-14T19:49:04.000Z
2021-06-03T13:15:16.000Z
scripts/03_BuildLITypeModels/14_TrainLemmaModel.py
danielplatt/LemmInflect
7db0633098409800fbe7056bdab7d6f5f144cebb
[ "MIT" ]
20
2019-08-21T12:40:51.000Z
2021-10-02T15:06:07.000Z
#!/usr/bin/python3 import sys sys.path.insert(0, '../..') # make '..' first in the lib search path import gzip import numpy from lemminflect.kmodels.ModelLemma import ModelLemma from lemminflect.kmodels.ModelLemmaInData import ModelLemmaInData from lemminflect.kmodels.ModelLemmaClasses import ModelLemm...
31.641509
75
0.690519
0
0
0
0
0
0
0
0
290
0.172928
f1dd06cdb53d42d5c3f71ef66179e31f525e4e55
9,006
py
Python
python/snips_nlu_parsers/builtin_entities.py
f-laurens/snips-nlu-parsers
82d24c0b4258acd1191af5d558b7592a18f2dada
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
14
2019-04-17T15:10:39.000Z
2022-02-14T09:38:47.000Z
python/snips_nlu_parsers/builtin_entities.py
f-laurens/snips-nlu-parsers
82d24c0b4258acd1191af5d558b7592a18f2dada
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
4
2019-04-07T19:36:24.000Z
2020-05-28T12:46:37.000Z
python/snips_nlu_parsers/builtin_entities.py
f-laurens/snips-nlu-parsers
82d24c0b4258acd1191af5d558b7592a18f2dada
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
43
2019-04-20T07:31:57.000Z
2022-01-12T16:24:13.000Z
# coding=utf-8 from __future__ import (absolute_import, division, print_function, unicode_literals) import json from _ctypes import byref, pointer from builtins import range, str from ctypes import c_char_p, string_at from snips_nlu_parsers.utils import (CStringArray, check_ffi_error, lib, ...
40.751131
87
0.67777
0
0
0
0
0
0
0
0
1,953
0.216855
f1decafed3dd9912b1ab456a5f7d5b245e48033e
521
py
Python
picoctf-2019/got/shellcode.py
onealmond/hacking-lab
631e615944add02db3c2afef47bf1de7171eb065
[ "MIT" ]
9
2021-04-20T15:28:36.000Z
2022-03-08T19:53:48.000Z
picoctf-2019/got/shellcode.py
onealmond/hacking-lab
631e615944add02db3c2afef47bf1de7171eb065
[ "MIT" ]
null
null
null
picoctf-2019/got/shellcode.py
onealmond/hacking-lab
631e615944add02db3c2afef47bf1de7171eb065
[ "MIT" ]
6
2021-06-24T03:25:21.000Z
2022-02-20T21:44:52.000Z
import os;os.environ['TMPDIR'] = os.path.join(os.environ['HOME'], 'tmp') import pwn remote_binary = "/problems/got_5_c5119617c90aa544a639812dbc41e24e/vuln" def segfault(): try: pr = pwn.process(remote_binary) elf = pwn.ELF(remote_binary, False) print(elf.got) pr.sendlineafter("Inpu...
27.421053
72
0.629559
0
0
0
0
0
0
0
0
118
0.226488
f1e15b839857a50eb242db9bce20dc2231b79a03
9,518
py
Python
miscellaneous/utils.py
tingyuansen/Weak_Lensing
f8f0833345687648c467b4dea7074d9596c81c14
[ "MIT" ]
null
null
null
miscellaneous/utils.py
tingyuansen/Weak_Lensing
f8f0833345687648c467b4dea7074d9596c81c14
[ "MIT" ]
null
null
null
miscellaneous/utils.py
tingyuansen/Weak_Lensing
f8f0833345687648c467b4dea7074d9596c81c14
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # *Author: Dezso Ribli* """ Util functions for training CNN on weak lesnsing maps. Mostly data loaders and data generators with some additional functionality. """ import numpy as np # https://github.com/IntelPython/mkl_fft/issues/11 #np.fft.restore_all() import cv2 import math...
37.179688
87
0.604434
3,064
0.321916
0
0
0
0
0
0
2,544
0.267283
f1e232b6730dde2945dc690b0f6fddabcc0f6b8b
4,683
py
Python
bert/utils/common.py
rschoon/bert
5aeb394dd7c1fcf5995d2f7cd6a25ef3ac81ce13
[ "MIT" ]
null
null
null
bert/utils/common.py
rschoon/bert
5aeb394dd7c1fcf5995d2f7cd6a25ef3ac81ce13
[ "MIT" ]
null
null
null
bert/utils/common.py
rschoon/bert
5aeb394dd7c1fcf5995d2f7cd6a25ef3ac81ce13
[ "MIT" ]
null
null
null
import hashlib import io import json import os import re import struct def decode_bin(s, encoding=None): if encoding is None: encoding = "utf-8" if encoding in ("bin", "binary", "bytes", "raw"): return s return s.decode(encoding) class open_output(object): def __init__(self, filename,...
23.771574
74
0.558189
2,494
0.532565
0
0
65
0.01388
0
0
216
0.046124
f1e2aa05c0131a4119034421ecbeb1cb9810d8c8
2,080
py
Python
boaphys/elements.py
janpipek/boaphys
f32d972e22ebede2f24bf69506125b7c59a4c8c0
[ "MIT" ]
null
null
null
boaphys/elements.py
janpipek/boaphys
f32d972e22ebede2f24bf69506125b7c59a4c8c0
[ "MIT" ]
null
null
null
boaphys/elements.py
janpipek/boaphys
f32d972e22ebede2f24bf69506125b7c59a4c8c0
[ "MIT" ]
null
null
null
class Element: def __init__(self, name : str, symbol : str, Z : int): self.name = name self.symbol = symbol self.Z = Z def __repr__(self): return "Element(\"{0}\", Z={1})".format(self.name, self.Z) def __str__(self): return self.symbol ...
27.012987
93
0.516827
1,693
0.813942
0
0
161
0.077404
0
0
112
0.053846
f1e338fa1474985107d12ea6bcd66b88abed94fc
2,924
py
Python
projects/vdk-plugins/airflow-provider-vdk/tests/hooks/test_vdkhook.py
vmware/versatile-data-kit
c4e10324a4f3203c58079cb18203880f68053f15
[ "Apache-2.0" ]
100
2021-10-04T09:32:04.000Z
2022-03-30T11:23:53.000Z
projects/vdk-plugins/airflow-provider-vdk/tests/hooks/test_vdkhook.py
vmware/versatile-data-kit
c4e10324a4f3203c58079cb18203880f68053f15
[ "Apache-2.0" ]
208
2021-10-04T16:56:40.000Z
2022-03-31T10:41:44.000Z
projects/vdk-plugins/airflow-provider-vdk/tests/hooks/test_vdkhook.py
vmware/versatile-data-kit
c4e10324a4f3203c58079cb18203880f68053f15
[ "Apache-2.0" ]
14
2021-10-11T14:15:13.000Z
2022-03-11T13:39:17.000Z
# Copyright 2021 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 import logging import unittest from unittest import mock from vdk.plugin.control_api_auth.authentication import Authentication from vdk_provider.hooks.vdk import VDKHook log = logging.getLogger(__name__) # Monkey-patch the authentication logic to a...
38.986667
129
0.703146
2,552
0.872777
0
0
2,384
0.815321
0
0
1,137
0.388851
f1e3adf84f989f48fb009dcc9e422f44d758219c
720
py
Python
skater/util/logger.py
RPUTHUMA/Skater
317460b88065b41eebe6790e9efdbb0595cbe450
[ "UPL-1.0" ]
718
2017-05-19T22:49:40.000Z
2019-03-27T06:40:54.000Z
skater/util/logger.py
quant1729/Skater
b46a4abe3465ddc7b19ffc762ad45d1414b060a6
[ "UPL-1.0" ]
114
2017-05-24T16:55:59.000Z
2019-03-27T12:48:18.000Z
skater/util/logger.py
quant1729/Skater
b46a4abe3465ddc7b19ffc762ad45d1414b060a6
[ "UPL-1.0" ]
121
2017-05-22T17:20:19.000Z
2019-03-21T15:06:19.000Z
"""Funcs for logging""" import logging _CRITICAL = logging.CRITICAL _ERROR = logging.ERROR _WARNING = logging.WARNING _INFO = logging.INFO _DEBUG = logging.DEBUG _NOTSET = logging.NOTSET def build_logger(log_level, logger_name, capture_warning=True): logger = logging.Logger(logger_name) # All warnings are ...
24
63
0.740278
0
0
0
0
0
0
0
0
113
0.156944
f1e59d1d38ade7999a6cd5e7982c060b5e15cc11
575
py
Python
algorithms/code/leetcode/lc217_contains_duplicate/lc217_contains_duplicate.py
altermarkive/training
6a13f5b2f466156ad5db0e25da0e601d2404b4c3
[ "MIT" ]
null
null
null
algorithms/code/leetcode/lc217_contains_duplicate/lc217_contains_duplicate.py
altermarkive/training
6a13f5b2f466156ad5db0e25da0e601d2404b4c3
[ "MIT" ]
1
2022-02-16T11:28:56.000Z
2022-02-16T11:28:56.000Z
algorithms/code/leetcode/lc217_contains_duplicate/lc217_contains_duplicate.py
altermarkive/training
6a13f5b2f466156ad5db0e25da0e601d2404b4c3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # https://leetcode.com/problems/contains-duplicate/ import unittest from typing import List class Solution: def containsDuplicate(self, nums: List[int]) -> bool: seen = set() for num in nums: if num in seen: return True seen.add(num)...
23
71
0.626087
452
0.786087
0
0
0
0
0
0
73
0.126957
f1e6fe5da799ee54688ff5ee8d7c10fc529546e8
1,818
py
Python
examples/hsmm-geo.py
bikash/pyhsmm
94fab0ea66072a639b20163c40db04c18069496c
[ "MIT" ]
1
2015-11-08T05:20:39.000Z
2015-11-08T05:20:39.000Z
examples/hsmm-geo.py
bikash/pyhsmm
94fab0ea66072a639b20163c40db04c18069496c
[ "MIT" ]
null
null
null
examples/hsmm-geo.py
bikash/pyhsmm
94fab0ea66072a639b20163c40db04c18069496c
[ "MIT" ]
null
null
null
from __future__ import division import numpy as np np.seterr(divide='ignore') # these warnings are usually harmless for this code from matplotlib import pyplot as plt import copy, os import pyhsmm from pyhsmm.util.text import progprint_xrange ################### # generate data # ################### T = 1000 obs_d...
25.25
95
0.669417
0
0
0
0
0
0
0
0
279
0.153465
f1e7704fa789f92ccdaa67ed757a654c38ed5fda
2,644
py
Python
drf_nested/mixins/update_nested_mixin.py
promoteinternational/drf-nested
0042b9e4c100df4ae43a10684c30348160b39187
[ "MIT" ]
1
2020-01-05T07:23:48.000Z
2020-01-05T07:23:48.000Z
drf_nested/mixins/update_nested_mixin.py
promoteinternational/drf-nested
0042b9e4c100df4ae43a10684c30348160b39187
[ "MIT" ]
null
null
null
drf_nested/mixins/update_nested_mixin.py
promoteinternational/drf-nested
0042b9e4c100df4ae43a10684c30348160b39187
[ "MIT" ]
2
2019-08-12T07:36:57.000Z
2019-11-30T01:40:30.000Z
from django.db import transaction from rest_framework.exceptions import ValidationError from .base_nested_mixin import BaseNestedMixin class UpdateNestedMixin(BaseNestedMixin): @transaction.atomic def update(self, instance, validated_data): """ :param instance: :param validated_data: ...
44.066667
112
0.655825
2,505
0.947428
0
0
2,459
0.93003
0
0
612
0.231467
f1e8ea63244e88c3991257407c19f60101c1fe1a
27
py
Python
sbpack/version.py
jdidion/sbpack
84bd7867a0630a826280a702db715377aa879f6a
[ "Apache-2.0" ]
11
2020-08-12T09:33:46.000Z
2022-02-18T15:27:26.000Z
sbpack/version.py
jdidion/sbpack
84bd7867a0630a826280a702db715377aa879f6a
[ "Apache-2.0" ]
35
2020-06-12T16:52:36.000Z
2022-03-25T04:29:02.000Z
sbpack/version.py
jdidion/sbpack
84bd7867a0630a826280a702db715377aa879f6a
[ "Apache-2.0" ]
2
2021-09-27T16:17:26.000Z
2022-01-12T22:18:12.000Z
__version__ = "2021.10.07"
13.5
26
0.703704
0
0
0
0
0
0
0
0
12
0.444444
f1e91dba84a62775f1e1edc376c14039a6a6b66f
179
py
Python
forayer/datasets/__init__.py
dobraczka/forayer
df6783f85fb063f58e8b96acef924f9fd2532227
[ "MIT" ]
5
2021-09-06T13:50:44.000Z
2022-02-14T09:39:09.000Z
forayer/datasets/__init__.py
dobraczka/forayer
df6783f85fb063f58e8b96acef924f9fd2532227
[ "MIT" ]
5
2021-09-07T06:53:41.000Z
2022-01-17T09:51:53.000Z
forayer/datasets/__init__.py
dobraczka/forayer
df6783f85fb063f58e8b96acef924f9fd2532227
[ "MIT" ]
null
null
null
"""Make datasets available.""" from forayer.datasets.oaei_kg import OAEIKGDataset from forayer.datasets.open_ea import OpenEADataset __all__ = ["OpenEADataset", "OAEIKGDataset"]
29.833333
50
0.804469
0
0
0
0
0
0
0
0
60
0.335196
f1ed8dbfedb221a10fa60ea9b89b4d29afac3606
227
py
Python
challenge/admin.py
dpmpolo/anniv
27081ca5bc514050c10ecc5e5c0994a4d5a7066f
[ "MIT" ]
null
null
null
challenge/admin.py
dpmpolo/anniv
27081ca5bc514050c10ecc5e5c0994a4d5a7066f
[ "MIT" ]
null
null
null
challenge/admin.py
dpmpolo/anniv
27081ca5bc514050c10ecc5e5c0994a4d5a7066f
[ "MIT" ]
null
null
null
from django.contrib import admin from challenge.models import Goal, GoalInstance, SignificantOther # Register your models here. admin.site.register(Goal) admin.site.register(GoalInstance) admin.site.register(SignificantOther)
28.375
65
0.837004
0
0
0
0
0
0
0
0
28
0.123348
f1ee53bc0c6e33469f0d38aac5f3576590fc8660
14,142
py
Python
allocate.py
tomdavsmi/ncl-spa
baa714071d18cc388ccc73702d78a53f7096db6e
[ "MIT" ]
null
null
null
allocate.py
tomdavsmi/ncl-spa
baa714071d18cc388ccc73702d78a53f7096db6e
[ "MIT" ]
null
null
null
allocate.py
tomdavsmi/ncl-spa
baa714071d18cc388ccc73702d78a53f7096db6e
[ "MIT" ]
null
null
null
import library import random import re def allocate(studPrefs,unassignedStudents,lecturerprefs,projLects,lectProjs,lecturercaps,projCaps,randomise,updates,iterationLimit): # Create projected preference list - first pass; add students not on lecturer's list for k, v in studPrefs.items(): for project in v: ...
38.53406
172
0.680031
0
0
0
0
0
0
0
0
1,979
0.139938
f1f067f028748782da40d03c616d1804024a0dea
3,271
py
Python
tests/models/classifiers/test_logistic.py
harmsm/epistasis
741b25b3e28015aeeba8d4efc94af1e1d811cd63
[ "Unlicense" ]
null
null
null
tests/models/classifiers/test_logistic.py
harmsm/epistasis
741b25b3e28015aeeba8d4efc94af1e1d811cd63
[ "Unlicense" ]
null
null
null
tests/models/classifiers/test_logistic.py
harmsm/epistasis
741b25b3e28015aeeba8d4efc94af1e1d811cd63
[ "Unlicense" ]
2
2020-04-02T00:58:24.000Z
2021-11-16T13:30:30.000Z
import pytest # External imports import numpy as np from gpmap import GenotypePhenotypeMap # Module to test import epistasis from epistasis.models.classifiers import * THRESHOLD = 0.2 @pytest.fixture def gpm(test_data): """ Create a genotype-phenotype map """ d = test_data[0] return GenotypePh...
27.258333
60
0.61174
0
0
0
0
284
0.086824
0
0
535
0.163559
f1f07ae2628711dd9b1d256f9780dc722c6f8e53
381
py
Python
backend/notifications/admin.py
solitariaa/CMPUT404-project-socialdistribution
f9e23a10e209f8bf7ed062e105f44038751f7c74
[ "W3C-20150513" ]
1
2022-03-01T03:03:40.000Z
2022-03-01T03:03:40.000Z
backend/notifications/admin.py
solitariaa/CMPUT404-project-socialdistribution
f9e23a10e209f8bf7ed062e105f44038751f7c74
[ "W3C-20150513" ]
51
2022-02-09T06:18:27.000Z
2022-03-28T19:01:54.000Z
backend/notifications/admin.py
solitariaa/CMPUT404-project-socialdistribution
f9e23a10e209f8bf7ed062e105f44038751f7c74
[ "W3C-20150513" ]
2
2022-03-13T20:58:10.000Z
2022-03-19T06:29:56.000Z
from django.contrib import admin from .models import Notification class NotificationAdmin(admin.ModelAdmin): ordering = ('published',) search_fields = ('get_author',) list_display = ('id', 'get_author', 'published', 'summary') def get_author(self, obj: Notification): return obj.author.displa...
23.8125
63
0.727034
257
0.674541
0
0
0
0
0
0
59
0.154856
f1f2709a9b0d54f4549f4f5b2c964cce095a32f9
3,655
py
Python
example/experiments/01_experiment.py
dzwiedziu-nkg/credo-classify-framework
45417b505b4f4b20a7248f3487ca57a3fd49ccee
[ "MIT" ]
null
null
null
example/experiments/01_experiment.py
dzwiedziu-nkg/credo-classify-framework
45417b505b4f4b20a7248f3487ca57a3fd49ccee
[ "MIT" ]
null
null
null
example/experiments/01_experiment.py
dzwiedziu-nkg/credo-classify-framework
45417b505b4f4b20a7248f3487ca57a3fd49ccee
[ "MIT" ]
3
2020-06-19T15:41:19.000Z
2020-06-29T12:47:05.000Z
import bz2 import time import urllib.request import io from typing import List, Tuple from credo_cf import load_json_from_stream, progress_and_process_image, group_by_device_id, group_by_resolution, too_often, near_hot_pixel2, \ too_bright from credo_cf import xor_preprocess from credo_cf.commons.utils import get_...
31.782609
142
0.642681
0
0
0
0
0
0
0
0
885
0.242134
f1f2862dcb680020685252fc0444e7b7a36ac2b8
427
py
Python
apptweak/ios.py
gudhati/apptweak-api-python-library
f4a7f7e34548d6d216f3a297d63944c7adbf9667
[ "MIT" ]
5
2019-05-21T14:44:57.000Z
2020-10-30T04:08:13.000Z
apptweak/ios.py
gudhati/apptweak-api-python-library
f4a7f7e34548d6d216f3a297d63944c7adbf9667
[ "MIT" ]
1
2020-08-28T02:42:37.000Z
2020-08-28T07:52:54.000Z
apptweak/ios.py
gudhati/apptweak-api-python-library
f4a7f7e34548d6d216f3a297d63944c7adbf9667
[ "MIT" ]
5
2019-07-18T13:38:01.000Z
2021-06-09T04:12:35.000Z
from apptweak.plateform import * class Ios(Plateform): plateform_name = 'ios' def __init__(self): super().__init__(self.plateform_name) @classmethod def ratings(self, application_id, params = {}): return self.applications(application_id, API_END_PATH['ratings'], params) @classmet...
26.6875
81
0.697892
392
0.918033
0
0
261
0.611241
0
0
50
0.117096
f1f2f70605379c3a09598bf2b8739bb4f47caa1b
3,944
py
Python
30-Days-Of-Python/30-Days-Of-Python/19_file_handling.py
zhaobingwang/python-samples
d59f84d2b967cc793cb9b8999f8cdef349fd6fd5
[ "MIT" ]
null
null
null
30-Days-Of-Python/30-Days-Of-Python/19_file_handling.py
zhaobingwang/python-samples
d59f84d2b967cc793cb9b8999f8cdef349fd6fd5
[ "MIT" ]
null
null
null
30-Days-Of-Python/30-Days-Of-Python/19_file_handling.py
zhaobingwang/python-samples
d59f84d2b967cc793cb9b8999f8cdef349fd6fd5
[ "MIT" ]
null
null
null
print('---------- Opening Files for Reading ----------') f = open('./files/reading_file_example.txt') print(f) # <_io.TextIOWrapper name='./files/reading_file_example.txt' mode='r' encoding='cp936'> print('\t---------- read() ----------') # read(): read the whole text as string. If we want to limit the number of char...
31.806452
113
0.606491
0
0
0
0
0
0
0
0
2,681
0.679767
f1f6211abde32ba71ccaac35e7c39eb9935dfa7c
2,491
py
Python
data/grady-memorial-hospital/parse.py
Afellman/hospital-chargemaster
1b87bc64d95d97c0538be7633f9e469e5db624e2
[ "MIT" ]
34
2019-01-18T00:15:58.000Z
2022-03-26T15:01:08.000Z
data/grady-memorial-hospital/parse.py
wsheffel/hospital-chargemaster
b3473c798fd2f343f7f02c1e32496f9eea9fa94d
[ "MIT" ]
8
2019-01-16T22:06:11.000Z
2019-02-25T00:59:25.000Z
data/grady-memorial-hospital/parse.py
wsheffel/hospital-chargemaster
b3473c798fd2f343f7f02c1e32496f9eea9fa94d
[ "MIT" ]
10
2019-02-20T14:58:16.000Z
2021-11-22T21:57:04.000Z
#!/usr/bin/env python import os from glob import glob import json import pandas import datetime import sys here = os.path.dirname(os.path.abspath(__file__)) folder = os.path.basename(here) latest = '%s/latest' % here year = datetime.datetime.today().year output_data = os.path.join(here, 'data-latest.tsv') output_year...
29.654762
75
0.583701
0
0
0
0
0
0
0
0
643
0.258129
f1f62ac7868b351e283f53daaf44f5e2562dfc27
10,476
py
Python
DeterministicParticleFlowControl/tests/test_pytorch_kernel.py
dimitra-maoutsa/DeterministicParticleFlowControl
106bc9b01d7a4888e4ded18c5fb5a989fe672386
[ "MIT" ]
6
2021-12-13T14:30:31.000Z
2022-01-24T07:54:57.000Z
DeterministicParticleFlowControl/tests/test_pytorch_kernel.py
dimitra-maoutsa/DeterministicParticleFlowControl
106bc9b01d7a4888e4ded18c5fb5a989fe672386
[ "MIT" ]
10
2021-12-18T23:04:53.000Z
2022-02-05T02:06:34.000Z
DeterministicParticleFlowControl/tests/test_pytorch_kernel.py
dimitra-maoutsa/DeterministicParticleFlowControl
106bc9b01d7a4888e4ded18c5fb5a989fe672386
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Jan 10 07:20:39 2022 @author: maout """ import numpy as np from scipy.spatial.distance import cdist import torch #from score_function_estimators import my_cdist from typing import Union from torch.autograd import grad #%% select available device def set_device(): device...
37.683453
180
0.612447
5,834
0.556892
0
0
0
0
0
0
4,112
0.392516
f1f6905a9916f479816181eeb443cb6b650cc61b
11,075
py
Python
components.py
zachgk/tfcomponents
6c33349ab13549debfc9b347df795c82e38cfa73
[ "MIT" ]
null
null
null
components.py
zachgk/tfcomponents
6c33349ab13549debfc9b347df795c82e38cfa73
[ "MIT" ]
null
null
null
components.py
zachgk/tfcomponents
6c33349ab13549debfc9b347df795c82e38cfa73
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import tensorflow as tf import tflearn from tflearn import variables as vs from tflearn import activations from tflearn import initializations from tflearn import losses from tflearn import utils def condition(cond, t, f): i...
34.182099
116
0.557562
10,433
0.942032
0
0
0
0
0
0
1,100
0.099323
f1f9c0eee8a8c52481a3d1792850e6310a0a8163
1,984
py
Python
tests/unit/warnings_test.py
gamechanger/dusty
dd9778e3a4f0c623209e53e98aa9dc1fe76fc309
[ "MIT" ]
421
2015-06-02T16:29:59.000Z
2021-06-03T18:44:42.000Z
tests/unit/warnings_test.py
gamechanger/dusty
dd9778e3a4f0c623209e53e98aa9dc1fe76fc309
[ "MIT" ]
404
2015-06-02T20:23:42.000Z
2019-08-21T16:59:41.000Z
tests/unit/warnings_test.py
gamechanger/dusty
dd9778e3a4f0c623209e53e98aa9dc1fe76fc309
[ "MIT" ]
16
2015-06-16T17:21:02.000Z
2020-03-27T02:27:09.000Z
from ..testcases import DustyTestCase from dusty.warnings import Warnings class TestWarnings(DustyTestCase): def setUp(self): super(TestWarnings, self).setUp() self.warnings = Warnings() def test_warn(self): message_1 = 'Something is wrong, yo' message_2 = 'Yo this thing is al...
45.090909
229
0.689516
1,907
0.96119
0
0
0
0
0
0
536
0.270161
f1fa3f6469623ef44f7b253d9c5da8307b330081
4,655
py
Python
dndice.py
Ar4093/PythonUtils
fd2d1e0eab51c40cd75b42a513f6e76ea8f76bb3
[ "MIT" ]
null
null
null
dndice.py
Ar4093/PythonUtils
fd2d1e0eab51c40cd75b42a513f6e76ea8f76bb3
[ "MIT" ]
null
null
null
dndice.py
Ar4093/PythonUtils
fd2d1e0eab51c40cd75b42a513f6e76ea8f76bb3
[ "MIT" ]
null
null
null
from random import randint import re # Supported formats: # [A]dX[(L|H|K)n][.Y1[.Y2[...]]] # A - number of dice # X - number of sides of dice # . - operation: allowed are + - * x / # Ln/Hn/Kn - discard the Lowest n dice or Keep the Highest n dice. - will only apply the first of these, in order LHK # Y1,Y2,......
34.738806
140
0.478195
0
0
0
0
0
0
0
0
1,631
0.350376
f1fbbda465699c148d64aca8b6b9736f618761e2
2,471
py
Python
cfg/configure_model.py
dadelani/sentiment-discovery
0cbfc5f6345dacbf52f1f806a9e136a61ca35cf8
[ "BSD-3-Clause" ]
2
2019-04-24T08:23:54.000Z
2020-06-24T10:25:34.000Z
cfg/configure_model.py
mikekestemont/sentiment-discovery
84bf39846ddf6b099d99318214a013269b5b0e61
[ "BSD-3-Clause" ]
null
null
null
cfg/configure_model.py
mikekestemont/sentiment-discovery
84bf39846ddf6b099d99318214a013269b5b0e61
[ "BSD-3-Clause" ]
1
2019-03-23T08:07:33.000Z
2019-03-23T08:07:33.000Z
import os from sentiment_discovery.reparameterization import remove_weight_norm from sentiment_discovery.model import make_model class ModuleConfig(object): def __init__(self, parser): super(ModuleConfig, self).__init__() self.parser = parser def apply(self, cfg, opt): """make model and format model...
39.854839
93
0.718737
1,115
0.451234
0
0
0
0
0
0
763
0.308782
f1fcac439aa33bb2b7ada9c60628d61b4b1afd6c
4,309
py
Python
tests/backends/console/test_env.py
j5api/j5
d3158cfd3d0d19ed33aba0c5c2c1f17a38fe12c7
[ "MIT" ]
10
2019-01-19T13:09:37.000Z
2021-06-18T13:40:10.000Z
tests/backends/console/test_env.py
j5api/j5
d3158cfd3d0d19ed33aba0c5c2c1f17a38fe12c7
[ "MIT" ]
681
2019-01-22T18:12:23.000Z
2022-03-25T14:14:31.000Z
tests/backends/console/test_env.py
j5api/j5
d3158cfd3d0d19ed33aba0c5c2c1f17a38fe12c7
[ "MIT" ]
8
2019-02-22T21:45:47.000Z
2021-11-17T19:43:33.000Z
"""Tests for the ConsoleEnvironment and Console helper.""" from j5.backends.console import Console def test_console_instantiation() -> None: """Test that we can create a console.""" console = Console("MockConsole") assert type(console) is Console assert console._descriptor == "MockConsole" def tes...
31.918519
89
0.598283
2,437
0.56556
0
0
160
0.037132
0
0
1,365
0.316779
f1ff198ad462185fb2910c252e87000aebf824f5
6,351
py
Python
backend/modules/cache.py
fheyen/ClaVis
528ca85dd05606d39761b5a00d755500cf1cd2f6
[ "MIT" ]
2
2021-01-11T20:09:32.000Z
2021-05-14T14:52:48.000Z
backend/modules/cache.py
fheyen/ClaVis
528ca85dd05606d39761b5a00d755500cf1cd2f6
[ "MIT" ]
null
null
null
backend/modules/cache.py
fheyen/ClaVis
528ca85dd05606d39761b5a00d755500cf1cd2f6
[ "MIT" ]
null
null
null
from os import listdir, remove, makedirs from os.path import isfile, join, exists import shutil import joblib from termcolor import cprint import json from pathlib import Path _cache_path = None _log_actions = True def init(cache_path, log_actions=True): """ Initializes the cache. Keyword Arguments: ...
26.352697
140
0.597859
0
0
0
0
0
0
0
0
2,483
0.390962
7b00a8aae5f5c462bd8742df1743968940cbb675
8,123
py
Python
training/data/sampler.py
jpjuvo/PANDA-challenge-raehmae
5748cd23f18e2dd36d56918dcee495b822d2a5cd
[ "MIT" ]
null
null
null
training/data/sampler.py
jpjuvo/PANDA-challenge-raehmae
5748cd23f18e2dd36d56918dcee495b822d2a5cd
[ "MIT" ]
null
null
null
training/data/sampler.py
jpjuvo/PANDA-challenge-raehmae
5748cd23f18e2dd36d56918dcee495b822d2a5cd
[ "MIT" ]
1
2021-04-20T04:37:47.000Z
2021-04-20T04:37:47.000Z
import torch import os import numpy as np import random import pandas as pd from sklearn.model_selection import StratifiedKFold from data.tileimages import * from data.multitask import * import fastai from fastai.vision import * class FoldSampler: def __init__(self, TRAIN, LABELS, mean, std, N, ...
40.819095
111
0.519266
7,892
0.971562
0
0
0
0
0
0
934
0.114982
7b0127f18652a5554693ea5f44876da7eca25e09
281
py
Python
ABC/194/a.py
fumiyanll23/AtCoder
362ca9fcacb5415c1458bc8dee5326ba2cc70b65
[ "MIT" ]
null
null
null
ABC/194/a.py
fumiyanll23/AtCoder
362ca9fcacb5415c1458bc8dee5326ba2cc70b65
[ "MIT" ]
null
null
null
ABC/194/a.py
fumiyanll23/AtCoder
362ca9fcacb5415c1458bc8dee5326ba2cc70b65
[ "MIT" ]
null
null
null
def main(): # input A, B = map(int, input().split()) # compute # output if A+B>=15 and B >= 8: print(1) elif A+B>=10 and B>=3: print(2) elif A+B >= 3: print(3) else: print(4) if __name__ == '__main__': main()
14.05
36
0.441281
0
0
0
0
0
0
0
0
34
0.120996
7b0281efeed9226063f79960fa17b68b47603613
2,578
py
Python
test/graph/test_from_ase.py
yhtang/GraphDot
3d5ed4fbb2f6912052baa42780b436da76979691
[ "BSD-3-Clause-LBNL" ]
9
2020-02-14T18:07:39.000Z
2021-12-15T12:07:31.000Z
test/graph/test_from_ase.py
yhtang/graphdot
3d5ed4fbb2f6912052baa42780b436da76979691
[ "BSD-3-Clause-LBNL" ]
3
2020-03-19T19:07:26.000Z
2021-02-24T06:08:51.000Z
test/graph/test_from_ase.py
yhtang/graphdot
3d5ed4fbb2f6912052baa42780b436da76979691
[ "BSD-3-Clause-LBNL" ]
3
2019-10-17T06:11:18.000Z
2021-05-07T11:56:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from ase.build import molecule from ase.lattice.cubic import SimpleCubic from graphdot.graph import Graph from graphdot.graph.adjacency import AtomicAdjacency adjacencies = [ AtomicAdjacency(shape='tent1', length_scale=1.0, zoom=1), AtomicAdjacency(s...
38.477612
79
0.660978
0
0
0
0
1,899
0.736618
0
0
227
0.088053
7b02e549c87583bcf554b71f024544d0bb0dac0a
2,735
py
Python
FEM/src/FemIo.py
BartSiwek/Neurotransmitter2D
200c1b7e74de0786b1bb52d456e227f9d64cebc6
[ "MIT" ]
null
null
null
FEM/src/FemIo.py
BartSiwek/Neurotransmitter2D
200c1b7e74de0786b1bb52d456e227f9d64cebc6
[ "MIT" ]
null
null
null
FEM/src/FemIo.py
BartSiwek/Neurotransmitter2D
200c1b7e74de0786b1bb52d456e227f9d64cebc6
[ "MIT" ]
null
null
null
import string import scipy import PslgIo, ElementAwarePslg def loadEle(filename): pslg = ElementAwarePslg.ElementAwarePslg() file = open(filename, "r") try: PslgIo.readFromFile(file, pslg, filename) finally: file.close() return pslg def saveFem(filename, femResults): #Open the ...
27.35
102
0.571115
0
0
0
0
0
0
0
0
243
0.088848
7b04376d12aae979563b6b36b34ff0b76d2dcff0
3,466
py
Python
dianna/__init__.py
cffbots/dianna
21e272dce2862747a5109341b622798f667d9248
[ "Apache-2.0" ]
null
null
null
dianna/__init__.py
cffbots/dianna
21e272dce2862747a5109341b622798f667d9248
[ "Apache-2.0" ]
null
null
null
dianna/__init__.py
cffbots/dianna
21e272dce2862747a5109341b622798f667d9248
[ "Apache-2.0" ]
null
null
null
""" DIANNA: Deep Insight And Neural Network Analysis. Modern scientific challenges are often tackled with (Deep) Neural Networks (DNN). Despite their high predictive accuracy, DNNs lack inherent explainability. Many DNN users, especially scientists, do not harvest DNNs power because of lack of trust and understanding ...
42.790123
99
0.742643
0
0
0
0
0
0
0
0
2,388
0.688979
7b0494a9e41efc09a0891a5e4ffe2bfd4e84d0d3
2,925
py
Python
printer/gpio.py
3DRPP/printer
7826c7c82a5331d916d8ea038bd3a44aff6e35b5
[ "MIT" ]
null
null
null
printer/gpio.py
3DRPP/printer
7826c7c82a5331d916d8ea038bd3a44aff6e35b5
[ "MIT" ]
null
null
null
printer/gpio.py
3DRPP/printer
7826c7c82a5331d916d8ea038bd3a44aff6e35b5
[ "MIT" ]
null
null
null
try: import RPi.GPIO as GPIO except RuntimeError: print("Error importing RPi.GPIO! This is probably because you need " "superuser privileges. You can achieve this by using 'sudo' to run " "your script") gpios = [7, 8, 10, 11, 12, 13, 15, 16, 18, 19, 21, 22, 23, 24, 26, 29, 31, 32...
29.545455
79
0.523419
2,318
0.792479
0
0
0
0
0
0
315
0.107692
7b04e005435865593cbdccc3f6d9e91235157df4
1,395
py
Python
simple_joint_subscriber/scripts/joint_subscriber.py
itk-thrivaldi/thrivaldi_examples
7c00ad4e1b4fa4b0f27c88e8c0147f8105b042fd
[ "Apache-2.0" ]
null
null
null
simple_joint_subscriber/scripts/joint_subscriber.py
itk-thrivaldi/thrivaldi_examples
7c00ad4e1b4fa4b0f27c88e8c0147f8105b042fd
[ "Apache-2.0" ]
1
2017-12-14T14:04:24.000Z
2017-12-14T16:58:05.000Z
simple_joint_subscriber/scripts/joint_subscriber.py
itk-thrivaldi/thrivaldi_examples
7c00ad4e1b4fa4b0f27c88e8c0147f8105b042fd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import rospy # For all things ros with python # JointState is defined in sensor_msgs.msg # If you know a message but not where it is # call rosmsg info MSGNAME from the terminal from sensor_msgs.msg import JointState # This tutorial takes heavily from # http://wiki.ros.org/ROS/Tutorials/WritingP...
34.875
79
0.7319
0
0
0
0
0
0
0
0
1,019
0.730466
7b0521366a87b5722240ee07005b1b01f21cf17a
1,291
py
Python
src/lab4_cam/src/sawyercam.py
citronella3alain/baxterDraw
c050254e8b4b8d4f5087e8743a34289844138e0c
[ "MIT" ]
null
null
null
src/lab4_cam/src/sawyercam.py
citronella3alain/baxterDraw
c050254e8b4b8d4f5087e8743a34289844138e0c
[ "MIT" ]
null
null
null
src/lab4_cam/src/sawyercam.py
citronella3alain/baxterDraw
c050254e8b4b8d4f5087e8743a34289844138e0c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Aran Sena 2018 # # Code example only, provided without guarantees # # Example for how to get both cameras streaming together # #### import rospy from intera_core_msgs.srv._IOComponentCommandSrv import IOComponentCommandSrv from intera_core_msgs.msg._IOComponentCommand import IOCompon...
33.102564
110
0.655306
0
0
0
0
0
0
0
0
478
0.370256
7b061600468274d3cebd155c75fff8f1303d7256
12,279
py
Python
citydata/crime.py
JackKirbyCook82/neighborhood
3805fa11890e121ffadcaaf8f02323434cb68519
[ "MIT" ]
null
null
null
citydata/crime.py
JackKirbyCook82/neighborhood
3805fa11890e121ffadcaaf8f02323434cb68519
[ "MIT" ]
null
null
null
citydata/crime.py
JackKirbyCook82/neighborhood
3805fa11890e121ffadcaaf8f02323434cb68519
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun May 2 2021 @name: CityData CensusTract Download Application @author: Jack Kirby Cook """ import sys import os.path import warnings import logging import regex as re MAIN_DIR = os.path.dirname(os.path.realpath(__file__)) MODULE_DIR = os.path.abspath(os.path.join(MAIN_DIR, ...
47.964844
197
0.710807
7,480
0.60917
1,318
0.107338
1,187
0.096669
0
0
2,145
0.174688
7b072a958ac36c49b32339e29f7e4de28848fadd
3,644
py
Python
apportionpy/experimental/boundary.py
btror/apportionpy
5b70dbeee4b197e41794bed061ea4a11f128d1c8
[ "MIT" ]
null
null
null
apportionpy/experimental/boundary.py
btror/apportionpy
5b70dbeee4b197e41794bed061ea4a11f128d1c8
[ "MIT" ]
null
null
null
apportionpy/experimental/boundary.py
btror/apportionpy
5b70dbeee4b197e41794bed061ea4a11f128d1c8
[ "MIT" ]
null
null
null
import math def estimate_lowest_divisor(method, divisor, populations, seats): """ Calculates the estimated lowest possible divisor. :param method: The method used. :type method: str :param divisor: A working divisor in calculating fair shares. :type divisor: float :param populations: Th...
30.881356
72
0.611416
0
0
0
0
0
0
0
0
1,344
0.368825
7b0bcb46e200df6f78d9fe78eb07f700564fadd3
4,084
py
Python
csv_to_table.py
canary-for-cognition/multimodal-ml-framework
379963e2815165b28a28c983d32dd17656fba9a9
[ "MIT" ]
1
2021-11-10T10:28:01.000Z
2021-11-10T10:28:01.000Z
csv_to_table.py
canary-for-cognition/multimodal-ml-framework
379963e2815165b28a28c983d32dd17656fba9a9
[ "MIT" ]
null
null
null
csv_to_table.py
canary-for-cognition/multimodal-ml-framework
379963e2815165b28a28c983d32dd17656fba9a9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np # import pylatex from pylatex import Document, Section, Tabular, Math, Axis, Subsection import pandas as pd import sys import os def main(): pm = u"\u00B1" filename = sys.argv[1] results = pd.read_csv(filename+'.csv') cols = results.col...
51.696203
131
0.578355
0
0
0
0
0
0
0
0
938
0.229677
7b0d0466817dc17050d1085421ef9276feb2fb86
2,803
py
Python
torch_audioset/vggish/model.py
Guillaume-oso/torch_audioset
e8852c53becef811784754a2de9c4617d8db2156
[ "MIT" ]
26
2020-03-25T21:19:33.000Z
2022-02-01T15:14:29.000Z
torch_audioset/vggish/model.py
Guillaume-oso/torch_audioset
e8852c53becef811784754a2de9c4617d8db2156
[ "MIT" ]
7
2020-05-31T07:57:05.000Z
2021-12-23T10:16:55.000Z
torch_audioset/vggish/model.py
Guillaume-oso/torch_audioset
e8852c53becef811784754a2de9c4617d8db2156
[ "MIT" ]
8
2020-10-27T16:22:55.000Z
2022-03-28T22:48:07.000Z
import os.path as osp import yaml import torch.nn as nn from torch import hub __all__ = ['get_vggish', 'vggish_category_metadata'] model_urls = { 'vggish': "https://github.com/w-hc/vggish/releases/download/v0.1/vggish_orig.pth", 'vggish_with_classifier': "https://github.com/w-hc/vggish/releases/download/v0.1...
29.197917
112
0.576882
1,735
0.61898
0
0
510
0.181948
0
0
576
0.205494
7b0d272861a3704f10e9a92801a2d879819c1a06
12,584
py
Python
common/cuchemcommon/data/helper/chembldata.py
dorukozturk/cheminformatics
c0fa66dd4f4e6650d7286ae2be533c66b7a2b270
[ "Apache-2.0" ]
null
null
null
common/cuchemcommon/data/helper/chembldata.py
dorukozturk/cheminformatics
c0fa66dd4f4e6650d7286ae2be533c66b7a2b270
[ "Apache-2.0" ]
null
null
null
common/cuchemcommon/data/helper/chembldata.py
dorukozturk/cheminformatics
c0fa66dd4f4e6650d7286ae2be533c66b7a2b270
[ "Apache-2.0" ]
null
null
null
import os import warnings import pandas import sqlite3 import logging from typing import List from dask import delayed, dataframe from contextlib import closing from cuchemcommon.utils.singleton import Singleton from cuchemcommon.context import Context warnings.filterwarnings("ignore", message=r"deprecated", categor...
39.202492
101
0.565559
11,324
0.899873
0
0
0
0
0
0
5,663
0.450016
7b0dd834a233f033a4537593bd1c545e5c4ea02a
769
py
Python
tests/app/users/migrations/0001_initial.py
silverlogic/djangorestframework-timed-auth-token
0884559c6b5e4021d7a8830ec5dd60f2799d0ee4
[ "MIT" ]
34
2015-05-22T00:02:49.000Z
2021-12-29T11:42:31.000Z
tests/app/users/migrations/0001_initial.py
silverlogic/djangorestframework-timed-auth-token
0884559c6b5e4021d7a8830ec5dd60f2799d0ee4
[ "MIT" ]
6
2015-05-22T00:04:50.000Z
2021-06-10T17:49:38.000Z
tests/app/users/migrations/0001_initial.py
silverlogic/djangorestframework-timed-auth-token
0884559c6b5e4021d7a8830ec5dd60f2799d0ee4
[ "MIT" ]
6
2015-05-25T17:44:50.000Z
2020-12-05T14:48:53.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='CustomUser', fields=[ ('id', models.AutoField(s...
29.576923
114
0.574772
660
0.858257
0
0
0
0
0
0
109
0.141743
7b0e27fa7adc3752fa6c840a8e64f5d20d45801c
370
py
Python
PyObjCTest/test_nsmachport.py
Khan/pyobjc-framework-Cocoa
f8b015ea2a72d8d78be6084fb12925c4785b8f1f
[ "MIT" ]
132
2015-01-01T10:02:42.000Z
2022-03-09T12:51:01.000Z
mac/pyobjc-framework-Cocoa/PyObjCTest/test_nsmachport.py
mba811/music-player
7998986b34cfda2244ef622adefb839331b81a81
[ "BSD-2-Clause" ]
6
2015-01-06T08:23:19.000Z
2019-03-14T12:22:06.000Z
mac/pyobjc-framework-Cocoa/PyObjCTest/test_nsmachport.py
mba811/music-player
7998986b34cfda2244ef622adefb839331b81a81
[ "BSD-2-Clause" ]
27
2015-02-23T11:51:43.000Z
2022-03-07T02:34:18.000Z
from PyObjCTools.TestSupport import * import objc import Foundation if hasattr(Foundation, 'NSMachPort'): class TestNSMachPort(TestCase): def testAlloc(self): obj = Foundation.NSMachPort.alloc() self.assertIsNot(obj, None) obj = obj.init() self.assertIsNot(o...
23.125
47
0.632432
218
0.589189
0
0
0
0
0
0
22
0.059459
7b13d630c689e01a72a9bc979b93bb26fb000d70
7,125
py
Python
harmony.py
cyrushadavi/home_automation
dcf1dcc688b5021a0c16e68e372e38a28d819f3d
[ "MIT" ]
null
null
null
harmony.py
cyrushadavi/home_automation
dcf1dcc688b5021a0c16e68e372e38a28d819f3d
[ "MIT" ]
null
null
null
harmony.py
cyrushadavi/home_automation
dcf1dcc688b5021a0c16e68e372e38a28d819f3d
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 """Command line utility for querying the Logitech Harmony.""" import argparse import logging import json import sys import auth import client as harmony_client LOGGER = logging.getLogger(__name__) def login_to_logitech(args): """Logs in to the Logitech service. Args: args: ar...
29.442149
107
0.663719
0
0
0
0
0
0
0
0
2,051
0.28786
7b15f666dd8b6c5e2030f1efa5c2aa16458ac78c
14,567
py
Python
workshop/static/Reliability/300_Testing_for_Resiliency_of_EC2_RDS_and_S3/Code/Python/WebAppLambda/deploy_web_lambda.py
sykang808/aws-well-architected-labs-kor
da021a9f7501088f871b08560673deac4488eef4
[ "Apache-2.0" ]
null
null
null
workshop/static/Reliability/300_Testing_for_Resiliency_of_EC2_RDS_and_S3/Code/Python/WebAppLambda/deploy_web_lambda.py
sykang808/aws-well-architected-labs-kor
da021a9f7501088f871b08560673deac4488eef4
[ "Apache-2.0" ]
null
null
null
workshop/static/Reliability/300_Testing_for_Resiliency_of_EC2_RDS_and_S3/Code/Python/WebAppLambda/deploy_web_lambda.py
sykang808/aws-well-architected-labs-kor
da021a9f7501088f871b08560673deac4488eef4
[ "Apache-2.0" ]
null
null
null
# # MIT No Attribution # # 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, distribute, subli...
39.800546
139
0.674126
0
0
0
0
0
0
0
0
5,878
0.403515
7b16d187420b13711f7fff210fdd319f14807224
483
py
Python
URI/1024.py
leilaapsilva/BabySteps
32b1e6439fa3be49c93a3cae0b4fbd0f03a713be
[ "MIT" ]
37
2020-10-01T03:50:42.000Z
2021-11-23T00:49:51.000Z
URI/1024.py
leilaapsilva/BabySteps
32b1e6439fa3be49c93a3cae0b4fbd0f03a713be
[ "MIT" ]
27
2020-10-03T23:16:13.000Z
2021-11-19T19:53:01.000Z
URI/1024.py
leilaapsilva/BabySteps
32b1e6439fa3be49c93a3cae0b4fbd0f03a713be
[ "MIT" ]
97
2020-10-01T11:39:01.000Z
2021-11-01T00:30:53.000Z
alpha = "abcdefghijklmnopqrstuvwxyz" n = int(raw_input()) for i in xrange(n): word = raw_input() aux_word = "" first_part = "" second_part = "" for j in xrange(len(word)-1, -1, -1): if(word[j].lower() in alpha): aux_word += chr(ord(word[j]) + 3) else: aux_word += word[j] middle = (len(word)/2) firs...
21
51
0.6294
0
0
0
0
0
0
0
0
34
0.070393
7b17163e98fca69e6d9d2a2ecd44f5b5e78cfd5c
6,095
py
Python
Coursework 2/nn_preprocess.py
martinferianc/Pattern-Recognition-EIE4
412d437582b236dadd81c0621935f6b3bd5dbad5
[ "MIT" ]
1
2019-08-20T11:17:56.000Z
2019-08-20T11:17:56.000Z
Coursework 2/nn_preprocess.py
martinferianc/Pattern-Recognition-EIE4
412d437582b236dadd81c0621935f6b3bd5dbad5
[ "MIT" ]
null
null
null
Coursework 2/nn_preprocess.py
martinferianc/Pattern-Recognition-EIE4
412d437582b236dadd81c0621935f6b3bd5dbad5
[ "MIT" ]
null
null
null
import numpy as np # For file manipulation and locating import os # For the progress bar from tqdm import tqdm # To create a deep copy of the data import copy # To load the pre-processed and split data from pre_process import load_data as ld # For normalization of the samples from sklearn.preprocessing import normalize...
33.674033
164
0.642986
0
0
0
0
0
0
0
0
2,136
0.350451
7b180f7965af3a7127ae86b77bf7384badafe436
776
py
Python
src/main.py
M10han/image-scores
509e2e9f9d3a484631a97a2e025849c266f71c43
[ "MIT" ]
null
null
null
src/main.py
M10han/image-scores
509e2e9f9d3a484631a97a2e025849c266f71c43
[ "MIT" ]
1
2021-06-08T21:41:19.000Z
2021-06-08T21:41:19.000Z
src/main.py
M10han/image-scores
509e2e9f9d3a484631a97a2e025849c266f71c43
[ "MIT" ]
null
null
null
import pandas as pd import time from image_matcher import read_image, bjorn_score def main(data_location='../data/', data_file='input.csv'): df = pd.read_csv(data_location + data_file) score_list, runtime_list = [], [] for idx, row in df.iterrows(): image1_file, image2_file = data_location + \ ...
26.758621
58
0.643041
0
0
0
0
0
0
0
0
78
0.100515
7b1892266415333934744e874665f21d627beb7f
2,006
py
Python
build/lib.linux-x86_64-2.7/biograder/Encryptor.py
PayneLab/GenericDataAPI
9469328c4f845fbf8d97b5d80ad2077c9f927022
[ "MIT" ]
2
2021-04-25T18:36:29.000Z
2021-05-14T15:34:59.000Z
build/lib.linux-x86_64-2.7/biograder/Encryptor.py
PayneLab/GenericDataAPI
9469328c4f845fbf8d97b5d80ad2077c9f927022
[ "MIT" ]
null
null
null
build/lib.linux-x86_64-2.7/biograder/Encryptor.py
PayneLab/GenericDataAPI
9469328c4f845fbf8d97b5d80ad2077c9f927022
[ "MIT" ]
2
2020-11-23T02:09:57.000Z
2021-08-13T21:57:03.000Z
from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding from cryptography.hazmat.primitives import serialization class Encryptor: def __init__(self): #Todo: read key from file ...
31.84127
97
0.602193
1,766
0.880359
0
0
0
0
0
0
400
0.199402
7b190c0f4573cd290b14012b9fc7b11615f31516
218
py
Python
elif_bayindir/phase_1/python_basic_1/day_6/q7.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
elif_bayindir/phase_1/python_basic_1/day_6/q7.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
elif_bayindir/phase_1/python_basic_1/day_6/q7.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
# Question 7 # Find out the number of CPUs using import os print("Number of CPUs using:", os.cpu_count()) # Alternative, """ import multiprocessing print("Number of CPUs using:", multiprocessing.cpu_count()) """
18.166667
63
0.711009
0
0
0
0
0
0
0
0
175
0.802752
7b1bfc88d4da28ede06e1a7e0dc3ba09c6ec9cb9
3,081
py
Python
openstates/openstates-master/openstates/ia/__init__.py
Jgorsick/Advocacy_Angular
8906af3ba729b2303880f319d52bce0d6595764c
[ "CC-BY-4.0" ]
null
null
null
openstates/openstates-master/openstates/ia/__init__.py
Jgorsick/Advocacy_Angular
8906af3ba729b2303880f319d52bce0d6595764c
[ "CC-BY-4.0" ]
null
null
null
openstates/openstates-master/openstates/ia/__init__.py
Jgorsick/Advocacy_Angular
8906af3ba729b2303880f319d52bce0d6595764c
[ "CC-BY-4.0" ]
null
null
null
import re import datetime import lxml.html import requests from billy.utils.fulltext import text_after_line_numbers from .bills import IABillScraper from .legislators import IALegislatorScraper from .events import IAEventScraper from .votes import IAVoteScraper # Silencing unverified HTTPS request warnings. requests.p...
29.066038
72
0.563778
0
0
0
0
0
0
0
0
1,182
0.383642
7b1e18b2a4656893e78e78b318983823f4f03309
2,965
py
Python
dp_excel/ExcelFile.py
DmitryPaschenko/python_excel_writer
d23acbe44e3e7e786fd8fd8deb1f47263326199f
[ "MIT" ]
null
null
null
dp_excel/ExcelFile.py
DmitryPaschenko/python_excel_writer
d23acbe44e3e7e786fd8fd8deb1f47263326199f
[ "MIT" ]
null
null
null
dp_excel/ExcelFile.py
DmitryPaschenko/python_excel_writer
d23acbe44e3e7e786fd8fd8deb1f47263326199f
[ "MIT" ]
null
null
null
from openpyxl import Workbook from openpyxl.utils import get_column_letter from openpyxl.writer.excel import save_virtual_workbook class ExcelFile: def __init__(self, file_name): self.file_name = file_name self.workbook = Workbook() self.active_worksheet = self.workbook.active sel...
36.158537
158
0.651602
2,831
0.954806
0
0
152
0.051265
0
0
588
0.198314
7b1ea6dc53dbed446cf8e4fe80ef8e9dd14dbdfd
435
py
Python
test/test_flow.py
williford/vipy
d7ce90cfa3c11363ca9e9fcb1fcea9371aa1b74d
[ "MIT" ]
13
2020-07-23T12:15:24.000Z
2022-03-18T13:58:31.000Z
test/test_flow.py
williford/vipy
d7ce90cfa3c11363ca9e9fcb1fcea9371aa1b74d
[ "MIT" ]
2
2020-02-26T00:58:40.000Z
2021-04-26T12:34:41.000Z
test/test_flow.py
williford/vipy
d7ce90cfa3c11363ca9e9fcb1fcea9371aa1b74d
[ "MIT" ]
2
2020-05-11T15:31:06.000Z
2021-09-16T14:01:33.000Z
import vipy from vipy.flow import Flow import numpy as np def test_flow(): imfrom = vipy.image.RandomScene(num_objects=1) imto = imfrom.clone().zeropad(5, 10).cornercrop(imfrom.height(), imfrom.width()) imf = Flow().imageflow(imfrom, imto) assert np.abs(np.median(imf.dx()) - 5) < 1 and np.abs(np.median...
25.588235
87
0.65977
0
0
0
0
0
0
0
0
41
0.094253
7b204556097cfdfd3ff88e8d7bc8bf1337b3e12c
660
py
Python
server/main.py
DarthBenro008/gh-release-paniker
757845b1eebef9d2219c88706fd4277f4261391f
[ "MIT" ]
5
2021-12-08T06:37:33.000Z
2021-12-20T17:17:18.000Z
server/main.py
DarthBenro008/gh-release-paniker
757845b1eebef9d2219c88706fd4277f4261391f
[ "MIT" ]
null
null
null
server/main.py
DarthBenro008/gh-release-paniker
757845b1eebef9d2219c88706fd4277f4261391f
[ "MIT" ]
null
null
null
from typing import Optional from fastapi import FastAPI app = FastAPI() import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) LED=21 BUZZER=23 GPIO.setup(LED,GPIO.OUT) def panikMode(): print("Entering PanikMode") GPIO.output(LED,GPIO.HIGH) GPIO.output(BUZZER,GPIO.HIGH) ...
16.5
33
0.672727
0
0
0
0
218
0.330303
0
0
96
0.145455
7b20674499d7148c6a6ca240f5128fad607757fd
8,656
py
Python
virtual/lib/python3.10/site-packages/bootstrap_py/tests/test_package.py
alex-mu/Moringa-blog
430ab9c1f43f2f0066369433ac3f60c41a51a01c
[ "MIT" ]
null
null
null
virtual/lib/python3.10/site-packages/bootstrap_py/tests/test_package.py
alex-mu/Moringa-blog
430ab9c1f43f2f0066369433ac3f60c41a51a01c
[ "MIT" ]
7
2021-03-30T14:10:56.000Z
2022-03-12T00:43:13.000Z
virtual/lib/python3.6/site-packages/bootstrap_py/tests/test_package.py
sarahsindet/pitch
c7a4256e19c9a250b6d88d085699a34f508eb86b
[ "Unlicense", "MIT" ]
1
2021-08-19T06:07:23.000Z
2021-08-19T06:07:23.000Z
# -*- coding: utf-8 -*- """bootstrap_py.tests.test_package.""" import unittest import os import shutil import tempfile from glob import glob from datetime import datetime from mock import patch from bootstrap_py import package from bootstrap_py.tests.stub import stub_request_metadata # pylint: disable=too-few-public-...
42.019417
79
0.586992
8,321
0.961299
0
0
1,291
0.149145
0
0
1,818
0.210028
7b2072a69cb5c6d86996ccfc0e3130c0fc1d1caa
383
py
Python
news_bl/main/migrations/0005_alter_article_urltoimage.py
noddy09/news_search
7bee6a3aeb6c8a5e9e01109635fbd53f5d808722
[ "MIT" ]
null
null
null
news_bl/main/migrations/0005_alter_article_urltoimage.py
noddy09/news_search
7bee6a3aeb6c8a5e9e01109635fbd53f5d808722
[ "MIT" ]
null
null
null
news_bl/main/migrations/0005_alter_article_urltoimage.py
noddy09/news_search
7bee6a3aeb6c8a5e9e01109635fbd53f5d808722
[ "MIT" ]
null
null
null
# Generated by Django 3.2.6 on 2021-08-30 13:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0004_auto_20210830_0359'), ] operations = [ migrations.AlterField( model_name='article', name='urlToImage', ...
20.157895
47
0.5953
290
0.75718
0
0
0
0
0
0
99
0.258486
7b20cd11ee3f48070fe24a5a912f30b91ada5d46
1,175
py
Python
utils/migrate_cmds_idx_32bit.py
jzuhone/kadi
de4885327d256e156cfe42b2b1700775f5b4d6cf
[ "BSD-3-Clause" ]
1
2015-07-30T18:33:14.000Z
2015-07-30T18:33:14.000Z
utils/migrate_cmds_idx_32bit.py
jzuhone/kadi
de4885327d256e156cfe42b2b1700775f5b4d6cf
[ "BSD-3-Clause" ]
104
2015-01-20T18:44:36.000Z
2022-03-29T18:51:55.000Z
utils/migrate_cmds_idx_32bit.py
jzuhone/kadi
de4885327d256e156cfe42b2b1700775f5b4d6cf
[ "BSD-3-Clause" ]
2
2018-08-23T02:36:08.000Z
2020-03-13T19:24:36.000Z
from pathlib import Path import numpy as np import tables # Use snapshot from aug08 before the last update that broke things. with tables.open_file('cmds_aug08.h5') as h5: cmds = h5.root.data[:] print(cmds.dtype) # [('idx', '<u2'), ('date', 'S21'), ('type', 'S12'), ('tlmsid', 'S10'), # ('scs', 'u1'), ('step', '<...
31.756757
85
0.613617
0
0
0
0
0
0
0
0
439
0.373617
7b21a08900385c33387348bb5cf7b32f2eca5c0f
579
py
Python
1_estrutura_sequencial/18_velocidade_download.py
cecilmalone/lista_de_exercicios_pybr
6d7c4aeddf8d1b1d839ad05ef5b5813a8fe611b5
[ "MIT" ]
null
null
null
1_estrutura_sequencial/18_velocidade_download.py
cecilmalone/lista_de_exercicios_pybr
6d7c4aeddf8d1b1d839ad05ef5b5813a8fe611b5
[ "MIT" ]
null
null
null
1_estrutura_sequencial/18_velocidade_download.py
cecilmalone/lista_de_exercicios_pybr
6d7c4aeddf8d1b1d839ad05ef5b5813a8fe611b5
[ "MIT" ]
null
null
null
""" 18. Faça um programa que peça o tamanho de um arquivo para download (em MB) e a velocidade de um link de Internet (em Mbps), calcule e informe o tempo aproximado de download do arquivo usando este link (em minutos). """ mb_arquivo = float(input('Informe o tamanho de um arquivo para download (em MB): ')) mbps_lin...
38.6
91
0.753022
0
0
0
0
0
0
0
0
403
0.69244
7b2304794deb520b2f5f87d0e37dcca35db22896
4,802
py
Python
src/rte_pac/train_pyramid.py
UKPLab/conll2019-snopes-experiments
102f4a05cfba781036bd3a7b06022246e53765ad
[ "Apache-2.0" ]
5
2019-11-08T09:17:07.000Z
2022-01-25T19:37:06.000Z
src/rte_pac/train_pyramid.py
UKPLab/conll2019-snopes-experiments
102f4a05cfba781036bd3a7b06022246e53765ad
[ "Apache-2.0" ]
18
2020-01-28T22:17:34.000Z
2022-03-11T23:57:22.000Z
src/rte_pac/train_pyramid.py
UKPLab/conll2019-snopes-experiments
102f4a05cfba781036bd3a7b06022246e53765ad
[ "Apache-2.0" ]
1
2021-03-08T12:02:24.000Z
2021-03-08T12:02:24.000Z
import argparse import pickle import os import json from sklearn.metrics import confusion_matrix from utils.data_reader import embed_data_sets_with_glove, embed_data_set_given_vocab, prediction_2_label from utils.text_processing import vocab_map from common.util.log_helper import LogHelper from deep_models.MatchPyramid...
52.195652
139
0.641399
0
0
0
0
0
0
0
0
1,162
0.241983
7b2354c08ba6d3f70427aa659e1ba9d3a3e03c13
854
py
Python
annotation/helpers/helpers/extract_noise.py
jim-schwoebel/allie
d85db041b91c81dfb3fd1a4d719b5aaaf3b6697e
[ "Apache-2.0" ]
87
2020-08-07T09:05:11.000Z
2022-01-24T00:48:22.000Z
annotation/helpers/helpers/extract_noise.py
jim-schwoebel/allie
d85db041b91c81dfb3fd1a4d719b5aaaf3b6697e
[ "Apache-2.0" ]
87
2020-08-07T19:12:10.000Z
2022-02-08T14:46:34.000Z
annotation/helpers/helpers/extract_noise.py
jim-schwoebel/allie
d85db041b91c81dfb3fd1a4d719b5aaaf3b6697e
[ "Apache-2.0" ]
25
2020-08-07T20:03:08.000Z
2022-03-16T07:33:25.000Z
import shutil, os, random from pydub import AudioSegment try: os.mkdir('noise') except: shutil.rmtree('noise') os.mkdir('noise') def extract_noise(filename, length): song = AudioSegment.from_mp3(filename) first = song[100:100+length] first.export(filename[0:-4]+'_noise.mp3') shutil.move(os.getcwd()+'/'+filename[...
27.548387
108
0.688525
0
0
0
0
0
0
0
0
133
0.155738
7b248b5ee36bb65d830c7b56e66b0b390aa45baa
1,030
py
Python
ARMODServers/Apps/Apiv2/urls.py
Phantomxm2021/ARMOD-Dashboard
383cf0a5e72dc5a2651f43e693f06773d5b88bbd
[ "Apache-2.0" ]
1
2021-11-04T09:03:27.000Z
2021-11-04T09:03:27.000Z
ARMODServers/Apps/Apiv2/urls.py
Phantomxm2021/ARMOD-Dashboard
383cf0a5e72dc5a2651f43e693f06773d5b88bbd
[ "Apache-2.0" ]
null
null
null
ARMODServers/Apps/Apiv2/urls.py
Phantomxm2021/ARMOD-Dashboard
383cf0a5e72dc5a2651f43e693f06773d5b88bbd
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import url from Apps.Apiv2.views import GetARResourcesView, GetARExperienceDetailView from Apps.Apiv2.views import GetTagListView,GetARExperienceRecommendList,GetARExperiencePublicListView,GetARExperiencesView from Apps.Apiv2.views import GetARexperienceByTagsListView app_name = 'Apps.Users' urlp...
60.588235
123
0.794175
0
0
0
0
0
0
0
0
325
0.315534