hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
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
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
ffc38006fdd80d176c6dd5a974bf142fe5572de8
4,153
py
Python
pi/run.py
br1985/aiy-photo-booth
ac4a681199ee23e8a5e664719c7182098d82449e
[ "MIT" ]
null
null
null
pi/run.py
br1985/aiy-photo-booth
ac4a681199ee23e8a5e664719c7182098d82449e
[ "MIT" ]
null
null
null
pi/run.py
br1985/aiy-photo-booth
ac4a681199ee23e8a5e664719c7182098d82449e
[ "MIT" ]
null
null
null
#!/usr/bin/env python import datetime import json import math import random import signal import subprocess import sys import time import threading import aiy._drivers._buzzer import aiy.leds import aiy.pins import gpiozero import picamera def photo(): global led0, led1, camera led0.update(aiy.leds.Leds.pri...
23.201117
131
0.55791
782ee2bc52d1e6ce0dfd0f167a38c11bf38ae256
4,031
py
Python
wagtail/wagtailcore/migrations/0014_add_verbose_name.py
balkantechnologies/BalkanCMS_core
68625199028fc96abb175e410a4a7a92c02cb261
[ "BSD-3-Clause" ]
1
2021-09-21T00:06:52.000Z
2021-09-21T00:06:52.000Z
wagtail/wagtailcore/migrations/0014_add_verbose_name.py
balkantechnologies/BalkanCMS_core
68625199028fc96abb175e410a4a7a92c02cb261
[ "BSD-3-Clause" ]
1
2021-02-24T08:25:30.000Z
2021-02-24T08:25:30.000Z
wagtail/wagtailcore/migrations/0014_add_verbose_name.py
balkantechnologies/BalkanCMS_core
68625199028fc96abb175e410a4a7a92c02cb261
[ "BSD-3-Clause" ]
1
2020-11-24T10:21:24.000Z
2020-11-24T10:21:24.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0013_update_golive_expire_help_text'), ] operations = [ migrations.AlterField( model_name='groupp...
43.344086
273
0.615728
568421f16703fbd66c98882ea0fea2afc43cb5c3
1,965
py
Python
Main.py
JohnDoe2576/MRAC
c0175cb07d17e9ebeb92437bf3e8700ad7e50128
[ "MIT" ]
null
null
null
Main.py
JohnDoe2576/MRAC
c0175cb07d17e9ebeb92437bf3e8700ad7e50128
[ "MIT" ]
null
null
null
Main.py
JohnDoe2576/MRAC
c0175cb07d17e9ebeb92437bf3e8700ad7e50128
[ "MIT" ]
null
null
null
from Parameters import * from Generate_Data import * from MRAC_Sim import * from Plot_Data import * import matplotlib.pyplot as plt import pickle as pkl # ---------------------------------------------------------------------------- # Parameters # ---------------------------...
36.388889
80
0.550127
651ba49e3c919a502e120594319686289b7b5123
83,309
py
Python
python/cudf/tests/test_dataframe.py
revans2/cudf
59bbb17ec4a2d040e999c3f86c56158e89d9dd0b
[ "Apache-2.0" ]
null
null
null
python/cudf/tests/test_dataframe.py
revans2/cudf
59bbb17ec4a2d040e999c3f86c56158e89d9dd0b
[ "Apache-2.0" ]
null
null
null
python/cudf/tests/test_dataframe.py
revans2/cudf
59bbb17ec4a2d040e999c3f86c56158e89d9dd0b
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018, NVIDIA CORPORATION. import operator import pytest import numpy as np import pandas as pd import pyarrow as pa import array as arr from librmm_cffi import librmm as rmm import cudf as gd from cudf.dataframe.dataframe import Series, DataFrame from cudf.dataframe.buffer import Buffer from cudf.se...
30.900964
138
0.593705
9d7e9c3401c5e826781cac17bd0c13d77f8a3162
2,142
py
Python
tests/test_joe.py
joiiewang/ProjectBackEndCC
6496ae89454765ddca8724974a3379079662a909
[ "Apache-2.0" ]
null
null
null
tests/test_joe.py
joiiewang/ProjectBackEndCC
6496ae89454765ddca8724974a3379079662a909
[ "Apache-2.0" ]
3
2020-11-21T21:48:38.000Z
2020-11-25T10:33:15.000Z
tests/test_joe.py
joiiewang/ProjectBackEndCC
6496ae89454765ddca8724974a3379079662a909
[ "Apache-2.0" ]
null
null
null
import json from base64 import b64encode # Database is reset between tests # Not sure if this is the best way to do things def test_joe(app,client): res = client.post('/api/v2/users/',json={"username":"joe","password":"monkey"}) assert res.status_code == 200 # success res = client.get('/api/v2/users/') ...
36.305085
93
0.643791
3da41ff0fdaa16ffcc1be2126aabcd92c8cf202c
3,727
py
Python
experiments/composition59.py
brendanhowell/cursor
81ac2e1e80f0a3ca56208b9498026fca147e7e0b
[ "MIT" ]
3
2021-12-02T08:30:02.000Z
2022-03-06T18:25:15.000Z
experiments/composition59.py
brendanhowell/cursor
81ac2e1e80f0a3ca56208b9498026fca147e7e0b
[ "MIT" ]
41
2020-03-22T13:15:04.000Z
2022-03-17T11:29:47.000Z
experiments/composition59.py
brendanhowell/cursor
81ac2e1e80f0a3ca56208b9498026fca147e7e0b
[ "MIT" ]
2
2020-01-09T16:35:14.000Z
2022-02-28T15:21:08.000Z
from cursor.path import Path, PathCollection from cursor import device import math def plain_spiral(pp): theta = 0 yextra = 0 r = 50 while theta < 255: y = r * math.cos(theta) * 2 x = r * math.sin(theta) + yextra pp.add(x, y, 0) theta += 0.02 yextra += 0.15 ...
21.056497
67
0.531527
03a72e466e1226d0b6e3c163d098b311997359d4
149
py
Python
tubbs/formatter/scala/__init__.py
tek/tubbs
cd4c174c31b6c58a6935ca8a5f0f141377a9a04c
[ "MIT" ]
null
null
null
tubbs/formatter/scala/__init__.py
tek/tubbs
cd4c174c31b6c58a6935ca8a5f0f141377a9a04c
[ "MIT" ]
null
null
null
tubbs/formatter/scala/__init__.py
tek/tubbs
cd4c174c31b6c58a6935ca8a5f0f141377a9a04c
[ "MIT" ]
null
null
null
from tubbs.formatter.scala.breaker import VimBreaker from tubbs.formatter.scala.indenter import VimIndenter __all__ = ('VimBreaker', 'VimIndenter')
29.8
54
0.818792
2f7b89db0c70099e9cd9b28f1b28d305465c33fb
895
py
Python
example/12.statics_files.py
ToteBrick/Tornado
4200b829ac6fbc5cf58021fe4710a3941ffcf6a2
[ "BSD-3-Clause" ]
null
null
null
example/12.statics_files.py
ToteBrick/Tornado
4200b829ac6fbc5cf58021fe4710a3941ffcf6a2
[ "BSD-3-Clause" ]
null
null
null
example/12.statics_files.py
ToteBrick/Tornado
4200b829ac6fbc5cf58021fe4710a3941ffcf6a2
[ "BSD-3-Clause" ]
null
null
null
# _*_coding: utf-8 _*_ import os import tornado.web import tornado.httpserver import tornado.ioloop from tornado.options import define, options define("port", default=8001, help="run on the given port", type=int) class IndexHandler(tornado.web.RequestHandler): def get(self): name = self.get_argument("n...
27.96875
68
0.682682
85d9bb2a6f76da3de9f5992b86142ef939df1de6
24,471
py
Python
animations/utils/gamegl.py
TristanCacqueray/demo-render
4c8403e684165e5e75c046ee023c1f794a6650a8
[ "Apache-2.0" ]
9
2018-02-19T14:17:12.000Z
2021-03-27T14:46:28.000Z
animations/utils/gamegl.py
TristanCacqueray/demo-render
4c8403e684165e5e75c046ee023c1f794a6650a8
[ "Apache-2.0" ]
null
null
null
animations/utils/gamegl.py
TristanCacqueray/demo-render
4c8403e684165e5e75c046ee023c1f794a6650a8
[ "Apache-2.0" ]
null
null
null
# 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, software # distributed under t...
35.311688
100
0.524171
9e897aa5aa765bf8352c1de8daf0fbeb566a2a3b
319
py
Python
configs/_base_/schedules/schedule_1x.py
kcyoon689/mmdetection
7d5861ccb42a54bcaf6f431d31a802a5416c8ff2
[ "Apache-2.0" ]
null
null
null
configs/_base_/schedules/schedule_1x.py
kcyoon689/mmdetection
7d5861ccb42a54bcaf6f431d31a802a5416c8ff2
[ "Apache-2.0" ]
null
null
null
configs/_base_/schedules/schedule_1x.py
kcyoon689/mmdetection
7d5861ccb42a54bcaf6f431d31a802a5416c8ff2
[ "Apache-2.0" ]
null
null
null
# optimizer optimizer = dict(type='SGD', lr=0.001, momentum=0.9, weight_decay=0.0001) optimizer_config = dict(grad_clip=None) # learning policy lr_config = dict( policy='step', warmup='linear', warmup_iters=500, warmup_ratio=0.001, step=[8, 11]) runner = dict(type='EpochBasedRunner', max_epochs=2)
26.583333
73
0.69906
de2828eb8ad269d494ec148e5bff66a2655e7764
3,463
py
Python
segment_formation_1.py
deepakrana47/Wheat-quality-detector
2f8d3e0c951d2fc800e70de16f9c8f62d793c89b
[ "MIT" ]
1
2018-10-24T10:50:15.000Z
2018-10-24T10:50:15.000Z
segment_formation_1.py
gremlin97/Wheat-quality-detector
2f8d3e0c951d2fc800e70de16f9c8f62d793c89b
[ "MIT" ]
null
null
null
segment_formation_1.py
gremlin97/Wheat-quality-detector
2f8d3e0c951d2fc800e70de16f9c8f62d793c89b
[ "MIT" ]
1
2019-02-20T10:00:16.000Z
2019-02-20T10:00:16.000Z
import numpy as np, cv2, os from threshold import otsu_threshold from _8connected import get_8connected from Area import areaThreshold_by_havg def segment_image(img_file, exp=3): org = cv2.imread(img_file,cv2.IMREAD_COLOR) h, w = org.shape[:2] # removing noise by using Non-local Means Denoising algorithm...
37.236559
132
0.564251
943f5c9a6d7d442702fa9e7afdf443353cdcaa3e
3,664
py
Python
bindings/python/ensmallen/datasets/string/candidatuswoesebacteriabacteriumrifcsphigho212full429.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/candidatuswoesebacteriabacteriumrifcsphigho212full429.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/candidatuswoesebacteriabacteriumrifcsphigho212full429.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Candidatus Woesebacteria bacterium RIFCSPHIGHO2_12_FULL_42_9. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, ...
34.895238
223
0.692959
9fd04212266dbdbfcf341ce3065d5d5864421804
11,270
py
Python
structures/linked_lists.py
VldmrB/py-toy-data-structures
cdbe43a3f66779b13628ac44c17fa935d7eb26d3
[ "Unlicense" ]
null
null
null
structures/linked_lists.py
VldmrB/py-toy-data-structures
cdbe43a3f66779b13628ac44c17fa935d7eb26d3
[ "Unlicense" ]
null
null
null
structures/linked_lists.py
VldmrB/py-toy-data-structures
cdbe43a3f66779b13628ac44c17fa935d7eb26d3
[ "Unlicense" ]
null
null
null
from typing import Union, Any """ Linked list and nodes implementations. To an extent, syntax and logic mirrors that of Python's list. """ class SingleNode: def __init__(self, value): self.value = value self.next = None def __repr__(self): value = (f'{self.value!r}' if isinstance(se...
33.049853
79
0.529814
f8d6f8943b61f69eb440a5b3ca6402f851d23705
705
py
Python
archived/silbiocomp/Practicals/Code/tuple.py
mathemage/TheMulQuaBio
63a0ad6803e2aa1b808bc4517009c18a8c190b4c
[ "MIT" ]
1
2019-10-12T13:33:14.000Z
2019-10-12T13:33:14.000Z
archived/silbiocomp/Practicals/Code/tuple.py
OScott19/TheMulQuaBio
197d710f76163469dfc7fa9d2d95ba3a739eccc7
[ "MIT" ]
null
null
null
archived/silbiocomp/Practicals/Code/tuple.py
OScott19/TheMulQuaBio
197d710f76163469dfc7fa9d2d95ba3a739eccc7
[ "MIT" ]
null
null
null
birds = ( ('Passerculus sandwichensis','Savannah sparrow',18.7), ('Delichon urbica','House martin',19), ('Junco phaeonotus','Yellow-eyed junco',19.5), ('Junco hyemalis','Dark-eyed junco',19.6), ('Tachycineata bicolor','Tree swallow',20.2), ) # Birds is a tuple of tuples ...
44.0625
86
0.680851
2b6dc458d8b98db02aaf665bfc996fa7da3167e2
7,807
py
Python
fastai2/callback/fp16.py
davanstrien/fastai2
48459c2882360310b5ddb4482a247535854eb50d
[ "Apache-2.0" ]
null
null
null
fastai2/callback/fp16.py
davanstrien/fastai2
48459c2882360310b5ddb4482a247535854eb50d
[ "Apache-2.0" ]
null
null
null
fastai2/callback/fp16.py
davanstrien/fastai2
48459c2882360310b5ddb4482a247535854eb50d
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/18_callback.fp16.ipynb (unless otherwise specified). __all__ = ['get_master', 'to_master_grads', 'to_model_params', 'test_overflow', 'grad_overflow', 'copy_clone', 'ModelToHalf', 'MixedPrecision', 'mixed_precision_one_batch', 'NativeMixedPrecision'] # Cell fr...
39.629442
136
0.670296
85d29bba6239f589554ab8d165a2df962c4a6c48
999
py
Python
J18_10/multiziperator.py
jdputsch/WPE
ddb2d594b8354f0c989a36fd95bb26387dbec994
[ "MIT" ]
null
null
null
J18_10/multiziperator.py
jdputsch/WPE
ddb2d594b8354f0c989a36fd95bb26387dbec994
[ "MIT" ]
1
2018-03-14T12:37:05.000Z
2018-03-14T12:37:05.000Z
J18_10/multiziperator.py
jdputsch/WPE
ddb2d594b8354f0c989a36fd95bb26387dbec994
[ "MIT" ]
null
null
null
#!/bin/env python def multiziperator(*args): """Return elements of iterable inputs one at a time. Args: *args: One or more iterables Yields: Return elements of each input, interleaved, one at a time. Example: Given: letters = 'abcde' numbers = [1,2...
21.255319
70
0.513514
93134047d8a1460b79433d0cf7ef26c559413d4c
319
py
Python
artifacts/console_user.py
chilcote/unearth
1aaa79195850aac8920efe2d632911d19d998fa3
[ "Apache-2.0" ]
71
2017-07-05T11:29:44.000Z
2021-12-14T16:39:30.000Z
artifacts/console_user.py
chilcote/unearth
1aaa79195850aac8920efe2d632911d19d998fa3
[ "Apache-2.0" ]
7
2017-08-29T15:35:08.000Z
2021-12-07T17:37:48.000Z
artifacts/console_user.py
chilcote/unearth
1aaa79195850aac8920efe2d632911d19d998fa3
[ "Apache-2.0" ]
18
2017-08-29T15:00:54.000Z
2021-09-21T15:11:44.000Z
from SystemConfiguration import SCDynamicStoreCopyConsoleUser factoid = "console_user" def fact(): """Returns the current console user""" result = SCDynamicStoreCopyConsoleUser(None, None, None)[0] return {factoid: result} if __name__ == "__main__": print("<result>%s</result>" % fact()[factoid])
21.266667
63
0.708464
2886077994916f9ca67ddc597972a2f43959ab03
621
py
Python
backend/app_api/models/module_model.py
defnngj/quick
98031a0fddf325820ec135a62253468f46aa2ba6
[ "Apache-2.0" ]
1
2021-12-21T16:25:29.000Z
2021-12-21T16:25:29.000Z
backend/app_api/models/module_model.py
defnngj/quick
98031a0fddf325820ec135a62253468f46aa2ba6
[ "Apache-2.0" ]
null
null
null
backend/app_api/models/module_model.py
defnngj/quick
98031a0fddf325820ec135a62253468f46aa2ba6
[ "Apache-2.0" ]
1
2022-03-26T14:01:28.000Z
2022-03-26T14:01:28.000Z
from django.db import models from app_api.models import Project class Module(models.Model): """ 模块表 """ project = models.ForeignKey(Project, on_delete=models.CASCADE) name = models.CharField("名称", max_length=100, null=False, default="") describe = models.TextField("描述", null=True, blank=True, ...
32.684211
73
0.698873
c533505ae10ced534afd1a045e246635a762e45a
1,097
py
Python
kaybee/app.py
pauleveritt/kaybee
a00a718aaaa23b2d12db30dfacb6b2b6ec84459c
[ "Apache-2.0" ]
2
2017-11-08T19:55:57.000Z
2018-12-21T12:41:41.000Z
kaybee/app.py
pauleveritt/kaybee
a00a718aaaa23b2d12db30dfacb6b2b6ec84459c
[ "Apache-2.0" ]
null
null
null
kaybee/app.py
pauleveritt/kaybee
a00a718aaaa23b2d12db30dfacb6b2b6ec84459c
[ "Apache-2.0" ]
1
2018-10-13T08:59:29.000Z
2018-10-13T08:59:29.000Z
""" Built-in registry app that can be used directly in docs projects. The app defines a set of configured actions. These come mostly from plugins. Kaybee ships with some built-in plugins, and this app bundles them up. Other sites might have other plugins and thus need a custom subclass for the app. """ import decta...
34.28125
72
0.811304
8fa90ff16f4c2718147e2b5c07923eafed30489a
942
py
Python
covid19_forecaster/v2/parking.py
PhiladelphiaController/covid19-forecaster
e2b4718b51c4b250db74269a73451f616db43bb5
[ "MIT" ]
1
2020-05-01T17:29:31.000Z
2020-05-01T17:29:31.000Z
covid19_forecaster/v2/parking.py
PhiladelphiaController/covid19-forecaster
e2b4718b51c4b250db74269a73451f616db43bb5
[ "MIT" ]
2
2021-03-04T22:31:09.000Z
2021-03-04T22:31:36.000Z
covid19_forecaster/v2/parking.py
PhiladelphiaController/covid19-forecaster
e2b4718b51c4b250db74269a73451f616db43bb5
[ "MIT" ]
null
null
null
import numpy as np from ..core import RevenueForecast from ..forecasters import DefaultForecaster from . import ( BASELINE_START, BASELINE_STOP, FORECAST_START, FORECAST_STOP, FREQ, ) class ParkingTaxForecast(DefaultForecaster, RevenueForecast): """Parking tax revenue forecast.""" ASSUMP...
25.459459
62
0.606157
f1df6d5eb768da2f1a985d0c4f665af65385ef63
1,017
py
Python
swg_generated/python/test/test_withdraw_coin.py
942star/upbit-client
43201797a605d1e1b3e0db1183ced8ec9997699f
[ "MIT" ]
1
2021-11-03T15:13:03.000Z
2021-11-03T15:13:03.000Z
swg_generated/python/test/test_withdraw_coin.py
942star/upbit-client
43201797a605d1e1b3e0db1183ced8ec9997699f
[ "MIT" ]
null
null
null
swg_generated/python/test/test_withdraw_coin.py
942star/upbit-client
43201797a605d1e1b3e0db1183ced8ec9997699f
[ "MIT" ]
1
2021-11-03T15:12:55.000Z
2021-11-03T15:12:55.000Z
# coding: utf-8 """ Upbit Open API ## REST API for Upbit Exchange - Base URL: [https://api.upbit.com] - Official Upbit API Documents: [https://docs.upbit.com] - Official Support email: [open-api@upbit.com] # noqa: E501 OpenAPI spec version: 1.1.6 Contact: ujhin942@gmail.com Generated by: https:...
24.804878
189
0.697148
83905ad5408fa0239af5833016c397dfa837cadb
2,025
py
Python
akv/secrets.py
casperlehmann/akv
bc74724e8dd29aea9cbae02c07c5ad123a760631
[ "MIT" ]
1
2021-05-11T11:04:27.000Z
2021-05-11T11:04:27.000Z
akv/secrets.py
casperlehmann/akv
bc74724e8dd29aea9cbae02c07c5ad123a760631
[ "MIT" ]
null
null
null
akv/secrets.py
casperlehmann/akv
bc74724e8dd29aea9cbae02c07c5ad123a760631
[ "MIT" ]
null
null
null
import os import logging from azure.keyvault.secrets import SecretClient from azure.identity import EnvironmentCredential from azure.core import exceptions class Secrets(): def __init__(self): for env_var in ('AZURE_TENANT_ID', 'AZURE_CLIENT_ID', 'KEY_VAULT_NAME', 'AZURE_CLIENT_SECR...
46.022727
106
0.637531
0c349ddb9c95a8b2cc0adb5b126f669326cb7b63
15,101
py
Python
kaivy/graphics/canvas.py
team-kaivy/kaivy
e27b53e8e9eedc48abc99151f3adbb76f0a9b331
[ "MIT" ]
null
null
null
kaivy/graphics/canvas.py
team-kaivy/kaivy
e27b53e8e9eedc48abc99151f3adbb76f0a9b331
[ "MIT" ]
null
null
null
kaivy/graphics/canvas.py
team-kaivy/kaivy
e27b53e8e9eedc48abc99151f3adbb76f0a9b331
[ "MIT" ]
null
null
null
####################################################################################################################### # # # This file is part of kAIvy ...
48.87055
136
0.613999
54567a11faccb16e1d4fe3fe4d27eb5b4e2ac418
6,313
py
Python
lib/api/taco_tuesday_api_handler.py
justinmuskopf/taco_tuesday_slack_app
5e8f6a481446fb079869c4fdbe6de55111f9aa5e
[ "Unlicense" ]
2
2019-10-07T15:02:49.000Z
2019-10-08T16:47:17.000Z
lib/api/taco_tuesday_api_handler.py
justinmuskopf/taco_tuesday_slack_app
5e8f6a481446fb079869c4fdbe6de55111f9aa5e
[ "Unlicense" ]
27
2019-10-22T20:16:56.000Z
2020-03-03T17:16:34.000Z
lib/api/taco_tuesday_api_handler.py
justinmuskopf/taco_tuesday_slack_app
5e8f6a481446fb079869c4fdbe6de55111f9aa5e
[ "Unlicense" ]
2
2019-10-08T16:48:51.000Z
2020-02-15T20:20:15.000Z
from http import HTTPStatus from json import JSONDecodeError from requests.auth import HTTPBasicAuth from config.api_config import TacoTuesdayApiConfig from lib.domain.domain_error import DomainError from lib.domain.employee import Employee from lib.domain.full_order import FullOrder from lib.domain.individual_order ...
35.666667
152
0.638524
cc6c083bffe733ed96654ddc43f7fc3f919c6ec8
332
py
Python
backend/resources/cocoa.py
aecobb53/civ_vi_city_planner
bac9517507f0f50a172fe821a8c08d7945fdf74f
[ "MIT" ]
2
2020-12-10T03:10:52.000Z
2020-12-27T06:17:01.000Z
backend/resources/cocoa.py
aecobb53/civ_vi_city_planner
bac9517507f0f50a172fe821a8c08d7945fdf74f
[ "MIT" ]
8
2020-12-10T06:38:10.000Z
2021-05-01T22:27:37.000Z
backend/resources/cocoa.py
aecobb53/civ_vi_city_planner
bac9517507f0f50a172fe821a8c08d7945fdf74f
[ "MIT" ]
null
null
null
from backend.common_tile import CommonTile class Cocoa(CommonTile): def __init__(self): super().__init__() self.food = 1 self.resource_type = 'bonus' self.terrain = [] self.features = [ 'rainforest' ] self.improvement = [ 'plantation...
19.529412
42
0.527108
4b16a58f97187e572cd34846ad6745ccbd27a60e
4,613
py
Python
python/ray/air/tests/test_huggingface_trainer.py
orcahmlee/ray
298742d7241681ee1f307ec0dd3cd7e9713a3c7d
[ "Apache-2.0" ]
null
null
null
python/ray/air/tests/test_huggingface_trainer.py
orcahmlee/ray
298742d7241681ee1f307ec0dd3cd7e9713a3c7d
[ "Apache-2.0" ]
41
2021-09-21T01:13:48.000Z
2022-03-19T07:12:22.000Z
python/ray/air/tests/test_huggingface_trainer.py
LaudateCorpus1/ray
20cf2edfef7103c269358a49a48c2159315ee132
[ "Apache-2.0" ]
null
null
null
import pandas as pd import pytest from unittest.mock import patch from ray.air.train.integrations.huggingface.huggingface_utils import TrainReportCallback from transformers import ( AutoConfig, AutoModelForCausalLM, AutoTokenizer, Trainer, TrainingArguments, ) from transformers.trainer_callback imp...
32.485915
88
0.700629
5c51fb2e467e66505939954fe471fc7d7c9e52cf
4,199
py
Python
src/custom_codes/scripts/ur_inverse_kinematics.py
lar-deeufba/potential_fields
19f7a0f73e503a00999fa9e175d8cc1d432bee99
[ "BSD-2-Clause" ]
6
2020-01-14T17:56:03.000Z
2021-08-10T18:57:04.000Z
src/custom_codes/scripts/ur_inverse_kinematics.py
lar-deeufba/potential_fields
19f7a0f73e503a00999fa9e175d8cc1d432bee99
[ "BSD-2-Clause" ]
null
null
null
src/custom_codes/scripts/ur_inverse_kinematics.py
lar-deeufba/potential_fields
19f7a0f73e503a00999fa9e175d8cc1d432bee99
[ "BSD-2-Clause" ]
3
2019-12-21T02:50:39.000Z
2022-01-04T02:53:07.000Z
#!/usr/bin/env python ## UR5/UR10 Inverse Kinematics - Ryan Keating Johns Hopkins University # ***** lib import numpy as np from numpy import linalg import cmath import math from math import cos as cos from math import sin as sin from math import atan2 as atan2 from math import acos as acos from math import asin as a...
25.295181
86
0.49488
4af1cb6450f02e56edbd572d604e73f5c0a5e88f
62,896
py
Python
d3m/primitive_interfaces/base.py
tods-doc/d3m
e25793d4aaa9a8fdb63ac33bf1c045b96d6067a6
[ "Apache-2.0" ]
null
null
null
d3m/primitive_interfaces/base.py
tods-doc/d3m
e25793d4aaa9a8fdb63ac33bf1c045b96d6067a6
[ "Apache-2.0" ]
null
null
null
d3m/primitive_interfaces/base.py
tods-doc/d3m
e25793d4aaa9a8fdb63ac33bf1c045b96d6067a6
[ "Apache-2.0" ]
null
null
null
import abc import inspect import logging import time import typing from d3m import exceptions, types, utils from d3m.metadata import base as metadata_base, hyperparams, params, problem __all__ = ( 'Inputs', 'Outputs', 'Params', 'Hyperparams', 'CallResult', 'MultiCallResult', 'DockerContainer', 'PrimitiveBase'...
48.605873
181
0.688613
4f96c0939b645ec244564682782409773d58b39d
364
py
Python
releng_tool/tool/svn.py
releng-tool/releng-tool
cd8728f35a7bdaf6ef90fd019e8c33bc5da8b265
[ "BSD-2-Clause" ]
7
2019-04-06T21:21:22.000Z
2021-12-10T04:07:20.000Z
releng_tool/tool/svn.py
releng-tool/releng-tool
cd8728f35a7bdaf6ef90fd019e8c33bc5da8b265
[ "BSD-2-Clause" ]
1
2019-10-01T20:03:10.000Z
2019-10-02T20:28:00.000Z
releng_tool/tool/svn.py
releng-tool/releng-tool
cd8728f35a7bdaf6ef90fd019e8c33bc5da8b265
[ "BSD-2-Clause" ]
1
2021-07-23T17:00:57.000Z
2021-07-23T17:00:57.000Z
# -*- coding: utf-8 -*- # Copyright 2018-2021 releng-tool from releng_tool.tool import RelengTool #: executable used to run svn commands SVN_COMMAND = 'svn' #: list of environment keys to filter from a environment dictionary SVN_SANITIZE_ENV_KEYS = [ 'SVN_MERGE', ] #: svn host tool helper SVN = RelengTool(SVN_C...
22.75
67
0.755495
ba2e91ef2a76db9cc006186eea8b088e927373eb
11,470
py
Python
SimPEG/PF/Gravity.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
1
2021-02-13T18:15:12.000Z
2021-02-13T18:15:12.000Z
SimPEG/PF/Gravity.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
null
null
null
SimPEG/PF/Gravity.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
1
2021-01-14T08:33:45.000Z
2021-01-14T08:33:45.000Z
from __future__ import print_function from SimPEG import Problem, Mesh from SimPEG import Utils from SimPEG.Utils import mkvc from SimPEG import Props import scipy as sp import scipy.constants as constants import os import time import numpy as np class GravityIntegral(Problem.LinearProblem): rho, rhoMap, rhoDeriv...
27.839806
92
0.499303
51830ed4c7d50707215dbbc054350ff1ce3ef44a
581
py
Python
open_cp/snippets/scrollframe.py
sumau/PredictCode
e2a2d5a8fa5d83f011c33e18d4ce6ac7e1429aa8
[ "Artistic-2.0" ]
18
2017-04-19T09:17:19.000Z
2021-05-24T08:53:28.000Z
open_cp/snippets/scrollframe.py
sumau/PredictCode
e2a2d5a8fa5d83f011c33e18d4ce6ac7e1429aa8
[ "Artistic-2.0" ]
8
2017-06-11T17:46:35.000Z
2021-06-07T10:49:10.000Z
open_cp/snippets/scrollframe.py
sumau/PredictCode
e2a2d5a8fa5d83f011c33e18d4ce6ac7e1429aa8
[ "Artistic-2.0" ]
10
2017-07-19T18:29:37.000Z
2020-11-12T22:06:45.000Z
import tkinter as tk import tkinter.ttk as ttk import os, sys sys.path.insert(0, os.path.join("..", "..")) import open_cp.gui.tk.util as util root = tk.Tk() util.centre_window_percentage(root, 50, 50) util.stretchy_columns(root, [0]) util.stretchy_rows(root, [0]) sf = util.ScrolledFrame(root) sf.grid() t...
22.346154
90
0.671256
56a20c9b8dc1c45ed850ec84b888205577ac5b5b
1,904
py
Python
blockformer/position/learned_encoding.py
colinski/blockformer
56be6abc08dc25ab97c526384e9c69f6c814c3ed
[ "MIT" ]
null
null
null
blockformer/position/learned_encoding.py
colinski/blockformer
56be6abc08dc25ab97c526384e9c69f6c814c3ed
[ "MIT" ]
null
null
null
blockformer/position/learned_encoding.py
colinski/blockformer
56be6abc08dc25ab97c526384e9c69f6c814c3ed
[ "MIT" ]
null
null
null
import math import torch import torch.nn as nn import torch.nn.functional as F #x and y are [bs1,bs2,...,bk] x n #interleave along feat dim #output is [bs1,bs2,...,bk] x 2n def interleave(x, y): z = torch.stack([x, y], dim=-1) #bs x n x 2 z = z.flatten(-2) #bs x 2*n return z #built from mmdetection and Co...
34
76
0.627101
e3e144a50978fb9a86e876e998f61cef41981916
6,777
py
Python
vendor/packages/amqp/amqp/exceptions.py
DESHRAJ/fjord
8899b6286b23347c9b024334e61c33fe133e836d
[ "BSD-3-Clause" ]
1
2015-08-04T19:41:53.000Z
2015-08-04T19:41:53.000Z
microblog/flask/venv/lib/python2.7/site-packages/amqp/exceptions.py
johankaito/fufuka
32a96ecf98ce305c2206c38443e58fdec88c788d
[ "Apache-2.0" ]
1
2021-12-13T20:55:07.000Z
2021-12-13T20:55:07.000Z
microblog/flask/venv/lib/python2.7/site-packages/amqp/exceptions.py
johankaito/fufuka
32a96ecf98ce305c2206c38443e58fdec88c788d
[ "Apache-2.0" ]
1
2020-11-01T20:40:01.000Z
2020-11-01T20:40:01.000Z
"""Exceptions used by amqp""" # Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your o...
26.166023
77
0.671093
050f13de18adebe8da5346bf78ac9534291ca667
1,567
py
Python
django_backend/fleet/migrations/0001_initial.py
CapacitacionDesoft/travels-log
9b70061ec6a9bde14c14b255498a04a85ecf642c
[ "MIT" ]
2
2021-05-20T18:26:08.000Z
2021-08-31T02:43:26.000Z
django_backend/fleet/migrations/0001_initial.py
CapacitacionDesoft/travels-log
9b70061ec6a9bde14c14b255498a04a85ecf642c
[ "MIT" ]
null
null
null
django_backend/fleet/migrations/0001_initial.py
CapacitacionDesoft/travels-log
9b70061ec6a9bde14c14b255498a04a85ecf642c
[ "MIT" ]
null
null
null
# Generated by Django 3.2.3 on 2021-05-24 01:50 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Driver', fields=[ ('id', models.BigAutoFiel...
38.219512
121
0.564135
1c37aaa572f430e147ce57c950d49214c220c7f1
13,738
py
Python
game/data/scripts/quests/605_AllianceWithKetraOrcs/__init__.py
TheDemonLife/Lineage2Server-Interlude
d23d145db533fd899d4064026e4bc7ee45c6624a
[ "Apache-2.0" ]
10
2019-07-27T13:12:11.000Z
2022-01-15T19:13:26.000Z
game/data/scripts/quests/605_AllianceWithKetraOrcs/__init__.py
TheDemonLife/Lineage2Server-Interlude
d23d145db533fd899d4064026e4bc7ee45c6624a
[ "Apache-2.0" ]
1
2021-08-06T12:15:01.000Z
2021-08-09T10:18:47.000Z
game/data/scripts/quests/605_AllianceWithKetraOrcs/__init__.py
TheDemonLife/Lineage2Server-Interlude
d23d145db533fd899d4064026e4bc7ee45c6624a
[ "Apache-2.0" ]
2
2020-02-20T23:02:26.000Z
2020-11-22T09:27:51.000Z
# Made by Emperorc # Rate Fix by Gnat import sys from ru.catssoftware import Config from ru.catssoftware.gameserver.model.quest import State from ru.catssoftware.gameserver.model.quest import QuestState from ru.catssoftware.gameserver.model.quest.jython import QuestJython as JQuest qn = "605_AllianceWithKetraOrcs" #N...
39.705202
153
0.59521
59d5a93197667caa8de7bc989abc1911c2325088
498
py
Python
homeworks/hw07/tests/q2c.py
cwakamiya/ieor135
084490380f265225927d11b43d948c1206b0aab8
[ "Apache-2.0" ]
28
2020-06-15T23:53:36.000Z
2022-03-19T09:27:02.000Z
homeworks/hw07/tests/q2c.py
cwakamiya/ieor135
084490380f265225927d11b43d948c1206b0aab8
[ "Apache-2.0" ]
4
2020-06-24T22:20:31.000Z
2022-02-28T01:37:36.000Z
homeworks/hw07/tests/q2c.py
cwakamiya/ieor135
084490380f265225927d11b43d948c1206b0aab8
[ "Apache-2.0" ]
78
2020-06-19T09:41:01.000Z
2022-02-05T00:13:29.000Z
test = { 'name': 'q2c', 'points': 1, 'suites': [ { 'cases': [ { 'code': '>>> df.index.name == ' "'Authors'\n" 'True', 'hidden': False, ...
41.5
70
0.2249
5e204728211f80d96baa31418627225e5f4459bd
12,914
py
Python
src/borg/testsuite/__init__.py
strager/borg
9019b48fd5982802af44a510b9decc05fa672c33
[ "BSD-3-Clause" ]
2
2020-04-28T02:49:10.000Z
2020-11-24T19:36:37.000Z
src/borg/testsuite/__init__.py
strager/borg
9019b48fd5982802af44a510b9decc05fa672c33
[ "BSD-3-Clause" ]
null
null
null
src/borg/testsuite/__init__.py
strager/borg
9019b48fd5982802af44a510b9decc05fa672c33
[ "BSD-3-Clause" ]
1
2020-04-28T02:59:58.000Z
2020-04-28T02:59:58.000Z
from contextlib import contextmanager import filecmp import functools import os try: import posix except ImportError: posix = None import stat import sys import sysconfig import tempfile import time import uuid import unittest from ..xattr import get_all from ..platform import get_flags from ..helpers import ...
35.575758
126
0.616618
59ce6c64f4f0b33315dd8a6a32df013ca8cfd922
2,071
py
Python
hyperglass/configuration/models/commands/arista.py
samip5/hyperglass
270ffecebb765289a4ecc75c774d6f7cc9741f7a
[ "BSD-3-Clause-Clear" ]
null
null
null
hyperglass/configuration/models/commands/arista.py
samip5/hyperglass
270ffecebb765289a4ecc75c774d6f7cc9741f7a
[ "BSD-3-Clause-Clear" ]
null
null
null
hyperglass/configuration/models/commands/arista.py
samip5/hyperglass
270ffecebb765289a4ecc75c774d6f7cc9741f7a
[ "BSD-3-Clause-Clear" ]
null
null
null
"""Arista Command Model.""" # Third Party from pydantic import StrictStr # Project from hyperglass.configuration.models.commands.common import CommandSet, CommandGroup class _IPv4(CommandSet): """Validation model for non-default dual afi commands.""" bgp_route: StrictStr = "show ip bgp {target}" bgp_as...
36.333333
84
0.699179
a67dc317b264e3cbfbddde03010048be9ef483fa
261,001
py
Python
salt/states/file.py
calinrailean/salt
6283b51bb44b734a3db82caaae4f4c4e32a9b9b3
[ "Apache-2.0" ]
2
2018-11-08T02:59:24.000Z
2021-01-04T00:30:50.000Z
salt/states/file.py
calinrailean/salt
6283b51bb44b734a3db82caaae4f4c4e32a9b9b3
[ "Apache-2.0" ]
4
2020-09-04T10:19:34.000Z
2020-11-09T12:55:59.000Z
salt/states/file.py
calinrailean/salt
6283b51bb44b734a3db82caaae4f4c4e32a9b9b3
[ "Apache-2.0" ]
5
2017-06-16T23:48:13.000Z
2021-04-08T17:43:48.000Z
# -*- coding: utf-8 -*- ''' Operations on regular files, special files, directories, and symlinks ===================================================================== Salt States can aggressively manipulate files on a system. There are a number of ways in which files can be managed. Regular files can be enforced wit...
35.906039
117
0.560109
2c60e92a42288de66771dda94d171c99fc65baf6
12,007
py
Python
main.py
DvaMishkiLapa/xolm3
bfbb49bca33dd0c978896ba14df7cbf13a370036
[ "Apache-2.0" ]
null
null
null
main.py
DvaMishkiLapa/xolm3
bfbb49bca33dd0c978896ba14df7cbf13a370036
[ "Apache-2.0" ]
null
null
null
main.py
DvaMishkiLapa/xolm3
bfbb49bca33dd0c978896ba14df7cbf13a370036
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import sys import matplotlib import matplotlib.pyplot as plt import numpy as np from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg from matplotlib.backends.backend_qt5agg import \ NavigationToolbar2QT as NavigationToolbar2 from PyQt5 import QtCore, QtGui, QtWidgets import ma...
39.496711
142
0.58924
fed1bbe0097aa2d8f0b3161bf96c8d04e8e739f6
2,283
py
Python
bottomdetection/work_files_bottom_detector.py
CRIMAC-WP4-Machine-learning/CRIMAC-classifiers-bottom
b62e2bf68f47b5585aafc0ed7106ccca2fa3d1f2
[ "MIT" ]
null
null
null
bottomdetection/work_files_bottom_detector.py
CRIMAC-WP4-Machine-learning/CRIMAC-classifiers-bottom
b62e2bf68f47b5585aafc0ed7106ccca2fa3d1f2
[ "MIT" ]
1
2021-05-21T11:54:04.000Z
2021-05-28T13:43:36.000Z
bottomdetection/work_files_bottom_detector.py
CRIMAC-WP4-Machine-learning/CRIMAC-classifiers-bottom
b62e2bf68f47b5585aafc0ed7106ccca2fa3d1f2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Uses the lowest layer boundary in LSSS work files as the detected bottom. Copyright (c) 2021, Contributors to the CRIMAC project. Licensed under the MIT license. """ import xml.etree.ElementTree as ET from pathlib import Path import numpy as np import xarray as xr def detect_bottom(zarr...
40.052632
103
0.712221
a90765c2b926f34cd446348cc739c08318315706
698
py
Python
deepinesStore/__init__.py
weblate/deepines-store
ddfbd324550a3f2fd256da595165e5f26819a3c1
[ "Apache-2.0" ]
1
2022-03-20T16:12:20.000Z
2022-03-20T16:12:20.000Z
deepinesStore/__init__.py
weblate/deepines-store
ddfbd324550a3f2fd256da595165e5f26819a3c1
[ "Apache-2.0" ]
null
null
null
deepinesStore/__init__.py
weblate/deepines-store
ddfbd324550a3f2fd256da595165e5f26819a3c1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from deepinesStore.store import run_gui from deepinesStore.svg import threading_svg from deepinesStore.maing import get_res from requests import get EXCLUIDOS = 'https://raw.githubusercontent.com/deepin-espanol/deepines-store/nightly/deepinesStore/config/excluidos.txt' DEEPINES = 'https://raw.git...
33.238095
120
0.776504
50bfa89f895afa84ffa8ca69bc1d3e91690e2b7f
1,813
py
Python
movies_recommender/utils.py
mateuszrusin/filmweb-rekomendacje
06bdff3825f4c9e7b80fb5778d1a40388d2313d9
[ "MIT" ]
3
2019-12-10T10:20:07.000Z
2020-12-03T17:37:24.000Z
movies_recommender/utils.py
mateuszrusin/filmweb-rekomendacje
06bdff3825f4c9e7b80fb5778d1a40388d2313d9
[ "MIT" ]
2
2021-03-31T19:31:04.000Z
2021-12-13T20:32:18.000Z
movies_recommender/utils.py
mateuszrusin/filmweb-rekomendacje
06bdff3825f4c9e7b80fb5778d1a40388d2313d9
[ "MIT" ]
4
2019-11-21T23:49:39.000Z
2020-12-03T17:37:26.000Z
from collections import defaultdict # https://surprise.readthedocs.io/en/stable/FAQ.html#how-to-get-the-top-n-recommendations-for-each-user def get_top_n(predictions, n=10, minimum_rating=4.0): top_n = defaultdict(list) for userID, movieID, actualRating, estimatedRating, _ in predictions: if estimate...
31.258621
103
0.661886
e67dc0f86e7afbad75f8401e6d10d1df08362fb5
3,645
py
Python
bcpy/binary_callers.py
Arcturus-io/bcpy
d41d3f468e8d9960a1bbdc6f3859d953251673b1
[ "MIT" ]
null
null
null
bcpy/binary_callers.py
Arcturus-io/bcpy
d41d3f468e8d9960a1bbdc6f3859d953251673b1
[ "MIT" ]
null
null
null
bcpy/binary_callers.py
Arcturus-io/bcpy
d41d3f468e8d9960a1bbdc6f3859d953251673b1
[ "MIT" ]
1
2020-09-28T19:09:02.000Z
2020-09-28T19:09:02.000Z
import subprocess from io import StringIO import hashlib import pandas as pd def sha512(text, encoding='utf-8'): """Converts an input string to its sha512 hash """ if not isinstance(text, bytes): if isinstance(text, str): text = text.encode(encoding) else: raise Va...
35.735294
96
0.61893
8f9c1b2a3de2a0484207bb7b6c4bde91d614d8aa
519
py
Python
Lab_Misc/forms.py
SimonSchubotz/Electronic-Laboratory-Notebook
a5dc3daa76b07370c1ee5b7e74fb6c780c3d3c97
[ "Apache-2.0" ]
null
null
null
Lab_Misc/forms.py
SimonSchubotz/Electronic-Laboratory-Notebook
a5dc3daa76b07370c1ee5b7e74fb6c780c3d3c97
[ "Apache-2.0" ]
null
null
null
Lab_Misc/forms.py
SimonSchubotz/Electronic-Laboratory-Notebook
a5dc3daa76b07370c1ee5b7e74fb6c780c3d3c97
[ "Apache-2.0" ]
null
null
null
from django import forms from bootstrap_modal_forms.forms import BSModalForm from django.db.models import fields from mptt.models import MPTTModel, TreeForeignKey from django.apps import apps from Lab_Misc.models import SampleBase def get_Form(group_name, model_name): class Form(BSModalForm): class Meta: ...
27.315789
58
0.714836
952c0159fbc8a4bade0d6072dca18175058f7185
1,468
py
Python
PyMOTW/source/zlib/zlib_checksum_tests.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2019-01-04T05:47:50.000Z
2019-01-04T05:47:50.000Z
PyMOTW/source/zlib/zlib_checksum_tests.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2020-07-18T03:52:03.000Z
2020-07-18T04:18:01.000Z
PyMOTW/source/zlib/zlib_checksum_tests.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
2
2021-03-06T04:28:32.000Z
2021-03-06T04:59:17.000Z
#!/usr/bin/env python3 # encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. # """ """ #end_pymotw_header import textwrap import timeit iterations = 1000 def show_results(title, result, iterations): "Report microseconds per pass and per item." per_pass = 1000000 * (result / iterations)...
23.301587
60
0.635559
65851e13f99d9d2382c1e05e4898cb2e35da428f
624
py
Python
Functions/exercicio_3.py
JoaoFelipe-AlvesOliveira/LearningPython
ecc500956a99b9b6852cd6502f928bc0ebc34dff
[ "MIT" ]
null
null
null
Functions/exercicio_3.py
JoaoFelipe-AlvesOliveira/LearningPython
ecc500956a99b9b6852cd6502f928bc0ebc34dff
[ "MIT" ]
null
null
null
Functions/exercicio_3.py
JoaoFelipe-AlvesOliveira/LearningPython
ecc500956a99b9b6852cd6502f928bc0ebc34dff
[ "MIT" ]
null
null
null
def calcularPercentualValores(valorPrincipal,valorRecebido): porcentagem = valorPrincipal+valorRecebido*100 return porcentagem valorPrincipal = float(input("Digite o valor principal")) valorRecebido = float(input("Digite o valor recebido")) porcentagem = calcularPercentualValores(valorPrincipal,valorRecebido) ...
41.6
85
0.762821
aa924b93c1660110e7ba9ec5594e8ff71edb5b53
534
py
Python
packages/python/plotly/plotly/validators/scatter3d/marker/_opacity.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/scatter3d/marker/_opacity.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/scatter3d/marker/_opacity.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scatter3d.marker", **kwargs): super(OpacityValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
35.6
88
0.631086
5c4ec99c533829240ac0bcc9647acb870f3412f8
35,510
py
Python
python/paddle/fluid/io.py
jichangjichang/Paddle
4fa3cee5499c6df0ad6043b0cfa220d09f2034e8
[ "Apache-2.0" ]
9
2017-12-04T02:58:01.000Z
2020-12-03T14:46:30.000Z
python/paddle/fluid/io.py
jichangjichang/Paddle
4fa3cee5499c6df0ad6043b0cfa220d09f2034e8
[ "Apache-2.0" ]
7
2017-12-05T20:29:08.000Z
2018-10-15T08:57:40.000Z
python/paddle/fluid/io.py
jichangjichang/Paddle
4fa3cee5499c6df0ad6043b0cfa220d09f2034e8
[ "Apache-2.0" ]
6
2018-03-19T22:38:46.000Z
2019-11-01T22:28:27.000Z
# Copyright (c) 2018 PaddlePaddle Authors. 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 required by app...
38.347732
110
0.602394
8813781a668b35bd922a99fedd473c95fa6beb2c
1,115
py
Python
src/bloomberg/datalake/datalakequeryingester/_request_handler.py
mosiac1/datalake-query-ingester
11550a67b085d568b210448ba5c2604988b63ded
[ "Apache-2.0" ]
5
2021-11-12T15:56:04.000Z
2022-02-17T09:53:32.000Z
src/bloomberg/datalake/datalakequeryingester/_request_handler.py
mosiac1/datalake-query-ingester
11550a67b085d568b210448ba5c2604988b63ded
[ "Apache-2.0" ]
null
null
null
src/bloomberg/datalake/datalakequeryingester/_request_handler.py
mosiac1/datalake-query-ingester
11550a67b085d568b210448ba5c2604988b63ded
[ "Apache-2.0" ]
2
2021-11-24T16:00:37.000Z
2022-02-16T21:33:07.000Z
""" ** Copyright 2021 Bloomberg Finance L.P. ** ** 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 applica...
29.342105
76
0.728251
2286fe7731c080d33787ac2f8caa5bde9b915a17
11,325
py
Python
docker/s3tests/base.py
yuchen-sun/chubaofs
8f2d60d4b193afb7a6d6ca0b980a07580c1823ae
[ "Apache-2.0" ]
2,498
2019-04-27T11:54:46.000Z
2022-01-20T09:53:30.000Z
docker/s3tests/base.py
yuchen-sun/chubaofs
8f2d60d4b193afb7a6d6ca0b980a07580c1823ae
[ "Apache-2.0" ]
332
2019-04-28T03:42:42.000Z
2022-01-19T08:47:32.000Z
docker/s3tests/base.py
yuchen-sun/chubaofs
8f2d60d4b193afb7a6d6ca0b980a07580c1823ae
[ "Apache-2.0" ]
367
2019-04-27T11:55:17.000Z
2022-01-22T09:21:06.000Z
# Copyright 2020 The ChubaoFS 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 by applicable law or agreed to in...
40.302491
114
0.669845
95ee507a58c210586298b2ce0592d86ebf273402
6,140
py
Python
chrome/common/extensions/docs/server2/branch_utility_test.py
MIPS/external-chromium_org
e31b3128a419654fd14003d6117caa8da32697e7
[ "BSD-3-Clause" ]
2
2017-10-19T13:50:00.000Z
2019-05-26T20:11:54.000Z
chrome/common/extensions/docs/server2/branch_utility_test.py
carlosavignano/android_external_chromium_org
2b5652f7889ccad0fbdb1d52b04bad4c23769547
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
chrome/common/extensions/docs/server2/branch_utility_test.py
carlosavignano/android_external_chromium_org
2b5652f7889ccad0fbdb1d52b04bad4c23769547
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
3
2017-07-31T19:09:52.000Z
2019-01-04T18:48:50.000Z
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import unittest from branch_utility import BranchUtility from fake_url_fetcher import FakeUrlFetcher from obj...
41.486486
77
0.684365
002abd12bc0f2c4d5668e81858604fc18ec874a8
55,443
py
Python
pyNastran/dev/bdf_vectorized2/cards/loads/loads.py
luzpaz/pyNastran
939e9eefdc87a3bf67939a23dc09f155b93969a0
[ "BSD-3-Clause" ]
null
null
null
pyNastran/dev/bdf_vectorized2/cards/loads/loads.py
luzpaz/pyNastran
939e9eefdc87a3bf67939a23dc09f155b93969a0
[ "BSD-3-Clause" ]
null
null
null
pyNastran/dev/bdf_vectorized2/cards/loads/loads.py
luzpaz/pyNastran
939e9eefdc87a3bf67939a23dc09f155b93969a0
[ "BSD-3-Clause" ]
null
null
null
from __future__ import annotations from typing import TYPE_CHECKING from collections import defaultdict from itertools import count import numpy as np from pyNastran.bdf.bdf_interface.assign_type import ( integer, integer_or_blank, double, double_or_blank, string_or_blank, integer_string_or_blank, string, fiel...
36.284686
109
0.487546
9f4acd8dff0fb79493326c3f30a82fbcd7ad1fa0
1,036
py
Python
src/richie/plugins/section/cms_plugins.py
Bodyhealer/richie
287139f0e71d49b747b703ecad4b194fa1be67ac
[ "MIT" ]
174
2018-04-14T23:36:01.000Z
2022-03-10T09:27:01.000Z
src/richie/plugins/section/cms_plugins.py
EDUlib/richie
3f9b14b929641f9392e54ba9badbb7a9a9fe7d44
[ "MIT" ]
631
2018-04-04T11:28:53.000Z
2022-03-31T11:18:31.000Z
src/richie/plugins/section/cms_plugins.py
EDUlib/richie
3f9b14b929641f9392e54ba9badbb7a9a9fe7d44
[ "MIT" ]
64
2018-06-27T08:35:01.000Z
2022-03-10T09:27:43.000Z
""" Section CMS plugin """ from django.utils.translation import gettext_lazy as _ from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from richie.apps.core.defaults import PLUGINS_GROUP from .defaults import SECTION_TEMPLATES from .forms import SectionForm from .models import Section ...
27.263158
77
0.722973
78d3ff1938a25ababae056a9890885c755327bd6
59,035
py
Python
contrib/geo_autoRIFT/autoRIFT/autoRIFT.py
RussellGrew/isce2
def109815df5f724c5dc653878314577e3505c48
[ "ECL-2.0", "Apache-2.0" ]
315
2019-02-10T01:37:44.000Z
2022-03-30T19:28:13.000Z
contrib/geo_autoRIFT/autoRIFT/autoRIFT.py
RussellGrew/isce2
def109815df5f724c5dc653878314577e3505c48
[ "ECL-2.0", "Apache-2.0" ]
276
2019-02-10T07:18:28.000Z
2022-03-31T21:45:55.000Z
contrib/geo_autoRIFT/autoRIFT/autoRIFT.py
RussellGrew/isce2
def109815df5f724c5dc653878314577e3505c48
[ "ECL-2.0", "Apache-2.0" ]
235
2019-02-10T05:00:53.000Z
2022-03-18T07:37:24.000Z
#!/usr/bin/env python3 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Copyright 2019 California Institute of Technology. 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 ...
40.798203
350
0.583281
b8858f93c30e643bc7a9f58a1a942864edf4567b
33,089
py
Python
Job Portal with Automated Resume Screening/gensim-4.1.2/gensim/corpora/sharded_corpus.py
Candida18/Job-Portal-with-Automated-Resume-Screening
19d19464ad3d1714da856656753a4afdfe257b31
[ "MIT" ]
3
2021-03-29T19:21:08.000Z
2021-12-31T09:30:11.000Z
Job Portal with Automated Resume Screening/gensim-4.1.2/gensim/corpora/sharded_corpus.py
Candida18/Job-Portal-with-Automated-Resume-Screening
19d19464ad3d1714da856656753a4afdfe257b31
[ "MIT" ]
1
2021-08-30T08:53:09.000Z
2021-08-30T08:53:09.000Z
venv/Lib/site-packages/gensim/corpora/sharded_corpus.py
saritmaitra/nlp_ner_topic_modeling
70914b4ae4cd7d3b9cb10776161132216394883c
[ "MIT" ]
2
2022-01-15T05:36:58.000Z
2022-02-08T15:25:50.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Original author: Jan Hajic jr. # Copyright (C) 2015 Radim Rehurek and gensim team. # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ This module implements a corpus class that stores its data in separate files called "shards". This is a com...
40.303289
118
0.625676
6a78aa5b56314216657f233b64fc522b0cae34de
502
py
Python
RSA-encryption/Attack-Common-Modulus/Challenges/RSA-1s-Fun/encrypt.py
amoniaka-knabino/Crypton
91a91698050a384e7623eddc871dba1acecd585c
[ "MIT" ]
1,175
2018-06-13T07:05:56.000Z
2022-03-28T05:51:38.000Z
RSA-encryption/Attack-Common-Modulus/Challenges/RSA-1s-Fun/encrypt.py
amoniaka-knabino/Crypton
91a91698050a384e7623eddc871dba1acecd585c
[ "MIT" ]
5
2019-10-12T15:43:52.000Z
2020-08-03T05:52:08.000Z
RSA-encryption/Attack-Common-Modulus/Challenges/RSA-1s-Fun/encrypt.py
amoniaka-knabino/Crypton
91a91698050a384e7623eddc871dba1acecd585c
[ "MIT" ]
211
2018-02-13T11:06:08.000Z
2022-03-28T22:36:59.000Z
from Crypto.Util.number import * e1 = 9 e2 = 123 def prime_gen(): while True: p = getPrime(1024) q = getPrime(1024) n = p*q phin = (p-1)*(q-1) if GCD(e1, phin) == 1 and GCD(e2, phin) == 1: return (p, q, n) p, q, n = prime_gen() print "p: ", p print "q: ", q pri...
17.310345
53
0.51992
232251ecbf4dd3b18a3f616241fbb8c2ff1418d7
667
py
Python
web_framework/api/type_parsing/type_adapter.py
Heknon/web-framework
95d0ef915f88e3de2c2613722cb8c1117f89d73a
[ "MIT" ]
null
null
null
web_framework/api/type_parsing/type_adapter.py
Heknon/web-framework
95d0ef915f88e3de2c2613722cb8c1117f89d73a
[ "MIT" ]
null
null
null
web_framework/api/type_parsing/type_adapter.py
Heknon/web-framework
95d0ef915f88e3de2c2613722cb8c1117f89d73a
[ "MIT" ]
null
null
null
from typing import TypeVar, Generic from web_framework.api.module import MethodContentType T = TypeVar('T') class TypeAdapter(Generic[T]): def __init__(self, adapting_type, content_type: MethodContentType): self.adapting_type = adapting_type self.content_type = content_type def decode(self,...
31.761905
101
0.715142
feb8b2e67a495df441603312c27e602aa675bafe
28,743
py
Python
tests/test_api.py
blueyed/coveragepy-bbmirror
fec75c18a87e8acf8a0d4f978b2ef4e1cea755de
[ "Apache-2.0" ]
null
null
null
tests/test_api.py
blueyed/coveragepy-bbmirror
fec75c18a87e8acf8a0d4f978b2ef4e1cea755de
[ "Apache-2.0" ]
null
null
null
tests/test_api.py
blueyed/coveragepy-bbmirror
fec75c18a87e8acf8a0d4f978b2ef4e1cea755de
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Tests for coverage.py's API.""" import fnmatch import os import os.path import sys import textwrap import warnings import coverage from coverage import env fro...
38.581208
99
0.590439
7a76fbfad33f056bda46de1012ef0e609cc9760a
380
py
Python
__init__.py
artec-kk/pyatcrobo2
fe8389a0bcc7b0075e97a0015196d966e847aaf3
[ "MIT" ]
3
2019-06-28T04:13:36.000Z
2021-08-19T14:40:30.000Z
__init__.py
artec-kk/pyatcrobo2
fe8389a0bcc7b0075e97a0015196d966e847aaf3
[ "MIT" ]
null
null
null
__init__.py
artec-kk/pyatcrobo2
fe8389a0bcc7b0075e97a0015196d966e847aaf3
[ "MIT" ]
2
2020-06-22T12:05:38.000Z
2020-09-19T02:45:48.000Z
from . import body from .parts import DCMotor from .parts import Servomotor from .parts import Buzzer from .parts import LED from .parts import IRPhotoReflector from .parts import LightSensor from .parts import SoundSensor from .parts import TouchSensor from .parts import Temperature from .parts import UltrasonicSensor...
25.333333
35
0.823684
ee957607f208f3250964b4ad8c8aa78e951b27e9
177
py
Python
AtCoder/ABC/129/a.py
ttyskg/ProgrammingCompetition
65fb9e131803e4f1a1a6369e68ed1b504f08b00f
[ "MIT" ]
null
null
null
AtCoder/ABC/129/a.py
ttyskg/ProgrammingCompetition
65fb9e131803e4f1a1a6369e68ed1b504f08b00f
[ "MIT" ]
null
null
null
AtCoder/ABC/129/a.py
ttyskg/ProgrammingCompetition
65fb9e131803e4f1a1a6369e68ed1b504f08b00f
[ "MIT" ]
null
null
null
import sys def main(): input = sys.stdin.readline A = list(map(int, input().split())) A.sort() return sum(A[:2]) if __name__ == '__main__': print(main())
14.75
39
0.570621
62d0d1a64e1a0655a2a00b0f544851898970b019
2,669
py
Python
tests/unit/test_core.py
vleseg/zmsavings
eb41f516fae2a7d97e107de682dbe15fa6a85719
[ "Apache-2.0" ]
1
2018-11-04T12:28:45.000Z
2018-11-04T12:28:45.000Z
tests/unit/test_core.py
vleseg/zmsavings
eb41f516fae2a7d97e107de682dbe15fa6a85719
[ "Apache-2.0" ]
1
2017-12-01T05:49:25.000Z
2017-12-01T05:49:25.000Z
tests/unit/test_core.py
vleseg/zmsavings
eb41f516fae2a7d97e107de682dbe15fa6a85719
[ "Apache-2.0" ]
null
null
null
# Third-party imports from mock import call, Mock, patch # Project imports from zmsavings.core import _select_transactions_for_goal, main @patch('core.ProgressiveTotal') @patch('core._select_transactions_for_goal') class TestMain(object): def setup_method(self): self._goal_patcher = patch('core.Goal') ...
37.591549
78
0.655676
319e61e75194d791cc6b8c6cce742107a7edd329
560
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractMandragonsWordpressCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractMandragonsWordpressCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractMandragonsWordpressCom.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractMandragonsWordpressCom(item): ''' Parser for 'mandragons.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'), ('Loi...
25.454545
104
0.639286
26ccd32ab5ae841837f58b2eaa500db632d56461
3,585
py
Python
security/views.py
thomasjbradley/django-security
e464b8be0161e6f98ad15e21d3c6386ba0b6d03e
[ "BSD-4-Clause" ]
223
2015-02-10T15:22:37.000Z
2022-03-07T03:45:11.000Z
security/views.py
thomasjbradley/django-security
e464b8be0161e6f98ad15e21d3c6386ba0b6d03e
[ "BSD-4-Clause" ]
51
2015-01-01T17:46:20.000Z
2022-03-22T14:18:19.000Z
security/views.py
thomasjbradley/django-security
e464b8be0161e6f98ad15e21d3c6386ba0b6d03e
[ "BSD-4-Clause" ]
47
2015-01-01T15:46:38.000Z
2022-03-17T14:36:13.000Z
# Copyright (c) 2011, SD Elements. See LICENSE.txt for details. import json from django.http import HttpResponseForbidden, HttpResponse from django.views.decorators.csrf import csrf_exempt import logging log = logging.getLogger(__name__) ACCEPTABLE_CONTENT_TYPES = ['application/json', 'application/csp-report'] de...
32.297297
79
0.654114
2a7e3d166f8daefbf5e807e667e8b1461088238b
357
py
Python
restful_ssh_config/__init__.py
wizardsoftheweb/restful-ssh-config
77cc7929cb5847c0c8cb42f1e3dd4a1ec79fc74c
[ "0BSD" ]
null
null
null
restful_ssh_config/__init__.py
wizardsoftheweb/restful-ssh-config
77cc7929cb5847c0c8cb42f1e3dd4a1ec79fc74c
[ "0BSD" ]
null
null
null
restful_ssh_config/__init__.py
wizardsoftheweb/restful-ssh-config
77cc7929cb5847c0c8cb42f1e3dd4a1ec79fc74c
[ "0BSD" ]
null
null
null
"""This file provides the main restful_ssh_config module""" from .data import KEYWORDS from .application import APPLICATION, DATABASE, MARSHMALLOW from .models import ( BaseModel, ConfigFile, Host, HOST_CONFIG_LOOKUP, Keyword, KEYWORD_HOST_LOOKUP, ) from .schemas import ( ConfigFileSchema, ...
19.833333
59
0.72549
f0ff566e2baed94d0b685026fda552e6386f27b9
1,565
py
Python
pytest_test_groups/__init__.py
pradyun/pytest-test-groups
c14464b3e03fd197c87bf7de7ba702c633783060
[ "MIT" ]
null
null
null
pytest_test_groups/__init__.py
pradyun/pytest-test-groups
c14464b3e03fd197c87bf7de7ba702c633783060
[ "MIT" ]
null
null
null
pytest_test_groups/__init__.py
pradyun/pytest-test-groups
c14464b3e03fd197c87bf7de7ba702c633783060
[ "MIT" ]
null
null
null
import math from random import Random def get_group_size(total_items, total_groups): return int(math.ceil(float(total_items) / total_groups)) def get_group(items, group_size, group_id): start = group_size * (group_id - 1) end = start + group_size if start >= len(items) or start < 0: raise ...
31.3
85
0.676677
86cdb72306eb840f775c65418d8a1b0eb59122db
1,280
py
Python
tests/kd_tests/test_nearest_point.py
lycantropos/locus
35990bcea99b293b6ae5f8f701e0d6bc9978a067
[ "MIT" ]
2
2021-04-14T10:40:35.000Z
2021-08-31T02:05:05.000Z
tests/kd_tests/test_nearest_point.py
lycantropos/locus
35990bcea99b293b6ae5f8f701e0d6bc9978a067
[ "MIT" ]
null
null
null
tests/kd_tests/test_nearest_point.py
lycantropos/locus
35990bcea99b293b6ae5f8f701e0d6bc9978a067
[ "MIT" ]
null
null
null
from functools import partial from typing import Tuple from ground.hints import Point from hypothesis import given from locus.kd import Tree from tests.utils import (all_unique, equivalence, is_point, to_points_distance) from . import strategi...
27.826087
75
0.6875
af9453406f42261205a68320ce8c8f981b9aad1f
341
py
Python
src/DAIDE/utils/exceptions.py
trigaten/DAIDE
5fbef0cbe26bcf0fc46dcb0dceec3325b404f8f6
[ "MIT" ]
null
null
null
src/DAIDE/utils/exceptions.py
trigaten/DAIDE
5fbef0cbe26bcf0fc46dcb0dceec3325b404f8f6
[ "MIT" ]
null
null
null
src/DAIDE/utils/exceptions.py
trigaten/DAIDE
5fbef0cbe26bcf0fc46dcb0dceec3325b404f8f6
[ "MIT" ]
null
null
null
__author__ = "Sander Schulhoff" __email__ = "sanderschulhoff@gmail.com" class ParseError(Exception): def __init__(self, string, p_type): super().__init__("Can't parse \"" + string + "\" as " + p_type + ".") class ConsumeError(ParseError): def __init__(self, string, to_consume): super().__init_...
34.1
77
0.677419
9e9a3c76ee51584433eef3f15c3b29f653d5fff2
173
py
Python
tensormonk/optimizers/__init__.py
Tensor46/TensorMONK
67617d3fdf8fde072ba9cab42de7d67c79b17494
[ "MIT" ]
29
2018-07-06T23:57:23.000Z
2022-03-08T20:38:57.000Z
tensormonk/optimizers/__init__.py
Tensor46/TensorMONK
67617d3fdf8fde072ba9cab42de7d67c79b17494
[ "MIT" ]
3
2018-12-14T22:21:26.000Z
2020-06-19T02:13:34.000Z
tensormonk/optimizers/__init__.py
Tensor46/TensorMONK
67617d3fdf8fde072ba9cab42de7d67c79b17494
[ "MIT" ]
8
2018-07-06T23:58:03.000Z
2021-04-12T01:35:54.000Z
""" TensorMONK :: optimizers """ __all__ = ["LookAhead", "RAdam", "AdaBelief"] from .look_ahead import LookAhead from .radam import RAdam from .adabelief import AdaBelief
21.625
45
0.734104
f1addc84acb57fed7015c6264d1c5fa4469ffc4d
6,987
py
Python
tools/nntool/utils/stats_funcs.py
mfkiwl/gap_sdk
642b798dfdc7b85ccabe6baba295033f0eadfcd4
[ "Apache-2.0" ]
null
null
null
tools/nntool/utils/stats_funcs.py
mfkiwl/gap_sdk
642b798dfdc7b85ccabe6baba295033f0eadfcd4
[ "Apache-2.0" ]
null
null
null
tools/nntool/utils/stats_funcs.py
mfkiwl/gap_sdk
642b798dfdc7b85ccabe6baba295033f0eadfcd4
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2020 GreenWaves Technologies, SAS # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progr...
34.25
112
0.604838
b3e797715be75c056863272a1edbc8cffc49bbec
335
py
Python
2_flask_1/practice/Sangkeun/b.py
sewonlee/WebStudio2019
ba1e6f848028c7fb67f91ee74737d4b3d0be1652
[ "MIT" ]
14
2019-03-06T10:32:40.000Z
2021-11-18T01:44:28.000Z
2_flask_1/practice/Sangkeun/b.py
sewonlee/WebStudio2019
ba1e6f848028c7fb67f91ee74737d4b3d0be1652
[ "MIT" ]
35
2019-03-13T07:04:02.000Z
2019-10-08T06:26:45.000Z
2_flask_1/practice/Sangkeun/b.py
sewonlee/WebStudio2019
ba1e6f848028c7fb67f91ee74737d4b3d0be1652
[ "MIT" ]
22
2019-03-11T11:00:24.000Z
2019-09-14T06:53:30.000Z
from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return '2019 web studio fighting T_T' @app.route('/abc') def abc(): return 'abc' @app.route('/variable/<input_string>') def variable(input_string): return '<h1>{}</h1>'.format(input_string) if __name__ == '__main__': app.ru...
15.952381
45
0.656716
9c844cfc61146c30ee4ea00f86aded4684bf91be
2,181
py
Python
src/IceRayPy/core/geometry/rtss.py
dmilos/IceRay
4e01f141363c0d126d3c700c1f5f892967e3d520
[ "MIT-0" ]
2
2020-09-04T12:27:15.000Z
2022-01-17T14:49:40.000Z
src/IceRayPy/core/geometry/rtss.py
dmilos/IceRay
4e01f141363c0d126d3c700c1f5f892967e3d520
[ "MIT-0" ]
null
null
null
src/IceRayPy/core/geometry/rtss.py
dmilos/IceRay
4e01f141363c0d126d3c700c1f5f892967e3d520
[ "MIT-0" ]
1
2020-09-04T12:27:52.000Z
2020-09-04T12:27:52.000Z
import ctypes import IceRayPy import IceRayPy.core Pointer = ctypes.POINTER AddresOf = ctypes.addressof VoidPtr = IceRayPy.type.basic.VoidPtr Integer = IceRayPy.type.basic.Integer Size3D = IceRayPy.type.math.coord.Size3D #Geometry = IceRayPy.core.geometry.Generic class Object: def __init__( self,...
34.078125
119
0.638239
eab0c4750df6c9e19346b6b275084c2e6465a50c
3,467
py
Python
drinkingBuddyDB_declarative.py
PostTenebrasLab/DrinksBuddyServer
bb50aa879a8e65b4cbbdc432ba41e15155d1efcb
[ "MIT" ]
2
2016-01-23T00:15:44.000Z
2016-11-17T16:01:03.000Z
drinkingBuddyDB_declarative.py
PostTenebrasLab/DrinksBuddyServer
bb50aa879a8e65b4cbbdc432ba41e15155d1efcb
[ "MIT" ]
9
2016-02-28T16:12:09.000Z
2016-12-31T21:05:58.000Z
drinkingBuddyDB_declarative.py
PostTenebrasLab/DrinksBuddyServer
bb50aa879a8e65b4cbbdc432ba41e15155d1efcb
[ "MIT" ]
1
2019-01-26T01:57:25.000Z
2019-01-26T01:57:25.000Z
#!/usr/bin/python3 import os import sys from sqlalchemy import Column, ForeignKey, Integer, String, DateTime, Boolean from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from sqlalchemy import create_engine from marshmallow import Schema, fields from flask_sqlalchemy import ...
28.186992
87
0.696568
55e7b11f2faea9d86631f128ac604873f0f92dfe
1,689
py
Python
tests/test_dynamic_model/test_model_name_prefix.py
Grusinator/django-json2model
fe06f4feb60b8a02859530556f91ca6a5978d6d1
[ "MIT" ]
null
null
null
tests/test_dynamic_model/test_model_name_prefix.py
Grusinator/django-json2model
fe06f4feb60b8a02859530556f91ca6a5978d6d1
[ "MIT" ]
null
null
null
tests/test_dynamic_model/test_model_name_prefix.py
Grusinator/django-json2model
fe06f4feb60b8a02859530556f91ca6a5978d6d1
[ "MIT" ]
null
null
null
import django from django.test import TransactionTestCase from json2model.services.dynamic_model import DynamicModelBuilder, DynamicDataInstances from json2model.services.dynamic_model.dynamic_model_utils import get_dynamic_model, add_prefix_to_model_label class TestModelNamePrefix(TransactionTestCase): """Tests...
37.533333
110
0.702783
68212ada9865cf011d0594c7e68235e37f083b72
770
py
Python
count_v5.py
Jerry-zhk/se-proj
56ce711377cf396bb53d4b808a2e5e0433b29a64
[ "MIT" ]
null
null
null
count_v5.py
Jerry-zhk/se-proj
56ce711377cf396bb53d4b808a2e5e0433b29a64
[ "MIT" ]
null
null
null
count_v5.py
Jerry-zhk/se-proj
56ce711377cf396bb53d4b808a2e5e0433b29a64
[ "MIT" ]
null
null
null
def count(alist): length = len(alist) i = length-1 letter = 0 num = 0 upperLetter = 0 lowerLetter = 0 special1 = 0 special2 = 0 special3 = 0 while(i>=0): s = alist[i] if ord('A') <= ord(s) and ord('Z') >= ord(s): upperLetter += 2 elif ord('a') <= ord(s) and ord('z') >= ord(s): lowerLetter += 1 ...
23.333333
64
0.542857
bda742a7df5bee908778d0b654ae9261dcd262aa
560
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractKchandratlWordpressCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractKchandratlWordpressCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractKchandratlWordpressCom.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractKchandratlWordpressCom(item): ''' Parser for 'kchandratl.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'), ('Loi...
25.454545
104
0.639286
a10564af25748fc373bbdcf49788e7feb9c5b21c
12,730
py
Python
util/chrome_plugin_spider.py
biefeng/profile
daa3d4e185db3008e3ad649f4249ed0b3945ad3d
[ "Apache-2.0" ]
null
null
null
util/chrome_plugin_spider.py
biefeng/profile
daa3d4e185db3008e3ad649f4249ed0b3945ad3d
[ "Apache-2.0" ]
4
2020-07-02T04:14:57.000Z
2020-07-02T04:17:05.000Z
util/chrome_plugin_spider.py
biefeng/profile
daa3d4e185db3008e3ad649f4249ed0b3945ad3d
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # author : BieFeNg # date_time 2020/06/23 11:46 # file_name : chrome_plugin_spider.py import csv import datetime import json import logging import os import requests from app.baidu_obs import BaiduBos, GENIOUS_BUCKET from util.MysqlUtil import Import # from app.baidu_obs import file_exists ...
56.079295
1,234
0.653024
589fc72856bd5d5f67d70f6ea5ccc3314be8b3f2
5,634
py
Python
third-party/llvm/llvm-src/tools/clang/bindings/python/tests/cindex/test_cdb.py
ram-nad/chapel
1d4aae17e58699c1481d2b2209c9d1fcd2658fc8
[ "ECL-2.0", "Apache-2.0" ]
115
2018-02-01T18:56:44.000Z
2022-03-21T13:23:00.000Z
third-party/llvm/llvm-src/tools/clang/bindings/python/tests/cindex/test_cdb.py
ram-nad/chapel
1d4aae17e58699c1481d2b2209c9d1fcd2658fc8
[ "ECL-2.0", "Apache-2.0" ]
27
2018-09-17T17:49:49.000Z
2021-11-03T04:31:51.000Z
third-party/llvm/llvm-src/tools/clang/bindings/python/tests/cindex/test_cdb.py
ram-nad/chapel
1d4aae17e58699c1481d2b2209c9d1fcd2658fc8
[ "ECL-2.0", "Apache-2.0" ]
55
2018-02-01T07:11:49.000Z
2022-03-04T01:20:23.000Z
import os from clang.cindex import Config if 'CLANG_LIBRARY_PATH' in os.environ: Config.set_library_path(os.environ['CLANG_LIBRARY_PATH']) from clang.cindex import CompilationDatabase from clang.cindex import CompilationDatabaseError from clang.cindex import CompileCommands from clang.cindex import CompileCommand ...
43.007634
90
0.626376
1acd297a5665f682d06ddfa6c1f1bfedd3c43ac5
1,471
py
Python
eodp/divide.py
gregjd/eodp
8bc748b5abdcd2a30898b75b385e67d555fcc5fb
[ "MIT" ]
null
null
null
eodp/divide.py
gregjd/eodp
8bc748b5abdcd2a30898b75b385e67d555fcc5fb
[ "MIT" ]
null
null
null
eodp/divide.py
gregjd/eodp
8bc748b5abdcd2a30898b75b385e67d555fcc5fb
[ "MIT" ]
null
null
null
import re # detect multiple cities? # Parts: 0 front matter, 1 preamble, 2 transition, # 2-main, 3-epilogue # 'whereas' sections # numbered sections (with and without the word 'section') BREAKS = [re.compile(r".+?\n(?=whereas)", re.I | re.DOTALL), re.compile(r"^.+(?:therefore|hereby|ordained).+?\n?.+?:\n"...
22.984375
69
0.625425
c9702714ea8027022add8d2f93fa40e5d9371dbe
294
py
Python
airquality.py
jdwalgren/Bakaqibot
58890e7b9b17af9507ba34d7ea37c7b672a0677e
[ "Unlicense" ]
null
null
null
airquality.py
jdwalgren/Bakaqibot
58890e7b9b17af9507ba34d7ea37c7b672a0677e
[ "Unlicense" ]
null
null
null
airquality.py
jdwalgren/Bakaqibot
58890e7b9b17af9507ba34d7ea37c7b672a0677e
[ "Unlicense" ]
null
null
null
import json import requests request_result = requests.get("https://api.waqi.info/feed/california/kern/bakersfield-california-avenue/?keyword=bakersfield&token=35e4a3b51d6f74ebb6ac6ea9a3fe9bdb0bb7b5f7") request_json = request_result.json() airq = request_json["data"]["aqi"] print(airq)
36.75
174
0.79932
19a8a52c475b314235ffe849fcb572d75588b263
1,776
py
Python
sample/garuda_dir/django_contrib_contenttypes_rpc.py
dhilipsiva/garuda
a1b1fdcf08ca0a808459bb21ea0b58d9673af64d
[ "MIT" ]
22
2018-07-21T06:00:04.000Z
2020-12-02T03:23:11.000Z
sample/garuda_dir/django_contrib_contenttypes_rpc.py
chr1043086360/garuda
a1b1fdcf08ca0a808459bb21ea0b58d9673af64d
[ "MIT" ]
10
2020-02-11T23:04:56.000Z
2021-07-30T11:22:28.000Z
sample/garuda_dir/django_contrib_contenttypes_rpc.py
chr1043086360/garuda
a1b1fdcf08ca0a808459bb21ea0b58d9673af64d
[ "MIT" ]
1
2019-11-20T01:14:12.000Z
2019-11-20T01:14:12.000Z
# DO NOT EDIT THIS FILE MANUALLY # THIS FILE IS AUTO-GENERATED # MANUAL CHANGES WILL BE DISCARDED # PLEASE READ GARUDA DOCS from garuda_dir.garuda_pb2 import ContentType, Void # NOQA from garuda_dir.django_contrib_contenttypes_crud import ( # NOQA read_contenttype, delete_contenttype, create_contenttype, ...
31.157895
66
0.657095
eadf41ab8a7202e5c0d5d00178b007dbe87d33b6
2,683
py
Python
var/www/cgi-bin/deletepagegraph.py
raspibo/Livello1
9f1ba10f2496eb0d4c40685336cc7b8768f4a767
[ "MIT" ]
null
null
null
var/www/cgi-bin/deletepagegraph.py
raspibo/Livello1
9f1ba10f2496eb0d4c40685336cc7b8768f4a767
[ "MIT" ]
null
null
null
var/www/cgi-bin/deletepagegraph.py
raspibo/Livello1
9f1ba10f2496eb0d4c40685336cc7b8768f4a767
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Questo file legge il file di configurazione, # trova e modifica il parametro eseguendo il rispettivo "write*.py" # Serve per la parte di gestione html in python import cgi import cgitb import html # Abilita gli errori al server web/http cgitb.enable() # Le mie librerie Json, Html, flt (Ther...
20.325758
107
0.617592
0e703fec36e0607053e9f3d5103de1ce452213db
2,942
py
Python
x/urls.py
Girbonsp/Domotic_Control
6d4f53266aca3629cb924830335a2386cec9d248
[ "BSD-2-Clause" ]
null
null
null
x/urls.py
Girbonsp/Domotic_Control
6d4f53266aca3629cb924830335a2386cec9d248
[ "BSD-2-Clause" ]
2
2016-11-26T15:39:03.000Z
2016-11-26T15:41:20.000Z
x/urls.py
Girbons/Domotic_Control
6d4f53266aca3629cb924830335a2386cec9d248
[ "BSD-2-Clause" ]
null
null
null
from django.conf import settings from django.conf.urls import include, url from django.contrib.auth import views as auth_views from django.contrib.auth.decorators import login_required from django.template.backends import django from rest_framework import routers from x import views from .views import Profile urlpa...
50.724138
128
0.707682
aeb89696625c69651659fc4b2470fde2a1a66191
170
py
Python
PyCharm/primer10.py
PervykhDarya/LR3
55a4c379c29e167eb3257b4cff4cf9b717906236
[ "MIT" ]
null
null
null
PyCharm/primer10.py
PervykhDarya/LR3
55a4c379c29e167eb3257b4cff4cf9b717906236
[ "MIT" ]
null
null
null
PyCharm/primer10.py
PervykhDarya/LR3
55a4c379c29e167eb3257b4cff4cf9b717906236
[ "MIT" ]
null
null
null
# !/usr/bin/env python3 # -*- cosing: utf-8 -*- with open("newfile.txt", "x") as fileptr: print(fileptr) if fileptr: print("File created successfully")
18.888889
42
0.605882
9c56d0131b815f7130c1a36eddc5c4674d3b5cd1
14,582
py
Python
Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
Packs/BitcoinAbuse/Integrations/BitcoinAbuse/BitcoinAbuse.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
import demistomock as demisto # noqa: F401 from CSVFeedApiModule import * from CommonServerPython import * # noqa: F401 # disable insecure warnings urllib3.disable_warnings() ''' CONSTANTS ''' SERVER_URL = 'https://www.bitcoinabuse.com/api/' ABUSE_TYPE_ID_TO_NAME: Dict[str, str] = { '1': 'ransomware', '2': ...
38.172775
119
0.652448
f75d67a67e857fd16da532b5525c2391bb842cd0
12,691
py
Python
nova/tests/unit/api/openstack/compute/test_create_backup.py
nicholaskuechler/nova
ff412c3888b234eb123161cc4e6d0d0d69c0004e
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/api/openstack/compute/test_create_backup.py
nicholaskuechler/nova
ff412c3888b234eb123161cc4e6d0d0d69c0004e
[ "Apache-2.0" ]
1
2021-03-21T11:39:52.000Z
2021-03-21T11:39:52.000Z
nova/tests/unit/api/openstack/compute/test_create_backup.py
nicholaskuechler/nova
ff412c3888b234eb123161cc4e6d0d0d69c0004e
[ "Apache-2.0" ]
1
2021-03-21T11:37:33.000Z
2021-03-21T11:37:33.000Z
# Copyright 2011 OpenStack Foundation # Copyright 2013 IBM Corp. # # 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 ...
36.573487
79
0.550942
f22bcc9b170e7600a53621cf8e39c38ea8991aa2
20,989
py
Python
pylib/bacon.py
deeprave/pylib
53ec7e922c8474c08f62068361b5529ac0a21e6a
[ "Apache-2.0" ]
null
null
null
pylib/bacon.py
deeprave/pylib
53ec7e922c8474c08f62068361b5529ac0a21e6a
[ "Apache-2.0" ]
null
null
null
pylib/bacon.py
deeprave/pylib
53ec7e922c8474c08f62068361b5529ac0a21e6a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ BACON configuration parser This is a simplistic implementation that does not support many of the directives required for a full configuration data loader. It implements enough to handle Mediator state files only. """ from __future__ import unicode_literals import logging import sys import o...
31.753404
119
0.525513
dd849b01daa749e1693427c0826f045a9823ba6b
2,074
py
Python
tabnine-vim/third_party/ycmd/third_party/parso/parso/python/token.py
MrMonk3y/vimrc
950230fb3fd7991d1234c2ab516ec03245945677
[ "MIT" ]
229
2017-09-12T23:25:30.000Z
2020-10-23T17:01:57.000Z
tabnine-vim/third_party/ycmd/third_party/parso/parso/python/token.py
MrMonk3y/vimrc
950230fb3fd7991d1234c2ab516ec03245945677
[ "MIT" ]
228
2021-01-02T19:55:22.000Z
2022-03-31T09:30:10.000Z
tabnine-vim/third_party/ycmd/third_party/parso/parso/python/token.py
MrMonk3y/vimrc
950230fb3fd7991d1234c2ab516ec03245945677
[ "MIT" ]
46
2017-09-14T01:09:45.000Z
2020-10-23T17:02:30.000Z
from __future__ import absolute_import from itertools import count from token import * from parso._compatibility import py_version _counter = count(N_TOKENS) # Never want to see this thing again. del N_TOKENS COMMENT = next(_counter) tok_name[COMMENT] = 'COMMENT' NL = next(_counter) tok_name[NL] = 'NL' # Sets the...
18.192982
79
0.701543
0edb3bf4836c12d4c821bb6117e76f37da6ed51c
4,656
py
Python
lib-python/2.7/test/test_capi.py
jeff5/jython-whinchat
65d8e5268189f8197295ff2d91be3decb1ee0081
[ "CNRI-Jython" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
BitmessageKit/Vendor/static-python/Lib/test/test_capi.py
VoluntaryLabs/BitmessageKit
dd634977a629ab4dec184e12bb6324cc01149ba3
[ "MIT" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
BitmessageKit/Vendor/static-python/Lib/test/test_capi.py
VoluntaryLabs/BitmessageKit
dd634977a629ab4dec184e12bb6324cc01149ba3
[ "MIT" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _testcapi exports whose name begins with 'test_'. from __future__ import with_statement import sys import time import random import unittest from test import test_support try: import thread import threading excep...
33.021277
84
0.589777
502f556bbad583884aa5bcb6bf82a14f0852c90e
3,908
py
Python
minituna_v1.py
c-bata/minituna
c2d6d652a6643d01d9c681257bccd369bacf6a91
[ "MIT" ]
54
2020-08-27T10:35:10.000Z
2021-07-13T02:07:37.000Z
minituna_v1.py
CyberAgentAILab/minituna
c4ad9f2367f159b4cbfa6bb7198e3b20dcbc0bca
[ "MIT" ]
null
null
null
minituna_v1.py
CyberAgentAILab/minituna
c4ad9f2367f159b4cbfa6bb7198e3b20dcbc0bca
[ "MIT" ]
3
2021-11-22T09:47:53.000Z
2022-03-24T05:40:55.000Z
import copy import random from typing import Callable from typing import cast from typing import Dict from typing import List from typing import Literal from typing import Optional TrialStateType = Literal["running", "completed", "failed"] class FrozenTrial: def __init__(self, trial_id: int, state: TrialStateT...
31.772358
83
0.637155
a50acbe9ed999e0ef883f9ef88afec373b9608ba
6,815
py
Python
tests/test_bootstrap_pagination.py
akx/django-bootstrap5
2fbe688c30061122e08981f65bf87ec35fcf28ad
[ "BSD-3-Clause" ]
118
2021-03-15T14:01:49.000Z
2022-03-29T06:40:46.000Z
tests/test_bootstrap_pagination.py
akx/django-bootstrap5
2fbe688c30061122e08981f65bf87ec35fcf28ad
[ "BSD-3-Clause" ]
97
2021-03-19T05:44:28.000Z
2022-03-31T09:05:29.000Z
tests/test_bootstrap_pagination.py
akx/django-bootstrap5
2fbe688c30061122e08981f65bf87ec35fcf28ad
[ "BSD-3-Clause" ]
33
2021-03-22T14:45:08.000Z
2022-02-23T18:12:23.000Z
from django.core.paginator import Paginator from django_bootstrap5.utils import url_replace_param from tests.base import BootstrapTestCase class PaginatorTestCase(BootstrapTestCase): @classmethod def setUpTestData(cls): cls.beatles = ["john", "paul", "george", "ringo"] cls.paginator = Paginat...
49.384058
118
0.551137
3da1051f74c64ce1657be9de12e9bc7ab3278c15
3,731
py
Python
unit_tests/test_utils.py
ryan-beisner/charm-nova-compute-ppc64el
c5448acb58f143bd0e018dd361d98003d23396e0
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
unit_tests/test_utils.py
ryan-beisner/charm-nova-compute-ppc64el
c5448acb58f143bd0e018dd361d98003d23396e0
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
unit_tests/test_utils.py
ryan-beisner/charm-nova-compute-ppc64el
c5448acb58f143bd0e018dd361d98003d23396e0
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2016 Canonical Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
26.841727
77
0.641383
ef500fdfdb2c804f87cafb3f8e1306b9e75c21e0
447
py
Python
data/scripts/templates/object/building/player/city/shared_bank_corellia.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/building/player/city/shared_bank_corellia.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/building/player/city/shared_bank_corellia.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/player/city/shared_bank_corellia.iff" result.attribute_template_id ...
26.294118
73
0.724832
5fc5f5194929d9d05df42282f08b6e68dd095543
797
py
Python
app/__init__.py
XiaoLinhong/mutter
ab0fae64cf0aa622239f256b97ace1f24638f98d
[ "MIT" ]
null
null
null
app/__init__.py
XiaoLinhong/mutter
ab0fae64cf0aa622239f256b97ace1f24638f98d
[ "MIT" ]
null
null
null
app/__init__.py
XiaoLinhong/mutter
ab0fae64cf0aa622239f256b97ace1f24638f98d
[ "MIT" ]
null
null
null
''' 初始化app,加载配置, 注册蓝图 ''' from flask import Flask from config import config # app 这个目录是与config平行的, __init__.py 就代表该目录; # flask 调用 create_app产出app, # 1. 初始化插件(读取app的配置); # 2. 加载蓝图,生成url_map; # 所有的请求 通过 wsgi 传给 flask, flask通过url_map找到端点函数,对请求进行处理; # 端点函数通过蓝图加载到view_functions # app.url_map # app.view_functions ...
26.566667
68
0.736512
8dfa12030195a33772dfc64b4ed06611b26e8398
398
py
Python
distributed/bokeh/processing-stacks.py
brinkar/distributed
4b881ee011e1e16dd1a64e197a38e5a09106a8e9
[ "BSD-3-Clause" ]
null
null
null
distributed/bokeh/processing-stacks.py
brinkar/distributed
4b881ee011e1e16dd1a64e197a38e5a09106a8e9
[ "BSD-3-Clause" ]
null
null
null
distributed/bokeh/processing-stacks.py
brinkar/distributed
4b881ee011e1e16dd1a64e197a38e5a09106a8e9
[ "BSD-3-Clause" ]
1
2019-02-21T14:25:34.000Z
2019-02-21T14:25:34.000Z
from __future__ import print_function, division, absolute_import from bokeh.io import curdoc from distributed.bokeh import messages from distributed.bokeh.components import ProcessingStacks component = ProcessingStacks(sizing_mode='stretch_both') doc = curdoc() doc.title = "Dask Processing Stack" doc.add_periodic_c...
28.428571
66
0.829146
032f0e9c4044b8b84ffe79a799a87e0b719a9a8f
462
py
Python
practice_platform_backend/tests/models.py
Jamison-Chen/practice_platform_backend
860b2e3bd7d57eb7db0e98f5fdda29565951e532
[ "MIT" ]
null
null
null
practice_platform_backend/tests/models.py
Jamison-Chen/practice_platform_backend
860b2e3bd7d57eb7db0e98f5fdda29565951e532
[ "MIT" ]
null
null
null
practice_platform_backend/tests/models.py
Jamison-Chen/practice_platform_backend
860b2e3bd7d57eb7db0e98f5fdda29565951e532
[ "MIT" ]
null
null
null
# import os from django.db import models # def upload_to(instance, filename): # base, extension = os.path.splitext(filename) # return "test_car/{}".format(instance.id + extension) class car(models.Model): name = models.CharField(max_length=128) # image = models.ImageField(upload_to=upload_to, blank...
25.666667
75
0.701299
3dabe312d572592b764515fafafc6371ba20256c
15,552
py
Python
StateReveal/bram_capture.py
samehattia/StateMover
8e242f6d3c370569f7267ffadda3d6e4f4b028b3
[ "MIT" ]
1
2021-10-12T16:18:04.000Z
2021-10-12T16:18:04.000Z
StateReveal/bram_capture.py
samehattia/StateMover
8e242f6d3c370569f7267ffadda3d6e4f4b028b3
[ "MIT" ]
null
null
null
StateReveal/bram_capture.py
samehattia/StateMover
8e242f6d3c370569f7267ffadda3d6e4f4b028b3
[ "MIT" ]
1
2021-12-06T14:10:29.000Z
2021-12-06T14:10:29.000Z
#!/usr/bin/env python3 from utils import * def insert_bram_capture_registers(modules, netlist, added_lines, top_name, task_modules): bram_id = 0 # Search for modules that contain BRAMs for module in modules: # Check if the module is part of the task if not module in task_modules: continue for instanc...
47.270517
186
0.699331
7fb4067370447d2bca94170742195137044d17a5
411
py
Python
tflib/ops/embedding.py
ponedo/rnnPassGAN
e681d767b2fefa731837e84da6a54eba3aa3e30b
[ "MIT" ]
9
2020-12-10T23:24:58.000Z
2021-12-31T19:48:34.000Z
tflib/ops/embedding.py
ponedo/rnnPassGAN
e681d767b2fefa731837e84da6a54eba3aa3e30b
[ "MIT" ]
null
null
null
tflib/ops/embedding.py
ponedo/rnnPassGAN
e681d767b2fefa731837e84da6a54eba3aa3e30b
[ "MIT" ]
1
2022-02-26T03:58:08.000Z
2022-02-26T03:58:08.000Z
import tflib as lib import numpy as np import tensorflow as tf def Embedding(name, inputs, vocab_size, hidden_size, embed=None): """ inputs_shape: (..., vocab_size) """ with tf.name_scope(name): embed_values = np.random.uniform(size=(vocab_size, hidden_size)) if not embed: ...
27.4
72
0.664234
b1de9ec75221cc1a4a1a4719d1bdec58a6cc349b
917
py
Python
tests/python/contrib/test_hexagon/test_relax_integration.py
octoml/relax
41f14415ba28d62e155b75ea2c740b25213a9970
[ "Apache-2.0" ]
11
2021-11-02T00:49:16.000Z
2021-11-19T02:17:00.000Z
tests/python/contrib/test_hexagon/test_relax_integration.py
octoml/relax
41f14415ba28d62e155b75ea2c740b25213a9970
[ "Apache-2.0" ]
16
2021-11-02T00:17:12.000Z
2021-11-21T20:47:52.000Z
tests/python/contrib/test_hexagon/test_relax_integration.py
octoml/relax
41f14415ba28d62e155b75ea2c740b25213a9970
[ "Apache-2.0" ]
4
2021-11-05T18:17:23.000Z
2021-11-11T06:22:00.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
32.75
62
0.762268
cdf266b452e29085213c5e0e7bbf936c442b31db
42,093
py
Python
data_loader/load_kitti.py
princeton-computational-imaging/neural-scene-graphs
8d3d9ce9064ded8231a1374c3866f004a4a281f8
[ "RSA-MD" ]
80
2021-08-06T08:28:40.000Z
2022-03-31T08:14:03.000Z
data_loader/load_kitti.py
esimionato/neural-scene-graphs
8d3d9ce9064ded8231a1374c3866f004a4a281f8
[ "RSA-MD" ]
4
2021-11-02T18:46:48.000Z
2022-03-11T14:43:05.000Z
data_loader/load_kitti.py
esimionato/neural-scene-graphs
8d3d9ce9064ded8231a1374c3866f004a4a281f8
[ "RSA-MD" ]
14
2021-08-08T13:38:48.000Z
2022-03-25T08:53:49.000Z
import os import imageio import json import numpy as np from matplotlib import pyplot as plt from data_loader.parseTrackletXML import parseXML _sem2label = { 'Misc': -1, 'Car': 0, 'Van': 0, 'Truck': 2, 'Tram': 3, 'Pedestrian': 4 } camera_ls = [2, 3] def kitti_string_to_float(str): retur...
41.026316
168
0.571972