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
9514c9647a31509619c43b943b315ef73a1f481a
1,192
py
Python
tests/test_hw02.py
timm/sinless-swe
b331b9bf4d27fdf357ce8a5ce54f9858103fd64f
[ "MIT" ]
null
null
null
tests/test_hw02.py
timm/sinless-swe
b331b9bf4d27fdf357ce8a5ce54f9858103fd64f
[ "MIT" ]
null
null
null
tests/test_hw02.py
timm/sinless-swe
b331b9bf4d27fdf357ce8a5ce54f9858103fd64f
[ "MIT" ]
2
2021-08-29T19:26:19.000Z
2021-09-20T17:44:27.000Z
import os import sys sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/..")) from src.hw2 import csv_reader def testCsvReader(): expectedResult = [['outlook', 'Temp', '?Humidity', 'windy', 'Wins+', 'Play-'], ['sunny', 85, 85, 'FALSE', 10, 20], ['sunny', 80, 90, ...
45.846154
82
0.452181
0
0
0
0
0
0
0
0
259
0.217282
9514f668db331c946ecbf660cfa6375f54adec5b
2,462
py
Python
hyperdeck.py
FlantasticDan/hyperdeck-replay
5d5a62c9342c4e552e6a2d44dbe85cb3dba49f28
[ "MIT" ]
1
2021-09-06T15:02:34.000Z
2021-09-06T15:02:34.000Z
hyperdeck.py
FlantasticDan/hyperdeck-replay
5d5a62c9342c4e552e6a2d44dbe85cb3dba49f28
[ "MIT" ]
null
null
null
hyperdeck.py
FlantasticDan/hyperdeck-replay
5d5a62c9342c4e552e6a2d44dbe85cb3dba49f28
[ "MIT" ]
null
null
null
from telnetlib import Telnet from threading import Thread class Hyperdeck: def __init__(self, ip_address, id) -> None: self.deck = Telnet(ip_address, 9993) self.id = id self.thread = Thread(target=self.listener) self.thread.start() def listener(self): while True: ...
34.676056
79
0.553209
2,398
0.974005
0
0
0
0
0
0
687
0.279041
95150abc9ac26ff15d14447cfaa884078a1c20b0
2,215
py
Python
tensorwatch/repeated_timer.py
sytelus/longview
686e43cf187eaf55df18949359fd63d57dc337b2
[ "MIT" ]
3,453
2019-05-22T15:01:23.000Z
2022-03-31T07:50:41.000Z
tensorwatch/repeated_timer.py
wgxcow/tensorwatch
142f83a7cb8c54e47e9bab06cb3a1ef8ae225422
[ "MIT" ]
69
2019-05-22T17:11:20.000Z
2022-03-03T09:32:38.000Z
tensorwatch/repeated_timer.py
wgxcow/tensorwatch
142f83a7cb8c54e47e9bab06cb3a1ef8ae225422
[ "MIT" ]
375
2019-05-22T17:10:33.000Z
2022-03-24T07:43:07.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import threading import time import weakref class RepeatedTimer: class State: Stopped=0 Paused=1 Running=2 def __init__(self, secs, callback, count=None): self.secs = secs self.callback = weakref....
31.197183
99
0.602709
2,096
0.946275
0
0
0
0
0
0
126
0.056885
9515d87797c5883ffb46a5046c9382bbdb71bc8f
1,037
py
Python
pushpy_examples/client/tasks/schedule/c_local_schedule.py
briangu/push-examples
3acf00d9f63523010ee3b70f3117d1be686c3335
[ "MIT" ]
null
null
null
pushpy_examples/client/tasks/schedule/c_local_schedule.py
briangu/push-examples
3acf00d9f63523010ee3b70f3117d1be686c3335
[ "MIT" ]
null
null
null
pushpy_examples/client/tasks/schedule/c_local_schedule.py
briangu/push-examples
3acf00d9f63523010ee3b70f3117d1be686c3335
[ "MIT" ]
null
null
null
import time from pushpy_examples.client.ex_push_manager import ExamplePushManager m = ExamplePushManager() m.connect() class ScheduleTask: def apply(self, control): import schedule import time def job(): print(f"I'm working...{time.time()}") schedule.clear() ...
24.690476
69
0.633558
662
0.63838
0
0
0
0
0
0
388
0.374156
951662a92b08b48e3775881d06dfdde6053f3486
453
py
Python
leetcode/weekly154/balloons.py
jan25/code_sorted
f405fd0898f72eb3d5428f9e10aefb4a009d5089
[ "Unlicense" ]
2
2018-01-18T11:01:36.000Z
2021-12-20T18:14:48.000Z
leetcode/weekly154/balloons.py
jan25/code_sorted
f405fd0898f72eb3d5428f9e10aefb4a009d5089
[ "Unlicense" ]
null
null
null
leetcode/weekly154/balloons.py
jan25/code_sorted
f405fd0898f72eb3d5428f9e10aefb4a009d5089
[ "Unlicense" ]
null
null
null
''' https://leetcode.com/contest/weekly-contest-154/problems/maximum-number-of-balloons/ ''' class Solution: def maxNumberOfBalloons(self, text: str) -> int: m = {} for c in text: if c not in m: m[c] = 0 m[c] += 1 ans = len(text) for c in 'lo': if ...
28.3125
84
0.479029
360
0.794702
0
0
0
0
0
0
103
0.227373
9516843db83caf5de14579548efc7a35483c1024
3,100
py
Python
app/cache/basic.py
JunyongYao/flask-backend-seed
9d16f56a9f34ebb1ec32eaab800b7ad6b10d0c9d
[ "MIT" ]
9
2017-10-20T09:26:09.000Z
2021-01-28T02:54:43.000Z
app/cache/basic.py
JunyongYao/flask-backend-seed
9d16f56a9f34ebb1ec32eaab800b7ad6b10d0c9d
[ "MIT" ]
2
2018-03-06T06:27:53.000Z
2018-04-19T01:47:38.000Z
app/cache/basic.py
JunyongYao/flask-backend-seed
9d16f56a9f34ebb1ec32eaab800b7ad6b10d0c9d
[ "MIT" ]
2
2019-07-18T22:32:28.000Z
2020-06-15T14:10:29.000Z
# -*- coding: utf-8 -*- import logging import pickle from abc import ABCMeta, abstractmethod from app import redis from app.cache import set_dict_if_key_expire, set_data_if_key_expire, set_redis_dict_with_timeout, \ set_redis_data_with_timeout from task.asyncTask import refresh_cache class CacheABC(object, meta...
32.978723
120
0.684516
2,800
0.903226
0
0
907
0.292581
0
0
572
0.184516
9518a93eb1a74edc2a091b88692ed0896329bfe9
38,343
py
Python
fraudbot.py
DocGrishka/tetstsss
9e594333306e6ea8c13f0c81aa5ccb05bc7e9e5e
[ "MIT" ]
null
null
null
fraudbot.py
DocGrishka/tetstsss
9e594333306e6ea8c13f0c81aa5ccb05bc7e9e5e
[ "MIT" ]
null
null
null
fraudbot.py
DocGrishka/tetstsss
9e594333306e6ea8c13f0c81aa5ccb05bc7e9e5e
[ "MIT" ]
null
null
null
import discord import sqlite3 import random import requests import pymorphy2 from itertools import product # база, в которой будут храниться заработанные очки и статус отношений бота с пользователем - играет оно и во что, # или просто общается class Bnc: def __init__(self): random.seed(self.ge...
68.469643
122
0.463683
46,927
0.990627
0
0
1,046
0.022081
40,365
0.852104
22,532
0.47565
9518dbb4f02a3d9f4f06a63e879638510aa4fe07
31,698
py
Python
iocage/lib/ioc_json.py
project-fifo/iocage
1b8669bc2119718dbea8f2707a4eb4c92197c0f0
[ "BSD-2-Clause" ]
null
null
null
iocage/lib/ioc_json.py
project-fifo/iocage
1b8669bc2119718dbea8f2707a4eb4c92197c0f0
[ "BSD-2-Clause" ]
null
null
null
iocage/lib/ioc_json.py
project-fifo/iocage
1b8669bc2119718dbea8f2707a4eb4c92197c0f0
[ "BSD-2-Clause" ]
1
2022-03-06T10:09:18.000Z
2022-03-06T10:09:18.000Z
"""Convert, load or write JSON.""" import json import logging import os import re import sys from os import geteuid, path from subprocess import CalledProcessError, PIPE, Popen, STDOUT, check_call from iocage.lib.ioc_common import checkoutput, get_nested_key, open_atomic def _get_pool_and_iocroot(): """For inter...
39.573034
81
0.430942
31,213
0.984699
0
0
139
0.004385
0
0
8,348
0.26336
951a6328f58a32b162e3ef00d555a91633c30955
6,913
py
Python
FP/V46_faraday_effect/plot.py
nsalewski/laboratory
e30d187a3f5227d5e228b0132c3de4d426d85ffb
[ "MIT" ]
1
2021-05-05T23:00:28.000Z
2021-05-05T23:00:28.000Z
FP/V46_faraday_effect/plot.py
nsalewski/laboratory
e30d187a3f5227d5e228b0132c3de4d426d85ffb
[ "MIT" ]
null
null
null
FP/V46_faraday_effect/plot.py
nsalewski/laboratory
e30d187a3f5227d5e228b0132c3de4d426d85ffb
[ "MIT" ]
null
null
null
#!usr/bin/env python3 #coding:utf8 import matplotlib.pyplot as plt import numpy as np from scipy.optimize import curve_fit from astropy.io import ascii from uncertainties import ufloat import uncertainties.unumpy as unp from modules.table import textable import scipy.constants as const import math as math from modules....
43.20625
613
0.707363
0
0
0
0
0
0
0
0
2,730
0.39468
951a6b980e66f06393b5c53d18d14db57345b12d
2,256
py
Python
hackzurich_py/test_hist_threshold.py
ejoebstl/hackzurich16
81a3b302050a4a464e2191c1d0912f8038c26ed9
[ "MIT" ]
null
null
null
hackzurich_py/test_hist_threshold.py
ejoebstl/hackzurich16
81a3b302050a4a464e2191c1d0912f8038c26ed9
[ "MIT" ]
null
null
null
hackzurich_py/test_hist_threshold.py
ejoebstl/hackzurich16
81a3b302050a4a464e2191c1d0912f8038c26ed9
[ "MIT" ]
null
null
null
import os import matplotlib.pyplot as plt import numpy as np import cv2 filedir = '/Users/gabrielfior/Dropbox/Hackzurich16/pupils_cutout/' readbgr = filedir+'left_pupil232.bmp' frame = plt.imread(readbgr) white=plt.imread('/Users/gabrielfior/Dropbox/Hackzurich16/pupils_bw/right_pupil61.bmp') black=plt.imread('/Users/...
23.747368
88
0.626773
0
0
0
0
0
0
0
0
459
0.203457
951fd4c03bbcd55fdd4eaa4cf1d74e5f3dba25ea
496
py
Python
Lyft-Dental/Django-WebRtc/home/views.py
Abhik1998/Lyft-sample_project
3f9a79fb86c7abee713ae37245f5e7971be09139
[ "MIT" ]
1
2021-01-09T08:42:24.000Z
2021-01-09T08:42:24.000Z
Lyft-Dental/Django-WebRtc/home/views.py
Abhik1998/Lyft-sample_project
3f9a79fb86c7abee713ae37245f5e7971be09139
[ "MIT" ]
null
null
null
Lyft-Dental/Django-WebRtc/home/views.py
Abhik1998/Lyft-sample_project
3f9a79fb86c7abee713ae37245f5e7971be09139
[ "MIT" ]
null
null
null
from django.shortcuts import render from chat.models import * # Create your views here. def home(request): chat = ChatMessage.objects.all() return render(request,'common/home.html', {'chat':chat}) def video(request): return render(request,'video.html') def video3(request): return render(request,'video3.html') ...
20.666667
57
0.745968
0
0
0
0
0
0
0
0
112
0.225806
9520fdc9ead572486f8211683471cb168ee795b7
6,113
py
Python
Spatial_Scripts/2_gtfs_arnold_stops.py
VolpeUSDOT/gtfs-measures
0530d3c7193f10d591edd446d7e4985d03a7c48a
[ "CC0-1.0" ]
3
2019-08-29T13:31:14.000Z
2021-06-18T06:10:06.000Z
Spatial_Scripts/2_gtfs_arnold_stops.py
VolpeUSDOT/gtfs-measures
0530d3c7193f10d591edd446d7e4985d03a7c48a
[ "CC0-1.0" ]
null
null
null
Spatial_Scripts/2_gtfs_arnold_stops.py
VolpeUSDOT/gtfs-measures
0530d3c7193f10d591edd446d7e4985d03a7c48a
[ "CC0-1.0" ]
null
null
null
#------------------------------------------------------------------------------- # Name: GTFS_Arnold_Stops # # Purpose: Associate stops with the route shapes that have already been snapped to ARNOLD # # Author: Alex Oberg and Gary Baker # # Created: 10/17/2016 # # Last updated 6/15/2017 #---------------------------...
33.773481
154
0.648454
0
0
0
0
0
0
0
0
3,559
0.582202
9521b11ea24c3b1975d9331d56438810a026e0f3
14,298
py
Python
tensorflow_federated/python/research/baselines/emnist/models.py
khramtsova/federated
88b3ca65204a9922696ccefd774ece03ebf5cc8e
[ "Apache-2.0" ]
1
2019-10-10T06:19:52.000Z
2019-10-10T06:19:52.000Z
tensorflow_federated/python/research/baselines/emnist/models.py
khramtsova/federated
88b3ca65204a9922696ccefd774ece03ebf5cc8e
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/research/baselines/emnist/models.py
khramtsova/federated
88b3ca65204a9922696ccefd774ece03ebf5cc8e
[ "Apache-2.0" ]
2
2019-10-10T06:19:41.000Z
2021-01-28T03:06:55.000Z
# Lint as: python3 # Copyright 2019, The TensorFlow Federated Authors. # # 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.873171
80
0.665268
0
0
0
0
0
0
0
0
8,832
0.617709
9522282432e0e76392916180e81134140fe248cd
893
py
Python
iterdeciser/loader.py
mpavlase/responses-form-evaluator
d0066a44c078ece458ae44577afc207583116638
[ "MIT" ]
1
2020-02-19T00:39:10.000Z
2020-02-19T00:39:10.000Z
iterdeciser/loader.py
mpavlase/responses-form-evaluator
d0066a44c078ece458ae44577afc207583116638
[ "MIT" ]
null
null
null
iterdeciser/loader.py
mpavlase/responses-form-evaluator
d0066a44c078ece458ae44577afc207583116638
[ "MIT" ]
null
null
null
import csv from iterdeciser import models def data_loader(filename): with open(filename, newline='') as fd: reader = csv.reader(fd, delimiter=',', quotechar='"') # remove all previous entries models.Answer.objects.all().delete() models.Question.objects.all().delete() model...
27.060606
61
0.555431
0
0
0
0
0
0
0
0
37
0.041433
95258effa24ad7ea4b397bc2159a4af1349e68bd
6,146
py
Python
adapter.py
jain-harshil/Adapter-BERT
fd74ed0eea21b13034f9a834244191846de6b8d5
[ "Apache-2.0" ]
4
2021-03-14T23:02:14.000Z
2022-02-14T10:10:12.000Z
adapter.py
jain-harshil/Adapter-BERT
fd74ed0eea21b13034f9a834244191846de6b8d5
[ "Apache-2.0" ]
null
null
null
adapter.py
jain-harshil/Adapter-BERT
fd74ed0eea21b13034f9a834244191846de6b8d5
[ "Apache-2.0" ]
2
2020-10-12T09:04:55.000Z
2021-11-13T03:54:55.000Z
import torch from torch import nn from transformers.modeling_bert import BertIntermediate, BertOutput, BertLayer, BertEncoder, BertModel, BertForSequenceClassification def get_nonlin_func(nonlin): if nonlin == "tanh": return torch.tanh elif nonlin == "relu": return torch.relu elif nonlin =...
35.94152
134
0.678653
5,560
0.904653
0
0
0
0
0
0
344
0.055971
9527282622ce1b8a8057c23be87132dc48225952
125
py
Python
test/integration_test/exampleProject/test_module.py
thusoy/grunt-pylint
1911144b76b144c991e721c794640c06101a8bf1
[ "MIT" ]
9
2015-03-04T22:35:49.000Z
2018-08-16T00:51:24.000Z
test/integration_test/exampleProject/test_module.py
thusoy/grunt-pylint
1911144b76b144c991e721c794640c06101a8bf1
[ "MIT" ]
10
2015-03-05T14:09:53.000Z
2019-04-13T21:48:05.000Z
test/integration_test/exampleProject/test_module.py
thusoy/grunt-pylint
1911144b76b144c991e721c794640c06101a8bf1
[ "MIT" ]
5
2015-03-04T16:25:05.000Z
2018-08-13T10:49:47.000Z
""" This module is used for integration testing. """ # pylint: disable=locally-disabled,unused-import import venv_exclusive
25
52
0.776
0
0
0
0
0
0
0
0
100
0.8
95277c92e91076992bcacdf611aab098dd6f15f0
3,837
py
Python
models/pixelpick/networks/deeplab.py
martafdezmAM/lessen_supervision
630dfea2e396b9b6f61a3ad6786bb3ee169da3fd
[ "MIT" ]
49
2021-04-08T07:45:13.000Z
2022-03-08T03:20:30.000Z
networks/deeplab.py
leiyu1980/PixelPick
f0ae7d35f62c1dda70f5bff1689177a513ab6259
[ "MIT" ]
5
2021-04-21T02:13:47.000Z
2022-03-30T12:06:36.000Z
networks/deeplab.py
leiyu1980/PixelPick
f0ae7d35f62c1dda70f5bff1689177a513ab6259
[ "MIT" ]
15
2021-04-14T01:15:06.000Z
2022-03-25T05:05:36.000Z
import os import torch import torch.nn as nn import torch.nn.functional as F from .aspp import ASPP from .decoders import SegmentHead from .mobilenet_v2 import MobileNetV2 class DeepLab(nn.Module): def __init__(self, args, backbone='mobilenet', output_stride=16...
37.990099
111
0.584832
3,677
0.954321
787
0.204256
0
0
0
0
405
0.105113
95291ef04782317ff7c65177e450a86cba814b66
1,224
py
Python
examples/top_view.py
ryan-mooore/anvil-parser
f2da8e0b7ca84ace49da8c6784363d914b2ca93d
[ "MIT" ]
70
2019-08-12T18:46:09.000Z
2022-02-22T12:37:29.000Z
examples/top_view.py
ryan-mooore/anvil-parser
f2da8e0b7ca84ace49da8c6784363d914b2ca93d
[ "MIT" ]
24
2020-01-20T04:15:59.000Z
2022-03-13T20:49:55.000Z
examples/top_view.py
ryan-mooore/anvil-parser
f2da8e0b7ca84ace49da8c6784363d914b2ca93d
[ "MIT" ]
33
2019-12-06T19:22:10.000Z
2022-03-28T17:08:56.000Z
""" Generates a image of the top view of a chunk Needs a textures folder with a block folder inside """ import sys if len(sys.argv) == 1: print('You must give a region file') exit() else: region = sys.argv[1] chx = int(sys.argv[2]) chz = int(sys.argv[3]) import os from PIL import Image import _path ...
26.042553
63
0.555556
0
0
0
0
0
0
0
0
205
0.167484
95293f8eba3bae03a2ebdf267114cb3e46a7731e
2,468
py
Python
readthedocs/worker.py
yarons/readthedocs.org
05c99a0adc222a1d48654d305b492ec142c3026b
[ "MIT" ]
4,054
2015-01-01T00:58:07.000Z
2019-06-28T05:50:49.000Z
readthedocs/worker.py
yarons/readthedocs.org
05c99a0adc222a1d48654d305b492ec142c3026b
[ "MIT" ]
4,282
2015-01-01T21:38:49.000Z
2019-06-28T15:41:00.000Z
readthedocs/worker.py
yarons/readthedocs.org
05c99a0adc222a1d48654d305b492ec142c3026b
[ "MIT" ]
3,224
2015-01-01T07:38:45.000Z
2019-06-28T09:19:10.000Z
"""Celery worker application instantiation.""" import os from celery import Celery from django.conf import settings from django_structlog.celery.steps import DjangoStructLogInitStep def create_application(): """Create a Celery application using Django settings.""" os.environ.setdefault( 'DJANGO_SET...
32.473684
77
0.715559
0
0
0
0
0
0
0
0
1,796
0.727715
952983a05bf28fe82e2cd622f5d71bbde9e46c7c
876
py
Python
tr_converter.py
EFatihAydin/contverter_error_utf8
971035644425af69d48b869d0de1668127843f01
[ "MIT" ]
null
null
null
tr_converter.py
EFatihAydin/contverter_error_utf8
971035644425af69d48b869d0de1668127843f01
[ "MIT" ]
null
null
null
tr_converter.py
EFatihAydin/contverter_error_utf8
971035644425af69d48b869d0de1668127843f01
[ "MIT" ]
null
null
null
file = open("./data.txt" , encoding = 'utf-8') data = file.readlines() liste=[] for string in data: string=string.replace('ü','ü') string=string.replace('ÅŸ','ş') string=string.replace('ÄŸ','ğ') string=string.replace('ç','ç') string=string.replace('ı','ı') string=string.replace('ö','ö') strin...
27.375
63
0.615297
0
0
0
0
0
0
0
0
216
0.233261
952d81863666bd0aa65ead158b3c1300284fe4e6
1,485
py
Python
example/simple_example/example_models.py
kun-fang/avro-data-model
1a657e20e666b534d0196888ae580ad7caddadeb
[ "MIT" ]
9
2019-03-28T16:31:33.000Z
2022-02-18T03:22:50.000Z
example/simple_example/example_models.py
kun-fang/avro-data-model
1a657e20e666b534d0196888ae580ad7caddadeb
[ "MIT" ]
3
2019-06-17T17:09:38.000Z
2021-05-14T03:06:00.000Z
example/simple_example/example_models.py
kun-fang/avro-data-model
1a657e20e666b534d0196888ae580ad7caddadeb
[ "MIT" ]
2
2019-04-11T18:26:52.000Z
2022-02-18T03:22:52.000Z
import datetime import os from avro_models import avro_schema, AvroModelContainer EXAMPLE_NAMES = AvroModelContainer(default_namespace="example.avro") DIRNAME = os.path.dirname(os.path.realpath(__file__)) @avro_schema( EXAMPLE_NAMES, schema_file=os.path.join(DIRNAME, "Date.avsc")) class Date(object): d...
23.203125
71
0.641077
857
0.577104
0
0
1,262
0.849832
0
0
146
0.098316
952e3eae671c4397df0072361e08791772e8f4d1
5,401
py
Python
src/lib/Server/Reports/settings.py
pcmxgti/bcfg2
33aaf9c6bbeb0d20eef084b1347a0fce42086663
[ "mpich2" ]
null
null
null
src/lib/Server/Reports/settings.py
pcmxgti/bcfg2
33aaf9c6bbeb0d20eef084b1347a0fce42086663
[ "mpich2" ]
null
null
null
src/lib/Server/Reports/settings.py
pcmxgti/bcfg2
33aaf9c6bbeb0d20eef084b1347a0fce42086663
[ "mpich2" ]
null
null
null
import django import sys # Compatibility import from Bcfg2.Bcfg2Py3k import ConfigParser # Django settings for bcfg2 reports project. c = ConfigParser.ConfigParser() if len(c.read(['/etc/bcfg2.conf', '/etc/bcfg2-web.conf'])) == 0: raise ImportError("Please check that bcfg2.conf or bcfg2-web.conf exists " ...
33.339506
79
0.695797
0
0
0
0
0
0
0
0
3,256
0.602851
95300a9bbee2d9246ae4298544114b63521e0cfa
2,851
py
Python
arachne/lingo.py
Darumin/arachne
ddae1c9f47e177941a6d6deed84357cbf41ad116
[ "MIT" ]
1
2020-08-24T05:19:05.000Z
2020-08-24T05:19:05.000Z
arachne/lingo.py
Darumin/arachne
ddae1c9f47e177941a6d6deed84357cbf41ad116
[ "MIT" ]
null
null
null
arachne/lingo.py
Darumin/arachne
ddae1c9f47e177941a6d6deed84357cbf41ad116
[ "MIT" ]
null
null
null
from enum import Enum import arachne.nouns as a nouns = ( a.Container, a.Item, a.Door, a.Room, a.Key, a.Door ) class Verb(Enum): # basic player actions LOOK = 'im rotating it in my mind' TAKE = 'the act of picking things up' DROP = 'the act of putting things down' PUT = '...
24.577586
89
0.591371
1,579
0.553841
0
0
0
0
0
0
1,504
0.527534
9531452916d8af98d79a18cfcf7c243ec86f577d
488
py
Python
src/hera/host_alias.py
bchalk101/hera-workflows
a3e9262f996ba477a35850c7e4b18ce3d5749687
[ "MIT" ]
84
2021-10-20T17:20:22.000Z
2022-03-31T17:20:06.000Z
src/hera/host_alias.py
bchalk101/hera-workflows
a3e9262f996ba477a35850c7e4b18ce3d5749687
[ "MIT" ]
84
2021-10-31T16:05:51.000Z
2022-03-31T14:25:25.000Z
src/hera/host_alias.py
bchalk101/hera-workflows
a3e9262f996ba477a35850c7e4b18ce3d5749687
[ "MIT" ]
18
2021-11-01T04:34:39.000Z
2022-03-29T03:48:19.000Z
from typing import List from argo_workflows.models import HostAlias as ArgoHostAlias from pydantic import BaseModel class HostAlias(BaseModel): """mapping between IP and hostnames Notes ----- See https://github.com/argoproj/argo-workflows/blob/master/sdks/python/client/docs/HostAlias.md """ ...
23.238095
103
0.715164
368
0.754098
0
0
124
0.254098
0
0
168
0.344262
9532e0a3625fbfa97cee2a3c1c1ac08b02e54bbb
1,297
py
Python
legacy/lua_data/lua_data_converter.py
kshshkim/factorioCalcPy
2a7c6ca567a3bf0d2b19f3cf0bc05274f83d4205
[ "MIT" ]
1
2021-09-21T01:42:05.000Z
2021-09-21T01:42:05.000Z
legacy/lua_data/lua_data_converter.py
kshshkim/factorioCalcPy
2a7c6ca567a3bf0d2b19f3cf0bc05274f83d4205
[ "MIT" ]
null
null
null
legacy/lua_data/lua_data_converter.py
kshshkim/factorioCalcPy
2a7c6ca567a3bf0d2b19f3cf0bc05274f83d4205
[ "MIT" ]
null
null
null
from slpp import slpp as lua import json class LuaConverter: def parse(self, luafile): with open(luafile, 'r') as to_convert: to_convert = str(to_convert.read()) to_convert = to_convert.replace('data:extend(\n{\n {', '').replace('})\n', '') # slpp가 알아먹을수 있는 형태로 가공 to_convert ...
36.027778
112
0.591365
1,309
0.914745
0
0
0
0
0
0
482
0.336827
9533f3d3d51a5a32d60d0e2337d926980cff5177
839
py
Python
odette/scripts/collect_iso_codes.py
mdelhoneux/oDETTE
1b09bb3a950eb847c409de48c466d6559a010bd8
[ "Unlicense" ]
2
2017-04-18T13:31:37.000Z
2017-07-12T21:00:10.000Z
odette/scripts/collect_iso_codes.py
mdelhoneux/oDETTE
1b09bb3a950eb847c409de48c466d6559a010bd8
[ "Unlicense" ]
null
null
null
odette/scripts/collect_iso_codes.py
mdelhoneux/oDETTE
1b09bb3a950eb847c409de48c466d6559a010bd8
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python #============================================================================== #author :Miryam de Lhoneux #email :miryam.de_lhoneux@lingfil.uu.se #date :2015/12/30 #version :1.0 #description :collect iso codes in UD directories #usage :python scripts/collect_iso_codes.py #Python version ...
28.931034
79
0.54112
0
0
0
0
0
0
0
0
479
0.570918
20f86d70eb09a90cb1a4b918de25a5f97e226d8c
5,696
py
Python
airtest/core/ios/mjpeg_cap.py
Cache-Cloud/Airtest
4f831977a32c2b120dee631631c1154407b34d32
[ "Apache-2.0" ]
null
null
null
airtest/core/ios/mjpeg_cap.py
Cache-Cloud/Airtest
4f831977a32c2b120dee631631c1154407b34d32
[ "Apache-2.0" ]
null
null
null
airtest/core/ios/mjpeg_cap.py
Cache-Cloud/Airtest
4f831977a32c2b120dee631631c1154407b34d32
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- import numpy import socket import traceback from airtest import aircv from airtest.utils.snippet import reg_cleanup, on_method_ready, ready_method from airtest.core.ios.constant import ROTATION_MODE, DEFAULT_MJPEG_PORT from airtest.utils.logger import get_logger from airte...
33.309942
119
0.607619
5,388
0.881256
0
0
1,172
0.191691
0
0
1,437
0.235034
20fa7eb3a7346661e1dcc5a7aa474c9102b7df4b
3,342
py
Python
happy.py
xiaoqcn/LearnLinuxViaPython
3c591471bbceefab44161aedb8ff67c2009b8ec0
[ "Apache-2.0" ]
null
null
null
happy.py
xiaoqcn/LearnLinuxViaPython
3c591471bbceefab44161aedb8ff67c2009b8ec0
[ "Apache-2.0" ]
null
null
null
happy.py
xiaoqcn/LearnLinuxViaPython
3c591471bbceefab44161aedb8ff67c2009b8ec0
[ "Apache-2.0" ]
null
null
null
import time import datetime import os import sys import atexit import signal from multiprocessing import Pool from threading import Thread class HappyScrum: def __init__( self, pid_path, pool_size=4, busy_wait=90, idle_wait=300, say_hi_wait=1800, is_debug=Fa...
28.084034
92
0.529623
3,210
0.957637
0
0
250
0.074582
0
0
339
0.101134
20fa9357a93d7d86c13beaf0a8a806393d553ed4
526
py
Python
functional_tests/test_gallery.py
atypicalrobot/igor_personal_site
8fd788bc43884792b786abeb34e9fec9e79492f1
[ "MIT" ]
null
null
null
functional_tests/test_gallery.py
atypicalrobot/igor_personal_site
8fd788bc43884792b786abeb34e9fec9e79492f1
[ "MIT" ]
null
null
null
functional_tests/test_gallery.py
atypicalrobot/igor_personal_site
8fd788bc43884792b786abeb34e9fec9e79492f1
[ "MIT" ]
null
null
null
from .base import * class GalleryPageTests(SeleniumTestCase): def test_gallery_items(self): browser = self.browser browser.get('http://127.0.0.1:8000/gallery/') assert "we don't have any Galleries" not in browser.page_source def test_gallery_images(self): browser = self.b...
29.222222
71
0.659696
505
0.960076
0
0
0
0
0
0
123
0.23384
20fb6d839493dfeb4698c4e202a1cd7ca0226dba
784
py
Python
plates.py
winksaville/cq-plates
fb175522fae991a8d88cdf26afad273a4b8b9098
[ "MIT" ]
null
null
null
plates.py
winksaville/cq-plates
fb175522fae991a8d88cdf26afad273a4b8b9098
[ "MIT" ]
null
null
null
plates.py
winksaville/cq-plates
fb175522fae991a8d88cdf26afad273a4b8b9098
[ "MIT" ]
null
null
null
import cadquery as cq # type: ignore nd = 0.4 # Nozzle Diameter length = 50 width = 20 gap = 5 p1 = ( cq.Workplane("XY", origin=(-(width + gap), 0, 0)) .rect(width, length) .extrude(nd/2) ) #show_object(p1) p2 = ( cq.Workplane("XY", origin=(0, 0, 0)) .rect(width, length) .extrude(nd) ) #sho...
21.189189
68
0.626276
0
0
0
0
0
0
0
0
331
0.422194
20fe1adaa92216baa26b834b33664cd9c78ae67b
2,430
py
Python
tests/tonalmodel_tests/test_chromatic_scale.py
dpazel/music_rep
2f9de9b98b13df98f1a0a2120b84714725ce527e
[ "MIT" ]
1
2021-05-06T19:45:54.000Z
2021-05-06T19:45:54.000Z
tests/tonalmodel_tests/test_chromatic_scale.py
dpazel/music_rep
2f9de9b98b13df98f1a0a2120b84714725ce527e
[ "MIT" ]
null
null
null
tests/tonalmodel_tests/test_chromatic_scale.py
dpazel/music_rep
2f9de9b98b13df98f1a0a2120b84714725ce527e
[ "MIT" ]
null
null
null
import unittest import logging from tonalmodel.chromatic_scale import ChromaticScale class TestChromaticScale(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_frequencies(self): assert is_close(ChromaticScale.get_frequency((4, 9)), 440.0), \ ...
38.571429
117
0.60535
2,115
0.87037
0
0
0
0
0
0
185
0.076132
20feae08b04eeba7945d6473eedc0730006c75f9
3,093
py
Python
beeseyes/pycode/sampling.py
sosi-org/scientific-code
395bae0f95fbccb936dc01145c797dc22a1c99a0
[ "Unlicense" ]
null
null
null
beeseyes/pycode/sampling.py
sosi-org/scientific-code
395bae0f95fbccb936dc01145c797dc22a1c99a0
[ "Unlicense" ]
null
null
null
beeseyes/pycode/sampling.py
sosi-org/scientific-code
395bae0f95fbccb936dc01145c797dc22a1c99a0
[ "Unlicense" ]
null
null
null
import numpy as np import math import polygon_sampler nan_rgb = np.zeros((3,)) + np.NaN # sampler session: texture, W_,H_,W,H ''' Used by `sample_colors_squarepixels()` Samples a single point. Using square pixels. [0, ... ,W-1] (incl.) By mapping [0,1) -> [0,W) (int) (mapping u,v) ''' def sample1(um,vm, texture, W_...
25.991597
154
0.6172
0
0
0
0
0
0
0
0
1,189
0.384416
20fedbf1080a9f144951aee297b7d6f393e3751d
5,237
py
Python
src/ui/workspace_view.py
weijiang1994/iPost
008e767c23691bd9ba802eab1e405f98094cce4c
[ "MIT" ]
2
2021-10-18T01:24:04.000Z
2021-12-14T01:29:22.000Z
src/ui/workspace_view.py
weijiang1994/iPost
008e767c23691bd9ba802eab1e405f98094cce4c
[ "MIT" ]
null
null
null
src/ui/workspace_view.py
weijiang1994/iPost
008e767c23691bd9ba802eab1e405f98094cce4c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'workspace_view.ui' # # Created by: PyQt5 UI code generator 5.14.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObj...
50.355769
114
0.715104
4,987
0.952263
0
0
0
0
0
0
520
0.099293
20ff397b31725a7c336cc66646521d603dc8bb92
389
py
Python
task_queuing/tasks/custom.py
joejcollins/lieutenant-dean
eea536a146fb89b2feca244d5c4cf68e662cf2f2
[ "MIT" ]
null
null
null
task_queuing/tasks/custom.py
joejcollins/lieutenant-dean
eea536a146fb89b2feca244d5c4cf68e662cf2f2
[ "MIT" ]
null
null
null
task_queuing/tasks/custom.py
joejcollins/lieutenant-dean
eea536a146fb89b2feca244d5c4cf68e662cf2f2
[ "MIT" ]
null
null
null
"""Custom celery task to capitalize text""" import task_queuing.celery_app as app class Capitalize(app.queue_broker.Task): """Custom task without the decorator""" def run(self, text): capitalized = text.upper() return capitalized @app.queue_broker.task(base=Capitalize) def shit(x): prin...
19.45
43
0.694087
172
0.442159
0
0
87
0.22365
0
0
132
0.339332
1f00bbb4cb26e6889fa5994c748463440e235c8e
654
py
Python
migrations/versions/d805931e1abd_add_topics.py
cyberinnovationhub/lunch-roulette
0b0b933188c095b6e3778ee7de9d4e21cd7caae5
[ "BSD-3-Clause" ]
4
2020-12-03T19:24:20.000Z
2022-03-16T13:45:11.000Z
migrations/versions/d805931e1abd_add_topics.py
cyberinnovationhub/lunch-roulette
0b0b933188c095b6e3778ee7de9d4e21cd7caae5
[ "BSD-3-Clause" ]
3
2020-08-24T08:05:11.000Z
2021-11-07T06:14:36.000Z
migrations/versions/d805931e1abd_add_topics.py
cyberinnovationhub/lunch-roulette
0b0b933188c095b6e3778ee7de9d4e21cd7caae5
[ "BSD-3-Clause" ]
3
2020-08-27T13:58:53.000Z
2022-03-09T14:09:06.000Z
"""add topics Revision ID: d805931e1abd Revises: 9430b6bc8d1a Create Date: 2018-09-18 15:11:45.922659 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'd805931e1abd' down_revision = '9430b6bc8d1a' branch_labels = None depends_on = None def upgrade(): # ###...
22.551724
84
0.689602
0
0
0
0
0
0
0
0
385
0.588685
1f01e1d172c08c2fafb69829e4c50d4807643989
726
py
Python
1-50/031NextPermutation.py
zhaoxinlu/leetcode-algorithms
f5e1c94c99628e7fb04ba158f686a55a8093e933
[ "MIT" ]
null
null
null
1-50/031NextPermutation.py
zhaoxinlu/leetcode-algorithms
f5e1c94c99628e7fb04ba158f686a55a8093e933
[ "MIT" ]
null
null
null
1-50/031NextPermutation.py
zhaoxinlu/leetcode-algorithms
f5e1c94c99628e7fb04ba158f686a55a8093e933
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Editor: Zhao Xinlu School: BUPT Date: 2018-03-24 算法思想:下一个排列 """ class Solution(object): def nextPermutation(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead. """ for idx in range(len(nums)-1, ...
24.2
74
0.508264
558
0.747989
0
0
0
0
0
0
240
0.321716
1f04128726942205094994e2b681a53cdfe743aa
64
py
Python
h1st/tuner/__init__.py
vophihungvn/h1st
d421995bb0b8de6a5a76788261efef5b26bc7c12
[ "Apache-2.0" ]
null
null
null
h1st/tuner/__init__.py
vophihungvn/h1st
d421995bb0b8de6a5a76788261efef5b26bc7c12
[ "Apache-2.0" ]
null
null
null
h1st/tuner/__init__.py
vophihungvn/h1st
d421995bb0b8de6a5a76788261efef5b26bc7c12
[ "Apache-2.0" ]
null
null
null
from h1st.tuner.hyperparameter_tuner import HyperParameterTuner
32
63
0.90625
0
0
0
0
0
0
0
0
0
0
1f0432871a66053bea5e2a19da56fe363bea9cb9
78,296
py
Python
allesfitter/basement.py
pierfra-ro/allesfitter
a6a885aaeb3253fec0d924ef3b45e8b7c473b181
[ "MIT" ]
null
null
null
allesfitter/basement.py
pierfra-ro/allesfitter
a6a885aaeb3253fec0d924ef3b45e8b7c473b181
[ "MIT" ]
null
null
null
allesfitter/basement.py
pierfra-ro/allesfitter
a6a885aaeb3253fec0d924ef3b45e8b7c473b181
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Oct 5 00:17:06 2018 @author: Dr. Maximilian N. Günther European Space Agency (ESA) European Space Research and Technology Centre (ESTEC) Keplerlaan 1, 2201 AZ Noordwijk, The Netherlands Email: maximilian.guenther@esa.int GitHub: mnguenther Twitter: m_n...
58.04003
224
0.481008
76,578
0.978045
0
0
0
0
0
0
35,484
0.453197
1f08e87bb685c5de27a28a6c0f75d6ba70a73d31
3,334
py
Python
schematron/ssk.py
SarahTV/SSK
ac7f5b7b1f1c02aefcb706abd80178f86c216cf7
[ "CC-BY-4.0" ]
null
null
null
schematron/ssk.py
SarahTV/SSK
ac7f5b7b1f1c02aefcb706abd80178f86c216cf7
[ "CC-BY-4.0" ]
null
null
null
schematron/ssk.py
SarahTV/SSK
ac7f5b7b1f1c02aefcb706abd80178f86c216cf7
[ "CC-BY-4.0" ]
null
null
null
#coding: utf-8 import re import os from lxml import etree as ET from bs4 import BeautifulSoup import csv class schSSK: def create_directory(self, directory): """Create a new directory. :param directory: path to new directory :type directory: string """ if not os.path.exis...
35.468085
96
0.54889
3,226
0.967606
0
0
0
0
0
0
694
0.208158
1f098e212077f84f0f80919da194e6c3605bd4fb
14,798
py
Python
src/01_eigenprogression_transform.py
lostanlen/nemisig2018
2868da84c938ff6db98936d81a830b838eef1131
[ "MIT" ]
1
2018-09-27T09:07:05.000Z
2018-09-27T09:07:05.000Z
src/01_eigenprogression_transform.py
lostanlen/nemisig2018
2868da84c938ff6db98936d81a830b838eef1131
[ "MIT" ]
null
null
null
src/01_eigenprogression_transform.py
lostanlen/nemisig2018
2868da84c938ff6db98936d81a830b838eef1131
[ "MIT" ]
null
null
null
import localmodule import datetime import h5py import math import music21 as m21 import numpy as np import os import scipy import scipy.linalg import sys import time # Parse arguments args = sys.argv[1:] composer_str = args[0] track_str = args[1] # Define constants. J_tm = 8 N = 2**10 n_octaves = 8 midi_octave_off...
34.334107
86
0.68462
0
0
0
0
0
0
0
0
3,970
0.268279
1f09cb31eceadc76ff93699e82ee70df317cae82
983
py
Python
src/spaceone/monitoring/manager/plugin_manager.py
jean1042/monitoring
0585a1ea52ec13285eaca81cc5b19fa3f7a1fba4
[ "Apache-2.0" ]
5
2020-06-04T23:01:30.000Z
2020-09-09T08:58:51.000Z
src/spaceone/monitoring/manager/plugin_manager.py
jean1042/monitoring
0585a1ea52ec13285eaca81cc5b19fa3f7a1fba4
[ "Apache-2.0" ]
9
2022-02-10T00:58:28.000Z
2022-03-23T11:12:47.000Z
src/spaceone/monitoring/manager/plugin_manager.py
jean1042/monitoring
0585a1ea52ec13285eaca81cc5b19fa3f7a1fba4
[ "Apache-2.0" ]
7
2020-06-10T01:56:35.000Z
2021-12-02T05:36:21.000Z
import logging from spaceone.core.manager import BaseManager from spaceone.core.connector.space_connector import SpaceConnector _LOGGER = logging.getLogger(__name__) class PluginManager(BaseManager): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.plugin_connector: S...
35.107143
110
0.666328
812
0.826043
0
0
0
0
0
0
188
0.191251
1f0a14df894f78200ec160dd56d1194d86c6d8d9
1,107
py
Python
Segmentation/bins/hist_label_portarit.py
ttthomaschan/DeepcvLib
18f7728559136a3c5c8ad54666788ea771e95b16
[ "MIT" ]
null
null
null
Segmentation/bins/hist_label_portarit.py
ttthomaschan/DeepcvLib
18f7728559136a3c5c8ad54666788ea771e95b16
[ "MIT" ]
null
null
null
Segmentation/bins/hist_label_portarit.py
ttthomaschan/DeepcvLib
18f7728559136a3c5c8ad54666788ea771e95b16
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ # @file name : hist_label_portrait.py # @author : JLChen # @date : 2020-03-11 # @brief : 统计各类别数量 """ import numpy as np import os import matplotlib.pyplot as plt import pylab as pl import cv2 def cal_cls_nums(path, t=0.78): label_img = cv2.imread(path) label_img = c...
26.357143
100
0.67299
0
0
0
0
0
0
0
0
468
0.393608
1f0a726404191dd0a8ef9e2cd1c7c33d9b482f77
7,924
py
Python
yoapi/contexts.py
YoApp/yo-api
a162e51804ab91724cc7ad3e7608410329da6789
[ "MIT" ]
1
2021-12-17T03:25:34.000Z
2021-12-17T03:25:34.000Z
yoapi/contexts.py
YoApp/yo-api
a162e51804ab91724cc7ad3e7608410329da6789
[ "MIT" ]
null
null
null
yoapi/contexts.py
YoApp/yo-api
a162e51804ab91724cc7ad3e7608410329da6789
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Client context module.""" import pytz import time from flask import current_app from datetime import datetime, timedelta from mongoengine import DoesNotExist from .ab_test import get_enrolled_experiments from .core import cache from .errors import APIError from .helpers import assert_vali...
32.342857
114
0.617365
0
0
0
0
272
0.034326
0
0
1,075
0.135664
1f0acc1fb7d824f01253e231a80bcc928842ee31
4,180
py
Python
coyote_framework/config/abstract_config.py
vaibhavrastogi1988/python_testing_framework
583a2286479ed0ccda309c866a403dc92fa1bb3b
[ "MIT" ]
null
null
null
coyote_framework/config/abstract_config.py
vaibhavrastogi1988/python_testing_framework
583a2286479ed0ccda309c866a403dc92fa1bb3b
[ "MIT" ]
null
null
null
coyote_framework/config/abstract_config.py
vaibhavrastogi1988/python_testing_framework
583a2286479ed0ccda309c866a403dc92fa1bb3b
[ "MIT" ]
null
null
null
from configparser import ConfigParser import json import fnmatch import os __author__ = 'justin@shapeways.com' TEST_RUN_SETTING_CONFIG = 'TEST_RUN_SETTING_CONFIG' confg_dict = {} class NullConfigAttribute(object): def __init__(self, description, default_value=None): self.description = description ...
35.726496
134
0.617943
3,351
0.801675
0
0
0
0
0
0
1,630
0.389952
1f0aed11f4fb176f853b2e44dfcbd9b5e33ba39f
16,468
py
Python
src/model_transforms.py
pmclSF/DeepCompress
6fc51aa0e9b34fb89f97877ad56da6345f93b929
[ "MIT" ]
8
2021-03-11T10:56:35.000Z
2022-02-24T12:44:33.000Z
src/model_transforms.py
pmclSF/DeepCompress
6fc51aa0e9b34fb89f97877ad56da6345f93b929
[ "MIT" ]
null
null
null
src/model_transforms.py
pmclSF/DeepCompress
6fc51aa0e9b34fb89f97877ad56da6345f93b929
[ "MIT" ]
null
null
null
from enum import Enum import tensorflow.compat.v1 as tf from tensorflow.keras.layers import Layer, Conv3D, Conv3DTranspose, AveragePooling3D from tensorflow_core.python.keras.utils import conv_utils import tensorflow_compression as tfc import tensorflow.keras as keras def relu(): return keras.activations.relu def...
55.076923
197
0.660189
15,736
0.95555
0
0
0
0
0
0
1,126
0.068375
1f0d5b67c4f91743453ccb056ca36b102ec5a878
6,485
py
Python
src/main.py
matthewb96/NetSpeedGraphs
51e6f6d4f24845e50f34ed56452a4fa454db189b
[ "MIT" ]
null
null
null
src/main.py
matthewb96/NetSpeedGraphs
51e6f6d4f24845e50f34ed56452a4fa454db189b
[ "MIT" ]
4
2021-06-08T21:23:15.000Z
2022-03-12T00:29:23.000Z
src/main.py
matthewb96/NetSpeedGraphs
51e6f6d4f24845e50f34ed56452a4fa454db189b
[ "MIT" ]
null
null
null
""" Main module for running NetSpeedGraphs. """ ##### IMPORTS ##### # Standard imports from pathlib import Path from datetime import datetime, timedelta from argparse import ArgumentParser # Third party imports import speedtest import numpy as np import pandas as pd from bokeh.plotting import figure, output_file,...
33.25641
84
0.612336
0
0
0
0
0
0
0
0
3,361
0.518273
1f0da5b719cc8ed4639299b06648e3a470d196da
7,478
py
Python
tests/planar_tests/test_region_in_multiregion.py
lycantropos/orient
01f4f67a717c5ee911d83756d455cc35e85ce817
[ "MIT" ]
2
2020-11-01T00:25:09.000Z
2021-04-07T10:13:59.000Z
tests/planar_tests/test_region_in_multiregion.py
lycantropos/orient
01f4f67a717c5ee911d83756d455cc35e85ce817
[ "MIT" ]
null
null
null
tests/planar_tests/test_region_in_multiregion.py
lycantropos/orient
01f4f67a717c5ee911d83756d455cc35e85ce817
[ "MIT" ]
null
null
null
from typing import Tuple from ground.base import Relation from hypothesis import given from orient.hints import (Multiregion, Region) from orient.planar import (contour_in_multiregion, region_in_multiregion, region_in_region) from tests.u...
47.329114
79
0.622626
0
0
0
0
6,697
0.89556
0
0
0
0
1f0ed2213b59cdb0f244b760bfd1759ed4538c6a
11,676
py
Python
gui/src/core/parse_qca.py
retallickj/qca-embedding
96fd37a3ecd4beacb04ad1cb193d65d0b48ceab2
[ "MIT" ]
1
2017-11-02T20:38:20.000Z
2017-11-02T20:38:20.000Z
gui/src/core/parse_qca.py
retallickj/qca-embedding
96fd37a3ecd4beacb04ad1cb193d65d0b48ceab2
[ "MIT" ]
null
null
null
gui/src/core/parse_qca.py
retallickj/qca-embedding
96fd37a3ecd4beacb04ad1cb193d65d0b48ceab2
[ "MIT" ]
null
null
null
#!/usr/bin/env python #--------------------------------------------------------- # Name: parse_qca.py # Purpose: Parsing functions for QCADesigner files # Author: Jacob Retallick # Created: 2015.10.22 # Last Modified: 2015.10.22 #--------------------------------------------------------- # NOTE # the origin...
32.34349
80
0.554642
0
0
0
0
0
0
0
0
4,603
0.394227
1f0fed3d680bffcc5eeafee6ce65b7395cfecca1
7,391
py
Python
docs/Tutorial/1-glm/plot_1_LinearRegression.py
bbayukari/abess
3b21b0a58cac6c1464ec9403ffbe4902fee7b890
[ "Intel" ]
null
null
null
docs/Tutorial/1-glm/plot_1_LinearRegression.py
bbayukari/abess
3b21b0a58cac6c1464ec9403ffbe4902fee7b890
[ "Intel" ]
null
null
null
docs/Tutorial/1-glm/plot_1_LinearRegression.py
bbayukari/abess
3b21b0a58cac6c1464ec9403ffbe4902fee7b890
[ "Intel" ]
null
null
null
""" ================= Linear Regression ================= In this tutorial, we are going to demonstrate how to use the ``abess`` package to carry out best subset selection in linear regression with both simulated data and real data. """ ############################################################################### #...
35.028436
221
0.64998
0
0
0
0
0
0
0
0
5,723
0.77432
1f11e9df2b051fcb60ef9a9128d6a058c4f210e2
2,386
py
Python
pyppeteer/tracing.py
cr1pt/pypyteer
b3aade3741b385f2e1dde600b501776f1f5e8479
[ "MIT" ]
null
null
null
pyppeteer/tracing.py
cr1pt/pypyteer
b3aade3741b385f2e1dde600b501776f1f5e8479
[ "MIT" ]
null
null
null
pyppeteer/tracing.py
cr1pt/pypyteer
b3aade3741b385f2e1dde600b501776f1f5e8479
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tracing module.""" import asyncio from pathlib import Path from typing import Any, Awaitable from pyppeteer.connection import Session class Tracing(object): """Tracing class.""" def __init__(self, client: Session) -> None: """Make new tracing objec...
32.684932
77
0.559933
2,196
0.920369
0
0
0
0
1,956
0.819782
632
0.264878
1f126ef87161ba2d8fbb4e598c5bbb09c32019bd
2,627
py
Python
src/wai/annotations/isp/map_labels/component/_MapLabels.py
waikato-ufdl/wai-annotations-core
bac3429e9488efb456972c74f9d462f951c4af3d
[ "Apache-2.0" ]
null
null
null
src/wai/annotations/isp/map_labels/component/_MapLabels.py
waikato-ufdl/wai-annotations-core
bac3429e9488efb456972c74f9d462f951c4af3d
[ "Apache-2.0" ]
3
2021-06-30T23:42:47.000Z
2022-03-01T03:45:07.000Z
src/wai/annotations/isp/map_labels/component/_MapLabels.py
waikato-ufdl/wai-annotations-core
bac3429e9488efb456972c74f9d462f951c4af3d
[ "Apache-2.0" ]
null
null
null
from typing import Optional, Dict from wai.common.adams.imaging.locateobjects import LocatedObjects from wai.common.cli.options import TypedOption from ....core.component import ProcessorComponent from ....core.stream import ThenFunction, DoneFunction from ....core.stream.util import RequiresNoFinalisation from ....c...
33.679487
113
0.650552
2,113
0.80434
0
0
474
0.180434
0
0
739
0.281309
1f12f143e8af312aabb54b8c1b32c57f8566b95e
793
py
Python
python/tHome/msgHub/__init__.py
ZigmundRat/T-Home
5dc8689f52d87dac890051e540b338b009293ced
[ "BSD-2-Clause" ]
18
2016-04-17T19:39:28.000Z
2020-11-19T06:55:20.000Z
python/tHome/msgHub/__init__.py
ZigmundRat/T-Home
5dc8689f52d87dac890051e540b338b009293ced
[ "BSD-2-Clause" ]
11
2018-09-07T18:34:41.000Z
2021-05-02T04:44:54.000Z
python/tHome/msgHub/__init__.py
ZigmundRat/T-Home
5dc8689f52d87dac890051e540b338b009293ced
[ "BSD-2-Clause" ]
12
2016-10-31T12:29:08.000Z
2021-12-28T12:18:28.000Z
#=========================================================================== # # msgHub package # #=========================================================================== __doc__ = """Zero-MQ Message Hub The msgHub is a pub/sub forwarder. All of the various data producers send messages to the msgHub as a single ...
28.321429
76
0.387137
0
0
0
0
0
0
0
0
699
0.881463
1f14096bca569e364e31b3699b308c6507e8fe1b
8,221
py
Python
nlg/app.py
samrudh/gramex-nlg
fb1b1ce14347947c8644adda7bd63856dcb2ce3d
[ "MIT" ]
null
null
null
nlg/app.py
samrudh/gramex-nlg
fb1b1ce14347947c8644adda7bd63856dcb2ce3d
[ "MIT" ]
null
null
null
nlg/app.py
samrudh/gramex-nlg
fb1b1ce14347947c8644adda7bd63856dcb2ce3d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Module for gramex exposure. This shouldn't be imported anywhere, only for use with gramex. """ import glob import json import os import os.path as op import pandas as pd from six.moves.urllib import parse from tornado.template import Template from gramex.apps.nlg import g...
33.555102
88
0.643961
0
0
0
0
0
0
0
0
2,759
0.335604
1f14219d12c0adf9ade099f871dd4550e114601e
3,682
py
Python
data/main_data_flow.py
SterArcher/OHCA-registry-Slovenia
ad8278a28039503ab6a75d48ffea314de9a759ba
[ "MIT" ]
1
2022-02-28T13:02:14.000Z
2022-02-28T13:02:14.000Z
data/main_data_flow.py
SterArcher/dispatch
ad8278a28039503ab6a75d48ffea314de9a759ba
[ "MIT" ]
1
2022-03-20T10:51:17.000Z
2022-03-21T07:52:57.000Z
data/main_data_flow.py
SterArcher/OHCA-registry-Slovenia
ad8278a28039503ab6a75d48ffea314de9a759ba
[ "MIT" ]
null
null
null
import plotly.graph_objects as go import plotly as plt import random # Uncomment the names you want the diagram to show # Names in english # sta = "Statistical Office" # si = "Emergency call admission" #"sprejem intervencij" # pni = "Emergency intervention report" #"poročilo/protokol nujne intervencije" # pnrv = "Em...
35.066667
125
0.67409
0
0
0
0
0
0
0
0
1,737
0.468573
1f14b7efeb28f5b978cdbfde55415ea03866d4ca
569
py
Python
tests/Exscript/memtest_host.py
saveshodhan/exscript
72718eee3e87b345d5a5255be9824e867e42927b
[ "MIT" ]
226
2015-01-20T19:59:06.000Z
2022-01-02T11:13:01.000Z
tests/Exscript/memtest_host.py
saveshodhan/exscript
72718eee3e87b345d5a5255be9824e867e42927b
[ "MIT" ]
155
2015-01-02T07:56:27.000Z
2022-01-09T20:56:19.000Z
tests/Exscript/memtest_host.py
saveshodhan/exscript
72718eee3e87b345d5a5255be9824e867e42927b
[ "MIT" ]
114
2015-01-03T11:48:17.000Z
2022-01-26T02:50:43.000Z
from __future__ import print_function from builtins import str from builtins import range # This script is not meant to provide a fully automated test, it's # merely a hack/starting point for investigating memory consumption # manually. The behavior also depends heavily on the version of meliae. from meliae import scan...
35.5625
71
0.773286
0
0
0
0
0
0
0
0
284
0.499121
1f1586c55bd8026b70c428056979527a8012b8fd
8,468
py
Python
apcadastros.py
Alexsussa/ap-cadastros
9b5e9b57970a6a044ebde071a68403e0d513e89b
[ "MIT" ]
null
null
null
apcadastros.py
Alexsussa/ap-cadastros
9b5e9b57970a6a044ebde071a68403e0d513e89b
[ "MIT" ]
null
null
null
apcadastros.py
Alexsussa/ap-cadastros
9b5e9b57970a6a044ebde071a68403e0d513e89b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- __developer__ = 'Alex Pinheiro' __version__ = 1.4 __build__ = 6 import sqlite3 from tkinter.ttk import * from tkinter.filedialog import * from threading import Thread from utils import Utils from login import Login u = Utils # Listas estados = ['AC', 'AL', 'AP', 'AM'...
41.920792
118
0.62931
7,609
0.898135
0
0
0
0
0
0
1,716
0.20255
1f17a8045e62dbb0dc195713bf778e0658496213
131
py
Python
src/pricehist/beanprice/alphavantage.py
chrisberkhout/pricehist
a54da85a6fae15e2f771e8612aed089407ec5c22
[ "MIT" ]
4
2021-09-15T03:23:10.000Z
2022-02-08T23:31:10.000Z
src/pricehist/beanprice/alphavantage.py
chrisberkhout/pricehist
a54da85a6fae15e2f771e8612aed089407ec5c22
[ "MIT" ]
null
null
null
src/pricehist/beanprice/alphavantage.py
chrisberkhout/pricehist
a54da85a6fae15e2f771e8612aed089407ec5c22
[ "MIT" ]
null
null
null
from pricehist import beanprice from pricehist.sources.alphavantage import AlphaVantage Source = beanprice.source(AlphaVantage())
26.2
55
0.847328
0
0
0
0
0
0
0
0
0
0
1f18bfa4fe6a76d3156288890c8bbdb080595ab5
12,846
py
Python
example/hit_path.py
dzwiedziu-nkg/credo-classify-framework
45417b505b4f4b20a7248f3487ca57a3fd49ccee
[ "MIT" ]
null
null
null
example/hit_path.py
dzwiedziu-nkg/credo-classify-framework
45417b505b4f4b20a7248f3487ca57a3fd49ccee
[ "MIT" ]
null
null
null
example/hit_path.py
dzwiedziu-nkg/credo-classify-framework
45417b505b4f4b20a7248f3487ca57a3fd49ccee
[ "MIT" ]
3
2020-06-19T15:41:19.000Z
2020-06-29T12:47:05.000Z
import math import sys from scipy.interpolate import interp2d from scipy.ndimage import rotate, center_of_mass from scipy.spatial import distance from skimage.feature import canny from skimage.filters import rank, gaussian from skimage.measure import subdivide_polygon from skimage.morphology import medial_axis, square...
28.738255
175
0.541725
0
0
0
0
0
0
0
0
1,281
0.099681
1f18f11b5d9f381e25d945aa36634594b061dc4c
3,749
py
Python
exps/supp-synthetic/notebooks/hp_analysis.py
Viktour19/overlap-code
f5c6e63146a00f65710c38b9181bb9d12de6454f
[ "MIT" ]
2
2020-07-09T03:15:58.000Z
2022-03-09T11:57:17.000Z
exps/supp-synthetic/notebooks/hp_analysis.py
Viktour19/overlap-code
f5c6e63146a00f65710c38b9181bb9d12de6454f
[ "MIT" ]
null
null
null
exps/supp-synthetic/notebooks/hp_analysis.py
Viktour19/overlap-code
f5c6e63146a00f65710c38b9181bb9d12de6454f
[ "MIT" ]
1
2021-05-18T11:55:04.000Z
2021-05-18T11:55:04.000Z
#!/usr/bin/env python # coding: utf-8 from sacred.observers import TinyDbReader import pdb import numpy as np import pandas as pd import matplotlib.pyplot as plt def get_exclusion_metadata( d, ideal_rule = [['i0', 'not', ''], ['i1', 'not', '']], w_lb=1e-8): r = dict(d) r['rule_avg_cov...
41.197802
112
0.628434
0
0
0
0
0
0
0
0
1,517
0.404641
1f1ad2122b60088ba3e024758a2e26d9b7b4784d
9,282
py
Python
bin/punydecode.py
mutedmouse/punydecode
547900823b874f581a842379a4472b2a27d64c1c
[ "Apache-2.0" ]
1
2021-03-24T00:22:40.000Z
2021-03-24T00:22:40.000Z
bin/punydecode.py
mutedmouse/punydecode
547900823b874f581a842379a4472b2a27d64c1c
[ "Apache-2.0" ]
null
null
null
bin/punydecode.py
mutedmouse/punydecode
547900823b874f581a842379a4472b2a27d64c1c
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2005-2017 Splunk Inc. All Rights Reserved. Version 6.x # Author: Andrew Quill import sys,splunk.Intersplunk import string import getpass import re def replace_xns(field): try: punydecode = field.encode("idna").decode("idna") except: punydecode = field return punydecode def...
45.058252
120
0.5195
0
0
0
0
0
0
0
0
1,309
0.141026
1f1e0b869b9f01994358b74334809a1ece521ead
774
py
Python
345_ReverseVowelsOfAString.py
satwiksabharwal01/LeetcodeProblemSolutions
c08fb77b76519f9c543d74f84cb2c0477aeddcd9
[ "MIT" ]
1
2020-06-03T22:00:54.000Z
2020-06-03T22:00:54.000Z
345_ReverseVowelsOfAString.py
AmiGandhi/leetcode
238186f1e4dd7f243caab47173ebc2511ae5902e
[ "MIT" ]
null
null
null
345_ReverseVowelsOfAString.py
AmiGandhi/leetcode
238186f1e4dd7f243caab47173ebc2511ae5902e
[ "MIT" ]
null
null
null
# Write a function that takes a string as input and reverse only the vowels of a string. # Example 1: # Input: "hello" # Output: "holle" # Example 2: # Input: "leetcode" # Output: "leotcede" class Solution: def reverseVowels(self, s: str) -> str: vowels = set(list("aeiouAEIOU")) s = list(s) ...
26.689655
88
0.536176
496
0.640827
0
0
0
0
0
0
215
0.277778
1f1f88fe67e806539b890092e9e0d182702100b7
574
py
Python
script/run_basic_slackbot.py
imperial-genomics-facility/IGFSlackBot
2692460e907381cea067b674a560cacef6fff981
[ "Apache-2.0" ]
null
null
null
script/run_basic_slackbot.py
imperial-genomics-facility/IGFSlackBot
2692460e907381cea067b674a560cacef6fff981
[ "Apache-2.0" ]
null
null
null
script/run_basic_slackbot.py
imperial-genomics-facility/IGFSlackBot
2692460e907381cea067b674a560cacef6fff981
[ "Apache-2.0" ]
null
null
null
import argparse from slackbot.basic.igfbasicslackbot import IgfBasicSlackBot parser=argparse.ArgumentParser() parser.add_argument('-s','--slack_config', required=True, help='Slack configuration json file') parser.add_argument('-p','--project_data', required=True, help='Project data CSV file') args=parser.parse_args()...
31.888889
95
0.771777
0
0
0
0
0
0
0
0
94
0.163763
1f201209100b12ce6a3d7fab4f4d25eb9b397c33
258
py
Python
python/Exercises105Bonus.py
TerryRPatterson/Coursework
633d15b9ceb4e5a3cc4c74d0ca44ab91d7faa7c7
[ "Apache-2.0" ]
null
null
null
python/Exercises105Bonus.py
TerryRPatterson/Coursework
633d15b9ceb4e5a3cc4c74d0ca44ab91d7faa7c7
[ "Apache-2.0" ]
null
null
null
python/Exercises105Bonus.py
TerryRPatterson/Coursework
633d15b9ceb4e5a3cc4c74d0ca44ab91d7faa7c7
[ "Apache-2.0" ]
2
2018-02-16T00:44:16.000Z
2018-02-16T18:44:45.000Z
def countDown(start,message): import time if start > 20: raise OverflowError("Countdown can accept numbers bigger that 20.") for i in range(start,0,-1): time.sleep(1) print(i) print(message) countDown(20,"Blastoff!🚀")
25.8
75
0.631783
0
0
0
0
0
0
0
0
61
0.233716
1f2103ff16477b77dbb801e6f1f09baa26d1ea3b
1,170
py
Python
bgbl/management/commands/fix_glyphs.py
okfde/api.offenegesetze.de
85bc0a1a65dfa77651b7319eb0fccde1a27ba193
[ "MIT" ]
16
2018-12-10T11:59:44.000Z
2020-06-28T21:37:15.000Z
bgbl/management/commands/fix_glyphs.py
bundestag/api.offenegesetze.de
280673b9995a8a5c1fd01b1cb14dc0046599530f
[ "MIT" ]
21
2020-02-11T23:17:52.000Z
2022-01-05T13:58:20.000Z
bgbl/management/commands/fix_glyphs.py
bundestag/api.offenegesetze.de
280673b9995a8a5c1fd01b1cb14dc0046599530f
[ "MIT" ]
1
2018-12-11T20:17:09.000Z
2018-12-11T20:17:09.000Z
from glob import glob import os import shutil from django.core.management.base import BaseCommand from bgbl.pdf_utils import fix_glyphs, remove_watermark class Command(BaseCommand): help = 'Fix glyphs pdfs' def add_arguments(self, parser): parser.add_argument('doc_path', type=str) def handle(s...
30.789474
81
0.638462
1,011
0.864103
0
0
0
0
0
0
134
0.11453
1f228e4d5652a96220edc4fa67e8ff6e9ecc91ac
657
py
Python
catalog/bindings/csw/time_topology_complex_type.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/csw/time_topology_complex_type.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/csw/time_topology_complex_type.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass, field from typing import List from bindings.csw.abstract_time_complex_type import AbstractTimeComplexType from bindings.csw.time_topology_primitive_property_type import ( TimeTopologyPrimitivePropertyType, ) __NAMESPACE__ = "http://www.opengis.net/gml" @dataclass class TimeTopo...
26.28
75
0.703196
350
0.532725
0
0
361
0.549467
0
0
138
0.210046
1f251d95dc8853c21e444177f77e27a265f912f3
1,534
py
Python
maro/cli/grass/lib/services/node_api_server/blueprints/containers.py
yangboz/maro
0973783e55ca07bf8e177910c9d47854117a4ea8
[ "MIT" ]
598
2020-09-23T00:50:22.000Z
2022-03-31T08:12:54.000Z
maro/cli/grass/lib/services/node_api_server/blueprints/containers.py
gx9702/maro
38c796f0a7ed1e0f64c299d96c6e0df032401fa9
[ "MIT" ]
235
2020-09-22T10:20:48.000Z
2022-03-31T02:10:03.000Z
maro/cli/grass/lib/services/node_api_server/blueprints/containers.py
gx9702/maro
38c796f0a7ed1e0f64c299d96c6e0df032401fa9
[ "MIT" ]
116
2020-09-22T09:19:04.000Z
2022-02-12T05:04:07.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from flask import Blueprint, abort, request from ...utils.docker_controller import DockerController from ...utils.exception import CommandExecutionError # Flask related. blueprint = Blueprint(name="container", import_name=__name__) URL_PREFIX...
22.895522
89
0.683833
0
0
0
0
1,167
0.760756
0
0
588
0.383312
1f25e26a1245bec906b2d218d9c2eb30d569b680
384
py
Python
examples/testlogger.py
ev3dev-python-tools/ev3devlogging
b98904d9d93059159637d87e5ebcab8ca093b0f1
[ "MIT" ]
null
null
null
examples/testlogger.py
ev3dev-python-tools/ev3devlogging
b98904d9d93059159637d87e5ebcab8ca093b0f1
[ "MIT" ]
null
null
null
examples/testlogger.py
ev3dev-python-tools/ev3devlogging
b98904d9d93059159637d87e5ebcab8ca093b0f1
[ "MIT" ]
null
null
null
# print to log file, not shown on screen (to stderr which ev3dev os puts in logfile) from ev3devlogger import log #from ev3devlogger import timedlog as log log("starwars song(log)") from ev3devlogger import timedlog timedlog("starwars song(timedlog)") print("starwars (print)") log("starwars song") from ev3devlogg...
27.428571
86
0.770833
0
0
0
0
0
0
0
0
238
0.619792
1f26b6eb6d6dcadfa381edb1a417fab9d0a51f97
5,305
py
Python
python_graphs/instruction_test.py
reshinthadithyan/python-graphs
1234c448cb38af44c963d5ef7f8d99f678028104
[ "Apache-2.0" ]
53
2021-04-12T14:20:16.000Z
2022-03-29T02:47:30.000Z
python_graphs/instruction_test.py
reshinthadithyan/python-graphs
1234c448cb38af44c963d5ef7f8d99f678028104
[ "Apache-2.0" ]
2
2021-09-08T16:37:34.000Z
2022-03-15T17:32:36.000Z
python_graphs/instruction_test.py
reshinthadithyan/python-graphs
1234c448cb38af44c963d5ef7f8d99f678028104
[ "Apache-2.0" ]
14
2021-05-08T04:34:46.000Z
2022-01-16T12:58:16.000Z
# Copyright (C) 2021 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
42.782258
77
0.6541
4,374
0.824505
0
0
0
0
0
0
1,346
0.253723
1f26c8fd4ac1dfad9af1cf8e92f70fe641af8f00
6,521
py
Python
src/licensedcode/saneyaml.py
chetanya-shrimali/scancode-toolkit
a1a22fb225cbeb211bd6f92272a46f1351f57d6b
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
src/licensedcode/saneyaml.py
chetanya-shrimali/scancode-toolkit
a1a22fb225cbeb211bd6f92272a46f1351f57d6b
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
src/licensedcode/saneyaml.py
chetanya-shrimali/scancode-toolkit
a1a22fb225cbeb211bd6f92272a46f1351f57d6b
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
# # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
33.441026
90
0.73455
272
0.041711
363
0.055666
0
0
0
0
3,724
0.571078
1f272919a0358c21a01d9a8008881e0d63626d7a
14,383
py
Python
tsutsuji/gui_tsutsuji.py
konawasabi/tsutsuji-trackcomputer
04469a8a9872e8bad3d661c5911b9c881fab8ca9
[ "Apache-2.0" ]
1
2022-03-14T00:35:05.000Z
2022-03-14T00:35:05.000Z
tsutsuji/gui_tsutsuji.py
konawasabi/tsutsuji-trackcomputer
04469a8a9872e8bad3d661c5911b9c881fab8ca9
[ "Apache-2.0" ]
null
null
null
tsutsuji/gui_tsutsuji.py
konawasabi/tsutsuji-trackcomputer
04469a8a9872e8bad3d661c5911b9c881fab8ca9
[ "Apache-2.0" ]
null
null
null
# # Copyright 2021-2022 konawasabi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
43.453172
144
0.643398
12,374
0.84326
0
0
0
0
0
0
2,320
0.158103
1f2ccc8e4139330b0b1a1e4de76035b03e5fa0d0
1,011
py
Python
extra/uniq.py
JarryShaw/darc
0fc8782bb2f641ca3734c94666cbc36e3d9cb09f
[ "BSD-3-Clause" ]
24
2020-07-08T06:16:52.000Z
2022-02-19T00:33:34.000Z
extra/uniq.py
JarryShaw/darc
0fc8782bb2f641ca3734c94666cbc36e3d9cb09f
[ "BSD-3-Clause" ]
42
2020-05-29T12:56:10.000Z
2022-03-07T17:12:08.000Z
extra/uniq.py
JarryShaw/darc
0fc8782bb2f641ca3734c94666cbc36e3d9cb09f
[ "BSD-3-Clause" ]
7
2020-07-11T18:57:24.000Z
2022-02-01T21:46:30.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import tempfile def is_in(line: str, dest: str) -> bool: if os.path.isfile(dest): with open(dest) as file: for content in filter(None, map(lambda s: s.strip(), file)): if line == content: r...
24.071429
72
0.547972
0
0
0
0
0
0
0
0
70
0.069238
1f2d5d68906150aa022de6e4c0b468cf3688673c
353
py
Python
tests.py
B1Z0N/turingmachine
4c6761ee52fd05071d675a8cab8558025a5c26d9
[ "MIT" ]
null
null
null
tests.py
B1Z0N/turingmachine
4c6761ee52fd05071d675a8cab8558025a5c26d9
[ "MIT" ]
3
2020-03-24T16:53:31.000Z
2021-02-02T21:58:25.000Z
tests.py
B1Z0N/turingmachine
4c6761ee52fd05071d675a8cab8558025a5c26d9
[ "MIT" ]
null
null
null
""" Script that runs all tests written """ import os import pathlib import pytest cwd = pathlib.Path.cwd os.chdir(cwd() / "tests") def subfolders(dir): return [x[0] for x in os.walk(dir)][1:] # without current directory for subf in subfolders(cwd()): if not subf.endswith("__pycache__"): os.chd...
13.576923
72
0.645892
0
0
0
0
0
0
0
0
91
0.25779
1f2da5398cfdb995da864f3b7f84a89bc1c2fda5
7,933
py
Python
sandbox/straws/loadstraws.py
mustaric/lambda-tess-search
1d48133f32c8a073cba5d221f30c2d44e8d06e4b
[ "BSD-3-Clause" ]
2
2019-06-26T14:35:22.000Z
2020-05-12T15:26:27.000Z
sandbox/straws/loadstraws.py
mustaric/lambda-tess-search
1d48133f32c8a073cba5d221f30c2d44e8d06e4b
[ "BSD-3-Clause" ]
7
2019-06-26T20:52:14.000Z
2020-12-16T21:08:20.000Z
sandbox/straws/loadstraws.py
mustaric/lambda-tess-search
1d48133f32c8a073cba5d221f30c2d44e8d06e4b
[ "BSD-3-Clause" ]
2
2019-06-26T20:24:11.000Z
2020-05-12T19:36:04.000Z
# -*- coding: utf-8 -*- # Copyright 2017-2018 Orbital Insight Inc., all rights reserved. # Contains confidential and trade secret information. # Government Users: Commercial Computer Software - Use governed by # terms of Orbital Insight commercial license agreement. """ Created on Tue Oct 22 21:22:36 2019 @author: fe...
30.511538
87
0.573427
7,446
0.938611
0
0
0
0
0
0
3,474
0.437918
1f2febb0be1e8f771610a3b24e1a5429336b73dd
508
py
Python
vbench/scripts/vb_run_benchmarks.py
vene/vbench
77989fa0d3c45e63f576968d206021ffee72a24c
[ "MIT" ]
1
2017-08-12T03:11:42.000Z
2017-08-12T03:11:42.000Z
vbench/scripts/vb_run_benchmarks.py
vene/vbench
77989fa0d3c45e63f576968d206021ffee72a24c
[ "MIT" ]
null
null
null
vbench/scripts/vb_run_benchmarks.py
vene/vbench
77989fa0d3c45e63f576968d206021ffee72a24c
[ "MIT" ]
null
null
null
import sys import traceback import cPickle as pickle if len(sys.argv) != 3: print 'Usage: script.py input output' sys.exit() in_path, out_path = sys.argv[1:] benchmarks = pickle.load(open(in_path)) results = {} for bmk in benchmarks: try: res = bmk.run() results[bmk.checksum] = res ex...
22.086957
68
0.647638
0
0
0
0
0
0
0
0
62
0.122047
1f2ff6c7d9e8ddf98bfe8be97cd8f3e7685911e4
6,445
py
Python
problems/kitchencombinatorics/data/secret/gendata.py
stoman/CompetitiveProgramming
0000b64369b50e31c6f48939e837bdf6cece8ce4
[ "MIT" ]
2
2020-12-22T13:21:25.000Z
2021-12-12T22:26:26.000Z
problems/kitchencombinatorics/data/secret/gendata.py
stoman/CompetitiveProgramming
0000b64369b50e31c6f48939e837bdf6cece8ce4
[ "MIT" ]
null
null
null
problems/kitchencombinatorics/data/secret/gendata.py
stoman/CompetitiveProgramming
0000b64369b50e31c6f48939e837bdf6cece8ce4
[ "MIT" ]
null
null
null
import sys import random MAX_R = 1000 MAX_D = 25 MAX_K = 20 MAX_C = 2000 MAX_B = 100 case_no = 1 def next_file(suffix=None, desc=None): global case_no basename = '%02d' % case_no if suffix is None else '%02d-%s' % (case_no, suffix) f = open(basename + '.in', 'w') if desc is not None: with ope...
42.401316
213
0.621257
0
0
0
0
0
0
0
0
1,106
0.171606
1f30e7564e6c5decd42ff9ef937b6271af7e25ce
8,797
py
Python
MISC/opt_omega_ip.py
PHOTOX/photoxrepo
83ad3813e9c52926e6387afc76813e99d430a5f3
[ "MIT" ]
4
2015-03-27T09:12:44.000Z
2022-01-18T08:45:29.000Z
MISC/opt_omega_ip.py
PHOTOX/photoxrepo
83ad3813e9c52926e6387afc76813e99d430a5f3
[ "MIT" ]
5
2015-01-06T22:08:58.000Z
2021-04-12T07:56:34.000Z
MISC/opt_omega_ip.py
PHOTOX/photoxrepo
83ad3813e9c52926e6387afc76813e99d430a5f3
[ "MIT" ]
2
2019-09-02T11:43:32.000Z
2022-01-18T08:45:30.000Z
#!/usr/bin/env python import os import sys sys.path.append(os.getcwd()) import abinitio_driver as driver from abinitio_driver import AUtoEV import scipy.optimize as opt from scipy.interpolate import interp1d try: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt except: pass # This i...
32.581481
103
0.665909
0
0
0
0
0
0
0
0
3,605
0.409799
1f36e08746ee116943eb44bc9ccc08813b7b6dbe
415
py
Python
test/test_pbp.py
Galtozzy/basketball_reference_scraper
fb0081f2ae146f3a7da3a17d4e30af0c0dc1124a
[ "MIT" ]
191
2020-01-14T19:32:54.000Z
2022-03-29T17:57:19.000Z
test/test_pbp.py
Galtozzy/basketball_reference_scraper
fb0081f2ae146f3a7da3a17d4e30af0c0dc1124a
[ "MIT" ]
59
2020-01-14T18:55:09.000Z
2022-03-03T21:10:03.000Z
test/test_pbp.py
Galtozzy/basketball_reference_scraper
fb0081f2ae146f3a7da3a17d4e30af0c0dc1124a
[ "MIT" ]
76
2020-01-08T19:50:31.000Z
2022-03-31T18:52:06.000Z
import unittest from basketball_reference_scraper.pbp import get_pbp class TestPbp(unittest.TestCase): def test_pbp(self): df = get_pbp('2020-01-06', 'DEN', 'ATL') expected_columns = ['QUARTER', 'TIME_REMAINING', 'DENVER_ACTION', 'ATLANTA_ACTION', 'DENVER_SCORE', 'ATLANTA_SCORE'] self.asser...
34.583333
124
0.710843
296
0.713253
0
0
0
0
0
0
117
0.281928
1f376809bd6d755cb0caead50017abc148fc244a
978
py
Python
bin/grep.py
Blindfold/pk-mod
24f958b0d501a3b5d9393dcad1e69987c2448968
[ "Apache-2.0" ]
1
2019-04-03T20:02:40.000Z
2019-04-03T20:02:40.000Z
bin/grep.py
Blindfold-Games/pk-mod
24f958b0d501a3b5d9393dcad1e69987c2448968
[ "Apache-2.0" ]
3
2015-01-03T23:56:51.000Z
2015-01-15T09:16:46.000Z
bin/grep.py
Blindfold-Games/pk-mod
24f958b0d501a3b5d9393dcad1e69987c2448968
[ "Apache-2.0" ]
null
null
null
import re import os from sys import argv def grep(match): def _do_grep_wrapper(match): def _do_grep(lines): if match(lines): yield lines return _do_grep return _do_grep_wrapper(match) def find(what, where, depth=True): """ :param what: str String to search ...
27.166667
96
0.5818
0
0
194
0.198364
0
0
0
0
227
0.232106
1f39f0a7bb12ceef46b29fb32101f2f558a75220
2,023
py
Python
solution.py
nandita16gupta/CSV-Reading-using-Dynamic-Programming
793f9a9b23c2b1ea45d9ec71ea7070690932f9aa
[ "Apache-2.0" ]
null
null
null
solution.py
nandita16gupta/CSV-Reading-using-Dynamic-Programming
793f9a9b23c2b1ea45d9ec71ea7070690932f9aa
[ "Apache-2.0" ]
null
null
null
solution.py
nandita16gupta/CSV-Reading-using-Dynamic-Programming
793f9a9b23c2b1ea45d9ec71ea7070690932f9aa
[ "Apache-2.0" ]
null
null
null
import csv def inner(cell, spreadsheet): try: parts = cell.split() if len(parts) == 0: return 0.0 stack = [] for part in parts: if part[0].isalpha(): col = ord(part[0]) - ord('a') row = int(part[1:]) - 1 cell ...
24.373494
53
0.44439
0
0
0
0
0
0
0
0
130
0.064261
1f3ab12d8151036391c9ff1e4b3cbf52e4305e09
1,147
py
Python
slacm/exceptions.py
SLAcM/SLAcM
62943f4a68725674b103c73fcbcd25bb9cb5890e
[ "Apache-2.0" ]
1
2022-01-13T03:19:24.000Z
2022-01-13T03:19:24.000Z
slacm/exceptions.py
SLAcM/SLAcM
62943f4a68725674b103c73fcbcd25bb9cb5890e
[ "Apache-2.0" ]
null
null
null
slacm/exceptions.py
SLAcM/SLAcM
62943f4a68725674b103c73fcbcd25bb9cb5890e
[ "Apache-2.0" ]
null
null
null
''' Created on Sep 19, 2020 @author: esdev ''' class SlacmException(Exception): ''' Base class for all SLAcM expressions ''' def __init__(self, message): super().__init__(message) class NotYetImplemented(SlacmException): def __init__(self, message): super().__ini...
24.404255
41
0.652136
1,007
0.877942
0
0
0
0
0
0
100
0.087184
1f3ca2663f904f54aa3ffae1453e96545934c8ab
959
py
Python
tests/test_auth.py
ChukwuEmekaAjah/buycoins_python
86547aa742364a0e308b1dfb5f7c73b4467b1e06
[ "MIT" ]
1
2021-03-25T19:28:48.000Z
2021-03-25T19:28:48.000Z
tests/test_auth.py
ChukwuEmekaAjah/buycoins_python
86547aa742364a0e308b1dfb5f7c73b4467b1e06
[ "MIT" ]
null
null
null
tests/test_auth.py
ChukwuEmekaAjah/buycoins_python
86547aa742364a0e308b1dfb5f7c73b4467b1e06
[ "MIT" ]
null
null
null
from buycoins_client import Auth import unittest class TestAuthMethods(unittest.TestCase): def test_invalid_secret_key_setup(self): """ Should throw an exception for invalid secret key """ try: Auth.setup("name",3) except Exception as e: self.ass...
26.638889
89
0.605839
858
0.894682
0
0
0
0
0
0
381
0.397289
1f3d20a100b0201057cb5b8f77818cba1ad9e63b
6,328
py
Python
icn/plc/main.py
PMaynard/ndn-water-treatment-testbed
926db68237b06f43f6e736f035201ed71fc153bc
[ "MIT" ]
3
2021-01-20T00:54:09.000Z
2021-06-02T01:54:02.000Z
icn/plc/main.py
PMaynard/ndn-water-treatment-testbed
926db68237b06f43f6e736f035201ed71fc153bc
[ "MIT" ]
null
null
null
icn/plc/main.py
PMaynard/ndn-water-treatment-testbed
926db68237b06f43f6e736f035201ed71fc153bc
[ "MIT" ]
null
null
null
# from ui import UI # from ui import UI_Element import sys import time import threading import socket from plcrpcservice import PLCRPCClient import pyndn from pyndn import Name from pyndn import Face from pyndn import Interest from pyndn.security import KeyChain from pyndn.security.identity import IdentityManager fr...
31.326733
112
0.588021
5,617
0.887642
0
0
0
0
0
0
1,824
0.288243
1f3eb22adbac011762c8a0158ac669343f090557
2,876
py
Python
cogs/administration.py
tigersharkpr13/AnsuraBot
035797121d8e7952bc38e32834cdb655c15cb703
[ "Unlicense" ]
null
null
null
cogs/administration.py
tigersharkpr13/AnsuraBot
035797121d8e7952bc38e32834cdb655c15cb703
[ "Unlicense" ]
null
null
null
cogs/administration.py
tigersharkpr13/AnsuraBot
035797121d8e7952bc38e32834cdb655c15cb703
[ "Unlicense" ]
null
null
null
from typing import Union import discord from discord.ext import commands import cogs.gamertags from ansura.ansurabot import AnsuraBot from ansura.ansuracontext import AnsuraContext class Administration(commands.Cog): def error(self, title, message={}, color=0xff0000): e = discord.Embed() e.colou...
40.507042
92
0.561544
2,635
0.916203
0
0
2,297
0.798679
2,233
0.776426
312
0.108484
1f3f0f56c3a1c070b48e8fbce26fe6e40715c8ef
357
py
Python
project/celery.py
kunugoda/jobbrd
19debcac7673a85eda4a8d1eb00e5537268bd601
[ "MIT" ]
1
2020-06-17T05:25:42.000Z
2020-06-17T05:25:42.000Z
project/celery.py
kunugoda/jobbrd
19debcac7673a85eda4a8d1eb00e5537268bd601
[ "MIT" ]
null
null
null
project/celery.py
kunugoda/jobbrd
19debcac7673a85eda4a8d1eb00e5537268bd601
[ "MIT" ]
null
null
null
import os from celery import Celery from django.conf import settings os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings') app = Celery('jobboard') app.config_from_object('django.conf:settings') app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) @app.task(bind=True) def debug_task(self): print(...
23.8
67
0.787115
0
0
0
0
87
0.243697
0
0
88
0.246499
1f3fa004ef7cd2d4e23f674d416525c0f3924172
128
py
Python
rotatelist/rotatelist.py
tanaytoshniwal/Python-Programs
6553a2dcef5d26aad5a818cafd3c678ef59e8b82
[ "MIT" ]
1
2019-01-29T18:46:39.000Z
2019-01-29T18:46:39.000Z
rotatelist/rotatelist.py
AlphaBAT69/Python-Programs
6553a2dcef5d26aad5a818cafd3c678ef59e8b82
[ "MIT" ]
null
null
null
rotatelist/rotatelist.py
AlphaBAT69/Python-Programs
6553a2dcef5d26aad5a818cafd3c678ef59e8b82
[ "MIT" ]
null
null
null
def rotatelist(l,k): (i,t) = (1,l) while i<=k: (l,i) = (l[len(l)-1:len(l)] + l[0:len(l)-1],i+1) (rot,l) = (l,t) return rot
21.333333
50
0.484375
0
0
0
0
0
0
0
0
0
0
1f406fa1d479f75e59d5f05a3c4ac549424cb9b7
214
py
Python
filer/models/__init__.py
pbs/django-filer
c862a84d4e1d86c14eeb509e341f6a7d39a421bf
[ "BSD-3-Clause" ]
1
2015-03-03T15:49:14.000Z
2015-03-03T15:49:14.000Z
filer/models/__init__.py
pbs/django-filer
c862a84d4e1d86c14eeb509e341f6a7d39a421bf
[ "BSD-3-Clause" ]
10
2015-04-08T14:16:52.000Z
2021-12-15T16:17:57.000Z
filer/models/__init__.py
pbs/django-filer
c862a84d4e1d86c14eeb509e341f6a7d39a421bf
[ "BSD-3-Clause" ]
null
null
null
#-*- coding: utf-8 -*- from .mixins import * from .filemodels import * from .clipboardmodels import * from .imagemodels import * from .foldermodels import * from .virtualitems import * from .archivemodels import *
23.777778
30
0.742991
0
0
0
0
0
0
0
0
22
0.102804
1f407417b73374a6afc645fcceeb6ced94f54f5e
2,388
py
Python
EGGS_labrad/clients/cryovac_clients/fma1700a_client.py
EGGS-Experiment/EGGS_Control
c29b3ab0e30dcb6e01d1ca3212ac64ad1506143b
[ "MIT" ]
2
2021-12-26T05:00:54.000Z
2021-12-30T17:15:49.000Z
EGGS_labrad/clients/cryovac_clients/fma1700a_client.py
EGGS-Experiment/EGGS_Control
c29b3ab0e30dcb6e01d1ca3212ac64ad1506143b
[ "MIT" ]
null
null
null
EGGS_labrad/clients/cryovac_clients/fma1700a_client.py
EGGS-Experiment/EGGS_Control
c29b3ab0e30dcb6e01d1ca3212ac64ad1506143b
[ "MIT" ]
null
null
null
from time import time from datetime import datetime from twisted.internet.defer import inlineCallbacks from EGGS_labrad.clients import GUIClient from EGGS_labrad.clients.cryovac_clients.fma1700a_gui import fma1700a_gui class fma1700a_client(GUIClient): name = 'FMA1700A Client' FLOWID = 877920 servers = ...
33.166667
100
0.620603
2,059
0.862228
1,615
0.676298
1,678
0.70268
0
0
471
0.197236
1f41c0a4ab7d43a2dea653442a426c4d1174eff9
1,653
py
Python
tests/test_model.py
camisatx/flasker
affc9fc13742e18434961b8ec15f133cc246dcd5
[ "MIT" ]
3
2020-12-12T01:30:08.000Z
2021-10-13T16:47:56.000Z
tests/test_model.py
camisatx/flasker
affc9fc13742e18434961b8ec15f133cc246dcd5
[ "MIT" ]
null
null
null
tests/test_model.py
camisatx/flasker
affc9fc13742e18434961b8ec15f133cc246dcd5
[ "MIT" ]
1
2020-12-12T01:30:13.000Z
2020-12-12T01:30:13.000Z
import sys import unittest sys.path.append('../') from app import db # NOQA from app.models import User # NOQA from tests.base import BaseTestCase # NOQA class UserModelCase(BaseTestCase): def test_model_password_hashing(self): """Test the password hashing.""" ...
31.788462
75
0.603146
1,409
0.85239
0
0
0
0
0
0
268
0.162129
1f41eb6162eb883a714a301cdb2d992b3f4f957d
119
py
Python
examples/__init__.py
DiMoser/PyPinT
3cba394d0fd87055ab412d35fe6dbf4a3b0dbe73
[ "MIT" ]
null
null
null
examples/__init__.py
DiMoser/PyPinT
3cba394d0fd87055ab412d35fe6dbf4a3b0dbe73
[ "MIT" ]
null
null
null
examples/__init__.py
DiMoser/PyPinT
3cba394d0fd87055ab412d35fe6dbf4a3b0dbe73
[ "MIT" ]
null
null
null
# coding=utf-8 """Examples demonstrating usage of PyPinT .. moduleauthor:: Torbjörn Klatt <t.klatt@fz-juelich.de> """
19.833333
56
0.722689
0
0
0
0
0
0
0
0
118
0.983333
1f43bc58bc8f57d5639beefb900d57b125412748
1,440
py
Python
cd4ml/app.py
joragupra/CD4ML-Scenarios
8c8886388260147cd5248dfa1945f60ebabfaacc
[ "MIT" ]
1
2020-12-24T19:52:58.000Z
2020-12-24T19:52:58.000Z
cd4ml/app.py
joragupra/CD4ML-Scenarios
8c8886388260147cd5248dfa1945f60ebabfaacc
[ "MIT" ]
null
null
null
cd4ml/app.py
joragupra/CD4ML-Scenarios
8c8886388260147cd5248dfa1945f60ebabfaacc
[ "MIT" ]
1
2020-05-04T18:21:41.000Z
2020-05-04T18:21:41.000Z
from flask import Flask, render_template, request import cd4ml.app_utils as utils from cd4ml.fluentd_logging import FluentdLogger app = Flask(__name__, template_folder='webapp/templates', static_folder='webapp/static') fluentd_logger = FluentdLogger() @app.route('/') def index(): return render_templ...
25.263158
66
0.702083
0
0
0
0
1,075
0.746528
0
0
210
0.145833
1f44b877c61b52c5169fcc3dc901630593e11752
1,456
py
Python
api/crud/events.py
cnuland/tbml
8dca907011971a8ad21dfc5b5d6bec1ddbff0818
[ "MIT" ]
null
null
null
api/crud/events.py
cnuland/tbml
8dca907011971a8ad21dfc5b5d6bec1ddbff0818
[ "MIT" ]
null
null
null
api/crud/events.py
cnuland/tbml
8dca907011971a8ad21dfc5b5d6bec1ddbff0818
[ "MIT" ]
null
null
null
from fastapi import HTTPException from tortoise.exceptions import DoesNotExist from db.models import Events from schemas.events import EventsOutSchema async def get_events(): return await EventsOutSchema.from_queryset(Events.all()) async def get_event(event_id) -> EventsOutSchema: return await EventsOutSch...
35.512195
86
0.76511
0
0
0
0
0
0
1,290
0.885989
114
0.078297
1f46b6c5cc84e0b05c2f63e339fe44af56c4515e
29,428
py
Python
sfx/sfx.py
Terry14/sfx
16bcf401ba3251b0de211276d97153469499515d
[ "MIT" ]
null
null
null
sfx/sfx.py
Terry14/sfx
16bcf401ba3251b0de211276d97153469499515d
[ "MIT" ]
null
null
null
sfx/sfx.py
Terry14/sfx
16bcf401ba3251b0de211276d97153469499515d
[ "MIT" ]
null
null
null
import asyncio import os import unicodedata import aiohttp import discord import lavalink import unidecode from redbot.core import Config, checks, commands from redbot.core.utils.chat_formatting import pagify from redbot.core.utils.predicates import MessagePredicate from .api import generate_urls try: from redb...
35.327731
157
0.571259
28,904
0.982194
0
0
22,239
0.755709
25,700
0.873318
7,504
0.254995
1f477811434f0fbba0fb2564e885e5ce2cde1027
581
py
Python
norm_files.py
jncraton/ipeds-data
e17b051bac3d4d112d83a85f38dc1422d4fb584b
[ "MIT" ]
null
null
null
norm_files.py
jncraton/ipeds-data
e17b051bac3d4d112d83a85f38dc1422d4fb584b
[ "MIT" ]
null
null
null
norm_files.py
jncraton/ipeds-data
e17b051bac3d4d112d83a85f38dc1422d4fb584b
[ "MIT" ]
null
null
null
""" Normalizes contents for all data files. - Converts column names to uppercase - Converts data values to uppercase - Converts to Unix line endings - Removes trailing whitespace from all lines """ import os csvs = ['data/' + f for f in os.listdir('data') if f.endswith('.csv')] for f in csvs: lf = f.lower() o...
19.366667
70
0.650602
0
0
0
0
0
0
0
0
246
0.423408
1f4a0b28023170a365cdcc71fab67b6fb8261389
2,929
py
Python
admin/sandbox.py
liuhh02/NERDA
7488d0c5adf3eb5296b1b276b412b95131557097
[ "MIT" ]
123
2020-12-19T09:36:28.000Z
2022-03-20T11:01:02.000Z
admin/sandbox.py
liuhh02/NERDA
7488d0c5adf3eb5296b1b276b412b95131557097
[ "MIT" ]
35
2021-02-14T09:46:11.000Z
2022-03-31T09:57:38.000Z
admin/sandbox.py
liuhh02/NERDA
7488d0c5adf3eb5296b1b276b412b95131557097
[ "MIT" ]
30
2021-01-28T11:02:31.000Z
2022-03-06T19:58:27.000Z
from NERDA.models import NERDA from NERDA.datasets import get_conll_data, get_dane_data from transformers import AutoTokenizer trans = 'bert-base-multilingual-uncased' tokenizer = AutoTokenizer.from_pretrained(trans, do_lower_case = True) data = get_dane_data('train') sents = data.get('sentences') out = [] for sent ...
26.627273
79
0.714237
0
0
0
0
0
0
0
0
1,408
0.48071
1f4f35f139c907b889c9bfaceea5f2502d416ae2
2,099
py
Python
ironic/tests/drivers/test_base.py
Tehsmash/ironic
a34c351639e960af92a3608fbc9249dfce5c6057
[ "Apache-2.0" ]
null
null
null
ironic/tests/drivers/test_base.py
Tehsmash/ironic
a34c351639e960af92a3608fbc9249dfce5c6057
[ "Apache-2.0" ]
null
null
null
ironic/tests/drivers/test_base.py
Tehsmash/ironic
a34c351639e960af92a3608fbc9249dfce5c6057
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Cisco Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
30.867647
78
0.697475
1,332
0.634588
0
0
286
0.136255
0
0
698
0.332539
1f51deb831801cb409889edbf97a6deabae048a4
1,368
py
Python
quantiphyse/packages/core/analysis/__init__.py
physimals/quantiphyse
bd3be0098b9929b1987fe0f23e515fa70674b3d4
[ "Apache-2.0" ]
9
2021-02-01T06:44:31.000Z
2022-01-17T15:46:40.000Z
quantiphyse/packages/core/analysis/__init__.py
ibme-qubic/quantiphyse
34f40424941414ce139c4612a903de3f24883576
[ "Apache-2.0" ]
34
2019-02-04T10:47:02.000Z
2020-08-13T09:36:52.000Z
quantiphyse/packages/core/analysis/__init__.py
ibme-qubic/quantiphyse
34f40424941414ce139c4612a903de3f24883576
[ "Apache-2.0" ]
2
2019-05-25T08:52:05.000Z
2020-06-18T13:59:00.000Z
""" Quantiphyse - Analysis widgets Copyright (c) 2013-2020 University of Oxford Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by a...
47.172414
123
0.811404
0
0
0
0
0
0
0
0
658
0.480994
1f528ea187b09ea162a161716dde9aff8b7b565d
1,042
py
Python
examples/chain_mdp.py
kngwyu/rlpy
329166de28d311d8f87358a62c38f40a7318fe07
[ "BSD-3-Clause" ]
3
2019-12-07T13:34:02.000Z
2021-03-29T10:20:05.000Z
examples/chain_mdp.py
kngwyu/rlpy
329166de28d311d8f87358a62c38f40a7318fe07
[ "BSD-3-Clause" ]
14
2019-09-29T03:09:09.000Z
2022-01-13T03:17:48.000Z
examples/chain_mdp.py
kngwyu/rlpy3
329166de28d311d8f87358a62c38f40a7318fe07
[ "BSD-3-Clause" ]
null
null
null
import click from rlpy.domains import ChainMDP from rlpy.tools.cli import run_experiment import methods def select_domain(chain_size): return ChainMDP(chain_size=chain_size) def select_agent(name, domain, max_steps, seed, **kwargs): if name is None or name == "lspi": return methods.tabular_lspi(dom...
28.944444
76
0.681382
0
0
0
0
0
0
0
0
89
0.085413
1f5495f299c3cac72ffba7fb46905bf9c811295d
694
py
Python
migrations/versions/6e2656ef034b_.py
haichungcn/h-ticketbox
37d3a3054a92fbb3702cac10f87621762b68bae2
[ "Apache-2.0" ]
null
null
null
migrations/versions/6e2656ef034b_.py
haichungcn/h-ticketbox
37d3a3054a92fbb3702cac10f87621762b68bae2
[ "Apache-2.0" ]
1
2021-06-02T00:42:03.000Z
2021-06-02T00:42:03.000Z
migrations/versions/6e2656ef034b_.py
haichungcn/h-ticketbox
37d3a3054a92fbb3702cac10f87621762b68bae2
[ "Apache-2.0" ]
null
null
null
"""empty message Revision ID: 6e2656ef034b Revises: f8f949ce4522 Create Date: 2019-11-26 11:05:54.376467 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '6e2656ef034b' down_revision = 'f8f949ce4522' branch_labels = None depends_on = None def upgrade(): # ...
23.931034
80
0.708934
0
0
0
0
0
0
0
0
444
0.639769
1f54a8fce56dc2266fdcba4960db2d6b32f72f6a
1,940
py
Python
python/heterocl/mlir/context.py
chhzh123/heterocl
856e9b8ad877d11280a7e457e91ca89803c05570
[ "Apache-2.0" ]
null
null
null
python/heterocl/mlir/context.py
chhzh123/heterocl
856e9b8ad877d11280a7e457e91ca89803c05570
[ "Apache-2.0" ]
null
null
null
python/heterocl/mlir/context.py
chhzh123/heterocl
856e9b8ad877d11280a7e457e91ca89803c05570
[ "Apache-2.0" ]
null
null
null
from contextvars import ContextVar from hcl_mlir.dialects import hcl as hcl_d from hcl_mlir.ir import * ImperativeLoopNestCount = ContextVar("ImperativeLoopNestCount", default=1) ImperativeLoopDepth = ContextVar("ImperativeLoopDepth", default=0) StageName = ContextVar("StageName", default="") NestedCompute = ContextV...
27.714286
79
0.619588
1,439
0.741753
0
0
900
0.463918
0
0
273
0.140722
1f572ce92d4767535e92d6069a13c0b878ad4d2b
1,216
py
Python
378. Kth Smallest Element in a Sorted Matrix.py
XinchaoGou/MyLeetCode
bba0ab077374f7da2cb1a990266bc59fa7ddf23c
[ "MIT" ]
null
null
null
378. Kth Smallest Element in a Sorted Matrix.py
XinchaoGou/MyLeetCode
bba0ab077374f7da2cb1a990266bc59fa7ddf23c
[ "MIT" ]
null
null
null
378. Kth Smallest Element in a Sorted Matrix.py
XinchaoGou/MyLeetCode
bba0ab077374f7da2cb1a990266bc59fa7ddf23c
[ "MIT" ]
null
null
null
from typing import List import heapq # 排序 class Solution: def kthSmallest(self, matrix: List[List[int]], k: int) -> int: res = sorted(sum(matrix,[])) return res[k-1] # 最小堆维护归并排序 class Solution: def kthSmallest(self, matrix: List[List[int]], k: int) -> int: n = len(matrix) hpq = ...
27.022222
66
0.449836
1,151
0.925241
0
0
0
0
0
0
48
0.038585