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
a33e27da81bb7bce9e69f05f780fb86f4b322234
501
py
Python
tests/test_trinomial.py
caltechlibrary/trinomial
0313e16400aca50f54bfe79080a10a1977702e9a
[ "BSD-3-Clause" ]
1
2021-05-22T17:29:17.000Z
2021-05-22T17:29:17.000Z
tests/test_trinomial.py
caltechlibrary/trinomial
0313e16400aca50f54bfe79080a10a1977702e9a
[ "BSD-3-Clause" ]
null
null
null
tests/test_trinomial.py
caltechlibrary/trinomial
0313e16400aca50f54bfe79080a10a1977702e9a
[ "BSD-3-Clause" ]
null
null
null
import os import pytest import sys from time import time try: thisdir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(thisdir, '..')) except: sys.path.append('..') import trinomial def test_basic(): trinomial.set_unique_key('x') assert trinomial.anon('foo@bar.com') == ...
22.772727
56
0.686627
0
0
0
0
0
0
0
0
89
0.177645
a33e48a10e11e80e4f5b747b61f4474ae03b0923
667
py
Python
openprocurement/tender/openeu/views/award_complaint_document.py
leits/openprocurement.tender.openeu
6e8b6650a23761cc09794030583206029a2928e8
[ "Apache-2.0" ]
1
2016-02-02T09:55:08.000Z
2016-02-02T09:55:08.000Z
openprocurement/tender/openeu/views/award_complaint_document.py
Leits/openprocurement.tender.openeu
6e8b6650a23761cc09794030583206029a2928e8
[ "Apache-2.0" ]
2
2021-03-26T00:35:37.000Z
2022-03-21T22:21:31.000Z
openprocurement/tender/openeu/views/award_complaint_document.py
leits/openprocurement.tender.openeu
6e8b6650a23761cc09794030583206029a2928e8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from openprocurement.api.utils import opresource from openprocurement.tender.openua.views.award_complaint_document import TenderUaAwardComplaintDocumentResource @opresource(name='Tender EU Award Complaint Documents', collection_path='/tenders/{tender_id}/awards/{award_id}/complaint...
51.307692
111
0.773613
94
0.14093
0
0
479
0.718141
0
0
278
0.416792
a33e4ece404ced51ee4f1506f207476b0d455c63
2,398
py
Python
pymic/layer/activation.py
vincentme/PyMIC
5cbbca7d0a19232be647086d4686ceea523f45ee
[ "Apache-2.0" ]
147
2019-12-23T02:52:04.000Z
2022-03-06T16:30:43.000Z
pymic/layer/activation.py
vincentme/PyMIC
5cbbca7d0a19232be647086d4686ceea523f45ee
[ "Apache-2.0" ]
4
2020-12-18T12:47:21.000Z
2021-05-21T02:18:01.000Z
pymic/layer/activation.py
vincentme/PyMIC
5cbbca7d0a19232be647086d4686ceea523f45ee
[ "Apache-2.0" ]
32
2020-01-08T13:48:50.000Z
2022-03-12T06:31:13.000Z
# -*- coding: utf-8 -*- from __future__ import print_function, division import torch import torch.nn as nn def get_acti_func(acti_func, params): acti_func = acti_func.lower() if(acti_func == 'relu'): inplace = params.get('relu_inplace', False) return nn.ReLU(inplace) elif(acti_func == 'l...
31.552632
67
0.607173
0
0
0
0
0
0
0
0
483
0.201418
a33eb973d0edc831eea7bb11066042e56e9c2e88
3,359
py
Python
ui/flowlayout.py
amadotejada/self-portal
c508fb120548f3eb65e872d08a823d3942fc650d
[ "Apache-2.0" ]
9
2022-03-15T02:02:30.000Z
2022-03-18T16:16:59.000Z
ui/flowlayout.py
amadotejada/self-portal
c508fb120548f3eb65e872d08a823d3942fc650d
[ "Apache-2.0" ]
null
null
null
ui/flowlayout.py
amadotejada/self-portal
c508fb120548f3eb65e872d08a823d3942fc650d
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Amado Tejada # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
31.688679
112
0.575171
2,659
0.791605
0
0
0
0
0
0
578
0.172075
a340df3cf71eb1be1675fbe29cece65cbcc98d43
3,183
py
Python
methods/smartdumpRJ.py
wdempsey/sense2stop-lvm
ea44d5f9199382d30e4c5a5ff4bd524313ceb5b2
[ "CECILL-B" ]
1
2020-04-18T11:16:02.000Z
2020-04-18T11:16:02.000Z
methods/smartdumpRJ.py
wdempsey/sense2stop-lvm
ea44d5f9199382d30e4c5a5ff4bd524313ceb5b2
[ "CECILL-B" ]
6
2020-04-13T18:38:04.000Z
2022-03-12T00:55:56.000Z
methods/smartdumpRJ.py
wdempsey/sense2stop-lvm
ea44d5f9199382d30e4c5a5ff4bd524313ceb5b2
[ "CECILL-B" ]
1
2020-07-02T04:47:00.000Z
2020-07-02T04:47:00.000Z
# -*- coding: utf-8 -*- """ Created on Tue May 26 14:29:26 2020 @author: Walter Dempsey & Jamie Yap """ #%% ############################################################################### # Build a RJMCMC class ############################################################################### from pymc import Stochast...
31.514851
88
0.602576
2,729
0.857367
0
0
0
0
0
0
1,544
0.485077
a34205264c406b528a6fcfa5ac69debf00a2b02c
2,021
py
Python
tests/test_slack_user.py
tomcooperca/mlb-slack-tracker
bbfd8ed6f0c345d5286813a6cd4b04e0557a762a
[ "MIT" ]
null
null
null
tests/test_slack_user.py
tomcooperca/mlb-slack-tracker
bbfd8ed6f0c345d5286813a6cd4b04e0557a762a
[ "MIT" ]
7
2018-09-08T20:07:43.000Z
2021-12-13T19:54:53.000Z
tests/test_slack_user.py
tomcooperca/mlb-slack-tracker
bbfd8ed6f0c345d5286813a6cd4b04e0557a762a
[ "MIT" ]
null
null
null
from unittest.mock import MagicMock from slack.user import User from baseball.team import Team reusableUser = User(token='blah', id='UB00123', team=None) testTeam = Team(abbreviation='CN', location='City Name', full_name='City Name Players', record='0W-162L', division='CL Beast', wins=0, losses=162, standing=5...
34.844828
74
0.730332
0
0
0
0
0
0
0
0
321
0.158832
a342151afcda4ba72f2d257247a2de01de22ba98
1,934
py
Python
tmuxp/testsuite/test_workspacefreezer.py
wrongwaycn/tmuxp
367cca3eb1b3162bb7e4801fe752b520f1f8eefa
[ "BSD-3-Clause" ]
2
2018-02-05T01:27:07.000Z
2018-06-10T02:02:25.000Z
tmuxp/testsuite/test_workspacefreezer.py
wrongwaycn/tmuxp
367cca3eb1b3162bb7e4801fe752b520f1f8eefa
[ "BSD-3-Clause" ]
null
null
null
tmuxp/testsuite/test_workspacefreezer.py
wrongwaycn/tmuxp
367cca3eb1b3162bb7e4801fe752b520f1f8eefa
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, with_statement import os import sys import logging import time import kaptan from .. import Window, config, exc from ..workspacebuilder import WorkspaceBuilder, freeze from .helpers import TmuxTestCase logger = logging.getLogger...
23.585366
80
0.609617
1,473
0.761634
0
0
0
0
0
0
607
0.313857
a343d4acc1180ec43471b02424e6695cc4893a9e
9,132
py
Python
libs/configs/DOTA1.0/dota_train/cfgs_res50_dotatrain_dcl_v15.py
Thinklab-SJTU/DCL_RetinaNet_Tensorflow
1d14c9800c3eb1975e8832978f7a263783d171ec
[ "Apache-2.0" ]
36
2020-11-19T07:23:42.000Z
2022-03-30T03:35:57.000Z
libs/configs/DOTA1.0/dota_train/cfgs_res50_dotatrain_dcl_v15.py
Thinklab-SJTU/DCL_RetinaNet_Tensorflow
1d14c9800c3eb1975e8832978f7a263783d171ec
[ "Apache-2.0" ]
4
2021-01-30T09:49:10.000Z
2021-12-05T12:49:11.000Z
libs/configs/DOTA1.0/dota_train/cfgs_res50_dotatrain_dcl_v15.py
Thinklab-SJTU/DCL_RetinaNet_Tensorflow
1d14c9800c3eb1975e8832978f7a263783d171ec
[ "Apache-2.0" ]
6
2020-11-23T07:54:47.000Z
2021-07-09T07:20:15.000Z
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import os import tensorflow as tf import math """ GCL + OMEGA = 180 / 512. {'0.6': {'ground-track-field': 0.573582489319409, 'harbor': 0.3891521609424017, 'bridge': 0.2563337419887201, 'small-vehicle': 0.5648505388890961, 'plane'...
71.34375
583
0.727551
0
0
0
0
0
0
0
0
6,726
0.736531
a34438fcd2d05af774f8b7d208037ebd093f49f3
1,488
py
Python
test.py
KyleJeong/ast_calculator
cf65ad76739839ac4b3df36b82862612d6bd4492
[ "MIT" ]
6
2016-07-20T07:37:07.000Z
2022-01-14T06:35:26.000Z
test.py
KyleJeong/ast_calculator
cf65ad76739839ac4b3df36b82862612d6bd4492
[ "MIT" ]
1
2020-03-29T05:13:58.000Z
2020-03-29T05:13:58.000Z
test.py
KyleJeong/ast_calculator
cf65ad76739839ac4b3df36b82862612d6bd4492
[ "MIT" ]
1
2020-03-29T04:29:36.000Z
2020-03-29T04:29:36.000Z
""" Test cases for AST calculator """ from unittest import TestCase from calc import evaluate class TestCaclEvaluate(TestCase): """ Test cases for AST calculator - evaluation """ def test_simple_expression(self): """ Test expression without functions or constants """ ...
23.619048
62
0.511425
1,390
0.93414
0
0
0
0
0
0
467
0.313844
a3446186d570e00d5586a746c5e62060ac9246b6
315
py
Python
app/main/utils.py
tmeftah/e-invoice
7cfe31e9391eb60ab3d06f0055bd2f1e9a524971
[ "MIT" ]
2
2019-06-10T19:30:06.000Z
2020-04-30T01:05:04.000Z
app/main/utils.py
tmeftah/e-invoice
7cfe31e9391eb60ab3d06f0055bd2f1e9a524971
[ "MIT" ]
null
null
null
app/main/utils.py
tmeftah/e-invoice
7cfe31e9391eb60ab3d06f0055bd2f1e9a524971
[ "MIT" ]
3
2019-01-23T21:37:29.000Z
2020-04-08T13:22:29.000Z
from flask import request from app.main.extensions import cache def clear_cache(key_prefix): keys = [key for key in cache.cache._cache.keys() if key.startswith(key_prefix)] cache.delete_many(*keys) def cache_json_keys(): json_data = tuple(sorted(request.get_json().items())) return json_data
19.6875
83
0.733333
0
0
0
0
0
0
0
0
0
0
a344e089a4efbd0afbd6c50e23cff7269d7dd9c8
1,931
py
Python
gum/managers.py
marcosgabarda/django-gum
796a496e95391aab9e462bde6d8f775534d5f6c6
[ "MIT" ]
16
2015-05-04T18:47:33.000Z
2021-02-03T17:10:40.000Z
gum/managers.py
marcosgabarda/django-gum
796a496e95391aab9e462bde6d8f775534d5f6c6
[ "MIT" ]
4
2015-09-08T14:48:31.000Z
2016-09-09T09:49:41.000Z
gum/managers.py
marcosgabarda/django-gum
796a496e95391aab9e462bde6d8f775534d5f6c6
[ "MIT" ]
2
2015-05-04T18:39:23.000Z
2016-04-18T14:35:47.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from gum.utils import elasticsearch_connection class ElasticsearchManager(object): """Like a `ModelManager` gives to the user methods to apply queries to Elasticsearch from a specific model. """ def __init__(self, model=None, mapping_ty...
32.183333
86
0.658726
1,813
0.938892
0
0
0
0
0
0
810
0.419472
a34991845be5613841f0b124224655a27cd95755
1,732
py
Python
app.py
u-aaa/House-_prediction_model
4808b4aefb802520a7ccd878c342699093e6942d
[ "MIT" ]
null
null
null
app.py
u-aaa/House-_prediction_model
4808b4aefb802520a7ccd878c342699093e6942d
[ "MIT" ]
null
null
null
app.py
u-aaa/House-_prediction_model
4808b4aefb802520a7ccd878c342699093e6942d
[ "MIT" ]
1
2021-09-23T19:42:36.000Z
2021-09-23T19:42:36.000Z
import pickle import json import numpy as np from flask import Flask, request, jsonify app = Flask(__name__) with open('models/regressor.pkl', 'rb') as f: model = pickle.load(f) def __process_input(posted_data) -> np.array: ''' transforms JSON type data acquired from request and transforms it into 2D ...
28.393443
105
0.639723
0
0
0
0
758
0.437644
0
0
500
0.288684
a34ab44ceb198f7ffec0e7a91a4d37823eb68330
4,734
py
Python
sobit_bringup/src/joint_state_listner.py
Choi-Laboratory/sobit_blue
81a228390e1726653d54f33afb3fbb1c1fdb5b24
[ "Apache-2.0" ]
null
null
null
sobit_bringup/src/joint_state_listner.py
Choi-Laboratory/sobit_blue
81a228390e1726653d54f33afb3fbb1c1fdb5b24
[ "Apache-2.0" ]
null
null
null
sobit_bringup/src/joint_state_listner.py
Choi-Laboratory/sobit_blue
81a228390e1726653d54f33afb3fbb1c1fdb5b24
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import rospy import math from sensor_msgs.msg import * from geometry_msgs.msg import * from sobit_bringup.msg import * #---グローバル変数----------------------------- motion = [0]*21 TIME = 0.1 serial_joint = Serial_motion() state_jointstate = JointState() state_jointstate.name =["...
37.872
322
0.603929
0
0
0
0
0
0
0
0
1,869
0.383778
a34d2a23f38ff576e6a5ef0f805165729d2fc6ef
2,789
py
Python
scalex/metrics.py
jsxlei/SCALEX
021c6d35a0cebeaa1f59ea53b9b9e22015ce6e5f
[ "MIT" ]
11
2021-04-09T02:46:29.000Z
2022-01-04T16:42:44.000Z
scale/metrics.py
QingZhan98/SCALE_v2
69bb02beee40ec085684335f356798d4dcb53fbc
[ "MIT" ]
2
2021-04-18T02:30:18.000Z
2022-03-05T10:40:00.000Z
scale/metrics.py
QingZhan98/SCALE_v2
69bb02beee40ec085684335f356798d4dcb53fbc
[ "MIT" ]
4
2021-03-29T12:34:47.000Z
2022-03-06T12:42:45.000Z
#!/usr/bin/env python """ # Author: Xiong Lei # Created Time : Thu 10 Jan 2019 07:38:10 PM CST # File Name: metrics.py # Description: """ import numpy as np import scipy from sklearn.neighbors import NearestNeighbors, KNeighborsRegressor def batch_entropy_mixing_score(data, batches, n_neighbors=100, n_pools=100, n...
34.8625
114
0.639656
0
0
0
0
0
0
0
0
1,248
0.447472
a34d8a9377344d0edaae44dd4947affb31816584
189
py
Python
src/miu/colorbilding.py
memowe/miniciti-user
ce1cbccdb693c4916217e1395eacb14f06d536a1
[ "MIT" ]
null
null
null
src/miu/colorbilding.py
memowe/miniciti-user
ce1cbccdb693c4916217e1395eacb14f06d536a1
[ "MIT" ]
null
null
null
src/miu/colorbilding.py
memowe/miniciti-user
ce1cbccdb693c4916217e1395eacb14f06d536a1
[ "MIT" ]
null
null
null
from miniciti.bilding import Bilding class ColorBilding(Bilding): def __init__(self, color="bli"): self.color = color def isBli(self): return self.color == "bli"
18.9
36
0.650794
150
0.793651
0
0
0
0
0
0
10
0.05291
a34e461868bd92e65252352e4554823a69ea35c7
2,603
py
Python
examples/data/create_data.py
fdabek1/EHR-Functions
e6bd0b6fa213930358c4a19be31c459ac7430ca9
[ "MIT" ]
null
null
null
examples/data/create_data.py
fdabek1/EHR-Functions
e6bd0b6fa213930358c4a19be31c459ac7430ca9
[ "MIT" ]
null
null
null
examples/data/create_data.py
fdabek1/EHR-Functions
e6bd0b6fa213930358c4a19be31c459ac7430ca9
[ "MIT" ]
null
null
null
import pandas as pd import random import time # Source: https://stackoverflow.com/a/553320/556935 def str_time_prop(start, end, date_format, prop): """Get a time at a proportion of a range of two formatted times. start and end should be strings specifying times formated in the given format (strftime-styl...
31.743902
102
0.579332
0
0
0
0
0
0
0
0
900
0.345755
a350ecde028977958b337223398f9351c3e4bbec
1,317
py
Python
contests/ccpc20qhd/f超时.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
contests/ccpc20qhd/f超时.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
contests/ccpc20qhd/f超时.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ''' #ccpc20qhd-f => 最大联通子图 #如果都是联通的,所有节点都要放进去, #友好值=联通子图中边的个数-点的个数 #应该所有(友好值>0)联通子图加起来? #DFS搜索,或者是并查集? 数一数有多少联通块? #最短路用广搜,全部解用深搜 连通图的复杂度是O(V+E).. 为什么会Runtime Error? 分析: 解法1: DFS做联通块 解法2: 看不包含哪些人,相当于走个捷径! ''' def f(n,l): el = [[] for _ in range(n)] for x,y in l: if x>y...
23.105263
82
0.430524
0
0
0
0
0
0
0
0
629
0.404502
a3525d2e36b057b387fd2a242a0be1258c2a7481
2,920
py
Python
test/feature_extraction/list_counter_test.py
tmhatton/MLinPractice
759706e13181cec864d6aa8ece9ae7042f083e4c
[ "MIT" ]
null
null
null
test/feature_extraction/list_counter_test.py
tmhatton/MLinPractice
759706e13181cec864d6aa8ece9ae7042f083e4c
[ "MIT" ]
1
2021-10-19T08:09:44.000Z
2021-10-19T08:09:44.000Z
test/feature_extraction/list_counter_test.py
tmhatton/MLinPractice
759706e13181cec864d6aa8ece9ae7042f083e4c
[ "MIT" ]
null
null
null
import unittest import pandas as pd from code.feature_extraction.list_counter import PhotosNum, URLsNum, HashtagNum, MentionNum, TokenNum from code.util import COLUMN_PHOTOS, COLUMN_URLS, COLUMN_HASHTAGS, COLUMN_MENTIONS class PhotosNumTest(unittest.TestCase): def setUp(self) -> None: self.INPUT_COLUMN ...
30.736842
161
0.667466
2,634
0.902055
0
0
0
0
0
0
404
0.138356
a352f55dcd4b6a9dcf2653a39663d590b4d79e27
926
py
Python
tests/test_2_promethee.py
qanastek/EasyMCDM
7fa2e2dfe9397834ca9f50211ea2717a16785394
[ "MIT" ]
4
2022-03-05T20:51:38.000Z
2022-03-15T17:10:22.000Z
tests/test_2_promethee.py
qanastek/EasyMCDM
7fa2e2dfe9397834ca9f50211ea2717a16785394
[ "MIT" ]
null
null
null
tests/test_2_promethee.py
qanastek/EasyMCDM
7fa2e2dfe9397834ca9f50211ea2717a16785394
[ "MIT" ]
1
2022-03-08T13:45:22.000Z
2022-03-08T13:45:22.000Z
import unittest from operator import index from EasyMCDM.models.Promethee import Promethee class TestPrometheeMethods(unittest.TestCase): def test_str_str_str(self): d = "data/partiels_donnees.csv" p = Promethee(data=d, verbose=False) res = p.solve( weights=[0.3, ...
42.090909
161
0.565875
779
0.841253
0
0
0
0
0
0
221
0.238661
a354ea47baa38abfde41024d2fd179d6d96966cf
1,207
py
Python
testbed_frontend/api/emulation/emulation_handler.py
Ncu-software-research-center/IIOT-testbed
b4c8f91d1fd1e596d2262152ce99afeb22976f7a
[ "Apache-2.0" ]
1
2021-05-25T09:33:28.000Z
2021-05-25T09:33:28.000Z
testbed_frontend/api/emulation/emulation_handler.py
Ncu-software-research-center/IIOT-testbed
b4c8f91d1fd1e596d2262152ce99afeb22976f7a
[ "Apache-2.0" ]
6
2020-06-06T01:59:09.000Z
2021-06-10T20:17:56.000Z
testbed_frontend/api/emulation/emulation_handler.py
Ncu-software-research-center/IIOT-testbed
b4c8f91d1fd1e596d2262152ce99afeb22976f7a
[ "Apache-2.0" ]
null
null
null
''' Vortex OpenSplice This software and documentation are Copyright 2006 to TO_YEAR ADLINK Technology Limited, its affiliated companies and licensors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Lice...
32.621622
92
0.729909
0
0
0
0
371
0.307374
0
0
707
0.58575
a3551761361e06ddd937cee500aed18df74cd70f
2,027
py
Python
torchtraining/functional/metrics/regression.py
szymonmaszke/torchtraining
1ddf169325b7239d6d6686b20072a406b69a0180
[ "MIT" ]
3
2020-08-26T06:11:58.000Z
2020-08-27T08:11:15.000Z
torchtraining/functional/metrics/regression.py
klaudiapalasz/torchtraining
7ac54009eea2fd84aa635b6f3cbfe306f317d087
[ "MIT" ]
1
2020-08-25T19:19:43.000Z
2020-08-25T19:19:43.000Z
torchtraining/functional/metrics/regression.py
klaudiapalasz/torchtraining
7ac54009eea2fd84aa635b6f3cbfe306f317d087
[ "MIT" ]
1
2021-04-15T18:55:57.000Z
2021-04-15T18:55:57.000Z
import typing import torch from .. import utils @utils.docs def regression_of_squares( output: torch.Tensor, target: torch.Tensor, reduction: typing.Callable[[torch.Tensor,], torch.Tensor,] = torch.sum, ) -> torch.Tensor: return reduction(output - torch.mean(target)) ** 2 @utils.docs def squares_o...
27.026667
84
0.693143
0
0
0
0
1,950
0.962013
0
0
12
0.00592
a3552615d55b8131f79fc858dd41da8c30cf2d71
6,028
py
Python
Source/game/systems/puzzle/hold.py
LucXyMan/starseeker
b5c3365514c982734da7d95621e6b85af550ce82
[ "BSD-3-Clause" ]
null
null
null
Source/game/systems/puzzle/hold.py
LucXyMan/starseeker
b5c3365514c982734da7d95621e6b85af550ce82
[ "BSD-3-Clause" ]
null
null
null
Source/game/systems/puzzle/hold.py
LucXyMan/starseeker
b5c3365514c982734da7d95621e6b85af550ce82
[ "BSD-3-Clause" ]
1
2019-11-27T18:00:00.000Z
2019-11-27T18:00:00.000Z
#!/usr/bin/env python2.7 # -*- coding:UTF-8 -*-2 u"""hold.py Copyright (c) 2019 Yukio Kuro This software is released under BSD license. ホールドピース管理モジュール。 """ import pieces as _pieces import utils.const as _const import utils.layouter as _layouter class Hold(object): u"""ホールドピース管理。 """ __slots__ = ( ...
31.233161
77
0.535169
6,218
0.95691
0
0
912
0.140351
0
0
1,340
0.206217
a35602a1c5d4bcf343e77bdb5e4000c799357ee5
347
py
Python
homeworks/kirill_shevchuk/hw05/level04.py
tgrx/Z22
b2539682ff26c8b6d9f63a7670c8a9c6b614a8ff
[ "Apache-2.0" ]
null
null
null
homeworks/kirill_shevchuk/hw05/level04.py
tgrx/Z22
b2539682ff26c8b6d9f63a7670c8a9c6b614a8ff
[ "Apache-2.0" ]
8
2019-11-15T18:15:56.000Z
2020-02-03T18:05:05.000Z
homeworks/kirill_shevchuk/hw05/level04.py
tgrx/Z22
b2539682ff26c8b6d9f63a7670c8a9c6b614a8ff
[ "Apache-2.0" ]
null
null
null
from urllib.parse import urlparse def host(url): if not url: return "" data = urlparse(url) if data.netloc: return data.netloc value = data.path.split("/")[0] if "@" not in value or ":" not in value: return value from_ = value.find("@") + 1 for_ = value.find(":") ...
21.6875
44
0.570605
0
0
0
0
0
0
0
0
17
0.048991
a35af943a1738408edb737fd87daf987635bfda0
1,554
py
Python
pertemuan_13/draw_utils.py
Muhammad-Yunus/Jetson-Nano-OpenCV-Learn
933cb2594539a877030fb82dc3e6867409c1a557
[ "Apache-2.0" ]
null
null
null
pertemuan_13/draw_utils.py
Muhammad-Yunus/Jetson-Nano-OpenCV-Learn
933cb2594539a877030fb82dc3e6867409c1a557
[ "Apache-2.0" ]
null
null
null
pertemuan_13/draw_utils.py
Muhammad-Yunus/Jetson-Nano-OpenCV-Learn
933cb2594539a877030fb82dc3e6867409c1a557
[ "Apache-2.0" ]
2
2021-09-28T00:24:21.000Z
2022-03-09T13:38:29.000Z
import cv2 import numpy as np # draw_ped() function to draw bounding box with top labeled text def draw_ped(img, label, x0, y0, xt, yt, font_size=0.4, alpha=0.5, bg_color=(255,0,0), ouline_color=(255,255,255), text_color=(0,0,0)): overlay = np.zeros_like(img) y0, yt = max(y0 - 15, 0) , min(yt + 15, img.shape[...
39.846154
135
0.47426
0
0
0
0
0
0
0
0
158
0.101673
a35b39c11aff2330ec7aa6556e235a658417a015
2,204
py
Python
Sensors/PortStart.py
cybertraining-dsc/boat
32e4942b69059d1dd48d79c8e0f55bac438eb5e7
[ "Apache-2.0" ]
null
null
null
Sensors/PortStart.py
cybertraining-dsc/boat
32e4942b69059d1dd48d79c8e0f55bac438eb5e7
[ "Apache-2.0" ]
null
null
null
Sensors/PortStart.py
cybertraining-dsc/boat
32e4942b69059d1dd48d79c8e0f55bac438eb5e7
[ "Apache-2.0" ]
null
null
null
""" Code modified from: apps.fishandwhistle.net/archives/1155 """ from __future__ import print_function import serial import sys import glob port_list = {} def identifyPort(port): """ tests the port and identifies what device is attached to it from probing it :param port: :return: a port list dict w...
26.878049
79
0.583031
0
0
0
0
0
0
0
0
736
0.333938
a35c7cddf46b7abcc142f392526fdba0c6a3aa7e
112
py
Python
test/python/test_utils.py
AdityaSidharta/docker_base
ccdbe7f10e4ddb329dfc106734b3e58226cd0b05
[ "MIT" ]
null
null
null
test/python/test_utils.py
AdityaSidharta/docker_base
ccdbe7f10e4ddb329dfc106734b3e58226cd0b05
[ "MIT" ]
null
null
null
test/python/test_utils.py
AdityaSidharta/docker_base
ccdbe7f10e4ddb329dfc106734b3e58226cd0b05
[ "MIT" ]
null
null
null
from app.python.utils import get_datetime def test_get_datetime(): assert isinstance(get_datetime(), str)
18.666667
42
0.776786
0
0
0
0
0
0
0
0
0
0
a35f847cfae16fa50a6998fa4b3afcf7165085cb
883
py
Python
tests/core/test_registered_plugins.py
MajesticFalcon/nornir
75f82dbb7f492d0f283abcc5eb6b5fee08db9487
[ "Apache-2.0" ]
955
2018-05-16T17:10:12.000Z
2022-03-30T20:14:26.000Z
tests/core/test_registered_plugins.py
MajesticFalcon/nornir
75f82dbb7f492d0f283abcc5eb6b5fee08db9487
[ "Apache-2.0" ]
490
2018-05-16T08:00:22.000Z
2022-03-28T21:14:39.000Z
tests/core/test_registered_plugins.py
MajesticFalcon/nornir
75f82dbb7f492d0f283abcc5eb6b5fee08db9487
[ "Apache-2.0" ]
243
2018-05-17T11:07:24.000Z
2022-03-27T18:01:07.000Z
from nornir.core.plugins.inventory import InventoryPluginRegister from nornir.core.plugins.runners import RunnersPluginRegister from nornir.plugins.inventory import SimpleInventory from nornir.plugins.runners import SerialRunner, ThreadedRunner from nornir_utils.plugins.inventory import YAMLInventory class Test: ...
33.961538
65
0.737259
576
0.652322
0
0
0
0
0
0
50
0.056625
a3644bcfb5d4ed17d821b83cba8aacde7ddfe23f
1,411
py
Python
setup.py
hodgestar/tesseract-control-software
41f47a4b901a0069f1745c90abe28f0778704b0e
[ "MIT" ]
2
2019-07-13T14:15:30.000Z
2020-01-04T10:44:47.000Z
setup.py
hodgestar/tesseract-control-software
41f47a4b901a0069f1745c90abe28f0778704b0e
[ "MIT" ]
null
null
null
setup.py
hodgestar/tesseract-control-software
41f47a4b901a0069f1745c90abe28f0778704b0e
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name="tessled", version="0.0.1", url='http://github.com/hodgestar/tesseract-control-software', license='MIT', description="Tesseract control software and simulator.", long_description=open('README.rst', 'r').read(), author='Simon Cross', ...
30.673913
65
0.593196
0
0
0
0
0
0
0
0
788
0.558469
a364c15aa063e5f5b9ce9b053b0dc00b7991aba9
45
py
Python
config.py
grimpy/glunit
ed8b8fabc8539abe94a9bf93418b95d006283066
[ "MIT" ]
null
null
null
config.py
grimpy/glunit
ed8b8fabc8539abe94a9bf93418b95d006283066
[ "MIT" ]
null
null
null
config.py
grimpy/glunit
ed8b8fabc8539abe94a9bf93418b95d006283066
[ "MIT" ]
1
2019-03-02T12:32:40.000Z
2019-03-02T12:32:40.000Z
GITLAB_URL = "XXXXXX" GITLAB_TOKEN = "XXXXX"
15
22
0.733333
0
0
0
0
0
0
0
0
15
0.333333
a3670442cb8f6ed8744f92e8d59bbfa74b3455a4
481
py
Python
app/collect/patch.py
luiscape/hdxscraper-unhcr-mediterranean-refugees
372bd7f565569e1d3a8428e6f09e86a01842bb9c
[ "MIT" ]
null
null
null
app/collect/patch.py
luiscape/hdxscraper-unhcr-mediterranean-refugees
372bd7f565569e1d3a8428e6f09e86a01842bb9c
[ "MIT" ]
2
2015-10-08T15:41:56.000Z
2015-10-08T15:50:48.000Z
app/collect/patch.py
luiscape/hdxscraper-unhcr-mediterranean-refugees
372bd7f565569e1d3a8428e6f09e86a01842bb9c
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import time def Epoch(data): '''Patching Epoch timestamps.''' for record in data: record['last_updated'] = time.strftime('%Y-%m-%d', time.localtime(record['last_updated'])) return data def Date(data): '''Patching date stamps.''' for record in data: m = t...
20.041667
94
0.619543
0
0
0
0
0
0
0
0
183
0.380457
a3686d9e544eb4ac435a125dc81bd7efb5af661e
1,875
py
Python
datasets/nlmap/preprocess_nlmap.py
zhuang-li/pyaudio_with_tranx
934d0431539564bb815c4c2c6399fe9d2fe7db55
[ "Apache-2.0" ]
null
null
null
datasets/nlmap/preprocess_nlmap.py
zhuang-li/pyaudio_with_tranx
934d0431539564bb815c4c2c6399fe9d2fe7db55
[ "Apache-2.0" ]
null
null
null
datasets/nlmap/preprocess_nlmap.py
zhuang-li/pyaudio_with_tranx
934d0431539564bb815c4c2c6399fe9d2fe7db55
[ "Apache-2.0" ]
null
null
null
from nltk.tokenize import TweetTokenizer import io def read_en_lines(lines): tknzr = TweetTokenizer() result = [] for line in lines: result.append(tknzr.tokenize(line)) return result def read_mrl_lines(lines): result = [] for line in lines: tgt = '' for i, ch in enume...
29.296875
82
0.6208
0
0
0
0
0
0
0
0
163
0.086933
a3697ddf813bc6d7c74b1660f1c7cbb233952678
2,228
py
Python
ocr.py
RonLek/ALPR-and-Identification-for-Indian-Vehicles
2c6cd5d6d883e67ed17a8dbb96830f813c6ab55e
[ "FTL", "Xnet", "X11" ]
13
2020-09-25T16:48:06.000Z
2022-01-31T01:36:33.000Z
ocr.py
RonLek/ALPR-and-Identification-for-Indian-Vehicles
2c6cd5d6d883e67ed17a8dbb96830f813c6ab55e
[ "FTL", "Xnet", "X11" ]
5
2021-01-19T09:36:59.000Z
2022-03-25T06:56:08.000Z
ocr.py
RonLek/ALPR-and-Identification-for-Indian-Vehicles
2c6cd5d6d883e67ed17a8dbb96830f813c6ab55e
[ "FTL", "Xnet", "X11" ]
7
2020-09-24T01:15:52.000Z
2022-03-23T06:50:55.000Z
states = ['AP', 'AR', 'AS', 'BR', 'CG', 'GA', 'GJ', 'HR', 'HP', 'JH', 'KA', 'KL', 'MP', 'MH', 'MN', 'ML', 'MZ', 'NL', 'OD', 'PB', 'RJ', 'SK', 'TN', 'TS', 'TR', 'UP', 'UK', 'WB', 'AN', 'CH', 'DD', 'DL', 'JK', 'LA', 'LD', 'PY'] def resultplate(plate): result=...
30.520548
75
0.508528
0
0
0
0
0
0
0
0
736
0.330341
a36a1929d767b48efa4751ceab577496580f2e66
667
py
Python
setup.py
LehmRob/photorename
b499b08f225264e5c7be3b51988d8e8fcbeb088f
[ "MIT" ]
null
null
null
setup.py
LehmRob/photorename
b499b08f225264e5c7be3b51988d8e8fcbeb088f
[ "MIT" ]
null
null
null
setup.py
LehmRob/photorename
b499b08f225264e5c7be3b51988d8e8fcbeb088f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from setuptools import setup from distutils.util import convert_path main_ns = {} vpath = convert_path('photorename/version.py') with open(vpath) as vfile: exec(vfile.read(), main_ns) setup( name='photorename', version=main_ns['__version__'], description='bulk rename photos in ...
23.821429
58
0.667166
0
0
0
0
0
0
0
0
258
0.386807
a36a758d49817dccb80abed74b7ead8eedf80c06
456
py
Python
python_loop/groom_lt1.py
hesthers/self-python-practice-
79e7a86385e599ca430af761f533f6eaf90aa448
[ "MIT" ]
1
2021-09-07T00:26:56.000Z
2021-09-07T00:26:56.000Z
python_loop/groom_lt1.py
hesthers/self-python-practice
79e7a86385e599ca430af761f533f6eaf90aa448
[ "MIT" ]
null
null
null
python_loop/groom_lt1.py
hesthers/self-python-practice
79e7a86385e599ca430af761f533f6eaf90aa448
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # UTF-8 encoding when using korean import numpy as np import math input_l = [] while True: user_input = int(input('')) input_l.append(user_input) if len(input_l[1:]) == input_l[0]: #user_input = user_input.split('\n') cnt_input = [] for i in range(1, len(input_l)): if np.sqrt(input...
17.538462
54
0.640351
0
0
0
0
0
0
0
0
95
0.208333
a36c8b3504ed6254b18b5d9848ed7acfd15782c9
454
py
Python
setup.py
hasangchun/ContextNet
da2515bb506a304186c9f579b251be8f086c541a
[ "Apache-2.0" ]
8
2021-06-20T17:59:22.000Z
2021-09-15T05:28:45.000Z
setup.py
hasangchun/ContextNet
da2515bb506a304186c9f579b251be8f086c541a
[ "Apache-2.0" ]
2
2021-12-02T20:33:08.000Z
2021-12-28T14:23:17.000Z
setup.py
hasangchun/ContextNet
da2515bb506a304186c9f579b251be8f086c541a
[ "Apache-2.0" ]
3
2022-02-02T10:36:01.000Z
2022-03-03T09:04:37.000Z
from setuptools import setup, find_packages setup( name='ContextNet', version='latest', packages=find_packages(), description='ContextNet: Improving Convolutional Neural Networks for Automatic Speech Recognition with Global Context', author='Sangchun Ha', author_email='seomk9896@naver.com', ...
28.375
123
0.698238
0
0
0
0
0
0
0
0
223
0.491189
a36d0ac9736ee7f0f87c898553b9622f6343c622
130
py
Python
katas/kyu_7/product_of_main_diagonal.py
the-zebulan/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
40
2016-03-09T12:26:20.000Z
2022-03-23T08:44:51.000Z
katas/kyu_7/product_of_main_diagonal.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
null
null
null
katas/kyu_7/product_of_main_diagonal.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
36
2016-11-07T19:59:58.000Z
2022-03-31T11:18:27.000Z
from operator import mul def main_diagonal_product(matrix): return reduce(mul, (matrix[a][a] for a in xrange(len(matrix))))
21.666667
67
0.730769
0
0
0
0
0
0
0
0
0
0
a36e85cc522d69fee1eb9747d2afca83c85e094a
1,643
py
Python
src/ctc/protocols/curve_utils/cli/curve_pools_command.py
fei-protocol/checkthechain
ec838f3d0d44af228f45394d9ba8d8eb7f677520
[ "MIT" ]
94
2022-02-15T19:34:49.000Z
2022-03-26T19:26:22.000Z
src/ctc/protocols/curve_utils/cli/curve_pools_command.py
fei-protocol/checkthechain
ec838f3d0d44af228f45394d9ba8d8eb7f677520
[ "MIT" ]
7
2022-03-03T02:58:47.000Z
2022-03-11T18:41:05.000Z
src/ctc/protocols/curve_utils/cli/curve_pools_command.py
fei-protocol/checkthechain
ec838f3d0d44af228f45394d9ba8d8eb7f677520
[ "MIT" ]
7
2022-02-15T17:53:07.000Z
2022-03-17T19:14:17.000Z
from __future__ import annotations import toolcli from ctc.protocols import curve_utils def get_command_spec() -> toolcli.CommandSpec: return { 'f': async_curve_pools_command, 'help': 'list curve pools', 'args': [ { 'name': '--verbose', 'help'...
26.934426
80
0.593427
0
0
0
0
0
0
1,224
0.744979
433
0.263542
a3724c66e413effcdf21b1d39aedb643be084706
218
py
Python
constants/db.py
sshikshu/app.cavill.in
4e9472ea9640dad920f17d29b9625c8485022a5e
[ "MIT" ]
null
null
null
constants/db.py
sshikshu/app.cavill.in
4e9472ea9640dad920f17d29b9625c8485022a5e
[ "MIT" ]
null
null
null
constants/db.py
sshikshu/app.cavill.in
4e9472ea9640dad920f17d29b9625c8485022a5e
[ "MIT" ]
null
null
null
""" db constants """ DB_HOST = 'localhost' DB_PORT = 28015 # Database is cavilling DB_NAME = 'cavilling' DB_TABLE_CAVILLS = 'cavills' DB_TABLE_HAIRDOS = 'hairdos' DB_TABLE_POLRUS = 'polrus' DB_TABLE_USERS = 'users'
14.533333
28
0.733945
0
0
0
0
0
0
0
0
98
0.449541
a3725144f31da3c2b8b26f9fa9ea6b635892f533
76,062
py
Python
socfakerservice/api/api.py
MSAdministrator/soc-faker-service
f3c401f8d6931d1c421f594dc8f1137f2ad984aa
[ "MIT" ]
1
2021-04-11T05:53:38.000Z
2021-04-11T05:53:38.000Z
socfakerservice/api/api.py
MSAdministrator/soc-faker-service
f3c401f8d6931d1c421f594dc8f1137f2ad984aa
[ "MIT" ]
null
null
null
socfakerservice/api/api.py
MSAdministrator/soc-faker-service
f3c401f8d6931d1c421f594dc8f1137f2ad984aa
[ "MIT" ]
1
2021-04-11T05:53:42.000Z
2021-04-11T05:53:42.000Z
from flask import Blueprint, render_template, request, abort, jsonify, Response from socfakerservice import status, HTMLRenderer, set_renderers from socfakerservice.model import TokenModel from socfaker import SocFaker socfaker = SocFaker() api_bp = Blueprint( 'api', __name__ ) def validate_request(request)...
28.349609
162
0.639623
0
0
0
0
73,705
0.969012
0
0
41,690
0.548105
a37355a19aa8f440bb3300c6b512a843d8e672aa
3,494
py
Python
jdit/trainer/instances/fashionClassParallelTrainer.py
dingguanglei/jdit
ef878e696c9e2fad5069f106496289d4e4cc6154
[ "Apache-2.0" ]
28
2019-06-18T15:56:53.000Z
2021-11-09T13:11:13.000Z
jdit/trainer/instances/fashionClassParallelTrainer.py
dingguanglei/jdit
ef878e696c9e2fad5069f106496289d4e4cc6154
[ "Apache-2.0" ]
2
2018-10-24T01:09:56.000Z
2018-11-08T07:13:48.000Z
jdit/trainer/instances/fashionClassParallelTrainer.py
dingguanglei/jdit
ef878e696c9e2fad5069f106496289d4e4cc6154
[ "Apache-2.0" ]
8
2019-01-11T01:12:15.000Z
2021-03-12T10:15:43.000Z
# coding=utf-8 import torch import torch.nn as nn import torch.nn.functional as F from jdit.trainer.single.classification import ClassificationTrainer from jdit.model import Model from jdit.optimizer import Optimizer from jdit.dataset import FashionMNIST from jdit.parallel import SupParallelTrainer class SimpleModel(...
32.351852
105
0.634516
1,523
0.43589
0
0
0
0
0
0
366
0.104751
a3741285d787f895d330b0560df8e8e215121b8a
1,701
py
Python
examples/plotter/lego.py
adamfazzari/pylgbst
1ae2b761a9da3d8983a8d3cd9dd3dfd7a0b7540b
[ "MIT" ]
468
2017-09-19T16:59:55.000Z
2022-03-09T11:52:02.000Z
examples/plotter/lego.py
adamfazzari/pylgbst
1ae2b761a9da3d8983a8d3cd9dd3dfd7a0b7540b
[ "MIT" ]
110
2017-12-28T14:53:17.000Z
2022-02-20T12:29:46.000Z
examples/plotter/lego.py
adamfazzari/pylgbst
1ae2b761a9da3d8983a8d3cd9dd3dfd7a0b7540b
[ "MIT" ]
120
2017-10-09T20:16:52.000Z
2022-03-29T13:14:28.000Z
def lego(plotter, t): h = t * 5.0 w = t * 3.0 plotter.move(-t * 2.0, 0) l(h, plotter, t, w) plotter.move(0, w + t) e(h, plotter, t, w) plotter.move(0, w + t) g(plotter, t) plotter.move(0, w + t) o(plotter, t) def o(plotter, t): # O plotter.move(t, 0) plotter.line(3...
20.743902
30
0.522046
0
0
0
0
0
0
0
0
12
0.007055
a37644a1e11006bb540b7235f3216f75efbca584
5,711
py
Python
movies_modeling.py
amotter443/movies
ae375d19befb8133c014199dc1bf1ae728fd0147
[ "MIT" ]
1
2022-01-13T21:46:40.000Z
2022-01-13T21:46:40.000Z
movies_modeling.py
amotter443/movies
ae375d19befb8133c014199dc1bf1ae728fd0147
[ "MIT" ]
null
null
null
movies_modeling.py
amotter443/movies
ae375d19befb8133c014199dc1bf1ae728fd0147
[ "MIT" ]
null
null
null
#Initialize packages import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import sklearn.model_selection as model_selection from sklearn import linear_model import sklearn.metrics as metrics from sklearn.preprocessing import StandardScaler from sklearn.ensemble import Ra...
38.073333
366
0.711959
0
0
0
0
0
0
0
0
2,136
0.374015
a3767371ed8f0cd8ffdd0f52e641dd47e92c68df
1,287
py
Python
Python/142.py
jaimeliew1/Project_Euler_Solutions
963c9c6d6571cade8f87341f97a6a2cd1af202bb
[ "MIT" ]
null
null
null
Python/142.py
jaimeliew1/Project_Euler_Solutions
963c9c6d6571cade8f87341f97a6a2cd1af202bb
[ "MIT" ]
1
2018-04-16T21:01:50.000Z
2018-04-16T21:01:50.000Z
Python/142.py
jaimeliew1/Project_Euler_Solutions
963c9c6d6571cade8f87341f97a6a2cd1af202bb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Solution to Project Euler problem 142 - Perfect Square Collection Author: Jaime Liew https://github.com/jaimeliew1/Project_Euler_Solutions """ from itertools import combinations import numpy as np def run(): N = 1000000 candids = {} # generate all pairs of squares which differ...
28.6
79
0.529915
0
0
0
0
0
0
0
0
374
0.290598
a3775d28ecda7be7aab9864818d4a6bf38e3387c
6,032
py
Python
garcon/activity.py
mortaliorchard/garcon
281221c63da0b2ea3ea51174a3d5878d1de8f487
[ "MIT" ]
null
null
null
garcon/activity.py
mortaliorchard/garcon
281221c63da0b2ea3ea51174a3d5878d1de8f487
[ "MIT" ]
null
null
null
garcon/activity.py
mortaliorchard/garcon
281221c63da0b2ea3ea51174a3d5878d1de8f487
[ "MIT" ]
null
null
null
""" Activity ======== Activities are self generated classes to which you can pass an identifier, and a list of tasks to perform. The activities are in between the decider and the task. For ease, two types of task runners are available: SyncTasks and AsyncTasks. If you need something more specific, you should either c...
28.587678
79
0.629145
2,623
0.434847
1,464
0.242706
0
0
0
0
3,039
0.503813
a37b1669512f165099c1e03b767ae6863a2fb2c7
7,754
py
Python
csvdiff.py
bugph0bia/PyCsvDiff
57d438d50e758e13834affd8d0e46f8a7bfe0ebe
[ "MIT" ]
null
null
null
csvdiff.py
bugph0bia/PyCsvDiff
57d438d50e758e13834affd8d0e46f8a7bfe0ebe
[ "MIT" ]
null
null
null
csvdiff.py
bugph0bia/PyCsvDiff
57d438d50e758e13834affd8d0e46f8a7bfe0ebe
[ "MIT" ]
null
null
null
import sys import csv import json import argparse from collections import namedtuple # diff info DiffInfo = namedtuple('DiffInfo', [ 'mark', # diff kind (!, -, +) 'address', # row/column addresses of diff 'keyname', # row/column key names of diff 'value', # values of diff ]) def ...
33.5671
131
0.554037
0
0
0
0
0
0
0
0
2,909
0.375161
a37e426d249e4fa306b483523b559a9a0ae9cff3
2,563
py
Python
map_reduce/core/data_source.py
HuynhThanhQuan/graph-network
e429a641e7baecad9765700cac580cfbdedbe1bd
[ "MIT" ]
null
null
null
map_reduce/core/data_source.py
HuynhThanhQuan/graph-network
e429a641e7baecad9765700cac580cfbdedbe1bd
[ "MIT" ]
11
2020-11-13T18:29:37.000Z
2022-02-10T00:25:15.000Z
map_reduce/core/data_source.py
HuynhThanhQuan/graph-network
e429a641e7baecad9765700cac580cfbdedbe1bd
[ "MIT" ]
null
null
null
import os from time import time import pandas as pd from sqlalchemy import create_engine import logging logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class AbstractDataSource: def __int__(self): pass class AbstractDataSourcePointer(AbstractDataSource): def __int__(self): ...
35.109589
106
0.587593
2,377
0.927429
545
0.212641
0
0
0
0
358
0.13968
a37e9163f756c5b933aa7522cfc07f57edae5c1e
3,431
py
Python
setup.py
michael-borisov/django-omnibus
3275ae41dcad5a140433f0bfcea5961dc837e913
[ "BSD-3-Clause" ]
null
null
null
setup.py
michael-borisov/django-omnibus
3275ae41dcad5a140433f0bfcea5961dc837e913
[ "BSD-3-Clause" ]
4
2020-08-19T08:39:55.000Z
2021-03-31T08:23:26.000Z
setup.py
radiosilence/django-omnibus
c31337306c601e75fbdac9d6b9b62dcc980e04f5
[ "BSD-3-Clause" ]
null
null
null
import codecs import os import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand def read(*parts): filename = os.path.join(os.path.dirname(__file__), *parts) with codecs.open(filename, encoding='utf-8') as fp: return fp.read() test_requires = [ ...
27.669355
86
0.575051
1,331
0.387934
0
0
0
0
0
0
1,354
0.394637
a37f3e393c9a970f74e1fb50bf59be6bc0954abc
504
py
Python
scripts/tests/snapshots/snap_etc_test.py
Duroktar/Wolf
c192d5c27eb2098e440f7726eb1bff40ed004db5
[ "Apache-2.0" ]
105
2018-02-07T22:07:47.000Z
2022-03-31T18:16:47.000Z
scripts/tests/snapshots/snap_etc_test.py
Duroktar/Wolf
c192d5c27eb2098e440f7726eb1bff40ed004db5
[ "Apache-2.0" ]
57
2018-02-07T23:07:41.000Z
2021-11-21T17:14:06.000Z
scripts/tests/snapshots/snap_etc_test.py
Duroktar/Wolf
c192d5c27eb2098e440f7726eb1bff40ed004db5
[ "Apache-2.0" ]
10
2018-02-24T23:44:51.000Z
2022-03-02T07:52:27.000Z
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['test_etc 1'] = '[{"lineno": 2, "value": "tup = (1, 2, 3)"}, {"lineno": 3, "source": ["tup\\n"], "value": "(1, 2, 3)"}, {"lineno": 5, "value":...
45.818182
335
0.56746
0
0
0
0
0
0
0
0
386
0.765873
a37f43b419e3def4e72bb772a8952c0f709cee66
1,823
py
Python
config.py
greatwallet/cosypose
e72ce7d521ef61870daef267cbbe65aaebe9d24d
[ "MIT" ]
null
null
null
config.py
greatwallet/cosypose
e72ce7d521ef61870daef267cbbe65aaebe9d24d
[ "MIT" ]
null
null
null
config.py
greatwallet/cosypose
e72ce7d521ef61870daef267cbbe65aaebe9d24d
[ "MIT" ]
null
null
null
import cosypose import os import yaml from joblib import Memory from pathlib import Path import getpass import socket import torch.multiprocessing torch.multiprocessing.set_sharing_strategy('file_system') hostname = socket.gethostname() username = getpass.getuser() PROJECT_ROOT = Path(cosypose.__file__)....
30.383333
88
0.765222
0
0
0
0
0
0
0
0
382
0.209545
a37f76a50ac5297fbe0ae2e72f8f20c6b13bb7e0
2,761
py
Python
2018/16/main.py
zelane/advent-of-code-2016
72ebda3ec4eca4d1921dd8d94f2f84bbd0566fc5
[ "MIT" ]
null
null
null
2018/16/main.py
zelane/advent-of-code-2016
72ebda3ec4eca4d1921dd8d94f2f84bbd0566fc5
[ "MIT" ]
null
null
null
2018/16/main.py
zelane/advent-of-code-2016
72ebda3ec4eca4d1921dd8d94f2f84bbd0566fc5
[ "MIT" ]
null
null
null
from copy import copy import re class Cpu: def __init__(self, mem): self.mem = mem def addr(self, a, b, c): self.mem[c] = self.mem[a] + self.mem[b] def addi(self, a, b, c): self.mem[c] = self.mem[a] + b def mulr(self, a, b, c): self.mem[c] = self.mem[a] * self.mem[b]...
23.801724
75
0.522637
1,273
0.461065
0
0
0
0
0
0
118
0.042738
a382674b28c095d002534f7e5a89fab99c7987b3
2,700
py
Python
streamlit/About.py
sarthak815/sage2therescue
b4bc38731a2b43866c545560e850cdddd85a0852
[ "MIT" ]
null
null
null
streamlit/About.py
sarthak815/sage2therescue
b4bc38731a2b43866c545560e850cdddd85a0852
[ "MIT" ]
null
null
null
streamlit/About.py
sarthak815/sage2therescue
b4bc38731a2b43866c545560e850cdddd85a0852
[ "MIT" ]
1
2022-03-04T09:31:18.000Z
2022-03-04T09:31:18.000Z
import streamlit as st def app(): st.title("About") st.markdown(''' During the Cyclone Fani which hit Odisha in 2019 a lot of places ran out of electricity, water and other basic necessities. During this period most of the rescue workers relied on data accumulated pre disaster to guide rescue services but this was...
117.391304
1,320
0.802963
0
0
0
0
0
0
0
0
2,639
0.977407
a3842c6138c7e752e05c72628b0129a00a3d511f
1,617
py
Python
tests/test_reduce_sum.py
gavinuhma/tf-encrypted
4e18d78a151bbe91489a1773fb839b889ff5b460
[ "Apache-2.0" ]
3
2018-10-18T19:36:02.000Z
2020-07-05T19:46:23.000Z
tests/test_reduce_sum.py
dropoutlabs/tf-encrypted
48c9dc7419163425e736ad05bb19980d134fc851
[ "Apache-2.0" ]
null
null
null
tests/test_reduce_sum.py
dropoutlabs/tf-encrypted
48c9dc7419163425e736ad05bb19980d134fc851
[ "Apache-2.0" ]
null
null
null
# pylint: disable=missing-docstring import unittest import numpy as np import tensorflow as tf import tf_encrypted as tfe class TestReduceSum(unittest.TestCase): def setUp(self): tf.reset_default_graph() def test_reduce_sum_1d(self): t = [1, 2] with tf.Session() as sess: out = tf.reduce_sum(t...
24.134328
54
0.650588
1,444
0.893012
0
0
0
0
0
0
45
0.027829
a38463fb4d443f7e3aa2457876c06216a04ae227
1,010
py
Python
tests/test_nodes.py
simonzabrocki/GraphModels
b43e44a189d663364ae08de9a1d1305320854d63
[ "MIT" ]
null
null
null
tests/test_nodes.py
simonzabrocki/GraphModels
b43e44a189d663364ae08de9a1d1305320854d63
[ "MIT" ]
null
null
null
tests/test_nodes.py
simonzabrocki/GraphModels
b43e44a189d663364ae08de9a1d1305320854d63
[ "MIT" ]
null
null
null
import pytest from GraphModels.models.Sarah.model_agricultural_water import AgriculturalWaterNodes from GraphModels.models.Sarah.model_freshwater_available import FreshwaterAvailableNodes from GraphModels.models.Sarah.model_municipal_water import MunicipalWaterNodes nodes_list = AgriculturalWaterNodes + FreshwaterAv...
37.407407
116
0.773267
0
0
0
0
310
0.306931
0
0
87
0.086139
a3859a2bc6f5180117d2aa59a1b851252ca8c8a5
1,350
py
Python
backend/telegram/methods/messages_and_media/get_updated_message_entity_types.py
appheap/social-media-analyzer
0f9da098bfb0b4f9eb38e0244aa3a168cf97d51c
[ "Apache-2.0" ]
5
2021-09-11T22:01:15.000Z
2022-03-16T21:33:42.000Z
backend/telegram/methods/messages_and_media/get_updated_message_entity_types.py
iamatlasss/social-media-analyzer
429d1d2bbd8bfce80c50c5f8edda58f87ace668d
[ "Apache-2.0" ]
null
null
null
backend/telegram/methods/messages_and_media/get_updated_message_entity_types.py
iamatlasss/social-media-analyzer
429d1d2bbd8bfce80c50c5f8edda58f87ace668d
[ "Apache-2.0" ]
3
2022-01-18T11:06:22.000Z
2022-02-26T13:39:28.000Z
from django.db import transaction from db.scaffold import Scaffold from typing import List from telegram import models as tg_models from pyrogram import types class GetUpdatedMessageEntityTypes(Scaffold): def get_updated_message_entity_types( self, *, db_message: 'tg_models.M...
32.926829
92
0.565926
1,187
0.879259
0
0
0
0
0
0
65
0.048148
a387303aea958c01ac561cbc1d4a035d79ef4112
486
py
Python
app/user_api/user_api.py
Basselbi/hikma-health-backend
0f891821a04aa103fff62097443bd585bc342dbc
[ "MIT" ]
null
null
null
app/user_api/user_api.py
Basselbi/hikma-health-backend
0f891821a04aa103fff62097443bd585bc342dbc
[ "MIT" ]
null
null
null
app/user_api/user_api.py
Basselbi/hikma-health-backend
0f891821a04aa103fff62097443bd585bc342dbc
[ "MIT" ]
null
null
null
from flask import Blueprint, request, jsonify from web_util import assert_data_has_keys from users.user import User user_api = Blueprint('users_api', __name__, url_prefix='/api/user') @user_api.route('/reset_password', methods=['POST']) def sync(): params = assert_data_has_keys(request, {'email', 'password', 'ne...
34.714286
81
0.73251
0
0
0
0
298
0.613169
0
0
120
0.246914
a389bd7328bfeb9809c940787f3815d94a0c7bd6
2,783
py
Python
commands.py
abcxyz618/MovieGeek
06029ed4202c63d3da4e306eb5d500ab81f2e1cb
[ "MIT" ]
null
null
null
commands.py
abcxyz618/MovieGeek
06029ed4202c63d3da4e306eb5d500ab81f2e1cb
[ "MIT" ]
null
null
null
commands.py
abcxyz618/MovieGeek
06029ed4202c63d3da4e306eb5d500ab81f2e1cb
[ "MIT" ]
null
null
null
import discord from discord.ext import commands from omdb_api import * from tmdb_api import * class Commands(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def movie(self, ctx, *, in_str=""): # input format: *movie {movie name} / {year} if in...
36.618421
102
0.594682
2,626
0.943586
0
0
2,511
0.902264
2,182
0.784046
421
0.151276
a38a03f634375d52713a25701814579ff7b6e33e
92,070
py
Python
cryptoapis/api/unified_endpoints_api.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
5
2021-05-17T04:45:03.000Z
2022-03-23T12:51:46.000Z
cryptoapis/api/unified_endpoints_api.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
null
null
null
cryptoapis/api/unified_endpoints_api.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
2
2021-06-02T07:32:26.000Z
2022-02-12T02:36:23.000Z
""" CryptoAPIs Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei...
42.704082
484
0.514945
86,921
0.944075
0
0
0
0
0
0
52,652
0.571869
a38b317b32dcbc6c9dff08940ace5dc60a5e39cd
1,853
py
Python
examples/run_ranch_baseline.py
pinjutien/DeepExplain
a80d85dcd5adc90968b6924a7ef39528170830f0
[ "MIT" ]
null
null
null
examples/run_ranch_baseline.py
pinjutien/DeepExplain
a80d85dcd5adc90968b6924a7ef39528170830f0
[ "MIT" ]
null
null
null
examples/run_ranch_baseline.py
pinjutien/DeepExplain
a80d85dcd5adc90968b6924a7ef39528170830f0
[ "MIT" ]
null
null
null
""" RANdom CHoice baseline (RANCH): random image from the target class """ import random import numpy as np import tensorflow_datasets as tfds from tqdm import tqdm # output_pattern = '/home/ec2-user/gan_submission_1/mnist/mnist_v2/ranch_baselines_%d' # tfds_name = 'mnist' # target_size = [28, 28, 1] # num_class = 1...
28.953125
88
0.67674
0
0
0
0
0
0
0
0
629
0.33945
a38b4a3c4607025ed47cb0e6994bcee905fa97f0
359
py
Python
pageOne.py
3bru/qt-tkinter-Test
41eefe7621c6a0bf3a25b4503df7a7451fc363b2
[ "MIT" ]
1
2020-05-18T21:59:39.000Z
2020-05-18T21:59:39.000Z
pageOne.py
3bru/qt-tkinter-Test
41eefe7621c6a0bf3a25b4503df7a7451fc363b2
[ "MIT" ]
null
null
null
pageOne.py
3bru/qt-tkinter-Test
41eefe7621c6a0bf3a25b4503df7a7451fc363b2
[ "MIT" ]
null
null
null
import sqlite3, os con = sqlite3.connect('database.sqlite') im = con.cursor() tablo = """CREATE TABLE IF NOT EXISTS writes(day, topic, texti)""" deger = """INSERT INTO writes VALUES('oneDay', 'nmap', 'nmaple ilgili bisiler')""" im.execute(tablo) im.execute(deger) con.commit() im.execute("""SELECT * FROM writes""") ...
22.4375
82
0.696379
0
0
0
0
0
0
0
0
175
0.487465
a38b9d380fbd10ce2b7350457ab818a75b222fac
6,075
py
Python
basicsr/metrics/psnr_ssim.py
BCV-Uniandes/RSR
dad60eedd3560f2655e3d1ed444153ed2616af2e
[ "zlib-acknowledgement" ]
14
2021-08-28T04:15:37.000Z
2021-12-28T17:00:33.000Z
basicsr/metrics/psnr_ssim.py
BCV-Uniandes/RSR
dad60eedd3560f2655e3d1ed444153ed2616af2e
[ "zlib-acknowledgement" ]
2
2021-09-26T01:27:06.000Z
2021-12-24T19:06:09.000Z
basicsr/metrics/psnr_ssim.py
BCV-Uniandes/RSR
dad60eedd3560f2655e3d1ed444153ed2616af2e
[ "zlib-acknowledgement" ]
1
2021-10-18T15:48:56.000Z
2021-10-18T15:48:56.000Z
import cv2 import numpy as np from basicsr.metrics.metric_util import reorder_image, to_y_channel def calculate_psnr(img1, img2, crop_border, input_order='HWC', test_y_channel=False): """Calculate PSNR (Peak Signal-to-Noise Ratio). ...
33.379121
80
0.596708
931
0.153251
0
0
318
0.052346
0
0
2,398
0.394733
a38ee10bfa692aa23805d2d2b99b5f0481e7ce48
14,224
py
Python
data/dataset.py
limingwu8/Pneumonia-Detection
8541e0f34a72f6e94773bf234cfd071732229b2b
[ "MIT" ]
7
2019-01-27T02:30:56.000Z
2020-04-29T18:47:21.000Z
data/dataset.py
limingwu8/Pneumonia-Detection
8541e0f34a72f6e94773bf234cfd071732229b2b
[ "MIT" ]
1
2020-01-28T04:40:15.000Z
2020-05-01T02:37:40.000Z
data/dataset.py
limingwu8/Pneumonia-Detection
8541e0f34a72f6e94773bf234cfd071732229b2b
[ "MIT" ]
3
2019-08-09T09:16:00.000Z
2021-07-01T11:45:00.000Z
import os import numpy as np import torch from tqdm import tqdm from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils from skimage import io, transform from utils.Config import opt from skimage import exposure import matplotlib.pylab as plt from utils import array_tool as at from sk...
41.228986
113
0.646161
4,013
0.282129
0
0
0
0
0
0
6,375
0.448186
a38f9c51d087930a15e07db3d41e43fedee278f9
8,344
py
Python
make_dataset/kor_sample_dataset.py
park-sungmoo/odqa_baseline_code
45954be766e5f987bef18e5b8a2e47f1508742cd
[ "Apache-2.0" ]
67
2021-05-12T15:54:28.000Z
2022-03-12T15:55:35.000Z
make_dataset/kor_sample_dataset.py
park-sungmoo/odqa_baseline_code
45954be766e5f987bef18e5b8a2e47f1508742cd
[ "Apache-2.0" ]
71
2021-05-01T06:07:37.000Z
2022-01-28T16:54:46.000Z
make_dataset/kor_sample_dataset.py
park-sungmoo/odqa_baseline_code
45954be766e5f987bef18e5b8a2e47f1508742cd
[ "Apache-2.0" ]
14
2021-05-24T10:57:27.000Z
2022-02-18T06:34:11.000Z
import json import os.path as p from collections import defaultdict import pandas as pd from datasets import load_dataset from datasets import concatenate_datasets from datasets import Sequence, Value, Features, Dataset, DatasetDict from utils.tools import get_args f = Features( { "answers": Sequence( ...
28.772414
112
0.65604
0
0
0
0
0
0
0
0
2,437
0.273636
a3927c6d9fb19dc907aa3851f9fb6293c833eaf2
1,737
py
Python
tests/test_simple.py
teosavv/pyembroidery
00985f423e64ea1a454e5484012c19a64f26eb2c
[ "MIT" ]
45
2018-07-08T09:49:30.000Z
2022-03-23T07:01:15.000Z
tests/test_simple.py
teosavv/pyembroidery
00985f423e64ea1a454e5484012c19a64f26eb2c
[ "MIT" ]
59
2018-07-05T22:05:58.000Z
2022-02-20T01:01:20.000Z
tests/test_simple.py
teosavv/pyembroidery
00985f423e64ea1a454e5484012c19a64f26eb2c
[ "MIT" ]
23
2018-08-10T17:58:04.000Z
2022-03-29T03:41:46.000Z
import os import shutil import pyembroidery import test_fractals def test_simple(): pattern = pyembroidery.EmbPattern() pattern.add_thread({ "rgb": 0x0000FF, "name": "Blue Test", "catalog": "0033", "brand": "PyEmbroidery Brand Thread" }) pattern.add_thread({ "...
31.581818
84
0.651698
0
0
0
0
0
0
0
0
451
0.259643
a392dab4e0208bcba731af6d1b6b1dd6d3c0e78a
21,317
py
Python
train.py
eapache/HawkEars
3b979166ed09de9f9254b830bb57499e1da7a015
[ "MIT" ]
null
null
null
train.py
eapache/HawkEars
3b979166ed09de9f9254b830bb57499e1da7a015
[ "MIT" ]
1
2021-12-17T16:56:12.000Z
2021-12-19T15:53:55.000Z
train.py
eapache/HawkEars
3b979166ed09de9f9254b830bb57499e1da7a015
[ "MIT" ]
1
2021-12-17T16:59:04.000Z
2021-12-17T16:59:04.000Z
# Train the selected neural network model on spectrograms for birds and a few other classes. # Train the selected neural network model on spectrograms for birds and a few other classes. # To see command-line arguments, run the script with -h argument. import argparse import math import matplotlib.pyplot as plt import ...
47.476615
233
0.598208
16,394
0.769058
0
0
0
0
0
0
5,718
0.268237
a3943fc348baced6fa934c762ac87be734e9ae13
2,002
py
Python
limix/heritability/estimate.py
fpcasale/limix
a6bc2850f243fe779991bb53a24ddbebe0ab74d2
[ "Apache-2.0" ]
null
null
null
limix/heritability/estimate.py
fpcasale/limix
a6bc2850f243fe779991bb53a24ddbebe0ab74d2
[ "Apache-2.0" ]
null
null
null
limix/heritability/estimate.py
fpcasale/limix
a6bc2850f243fe779991bb53a24ddbebe0ab74d2
[ "Apache-2.0" ]
null
null
null
from __future__ import division from numpy import ascontiguousarray, copy, ones, var from numpy_sugar.linalg import economic_qs from glimix_core.glmm import GLMMExpFam def estimate(pheno, lik, K, covs=None, verbose=True): r"""Estimate the so-called narrow-sense heritability. It supports Normal, Bernoulli, ...
24.414634
76
0.580919
0
0
0
0
0
0
0
0
1,154
0.576424
a394632989f95d229e000f46db6a73bbdcda0cf3
2,739
py
Python
pyrat/__main__.py
gitmarek/pyrat
cbf918d5c23d5d39e62e00bb64b6d0596170c68b
[ "MIT" ]
null
null
null
pyrat/__main__.py
gitmarek/pyrat
cbf918d5c23d5d39e62e00bb64b6d0596170c68b
[ "MIT" ]
null
null
null
pyrat/__main__.py
gitmarek/pyrat
cbf918d5c23d5d39e62e00bb64b6d0596170c68b
[ "MIT" ]
null
null
null
import argparse, importlib, sys import pyrat from pyrat import name, version, logger # This returns a function to be called by a subparser below # We assume in the tool's submodule there's a function called 'start(args)' # That takes over the execution of the program. def tool_(tool_name): def f(args): s...
36.039474
78
0.683826
0
0
0
0
0
0
0
0
1,210
0.441767
a394774a260348220f0663c39347cf191a6da686
485
py
Python
zof/event.py
byllyfish/pylibofp
8e96caf83f57cab930b45a78eb4a8eaa6d9d0408
[ "MIT" ]
4
2017-09-20T19:10:51.000Z
2022-01-10T04:02:00.000Z
zof/event.py
byllyfish/pylibofp
8e96caf83f57cab930b45a78eb4a8eaa6d9d0408
[ "MIT" ]
2
2017-09-02T22:53:03.000Z
2018-01-01T03:27:48.000Z
zof/event.py
byllyfish/pylibofp
8e96caf83f57cab930b45a78eb4a8eaa6d9d0408
[ "MIT" ]
null
null
null
from .objectview import to_json, from_json def load_event(event): try: return from_json(event) except ValueError as ex: # Report malformed JSON input. if event == b'': return {'event': 'EXCEPTION', 'reason': 'EOF', 'input': event} return {'event': 'EXCEPTION', 'reas...
26.944444
74
0.610309
0
0
0
0
0
0
0
0
118
0.243299
a3955ee346d7a3a5338cd528fa6afbec24d5527c
2,007
py
Python
python/projecteuler/src/longest_collatz_sequence.py
christopher-burke/warmups
140c96ada87ec5e9faa4622504ddee18840dce4a
[ "MIT" ]
null
null
null
python/projecteuler/src/longest_collatz_sequence.py
christopher-burke/warmups
140c96ada87ec5e9faa4622504ddee18840dce4a
[ "MIT" ]
2
2022-03-10T03:49:14.000Z
2022-03-14T00:49:54.000Z
python/projecteuler/src/longest_collatz_sequence.py
christopher-burke/warmups
140c96ada87ec5e9faa4622504ddee18840dce4a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Longest Collatz sequence. The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) Using the rule above and starting with 13, we generate the following sequence: 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1 It can be seen that...
23.611765
71
0.659691
0
0
0
0
0
0
0
0
1,156
0.569178
a396aa841a074ff27cad63b9fc597eb1d7fa8b7c
1,823
py
Python
examples/classify_pose.py
scottamain/aiy-maker-kit
4cdb973067b83d27cf0601c811d887877d1bc253
[ "Apache-2.0" ]
null
null
null
examples/classify_pose.py
scottamain/aiy-maker-kit
4cdb973067b83d27cf0601c811d887877d1bc253
[ "Apache-2.0" ]
null
null
null
examples/classify_pose.py
scottamain/aiy-maker-kit
4cdb973067b83d27cf0601c811d887877d1bc253
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35.745098
80
0.785518
0
0
0
0
0
0
0
0
1,267
0.695008
a396f80d3df39bc129b954b6343810b69c00e0ea
291
py
Python
weldx/tags/measurement/source.py
CagtayFabry/weldx
463f949d4fa54b5edafa2268cb862716865a62c2
[ "BSD-3-Clause" ]
13
2020-02-20T07:45:02.000Z
2021-12-10T13:15:47.000Z
weldx/tags/measurement/source.py
BAMWelDX/weldx
ada4e67fa00cdb80a0b954057f4e685b846c9fe5
[ "BSD-3-Clause" ]
675
2020-02-20T07:47:00.000Z
2022-03-31T15:17:19.000Z
weldx/tags/measurement/source.py
CagtayFabry/weldx
463f949d4fa54b5edafa2268cb862716865a62c2
[ "BSD-3-Clause" ]
5
2020-09-02T07:19:17.000Z
2021-12-05T08:57:50.000Z
from weldx.asdf.util import dataclass_serialization_class from weldx.measurement import SignalSource __all__ = ["SignalSource", "SignalSourceConverter"] SignalSourceConverter = dataclass_serialization_class( class_type=SignalSource, class_name="measurement/source", version="0.1.0" )
29.1
77
0.821306
0
0
0
0
0
0
0
0
64
0.219931
a39715724a34e51cf7b15a4f030411898b87a5ec
1,706
py
Python
test/test_entities_api.py
iknaio/graphsense-python
b61c66b6ec0bb9720036ae61777e90ce63a971cc
[ "MIT" ]
null
null
null
test/test_entities_api.py
iknaio/graphsense-python
b61c66b6ec0bb9720036ae61777e90ce63a971cc
[ "MIT" ]
1
2022-02-24T11:21:49.000Z
2022-02-24T11:21:49.000Z
test/test_entities_api.py
iknaio/graphsense-python
b61c66b6ec0bb9720036ae61777e90ce63a971cc
[ "MIT" ]
null
null
null
""" GraphSense API GraphSense API # noqa: E501 The version of the OpenAPI document: 0.5.1 Generated by: https://openapi-generator.tech """ import unittest import graphsense from graphsense.api.entities_api import EntitiesApi # noqa: E501 class TestEntitiesApi(unittest.TestCase): """Entities...
21.871795
73
0.623681
1,393
0.81653
0
0
0
0
0
0
997
0.584408
a39afee8e197b6834391bc0d4c2a7ba0f29e4cdf
622
py
Python
tests/test_versions_in_sync.py
simon-graham/pure_interface
da7bf05151c1c906c753987fbf7e3251905b4ba0
[ "MIT" ]
10
2018-08-27T04:15:53.000Z
2021-08-18T09:45:35.000Z
tests/test_versions_in_sync.py
simon-graham/pure_interface
da7bf05151c1c906c753987fbf7e3251905b4ba0
[ "MIT" ]
35
2018-08-27T04:17:44.000Z
2021-09-22T05:39:57.000Z
tests/test_versions_in_sync.py
tim-mitchell/pure_interface
46a2de2574f4543980303cafd89cfcbdb643fbbb
[ "MIT" ]
3
2018-09-19T21:32:01.000Z
2020-11-17T00:58:55.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import os import unittest import pure_interface class TestVersionsMatch(unittest.TestCase): def test_versions(self): setup_py = os.path.join(os.path.dirname(__file__), '..', 'setup.cfg') wit...
29.619048
82
0.636656
463
0.744373
0
0
0
0
0
0
86
0.138264
a39ce7f687dbc4302e562228dd957da1ccaaa084
315
py
Python
catalog/bindings/wfs/get_capabilities_2.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/wfs/get_capabilities_2.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/wfs/get_capabilities_2.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from bindings.wfs.get_capabilities_type_2 import GetCapabilitiesType2 __NAMESPACE__ = "http://www.opengis.net/wfs/2.0" @dataclass class GetCapabilities2(GetCapabilitiesType2): class Meta: name = "GetCapabilities" namespace = "http://www.opengis.net/wfs/2.0"
26.25
69
0.755556
147
0.466667
0
0
158
0.501587
0
0
81
0.257143
a39d78970a2b5428929cac47bbcd677dcd4fd411
2,169
py
Python
timeStamps/admin.py
zandegran/django-timeStamp
2c598d5543dc9b9198f41f0712406f22e60d5fa6
[ "MIT" ]
1
2017-12-15T17:36:58.000Z
2017-12-15T17:36:58.000Z
timeStamps/admin.py
zandegran/django-timeStamp
2c598d5543dc9b9198f41f0712406f22e60d5fa6
[ "MIT" ]
null
null
null
timeStamps/admin.py
zandegran/django-timeStamp
2c598d5543dc9b9198f41f0712406f22e60d5fa6
[ "MIT" ]
null
null
null
""" This module is to define how TimeStamp model is represented in the Admin site It also registers the model to be shown in the admin site .. seealso:: :class:`..models.TimeStamp` """ from django.contrib import admin from .models import TimeStamp class FilterUserAdmin(admin.ModelAdmin): """ Makes the ...
32.863636
125
0.654219
1,784
0.822499
0
0
0
0
0
0
1,020
0.470263
a39e36cdbd6fb2489b1dabdf74c900884f32c597
718
py
Python
setup.py
Gearheart-team/django-accounts
e0c2f12d350846fa31143b6dbdb0cf6fa713fb11
[ "MIT" ]
null
null
null
setup.py
Gearheart-team/django-accounts
e0c2f12d350846fa31143b6dbdb0cf6fa713fb11
[ "MIT" ]
null
null
null
setup.py
Gearheart-team/django-accounts
e0c2f12d350846fa31143b6dbdb0cf6fa713fb11
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name='izeni-django-accounts', version='1.1.2a', namespace_packages=['izeni', 'izeni.django'], packages=find_packages(), include_package_data=True, author='Izeni, Inc.', author_email='django-accounts@izeni.com', description=open('README....
29.916667
107
0.637883
0
0
0
0
0
0
0
0
358
0.498607
a39ece0f6a490b1cd3625b5fef325786496075c3
2,973
py
Python
train.py
Saaaber/urban-segmentation
fc893feb9208d3206d7c5329b1ccf4cfab97ed31
[ "MIT" ]
3
2020-11-16T20:21:25.000Z
2021-06-11T13:09:30.000Z
train.py
Saaaber/urban-segmentation
fc893feb9208d3206d7c5329b1ccf4cfab97ed31
[ "MIT" ]
null
null
null
train.py
Saaaber/urban-segmentation
fc893feb9208d3206d7c5329b1ccf4cfab97ed31
[ "MIT" ]
3
2020-11-11T23:43:15.000Z
2022-03-17T09:03:42.000Z
# Copyright (c) Ville de Montreal. All rights reserved. # Licensed under the MIT license. # See LICENSE file in the project root for full license information. import os import json import torch import argparse import datetime from utils.factories import ModelFactory, OptimizerFactory, TrainerFactory if __name__ == "...
33.784091
83
0.636731
0
0
0
0
0
0
0
0
999
0.336024
a3a01913f52507b8c2e9c60bffcef520ae43b4db
1,036
py
Python
pypeit/core/wavecal/spectrographs/templ_soar_goodman.py
rcooke-ast/PYPIT
0cb9c4cb422736b855065a35aefc2bdba6d51dd0
[ "BSD-3-Clause" ]
null
null
null
pypeit/core/wavecal/spectrographs/templ_soar_goodman.py
rcooke-ast/PYPIT
0cb9c4cb422736b855065a35aefc2bdba6d51dd0
[ "BSD-3-Clause" ]
null
null
null
pypeit/core/wavecal/spectrographs/templ_soar_goodman.py
rcooke-ast/PYPIT
0cb9c4cb422736b855065a35aefc2bdba6d51dd0
[ "BSD-3-Clause" ]
null
null
null
""" Generate the wavelength templates for SOAR Goodman""" import os from pypeit.core.wavecal import templates from IPython import embed def soar_goodman_400(overwrite=False): binspec = 2 outroot = 'soar_goodman_400_SYZY.fits' # PypeIt fits wpath = os.path.join(templates.template_path, 'SOAR_Goodman',...
31.393939
85
0.638031
0
0
0
0
0
0
0
0
217
0.209459
a3a1c89d1bcdd899b6c1712a17770e89aa6ef0b0
5,062
py
Python
vivarium/lidar.py
Pyrofoux/vivarium
90c07384929f6c34915f053fd8e95e91358c4e58
[ "MIT" ]
2
2020-10-30T15:28:06.000Z
2022-01-31T17:13:25.000Z
vivarium/lidar.py
Pyrofoux/vivarium
90c07384929f6c34915f053fd8e95e91358c4e58
[ "MIT" ]
null
null
null
vivarium/lidar.py
Pyrofoux/vivarium
90c07384929f6c34915f053fd8e95e91358c4e58
[ "MIT" ]
null
null
null
from simple_playgrounds.entities.agents.sensors.sensor import * from simple_playgrounds.entities.agents.sensors.semantic_sensors import * from collections import defaultdict from pymunk.vec2d import Vec2d import math #@SensorGenerator.register('lidar') class LidarSensor(SemanticSensor): def __init__(self, anchor...
34.435374
111
0.600356
4,806
0.949427
0
0
0
0
0
0
1,483
0.292967
a3a2b31e0b527f3675dc65a92359c7b90836c880
511
py
Python
apilos_settings/models.py
MTES-MCT/apilos
6404b94b0f668e39c1dc12a6421aebd26ef1c98b
[ "MIT" ]
null
null
null
apilos_settings/models.py
MTES-MCT/apilos
6404b94b0f668e39c1dc12a6421aebd26ef1c98b
[ "MIT" ]
2
2021-12-15T05:10:43.000Z
2021-12-15T05:11:00.000Z
apilos_settings/models.py
MTES-MCT/apilos
6404b94b0f668e39c1dc12a6421aebd26ef1c98b
[ "MIT" ]
1
2021-12-28T13:06:06.000Z
2021-12-28T13:06:06.000Z
from django.db import models class Departement(models.Model): id = models.AutoField(primary_key=True) nom = models.CharField(max_length=255, unique=True) code_insee = models.CharField(max_length=3, unique=True) code_postal = models.CharField(max_length=3) def natural_key(self): return (s...
26.894737
60
0.700587
479
0.937378
0
0
0
0
0
0
33
0.064579
a3a3cd19889c828efa32a912a6cda2aa73fb4ca6
4,310
py
Python
bin/allplots.py
Gabaldonlab/karyon
ba81828921b83b553f126892795253be1fd941ba
[ "MIT" ]
null
null
null
bin/allplots.py
Gabaldonlab/karyon
ba81828921b83b553f126892795253be1fd941ba
[ "MIT" ]
2
2021-07-07T08:40:56.000Z
2022-01-06T16:10:27.000Z
bin/allplots.py
Gabaldonlab/karyon
ba81828921b83b553f126892795253be1fd941ba
[ "MIT" ]
null
null
null
#!/bin/python import sys, os, re, subprocess, math import argparse import psutil from pysam import pysam from Bio import SeqIO import numpy as np import numpy.random import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt #import seaborn as sns import pandas as pd import scipy.stats from scipy.stats imp...
35.916667
236
0.710905
0
0
0
0
0
0
0
0
1,143
0.265197
a3a50e8b6b7936872866a8a4572b115958922c08
713
py
Python
console/middleware.py
laincloud/Console
9d4fb68ad5378279697803ca45a4eda58d72d9a3
[ "MIT" ]
11
2016-05-04T11:55:01.000Z
2018-09-29T01:00:05.000Z
console/middleware.py
laincloud/Console
9d4fb68ad5378279697803ca45a4eda58d72d9a3
[ "MIT" ]
21
2016-05-25T06:54:44.000Z
2019-06-06T00:38:38.000Z
console/middleware.py
laincloud/Console
9d4fb68ad5378279697803ca45a4eda58d72d9a3
[ "MIT" ]
16
2016-05-13T08:20:43.000Z
2021-12-31T09:23:14.000Z
# -*- coding: utf-8 from django.http import JsonResponse, HttpResponse # from commons.settings import ARCHON_HOST class CORSMiddleware: def process_request(self, request): if request.method == 'OPTIONS': r = HttpResponse('', content_type='text/plain', status=200) r['Access-Contro...
32.409091
100
0.605891
594
0.8331
0
0
0
0
0
0
267
0.374474
a3a546b361a588aac685878f310be185f371649f
538
py
Python
pypxl/errors.py
Kile/pypxl
0aabe5492386bffc1e246100cb55448bbac521ec
[ "MIT" ]
1
2021-04-02T09:05:33.000Z
2021-04-02T09:05:33.000Z
pypxl/errors.py
Kile/pypxl
0aabe5492386bffc1e246100cb55448bbac521ec
[ "MIT" ]
null
null
null
pypxl/errors.py
Kile/pypxl
0aabe5492386bffc1e246100cb55448bbac521ec
[ "MIT" ]
null
null
null
class PxlapiException(Exception): """ The base exception for anything related to pypxl """ pass class InvalidFlag(PxlapiException): pass class InvalidFilter(PxlapiException): pass class InvalidEyes(PxlapiException): pass class TooManyCharacters(PxlapiException): pass class InvalidSa...
18.551724
75
0.728625
524
0.973978
0
0
0
0
0
0
151
0.280669
a3a5bb350e05522589702afb78e2a9430fe6a8c4
1,061
py
Python
test.py
vinsmokemau/NQueens
7c9291f655b8e4f0ce4c6c5d07a80440f8f2c0a8
[ "MIT" ]
null
null
null
test.py
vinsmokemau/NQueens
7c9291f655b8e4f0ce4c6c5d07a80440f8f2c0a8
[ "MIT" ]
null
null
null
test.py
vinsmokemau/NQueens
7c9291f655b8e4f0ce4c6c5d07a80440f8f2c0a8
[ "MIT" ]
null
null
null
import unittest from algorithm import NQueens class TestNQueens(unittest.TestCase): def test_1_queen(self): self.assertEqual(NQueens(1).solutions, 1) def test_2_queen(self): self.assertEqual(NQueens(2).solutions, 0) def test_3_queen(self): self.assertEqual(NQueens(3).solutions, ...
25.878049
65
0.673893
1,011
0.952875
0
0
0
0
0
0
24
0.02262
6e55e971b17323a0b8342354a7a6ad601469f01e
18,524
py
Python
syntropynac/resolve.py
SyntropyNet/syntropy-nac
8beddcd606d46fd909f51d0c53044be496cec995
[ "MIT" ]
3
2021-01-06T08:24:47.000Z
2021-02-27T08:08:07.000Z
syntropynac/resolve.py
SyntropyNet/syntropy-nac
8beddcd606d46fd909f51d0c53044be496cec995
[ "MIT" ]
null
null
null
syntropynac/resolve.py
SyntropyNet/syntropy-nac
8beddcd606d46fd909f51d0c53044be496cec995
[ "MIT" ]
null
null
null
import functools from dataclasses import dataclass from itertools import combinations import click import syntropy_sdk as sdk from syntropy_sdk import utils from syntropynac.exceptions import ConfigureNetworkError from syntropynac.fields import ALLOWED_PEER_TYPES, ConfigFields, PeerState, PeerType @dataclass class ...
36.608696
125
0.589721
1,401
0.075632
0
0
1,965
0.106079
0
0
5,662
0.305658
6e56c45295d74ab6452768ca7c9600d73e511225
10,298
py
Python
idact/detail/nodes/node_impl.py
garstka/idact
b9c8405c94db362c4a51d6bfdf418b14f06f0da1
[ "MIT" ]
5
2018-12-06T15:40:34.000Z
2019-06-19T11:22:58.000Z
idact/detail/nodes/node_impl.py
garstka/idact
b9c8405c94db362c4a51d6bfdf418b14f06f0da1
[ "MIT" ]
9
2018-12-06T16:35:26.000Z
2019-04-28T19:01:40.000Z
idact/detail/nodes/node_impl.py
garstka/idact
b9c8405c94db362c4a51d6bfdf418b14f06f0da1
[ "MIT" ]
2
2019-04-28T19:18:58.000Z
2019-06-17T06:56:28.000Z
"""This module contains the implementation of the cluster node interface.""" import datetime from typing import Optional, Any, Callable import bitmath import fabric.operations import fabric.tasks import fabric.decorators from fabric.exceptions import CommandTimeout from fabric.state import env from idact.core.retry ...
37.721612
79
0.583026
8,652
0.840163
0
0
1,732
0.168188
0
0
1,457
0.141484
6e5770f83af2ce49e0548c12ebb2126470694c34
2,012
py
Python
geoportal/LUX_alembic/versions/17fb1559a5cd_create_table_for_hierarchy_of_accounts.py
arnaud-morvan/geoportailv3
b9d676cf78e45e12894f7d1ceea99b915562d64f
[ "MIT" ]
17
2015-01-14T08:40:22.000Z
2021-05-08T04:39:50.000Z
geoportal/LUX_alembic/versions/17fb1559a5cd_create_table_for_hierarchy_of_accounts.py
arnaud-morvan/geoportailv3
b9d676cf78e45e12894f7d1ceea99b915562d64f
[ "MIT" ]
1,477
2015-01-05T09:58:41.000Z
2022-03-18T11:07:09.000Z
geoportal/LUX_alembic/versions/17fb1559a5cd_create_table_for_hierarchy_of_accounts.py
arnaud-morvan/geoportailv3
b9d676cf78e45e12894f7d1ceea99b915562d64f
[ "MIT" ]
14
2015-07-24T07:33:13.000Z
2021-03-02T13:51:48.000Z
"""create table for hierarchy of accounts Revision ID: 17fb1559a5cd Revises: 3b7de32aebed Create Date: 2015-09-16 14:20:30.972593 """ # revision identifiers, used by Alembic. revision = '17fb1559a5cd' down_revision = '3b7de32aebed' branch_labels = None depends_on = None from alembic import op, context import sqlalc...
27.944444
73
0.611332
0
0
0
0
0
0
0
0
1,033
0.513419
6e596f23ab56bd2dd8dd6ce01540892f3e46cdad
1,076
py
Python
tests/test_migrate.py
tvcsantos/Flexget
e08ce2957dd4f0668911d1e56347369939e4d0a5
[ "MIT" ]
1
2017-08-25T07:17:04.000Z
2017-08-25T07:17:04.000Z
tests/test_migrate.py
tvcsantos/Flexget
e08ce2957dd4f0668911d1e56347369939e4d0a5
[ "MIT" ]
1
2018-06-09T18:03:35.000Z
2018-06-09T18:03:35.000Z
tests/test_migrate.py
tvcsantos/Flexget
e08ce2957dd4f0668911d1e56347369939e4d0a5
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import import os from tests import FlexGetBase class TestMigrate(FlexGetBase): __yaml__ = """ tasks: test: mock: - {title: 'foobar'} accept_all: yes """ def setup(self): import log...
31.647059
132
0.636617
966
0.89777
0
0
0
0
0
0
529
0.491636
6e5a5481a3630f1bb09ba60f327038cb691a80cf
2,422
py
Python
src/challenges/CtCI/dynamic/P1_triple_step.py
Ursidours/pythonic_interviews
a88e10b82ed2a163dfcc0bfd1d01a9e9e606c045
[ "MIT" ]
2
2021-11-13T01:30:25.000Z
2022-02-11T18:17:22.000Z
src/challenges/CtCI/dynamic/P1_triple_step.py
arnaudblois/pythonic_interviews
a88e10b82ed2a163dfcc0bfd1d01a9e9e606c045
[ "MIT" ]
null
null
null
src/challenges/CtCI/dynamic/P1_triple_step.py
arnaudblois/pythonic_interviews
a88e10b82ed2a163dfcc0bfd1d01a9e9e606c045
[ "MIT" ]
null
null
null
""" Problem 1 of Chapter 8 in CtCi Triple Step: A child is running up a staircase with N steps and can hop either 1 step, 2 steps, or 3 steps at a time. Return the number of possible ways exist this can be done. General idea of the solution: At any step N, the child must necessarily come from the steps N-3, N-2 or N-1...
31.454545
79
0.641618
0
0
0
0
530
0.218827
0
0
1,193
0.492568
6e5a95d6b33481e439c3c6dd74b69db486074c51
117
py
Python
lib/JumpScale/lib/docker/__init__.py
Jumpscale/jumpscale6_core
0502ddc1abab3c37ed982c142d21ea3955d471d3
[ "BSD-2-Clause" ]
1
2015-10-26T10:38:13.000Z
2015-10-26T10:38:13.000Z
lib/JumpScale/lib/docker/__init__.py
Jumpscale/jumpscale6_core
0502ddc1abab3c37ed982c142d21ea3955d471d3
[ "BSD-2-Clause" ]
null
null
null
lib/JumpScale/lib/docker/__init__.py
Jumpscale/jumpscale6_core
0502ddc1abab3c37ed982c142d21ea3955d471d3
[ "BSD-2-Clause" ]
null
null
null
from JumpScale import j j.base.loader.makeAvailable(j, 'tools') from Docker import Docker j.tools.docker = Docker()
19.5
39
0.769231
0
0
0
0
0
0
0
0
7
0.059829
6e5ab1e623f341546ab1d75882702a30b02894e2
3,704
py
Python
scenes/capture/motor_pi/stepper/motorclient.py
tum-pbs/reconstructScalarFlows
948efeaa99b90c3879f9fb544da9a596b0cb5852
[ "Apache-2.0" ]
null
null
null
scenes/capture/motor_pi/stepper/motorclient.py
tum-pbs/reconstructScalarFlows
948efeaa99b90c3879f9fb544da9a596b0cb5852
[ "Apache-2.0" ]
1
2020-02-20T12:37:38.000Z
2020-02-20T17:04:53.000Z
scenes/capture/motor_pi/stepper/motorclient.py
tum-pbs/reconstructScalarFlows
948efeaa99b90c3879f9fb544da9a596b0cb5852
[ "Apache-2.0" ]
3
2020-01-23T04:32:46.000Z
2020-02-20T05:48:36.000Z
#!/usr/bin/env python2 import sys import socket import datetime import math import time from time import sleep # The c binary for controlling the stepper motor is loaded via ctypes from ctypes import * stepper_lib = cdll.LoadLibrary('./stepper.so') # buffer containing the incomplete commands recvBuffer = str() # ...
23.896774
78
0.560475
0
0
0
0
0
0
0
0
1,435
0.387419
6e5d48ba91cb1100ebbf354d7f7d6405aa099be0
20,335
py
Python
bots/invaders/agent.py
alv67/Lux-AI-challenge
4fdd623a8ff578f769a6925ec0200170f84d4737
[ "MIT" ]
null
null
null
bots/invaders/agent.py
alv67/Lux-AI-challenge
4fdd623a8ff578f769a6925ec0200170f84d4737
[ "MIT" ]
27
2021-10-17T22:46:41.000Z
2021-12-05T23:41:19.000Z
bots/invaders/agent.py
alv67/Lux-AI-challenge
4fdd623a8ff578f769a6925ec0200170f84d4737
[ "MIT" ]
3
2021-11-14T19:22:16.000Z
2021-12-04T06:46:33.000Z
import os import math import sys from typing import List, Tuple # for kaggle-environments from abn.game_ext import GameExtended from abn.jobs import Task, Job, JobBoard from abn.actions import Actions from lux.game_map import Position, Cell, RESOURCE_TYPES from lux.game_objects import City from lux.game_constants impo...
47.847059
126
0.503369
0
0
0
0
0
0
0
0
4,336
0.213218
6e5de644fd911fb842013165cff69e62361a9159
12,503
py
Python
PySRCG/src/Tabs/cyberware_tab.py
apampuch/PySRCG
bb3777aed3517b473e5860336c015e2e8d0905e9
[ "MIT" ]
null
null
null
PySRCG/src/Tabs/cyberware_tab.py
apampuch/PySRCG
bb3777aed3517b473e5860336c015e2e8d0905e9
[ "MIT" ]
null
null
null
PySRCG/src/Tabs/cyberware_tab.py
apampuch/PySRCG
bb3777aed3517b473e5860336c015e2e8d0905e9
[ "MIT" ]
null
null
null
from copy import copy from tkinter import * from tkinter import ttk from src import app_data from src.CharData.augment import Cyberware from src.Tabs.notebook_tab import NotebookTab from src.statblock_modifier import StatMod from src.utils import treeview_get, recursive_treeview_fill, calculate_attributes, get_variabl...
38.589506
116
0.589698
11,965
0.95697
0
0
362
0.028953
0
0
2,406
0.192434
6e5f43493f76b33f089dfbae79e524b7b68ad4b5
337
py
Python
myapp/mymetric/my-metric.py
affoliveira/hiring-engineers
4064d8c7b6cead9a88197e95fcd6a0f2395e4d44
[ "Apache-2.0" ]
null
null
null
myapp/mymetric/my-metric.py
affoliveira/hiring-engineers
4064d8c7b6cead9a88197e95fcd6a0f2395e4d44
[ "Apache-2.0" ]
null
null
null
myapp/mymetric/my-metric.py
affoliveira/hiring-engineers
4064d8c7b6cead9a88197e95fcd6a0f2395e4d44
[ "Apache-2.0" ]
null
null
null
from datadog import initialize, statsd import time import random import os options = { 'statsd_host':os.environ['DD_AGENT_HOST'], 'statsd_port':8125 } initialize(**options) i = 0 while(1): i += 1 r = random.randint(0, 1000) statsd.gauge('mymetric',r , tags=["environment:dev"]) time.sleep(int(os.envi...
17.736842
55
0.68546
0
0
0
0
0
0
0
0
78
0.231454
6e5f8bfb8859c97984af510e67f81278396d3ad6
277
py
Python
1 ano/logica-de-programacao/list-telefone-lucio.py
ThiagoPereira232/tecnico-informatica
6b55ecf34501b38052943acf1b37074e3472ce6e
[ "MIT" ]
1
2021-09-24T16:26:04.000Z
2021-09-24T16:26:04.000Z
1 ano/logica-de-programacao/list-telefone-lucio.py
ThiagoPereira232/tecnico-informatica
6b55ecf34501b38052943acf1b37074e3472ce6e
[ "MIT" ]
null
null
null
1 ano/logica-de-programacao/list-telefone-lucio.py
ThiagoPereira232/tecnico-informatica
6b55ecf34501b38052943acf1b37074e3472ce6e
[ "MIT" ]
null
null
null
n = [0,0,0,0,0,0,0,0,0,0] t = [0,0,0,0,0,0,0,0,0,0] c=0 while(c<10): n[c]=input("Digite o nome") t[c]=input("Digite o telefone") c+=1 const="" while(const!="fim"): cons=input("Digite nome a consultar") if(n[c]==const): print(f"TEl: {t[c]}") c+=1
21.307692
41
0.516245
0
0
0
0
0
0
0
0
80
0.288809
6e61986199cea39f158bd8be59e6773d5f58be23
8,979
py
Python
serve_tiny_performance_mdrnn.py
cpmpercussion/robojam
8f9524be0ad850bdfc0c3459b0e4b677f5f70a84
[ "MIT" ]
10
2017-11-18T04:01:03.000Z
2022-03-06T21:07:09.000Z
serve_tiny_performance_mdrnn.py
cpmpercussion/robojam
8f9524be0ad850bdfc0c3459b0e4b677f5f70a84
[ "MIT" ]
17
2018-06-12T20:54:40.000Z
2022-02-09T23:27:24.000Z
serve_tiny_performance_mdrnn.py
cpmpercussion/robojam
8f9524be0ad850bdfc0c3459b0e4b677f5f70a84
[ "MIT" ]
2
2017-12-05T23:39:42.000Z
2018-06-13T13:46:33.000Z
#!/usr/bin/env python3 """A flask server for Robojam""" import json import time from io import StringIO import pandas as pd import tensorflow as tf import robojam from tensorflow.compat.v1.keras import backend as K from flask import Flask, request from flask_cors import CORS # Start server. tf.compat.v1.logging.set_v...
121.337838
1,670
0.702639
0
0
0
0
1,221
0.135984
0
0
7,251
0.807551
6e63b1a8022fa7d3c4dd2cc0d17b00043e002831
1,024
py
Python
youtube_sync/tasks.py
abhayagiri/youtube-sync
ce3861f1b0c1448b1d48e5ba17925f5c082f04a2
[ "MIT" ]
null
null
null
youtube_sync/tasks.py
abhayagiri/youtube-sync
ce3861f1b0c1448b1d48e5ba17925f5c082f04a2
[ "MIT" ]
null
null
null
youtube_sync/tasks.py
abhayagiri/youtube-sync
ce3861f1b0c1448b1d48e5ba17925f5c082f04a2
[ "MIT" ]
null
null
null
from datetime import datetime import os import re import subprocess from . import app, celery, db from .database import Job @celery.task() def make_audio(youtube_id): worker_path = os.path.join(app.root_path, 'worker.sh') env = { 'DYNAMIC_AUDIO_NORMALIZER_BIN': app.config['DYNAMIC_AUDIO_NORMALIZER_BI...
26.947368
84
0.682617
0
0
0
0
321
0.313477
0
0
128
0.125
6e6b8e97a66c01a64f2cca3a534d23843f440130
560
py
Python
setup.py
garethrylance/python-sdk-example
3f21c3a6c28f46050688ce1be66e33433a801e7c
[ "CC0-1.0" ]
null
null
null
setup.py
garethrylance/python-sdk-example
3f21c3a6c28f46050688ce1be66e33433a801e7c
[ "CC0-1.0" ]
null
null
null
setup.py
garethrylance/python-sdk-example
3f21c3a6c28f46050688ce1be66e33433a801e7c
[ "CC0-1.0" ]
null
null
null
from setuptools import setup setup( name="python-sdk-example", version="0.1", description="The dispatch model loader - lambda part.", url="https://github.com/garethrylance/python-sdk-example", author="Gareth Rylance", author_email="gareth@rylance.me.uk", packages=["example_sdk"], instal...
31.111111
82
0.671429
0
0
0
0
0
0
0
0
271
0.483929
6e6bf3bcb9f6b04ecf66cf6829603687c806b677
4,140
py
Python
markov.py
themichaelusa/zuckerkov
d68780f987b3f032d6382ea75118c84e7f205a39
[ "MIT" ]
1
2020-03-17T23:34:17.000Z
2020-03-17T23:34:17.000Z
markov.py
themichaelusa/zuckerkov
d68780f987b3f032d6382ea75118c84e7f205a39
[ "MIT" ]
null
null
null
markov.py
themichaelusa/zuckerkov
d68780f987b3f032d6382ea75118c84e7f205a39
[ "MIT" ]
null
null
null
### IMPORTS import json import glob import string import random import spacy from spacy.lang.en.stop_words import STOP_WORDS import markovify ### CONSTANTS/GLOBALS/LAMBDAS SYMBOLS_TO_RM = tuple(list(string.punctuation) + ['\xad']) NUMBERS_TO_RM = tuple(string.digits) spacy.prefer_gpu() NLP_ENGINE = spacy.load("en_c...
23
67
0.717874
0
0
0
0
0
0
0
0
1,176
0.284058
6e6ceb4b1bd05af797219ac67e3f71b01f520394
6,211
py
Python
src/cnf_shuffler.py
jreeves3/BiPartGen-Artifact
d7c6db628cad25701a398da67ab87bb725513a61
[ "MIT" ]
null
null
null
src/cnf_shuffler.py
jreeves3/BiPartGen-Artifact
d7c6db628cad25701a398da67ab87bb725513a61
[ "MIT" ]
null
null
null
src/cnf_shuffler.py
jreeves3/BiPartGen-Artifact
d7c6db628cad25701a398da67ab87bb725513a61
[ "MIT" ]
null
null
null
#/********************************************************************************** # Copyright (c) 2021 Joseph Reeves and Cayden Codel, Carnegie Mellon University # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and # associated documentation files (the "Software"), t...
34.893258
101
0.605378
0
0
0
0
0
0
0
0
2,694
0.433747
6e6dbb5cefe12073382965816c2a9d3f10ed725c
4,171
py
Python
test/app_page_scraper_test.py
googleinterns/betel
2daa56081ccc753f5b7eafbd1e9a48e3aca4b657
[ "Apache-2.0" ]
1
2020-09-21T12:52:33.000Z
2020-09-21T12:52:33.000Z
test/app_page_scraper_test.py
googleinterns/betel
2daa56081ccc753f5b7eafbd1e9a48e3aca4b657
[ "Apache-2.0" ]
null
null
null
test/app_page_scraper_test.py
googleinterns/betel
2daa56081ccc753f5b7eafbd1e9a48e3aca4b657
[ "Apache-2.0" ]
1
2020-07-31T09:55:33.000Z
2020-07-31T09:55:33.000Z
import pathlib import pytest from betel import app_page_scraper from betel import betel_errors from betel import utils ICON_HTML = """ <img src="%s" class="T75of sHb2Xb"> """ CATEGORY_HTML = """ <a itemprop="genre">Example</a> """ FILTERED_CATEGORY_HTML = """ <a itemprop="genre">Filtered</a> """ SIMPLE_HTML = """ <...
28.182432
86
0.714217
2,783
0.667226
0
0
459
0.110046
0
0
479
0.114841