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
21f6044c6d47b23589ffcc79568157764ee5680f
20,359
py
Python
scripts/parse_cluster_realign.py
maojanlin/gAIRRsuite
2c7b586624a8ec3f7321da787729bf5435b219d3
[ "MIT" ]
3
2021-05-20T06:05:40.000Z
2022-03-07T03:05:30.000Z
scripts/parse_cluster_realign.py
maojanlin/gAIRRsuite
2c7b586624a8ec3f7321da787729bf5435b219d3
[ "MIT" ]
null
null
null
scripts/parse_cluster_realign.py
maojanlin/gAIRRsuite
2c7b586624a8ec3f7321da787729bf5435b219d3
[ "MIT" ]
1
2022-03-04T02:29:27.000Z
2022-03-04T02:29:27.000Z
import argparse import pickle import os import numpy as np #from parse_contig_realign import mark_edit_region, variant_link_graph, haplotyping_link_graph, output_contig_correction from parse_contig_realign import variant_link_graph, output_contig_correction, parse_CIGAR, parse_MD, trim_dict, find_double_pos, get_farthe...
45.545861
175
0.554055
0
0
0
0
0
0
0
0
3,447
0.169311
21f660305f9eb4a0474e78b1bbb3a65006f2c75f
30,257
py
Python
src/huntsman/pocs/observatory.py
Physarah/huntsman-pocs
df013f71f99a7da17d6b44915ebf6f301aba10fc
[ "MIT" ]
null
null
null
src/huntsman/pocs/observatory.py
Physarah/huntsman-pocs
df013f71f99a7da17d6b44915ebf6f301aba10fc
[ "MIT" ]
null
null
null
src/huntsman/pocs/observatory.py
Physarah/huntsman-pocs
df013f71f99a7da17d6b44915ebf6f301aba10fc
[ "MIT" ]
null
null
null
import time from contextlib import suppress, contextmanager from astropy import units as u from panoptes.utils import error from panoptes.utils.utils import get_quantity_value from panoptes.utils.time import current_time, wait_for_events, CountdownTimer from panoptes.pocs.observatory import Observatory from panoptes....
44.300146
100
0.623228
29,320
0.969032
498
0.016459
2,330
0.077007
0
0
13,188
0.435866
21f6ac953977adb43d4446f137f14e3d19478056
285
py
Python
dist/urls.py
tfmt/netboot
abd690d463dfd14488b0d295512d61ce5c5bc97d
[ "Apache-2.0" ]
null
null
null
dist/urls.py
tfmt/netboot
abd690d463dfd14488b0d295512d61ce5c5bc97d
[ "Apache-2.0" ]
null
null
null
dist/urls.py
tfmt/netboot
abd690d463dfd14488b0d295512d61ce5c5bc97d
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import url from dist import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^add$', views.AddCategoryView.as_view(), name='add_category'), url(r'^(?P<cat_id>\d+)/$', views.CategoryView.as_view(), name='category'), ]
28.5
78
0.663158
0
0
0
0
0
0
0
0
65
0.22807
21f7222a7e651ad58c05783910d629bf0a7924e4
3,980
py
Python
src/tensorforce/tensorforce/tests/test_optimizers.py
linus87/drl_shape_optimization
39e6b66bd5b70dfce07e145aafe815071bc1b6fe
[ "MIT" ]
17
2020-12-28T16:25:47.000Z
2022-03-27T18:28:44.000Z
src/tensorforce/tensorforce/tests/test_optimizers.py
linus87/drl_shape_optimization
39e6b66bd5b70dfce07e145aafe815071bc1b6fe
[ "MIT" ]
2
2021-04-18T03:40:02.000Z
2022-01-24T08:40:10.000Z
src/tensorforce/tensorforce/tests/test_optimizers.py
linus87/drl_shape_optimization
39e6b66bd5b70dfce07e145aafe815071bc1b6fe
[ "MIT" ]
8
2020-12-23T05:59:52.000Z
2022-03-28T12:06:35.000Z
# Copyright 2018 Tensorforce Team. 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 applicable la...
32.357724
98
0.61407
3,179
0.798744
0
0
0
0
0
0
1,015
0.255025
21f908150b5a25cbfb04d6621c761e9d94cfeb15
1,981
py
Python
main.py
materoy/strobe_light_coms
2d59be7fe1e6f80e531ee2b9375bae0acb249e2d
[ "MIT" ]
null
null
null
main.py
materoy/strobe_light_coms
2d59be7fe1e6f80e531ee2b9375bae0acb249e2d
[ "MIT" ]
null
null
null
main.py
materoy/strobe_light_coms
2d59be7fe1e6f80e531ee2b9375bae0acb249e2d
[ "MIT" ]
null
null
null
import cv2 import numpy import time import iir_filter from scipy import signal import math import matplotlib.pylab as pl # This program detects and measures the frequency of strobe lights def main(): capture = cv2.VideoCapture(0) prev_frame = None point_light_threshold = 200 time_now = time.time() ...
27.136986
92
0.623423
0
0
0
0
0
0
0
0
400
0.201918
21f9319e8b6fa0bf2f0d17cbb3ff738368d5fe28
358
py
Python
advanced/react-django/APITestProject/api/migrations/0002_auto_20210110_0406.py
rocabrera/python-learning
578b6f6f64a59039956e2ff8eca9eb486127722f
[ "MIT" ]
3
2021-04-16T01:30:05.000Z
2021-07-22T21:00:45.000Z
advanced/react-django/APITestProject/api/migrations/0002_auto_20210110_0406.py
rocabrera/python-learning
578b6f6f64a59039956e2ff8eca9eb486127722f
[ "MIT" ]
null
null
null
advanced/react-django/APITestProject/api/migrations/0002_auto_20210110_0406.py
rocabrera/python-learning
578b6f6f64a59039956e2ff8eca9eb486127722f
[ "MIT" ]
null
null
null
# Generated by Django 3.1.5 on 2021-01-10 04:06 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('api', '0001_initial'), ] operations = [ migrations.RenameField( model_name='article', old_name='descripton', new...
18.842105
47
0.578212
273
0.76257
0
0
0
0
0
0
100
0.27933
21f9ac98a22385277ede92007595928086780eae
687
py
Python
easy/array/reverse_integer/reverse_integer.py
deepshig/leetcode-solutions
1e99e0852b8329bf699eb149e7dfe312f82144bc
[ "MIT" ]
null
null
null
easy/array/reverse_integer/reverse_integer.py
deepshig/leetcode-solutions
1e99e0852b8329bf699eb149e7dfe312f82144bc
[ "MIT" ]
null
null
null
easy/array/reverse_integer/reverse_integer.py
deepshig/leetcode-solutions
1e99e0852b8329bf699eb149e7dfe312f82144bc
[ "MIT" ]
null
null
null
import numpy class Solution(object): def reverse(self, x): """ :type x: int :rtype: int """ INTMAX32 = 2147483647 if abs(x) > INTMAX32: return 0 negative = False if x < 0: negative = True x = abs(x) str_x...
19.628571
42
0.505095
536
0.780204
0
0
0
0
0
0
101
0.147016
21f9b7045b329df6f1fc9828f5e918547ef50c4d
917
py
Python
core/dbt/perf_utils.py
dcereijodo/dbt
204fc25c2168710d2549515ffe4846880b89fdec
[ "Apache-2.0" ]
1
2021-04-08T03:33:33.000Z
2021-04-08T03:33:33.000Z
core/dbt/perf_utils.py
azhard/dbt
9cd7cbc9e35e5a7c8c4f17a3d113263f4421ab55
[ "Apache-2.0" ]
1
2021-04-30T21:33:11.000Z
2021-04-30T21:33:11.000Z
core/dbt/perf_utils.py
azhard/dbt
9cd7cbc9e35e5a7c8c4f17a3d113263f4421ab55
[ "Apache-2.0" ]
1
2021-06-04T16:00:44.000Z
2021-06-04T16:00:44.000Z
"""A collection of performance-enhancing functions that have to know just a little bit too much to go anywhere else. """ from dbt.adapters.factory import get_adapter from dbt.parser.manifest import load_manifest from dbt.contracts.graph.manifest import Manifest from dbt.config import RuntimeConfig def get_full_manife...
38.208333
75
0.760087
0
0
0
0
0
0
0
0
419
0.456925
21fba08b9abc98fedd07afe43100cb26b94bd135
7,576
py
Python
RoadDamageGAN/utils.py
ZhangXG001/RoadDamgeDetection
2880545f595368e8076ede2015335f6537f44b2a
[ "MIT" ]
7
2020-11-04T06:38:18.000Z
2022-03-09T07:13:30.000Z
RoadDamageGAN/utils.py
ZhangXG001/RoadDamgeDetection
2880545f595368e8076ede2015335f6537f44b2a
[ "MIT" ]
1
2020-11-26T07:28:31.000Z
2020-11-26T07:28:31.000Z
RoadDamageGAN/utils.py
ZhangXG001/RoadDamgeDetection
2880545f595368e8076ede2015335f6537f44b2a
[ "MIT" ]
1
2021-03-14T09:00:17.000Z
2021-03-14T09:00:17.000Z
import tensorflow as tf from tensorflow.contrib import slim from scipy import misc import os, random import numpy as np from glob import glob from keras.utils import np_utils try: import xml.etree.cElementTree as ET #解析xml的c语言版的模块 except ImportError: import xml.etree.ElementTree as ET class ImageData: de...
38.653061
139
0.619324
2,317
0.29344
0
0
0
0
0
0
1,367
0.173126
21fbf33def7e2a7ceecd0cf2a88408cb26ed3962
1,812
py
Python
release/stubs.min/System/Security/AccessControl_parts/PrivilegeNotHeldException.py
tranconbv/ironpython-stubs
a601759e6c6819beff8e6b639d18a24b7e351851
[ "MIT" ]
null
null
null
release/stubs.min/System/Security/AccessControl_parts/PrivilegeNotHeldException.py
tranconbv/ironpython-stubs
a601759e6c6819beff8e6b639d18a24b7e351851
[ "MIT" ]
null
null
null
release/stubs.min/System/Security/AccessControl_parts/PrivilegeNotHeldException.py
tranconbv/ironpython-stubs
a601759e6c6819beff8e6b639d18a24b7e351851
[ "MIT" ]
null
null
null
class PrivilegeNotHeldException(UnauthorizedAccessException): """ The exception that is thrown when a method in the System.Security.AccessControl namespace attempts to enable a privilege that it does not have. PrivilegeNotHeldException() PrivilegeNotHeldException(privilege: str) PrivilegeNotHeldExcepti...
37.75
215
0.742826
1,808
0.997792
0
0
197
0.10872
0
0
1,301
0.717991
21fc6b78c90650153fe0a66ddcecb6e108d72054
367
py
Python
apc/apc/apc_config.py
jmsung/APC
9f0e065aa748a4d041b783b07cd8078715d39625
[ "MIT" ]
null
null
null
apc/apc/apc_config.py
jmsung/APC
9f0e065aa748a4d041b783b07cd8078715d39625
[ "MIT" ]
null
null
null
apc/apc/apc_config.py
jmsung/APC
9f0e065aa748a4d041b783b07cd8078715d39625
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Mar 13 11:30:05 2019 @author: Jongmin Sung """ # config.py import os from pathlib import Path from inspect import currentframe, getframeinfo fname = getframeinfo(currentframe()).filename # current file name current_dir = Path(fname).resolve().parent data_dir = Path(fna...
16.681818
65
0.716621
0
0
0
0
0
0
0
0
127
0.346049
21fdcfcb45fd6e4c2b13357b9059ca59108a10c0
968
py
Python
recipes/happly/all/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
562
2019-09-04T12:23:43.000Z
2022-03-29T16:41:43.000Z
recipes/happly/all/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
9,799
2019-09-04T12:02:11.000Z
2022-03-31T23:55:45.000Z
recipes/happly/all/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
1,126
2019-09-04T11:57:46.000Z
2022-03-31T16:43:38.000Z
from conans import ConanFile, tools class HapplyConan(ConanFile): name = "happly" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/nmwsharp/happly" topics = ("conan", "happly", "ply", "3D") license = "MIT" description = "A C++ header-only parser for the PLY...
31.225806
114
0.663223
929
0.959711
0
0
76
0.078512
0
0
267
0.275826
21fdeb6692cc16bcf769e03462d13ce0331dfbad
48
py
Python
Weather-Data-Collector/API_key.py
Sachinsingh14/Python-Projects
1edba3574b618bc59c68a7647217a7957c604878
[ "Apache-2.0" ]
1
2021-10-18T14:52:42.000Z
2021-10-18T14:52:42.000Z
Weather-Data-Collector/API_key.py
Sachinsingh14/Python-Projects
1edba3574b618bc59c68a7647217a7957c604878
[ "Apache-2.0" ]
1
2021-10-18T15:30:50.000Z
2021-10-18T15:34:24.000Z
Weather-Data-Collector/API_key.py
Sachinsingh14/Python-Projects
1edba3574b618bc59c68a7647217a7957c604878
[ "Apache-2.0" ]
1
2021-10-18T15:20:48.000Z
2021-10-18T15:20:48.000Z
api_key = "1be3b57d0592f2096543bc46ebf302f0"
16
45
0.8125
0
0
0
0
0
0
0
0
34
0.708333
21fe43d98daef7dd3ebf40de9036c681e2844778
8,798
py
Python
balsam/management/commands/balsam_service.py
hep-cce/hpc-edge-service
57f2b9252d21d478eabe06cbdced5b623f08c75f
[ "BSD-3-Clause" ]
null
null
null
balsam/management/commands/balsam_service.py
hep-cce/hpc-edge-service
57f2b9252d21d478eabe06cbdced5b623f08c75f
[ "BSD-3-Clause" ]
null
null
null
balsam/management/commands/balsam_service.py
hep-cce/hpc-edge-service
57f2b9252d21d478eabe06cbdced5b623f08c75f
[ "BSD-3-Clause" ]
null
null
null
import os,sys,logging,multiprocessing,Queue,traceback logger = logging.getLogger(__name__) from django.core.management.base import BaseCommand, CommandError from django.conf import settings from balsam import models,BalsamJobReceiver,QueueMessage from common import DirCleaner,log_uncaught_exceptions,TransitionJob fro...
50.855491
153
0.587406
8,280
0.941123
0
0
0
0
0
0
2,507
0.284951
21ff67c59d30d6f1412fcfe74d55aa15df4f7837
857
py
Python
FlightPlan_DS.py
dsimmons123/tello-flight-2021
fbf86e1bfcb518395c29516938ee816f0e603984
[ "MIT" ]
null
null
null
FlightPlan_DS.py
dsimmons123/tello-flight-2021
fbf86e1bfcb518395c29516938ee816f0e603984
[ "MIT" ]
null
null
null
FlightPlan_DS.py
dsimmons123/tello-flight-2021
fbf86e1bfcb518395c29516938ee816f0e603984
[ "MIT" ]
1
2021-11-16T22:33:18.000Z
2021-11-16T22:33:18.000Z
from djitellopy import Tello from time import sleep # Initialize and Connect tello = Tello() tello.connect() # Takeoff and move up to 6 feet (183cm) tello.takeoff() tello.move_up(101) # Move forward (east) 5 feet (152cm) tello.move_forward(152) sleep(.5) # rotate 90 degrees CCW tello.rotate_counter_clockwise(90) #...
16.480769
39
0.740957
0
0
0
0
0
0
0
0
367
0.428238
21ff6ed5659b080f8d47c705b13562c2b1de1ccc
882
py
Python
dd.py
GPrathap/rrt-algorithms
b97af0b57306cdbc0e148f5c086345571d34e823
[ "MIT" ]
null
null
null
dd.py
GPrathap/rrt-algorithms
b97af0b57306cdbc0e148f5c086345571d34e823
[ "MIT" ]
null
null
null
dd.py
GPrathap/rrt-algorithms
b97af0b57306cdbc0e148f5c086345571d34e823
[ "MIT" ]
null
null
null
import cv2 import numpy as np import math # img = cv2.imread('/home/geesara/Pictures/bp8OO.jpg', 0) # img = cv2.threshold(img, 127, 255, cv2.THRESH_BINARY)[1] # ensure binary # ret, labels = cv2.connectedComponents(img) # # print("Number of labels" , len(labels)) # # def imshow_components(labels): # # Map componen...
21.512195
75
0.655329
0
0
0
0
0
0
0
0
700
0.793651
1d0099bd08d14b67316e62ac1133b0502a7f11ee
369
py
Python
jts/backend/review/migrations/0003_auto_20191011_1025.py
goupaz/babylon
4e638d02705469061e563fec349676d8faa9f648
[ "MIT" ]
1
2019-08-08T09:03:17.000Z
2019-08-08T09:03:17.000Z
backend/review/migrations/0003_auto_20191011_1025.py
goupaz/website
ce1bc8b6c52ee0815a7b98842ec3bde0c20e0add
[ "Apache-2.0" ]
2
2020-10-09T19:16:09.000Z
2020-10-10T20:40:41.000Z
jts/backend/review/migrations/0003_auto_20191011_1025.py
goupaz/babylon-hackathon
4e638d02705469061e563fec349676d8faa9f648
[ "MIT" ]
1
2019-07-21T01:42:21.000Z
2019-07-21T01:42:21.000Z
# Generated by Django 2.2 on 2019-10-11 17:25 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('review', '0002_auto_20191009_1119'), ] operations = [ migrations.RenameField( model_name='review', old_name='is_deleted', ...
19.421053
46
0.593496
286
0.775068
0
0
0
0
0
0
111
0.300813
1d0414064a76791a07370cb0449ad44c12e6bd53
556
py
Python
src/148.py
cloudzfy/euler
b82efad753ee98375fd40ec4e3989be57828e82c
[ "MIT" ]
12
2016-10-19T09:03:20.000Z
2021-01-10T10:53:23.000Z
src/148.py
cloudzfy/euler
b82efad753ee98375fd40ec4e3989be57828e82c
[ "MIT" ]
null
null
null
src/148.py
cloudzfy/euler
b82efad753ee98375fd40ec4e3989be57828e82c
[ "MIT" ]
6
2018-09-12T03:13:58.000Z
2021-07-07T00:29:43.000Z
# We can easily verify that none of the entries in the first seven # rows of Pascal's triangle are divisible by 7: # 1 # 1 1 # 1 2 1 # 1 3 3 1 # 1 4 6 4 1 # 1 5 10 10 5 1 # 1 6 15 20 15 6 1 # Howeve...
34.75
66
0.546763
0
0
0
0
0
0
0
0
541
0.973022
1d058aadd2ea53eaf7bc8c3792809f3c95cbd8ca
2,056
py
Python
algorithms_in_python/_12_sorting_and_selection/examples/quick_select.py
junteudjio/algorithms_in_python
90ceced09828aedf845605e5236f48ea92a4419e
[ "MIT" ]
null
null
null
algorithms_in_python/_12_sorting_and_selection/examples/quick_select.py
junteudjio/algorithms_in_python
90ceced09828aedf845605e5236f48ea92a4419e
[ "MIT" ]
null
null
null
algorithms_in_python/_12_sorting_and_selection/examples/quick_select.py
junteudjio/algorithms_in_python
90ceced09828aedf845605e5236f48ea92a4419e
[ "MIT" ]
1
2018-10-15T06:28:45.000Z
2018-10-15T06:28:45.000Z
from random import shuffle __author__ = 'Junior Teudjio' def quick_select(l, k, find_largest=True): """ return the k_th largest/smallest element of list l Parameters ---------- l : list k : int find_largest : Boolean True if return the k_th largest element False if return the k-t...
28.164384
109
0.548638
0
0
0
0
0
0
0
0
497
0.241732
1d067213814691f84d993aa83db62abacd69db0f
6,895
py
Python
value_based_1.py
frankfangy/gridlab
6251da042c67d3b939e25a9c800c6d61492a5efb
[ "Apache-2.0" ]
null
null
null
value_based_1.py
frankfangy/gridlab
6251da042c67d3b939e25a9c800c6d61492a5efb
[ "Apache-2.0" ]
null
null
null
value_based_1.py
frankfangy/gridlab
6251da042c67d3b939e25a9c800c6d61492a5efb
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' 这个来源于 udacity 的讲座 验证基础的概念和算法 ''' from grid_world import * import sys #from PyQt5.QtCore import QPoint, QRect, QSize, Qt #from PyQt5.QtGui import (QBrush, QPainter, QColor, QPen ) #from PyQt5.QtWidgets import (QApplication, QPushButton, QCheckBox, QGridLayout,QLabel, QWidg...
39.4
138
0.4657
6,564
0.91357
0
0
0
0
0
0
1,112
0.154767
1d07ee21511b5314cfa719c3b45d940106ac6bb8
1,711
py
Python
src/simmate/calculators/vasp/error_handlers/test/test_large_sigma.py
laurenmm/simmate-1
c06b94c46919b01cda50f78221ad14f75c100a14
[ "BSD-3-Clause" ]
9
2021-12-21T02:58:21.000Z
2022-01-25T14:00:06.000Z
src/simmate/calculators/vasp/error_handlers/test/test_large_sigma.py
laurenmm/simmate-1
c06b94c46919b01cda50f78221ad14f75c100a14
[ "BSD-3-Clause" ]
51
2022-01-01T15:59:58.000Z
2022-03-26T21:25:42.000Z
src/simmate/calculators/vasp/error_handlers/test/test_large_sigma.py
laurenmm/simmate-1
c06b94c46919b01cda50f78221ad14f75c100a14
[ "BSD-3-Clause" ]
7
2022-01-01T03:44:32.000Z
2022-03-29T19:59:27.000Z
# -*- coding: utf-8 -*- import os import pytest from simmate.conftest import copy_test_files from simmate.calculators.vasp.inputs import Incar from simmate.calculators.vasp.error_handlers import LargeSigma def test_large_sigma(tmpdir): copy_test_files( tmpdir, test_directory=__file__, t...
31.109091
77
0.71128
0
0
0
0
0
0
0
0
543
0.317358
1d08ffcc3348bfa440b3477262067290d3893191
3,043
py
Python
wyggles/wyggle/dna.py
kfields/wyggles-arcade
f9cfafa15247e09f21aa06c2fe2f2ca1347b672a
[ "MIT" ]
1
2020-03-15T23:10:12.000Z
2020-03-15T23:10:12.000Z
wyggles/wyggle/dna.py
kfields/wyggles-arcade
f9cfafa15247e09f21aa06c2fe2f2ca1347b672a
[ "MIT" ]
null
null
null
wyggles/wyggle/dna.py
kfields/wyggles-arcade
f9cfafa15247e09f21aa06c2fe2f2ca1347b672a
[ "MIT" ]
null
null
null
import math import random from PIL import Image import cairo from wyggles import Dna PI = math.pi RADIUS = 32 WIDTH = RADIUS HEIGHT = RADIUS class WyggleDna(Dna): def __init__(self, klass): super().__init__(klass) name = self.name r = random.uniform(0, .75) r1 = r + .20 r...
27.917431
94
0.550772
2,896
0.951692
0
0
0
0
0
0
212
0.069668
1d09f4af7ac6dd139ab8ee8934a37f14f97144a4
17,847
py
Python
scripts/trajectories.py
Miedema/MCNetwork
daab1fe5880c47695c6e21124f99aa6b2589aba1
[ "Apache-2.0" ]
null
null
null
scripts/trajectories.py
Miedema/MCNetwork
daab1fe5880c47695c6e21124f99aa6b2589aba1
[ "Apache-2.0" ]
null
null
null
scripts/trajectories.py
Miedema/MCNetwork
daab1fe5880c47695c6e21124f99aa6b2589aba1
[ "Apache-2.0" ]
1
2021-10-05T14:34:30.000Z
2021-10-05T14:34:30.000Z
#!/usr/bin/python3 from tools import * from sys import argv from os.path import join import h5py import matplotlib.pylab as plt from matplotlib.patches import Wedge import numpy as np if len(argv) > 1: pathToSimFolder = argv[1] else: pathToSimFolder = "../data/" parameters, electrodes = readParameters(pathT...
36.646817
197
0.428083
0
0
0
0
0
0
0
0
2,402
0.134588
1d0a47a3797d1d7c500c16f2bd41153122397e81
1,187
py
Python
rest_framework_sav/views.py
JamesRitchie/django-rest-framework-session-endpoint
a968129be88a1981d9904c3679e5fdd9490e890d
[ "BSD-2-Clause" ]
21
2015-03-04T09:25:47.000Z
2019-11-08T14:19:24.000Z
rest_framework_sav/views.py
JamesRitchie/django-rest-framework-session-endpoint
a968129be88a1981d9904c3679e5fdd9490e890d
[ "BSD-2-Clause" ]
1
2015-03-04T09:26:17.000Z
2015-03-11T13:10:20.000Z
rest_framework_sav/views.py
JamesRitchie/django-rest-framework-session-endpoint
a968129be88a1981d9904c3679e5fdd9490e890d
[ "BSD-2-Clause" ]
1
2020-05-17T04:16:27.000Z
2020-05-17T04:16:27.000Z
"""Views for Django Rest Framework Session Endpoint extension.""" from django.contrib.auth import login, logout from rest_framework import parsers, renderers from rest_framework.authtoken.serializers import AuthTokenSerializer from rest_framework.response import Response from rest_framework.views import APIView cla...
30.435897
68
0.711879
821
0.69166
0
0
0
0
0
0
282
0.237574
1d0ef63ab672909bfeb78546b4b689de11692b51
4,348
py
Python
app.py
thesadru/genshinstats-api
0b0d3b62ee29e4617b74c2fa033c3488cf77fec0
[ "MIT" ]
7
2021-02-09T11:34:38.000Z
2021-07-27T10:39:30.000Z
app.py
thesadru/genshinstats-flask-api
0b0d3b62ee29e4617b74c2fa033c3488cf77fec0
[ "MIT" ]
4
2021-09-19T04:10:48.000Z
2021-12-04T22:13:22.000Z
app.py
thesadru/genshinstats-flask-api
0b0d3b62ee29e4617b74c2fa033c3488cf77fec0
[ "MIT" ]
2
2021-02-21T04:39:30.000Z
2021-08-16T04:22:43.000Z
import os import time from concurrent.futures import ThreadPoolExecutor from enum import Enum from hashlib import sha256 from typing import List, Type import genshinstats as gs from cachetools import TTLCache from fastapi import Depends, FastAPI, HTTPException, Path, Query, Request from fastapi.responses import JSONRe...
33.96875
108
0.691122
0
0
0
0
3,322
0.764029
81
0.018629
1,264
0.290708
1d0f4c5eb9d4c29e42a28ad69535879d4ee1dd48
940
py
Python
tests/integration/serialization_test.py
markowanga/stweet
7f103b5c88fcef1d993d8cdc99cec358e55293f7
[ "MIT" ]
101
2020-11-22T16:44:25.000Z
2022-03-30T08:42:07.000Z
tests/integration/serialization_test.py
markowanga/stweet
7f103b5c88fcef1d993d8cdc99cec358e55293f7
[ "MIT" ]
53
2020-11-21T19:40:36.000Z
2022-03-02T10:09:52.000Z
tests/integration/serialization_test.py
markowanga/stweet
7f103b5c88fcef1d993d8cdc99cec358e55293f7
[ "MIT" ]
16
2020-12-12T23:02:51.000Z
2022-03-01T12:10:32.000Z
import pytest import stweet as st from tests.test_util import get_temp_test_file_name, get_tweets_to_tweet_output_test, \ two_lists_assert_equal def test_csv_serialization(): csv_filename = get_temp_test_file_name('csv') tweets_collector = st.CollectorTweetOutput() get_tweets_to_tweet_output_test([ ...
33.571429
87
0.787234
0
0
0
0
0
0
0
0
9
0.009574
0dfccc824d2f975fcc92e6cabd32a3783f6c5d15
391
py
Python
scripts/python/calculus/ch2.py
jeremiahmarks/dangerzone
fe2946b8463ed018d2136ca0eb178161ad370565
[ "MIT" ]
1
2015-08-15T05:25:35.000Z
2015-08-15T05:25:35.000Z
scripts/python/calculus/ch2.py
jeremiahmarks/dangerzone
fe2946b8463ed018d2136ca0eb178161ad370565
[ "MIT" ]
null
null
null
scripts/python/calculus/ch2.py
jeremiahmarks/dangerzone
fe2946b8463ed018d2136ca0eb178161ad370565
[ "MIT" ]
null
null
null
# from mypy.physics import constants def averageVelocity(positionEquation, startTime, endTime): """ The position equation is in the form of a one variable lambda and the averagevelocity=(changeinposition)/(timeelapsed) """ startTime=float(startTime) endTime=float(endTime) vAvg=(positionEquation(star...
24.4375
82
0.762148
0
0
0
0
0
0
0
0
137
0.350384
0dfde004acc4ea83cf0c183251d4f37479f7e957
690
py
Python
Maths_And_Stats/Number_Theory/Segmented_Sieve/segmented_sieve.py
arslantalib3/algo_ds_101
a1293f407e00b8346f93e8770727f769e7add00e
[ "MIT" ]
182
2020-10-01T17:16:42.000Z
2021-10-04T17:52:49.000Z
Maths_And_Stats/Number_Theory/Segmented_Sieve/segmented_sieve.py
arslantalib3/algo_ds_101
a1293f407e00b8346f93e8770727f769e7add00e
[ "MIT" ]
759
2020-10-01T00:12:21.000Z
2021-10-04T19:35:11.000Z
Maths_And_Stats/Number_Theory/Segmented_Sieve/segmented_sieve.py
arslantalib3/algo_ds_101
a1293f407e00b8346f93e8770727f769e7add00e
[ "MIT" ]
1,176
2020-10-01T16:02:13.000Z
2021-10-04T19:20:19.000Z
def segmented_sieve(n): # Create an boolean array with all values True primes = [True]*n for p in range(2,n): #If prime[p] is True,it is a prime and its multiples are not prime if primes[p]: for i in range(2*p,n,p): # Mark every multiple of a prime as not prim...
25.555556
74
0.569565
0
0
0
0
0
0
0
0
273
0.395652
df02884c6d0111c6be162d57811e3b0d85ecd572
2,003
py
Python
setup.py
UCL/scikit-surgerytf
b81ae994c44da790b101b868d12dd20b6d862df3
[ "Apache-2.0" ]
null
null
null
setup.py
UCL/scikit-surgerytf
b81ae994c44da790b101b868d12dd20b6d862df3
[ "Apache-2.0" ]
41
2020-06-15T12:13:06.000Z
2022-03-22T19:04:48.000Z
setup.py
UCL/scikit-surgerytf
b81ae994c44da790b101b868d12dd20b6d862df3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 """ Setup for scikit-surgerytf """ from setuptools import setup, find_packages import versioneer # Get the long description with open('README.rst') as f: long_description = f.read() setup( name='scikit-surgerytf', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), ...
27.819444
94
0.62656
0
0
0
0
0
0
0
0
1,170
0.584124
df04608972e31495e8f964d15c9dd90a93f28d89
2,155
py
Python
Codigos Python/String_to_int.py
BrunoHarlis/Solucoes_LeetCode
cca9b1331cbfe7d8dc8d844a810ac651a92d8c97
[ "MIT" ]
null
null
null
Codigos Python/String_to_int.py
BrunoHarlis/Solucoes_LeetCode
cca9b1331cbfe7d8dc8d844a810ac651a92d8c97
[ "MIT" ]
null
null
null
Codigos Python/String_to_int.py
BrunoHarlis/Solucoes_LeetCode
cca9b1331cbfe7d8dc8d844a810ac651a92d8c97
[ "MIT" ]
null
null
null
# Fonte: https://leetcode.com/problems/string-to-integer-atoi/ # Autor: Bruno Harlis # Data: 03/08/2021 """ Implemente a função myAtoi(string s), que converte uma string em um inteiro assinado de 32 bits (semelhante à função C / C ++ atoi). O algoritmo para myAtoi(string s) é o seguinte: Leia e ignore qualquer espaç...
30.352113
98
0.644084
0
0
0
0
0
0
0
0
1,620
0.738377
df0469beb5c62575548fc779498cc9b3a9cc1490
1,547
py
Python
tests/bench_bgra2rgb.py
RedFantom/python-mss
7e26de184b1e6a0800231b01451f794087a76f73
[ "MIT" ]
null
null
null
tests/bench_bgra2rgb.py
RedFantom/python-mss
7e26de184b1e6a0800231b01451f794087a76f73
[ "MIT" ]
null
null
null
tests/bench_bgra2rgb.py
RedFantom/python-mss
7e26de184b1e6a0800231b01451f794087a76f73
[ "MIT" ]
null
null
null
# coding: utf-8 """ 2018-03-19. Maximum screenshots in 1 second by computing BGRA raw values to RGB. GNU/Linux pil_frombytes 139 mss_rgb 119 pil_frombytes_rgb 51 numpy_flip 31 numpy_slice 29 macOS pil_frombytes 209 mss_rgb 174 pil_frombytes_rgb 113 numpy_fl...
19.582278
76
0.580478
0
0
0
0
0
0
0
0
503
0.325145
df06fb8878eee413e40a010aae2c0a5236a2dce0
431
py
Python
app1/migrations/0002_auto_20210925_0546.py
rianaansari/My_library
95b817ac2760d9dcb43b7cfff053056cfe3eb12d
[ "Apache-2.0" ]
null
null
null
app1/migrations/0002_auto_20210925_0546.py
rianaansari/My_library
95b817ac2760d9dcb43b7cfff053056cfe3eb12d
[ "Apache-2.0" ]
null
null
null
app1/migrations/0002_auto_20210925_0546.py
rianaansari/My_library
95b817ac2760d9dcb43b7cfff053056cfe3eb12d
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.7 on 2021-09-25 05:46 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('app1', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='author', name='date_of_birth', ), ...
19.590909
47
0.559165
346
0.802784
0
0
0
0
0
0
113
0.262181
df0719c519efa5ba53c3190dcb91a4426cd19f1a
672
py
Python
third_party/blink/renderer/bindings/scripts/blink_idl_parser_test.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
third_party/blink/renderer/bindings/scripts/blink_idl_parser_test.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
113
2015-05-04T09:58:14.000Z
2022-01-31T19:35:03.000Z
third_party/blink/renderer/bindings/scripts/blink_idl_parser_test.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
# Copyright 2017 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. # pylint: disable=no-member,relative-import """Unit tests for blink_idl_parser.py.""" import unittest from blink_idl_parser import BlinkIDLParser class B...
33.6
76
0.730655
358
0.532738
0
0
0
0
0
0
343
0.510417
df0a77a4b3e3c8e88b291a3d6e1f829363ad81e7
1,705
py
Python
encode.py
Kyobito/Pencil-Unrefined
352a0281a00129a4e5d8d793997d09c0a29a1c7c
[ "MIT" ]
null
null
null
encode.py
Kyobito/Pencil-Unrefined
352a0281a00129a4e5d8d793997d09c0a29a1c7c
[ "MIT" ]
null
null
null
encode.py
Kyobito/Pencil-Unrefined
352a0281a00129a4e5d8d793997d09c0a29a1c7c
[ "MIT" ]
null
null
null
import calc def caesar_cipher(word, base): up_alpha = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] low_alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x...
32.788462
144
0.575953
0
0
0
0
0
0
0
0
223
0.130792
df0aff4197ef0ad00e311fbd3784ea4b9b5eea37
2,142
py
Python
snuba/utils/types.py
fpacifici/snuba
cf732b71383c948f9387fbe64e9404ca71f8e9c5
[ "Apache-2.0" ]
null
null
null
snuba/utils/types.py
fpacifici/snuba
cf732b71383c948f9387fbe64e9404ca71f8e9c5
[ "Apache-2.0" ]
null
null
null
snuba/utils/types.py
fpacifici/snuba
cf732b71383c948f9387fbe64e9404ca71f8e9c5
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from typing import Any, Generic, TypeVar from typing_extensions import Protocol TComparable = TypeVar("TComparable", contravariant=True) class Comparable(Protocol[TComparable]): """ Defines the protocol for comparable objects. Objects that satisfy this protocol are ass...
31.5
86
0.723156
1,869
0.872549
0
0
314
0.146592
0
0
1,074
0.501401
df0b8deb7b8139e6384b8790377b34bff7533519
2,725
py
Python
ACME/render/renderer.py
mauriziokovacic/ACME
2615b66dd4addfd5c03d9d91a24c7da414294308
[ "MIT" ]
3
2019-10-23T23:10:55.000Z
2021-09-01T07:30:14.000Z
ACME/render/renderer.py
mauriziokovacic/ACME-Python
2615b66dd4addfd5c03d9d91a24c7da414294308
[ "MIT" ]
null
null
null
ACME/render/renderer.py
mauriziokovacic/ACME-Python
2615b66dd4addfd5c03d9d91a24c7da414294308
[ "MIT" ]
1
2020-07-11T11:35:43.000Z
2020-07-11T11:35:43.000Z
import neural_renderer as nr from ..math.unitvec import * class Renderer(nr.Renderer): """ A class extending the Neural Renderer Attributes ---------- device : str or torch.device (optional) the tensor the renderer will be stored to (default is 'cuda:0') culling : str (optional) ...
27.806122
80
0.601468
2,664
0.977615
0
0
0
0
0
0
1,643
0.602936
df0c2bb253afbf6cb0b5b41d83b69d48eccf038f
6,241
py
Python
src/codeGameSimulation/Multirun.py
LukasWallisch/game-ur-analysis
760a892cc20924cf1864b9602c5d3239a8995323
[ "MIT" ]
null
null
null
src/codeGameSimulation/Multirun.py
LukasWallisch/game-ur-analysis
760a892cc20924cf1864b9602c5d3239a8995323
[ "MIT" ]
null
null
null
src/codeGameSimulation/Multirun.py
LukasWallisch/game-ur-analysis
760a892cc20924cf1864b9602c5d3239a8995323
[ "MIT" ]
null
null
null
import copy from datetime import datetime from typing import List, Tuple from .store2db import createTabels, store_data_2_db from .GameUr import GameUr from .GameSettings import GameSettings import multiprocessing as mp import tqdm def getThreadCount()->int: return mp.cpu_count() def runGameNTimes(n: int, gs: ...
34.291209
214
0.620253
0
0
0
0
0
0
0
0
1,183
0.189553
df0c4609dc3d7030697a254872dda6cfb67438db
641
py
Python
setup.py
Wirtos/aioregex
b426fb99769d54d627e189bd058c4b724559fb80
[ "MIT" ]
null
null
null
setup.py
Wirtos/aioregex
b426fb99769d54d627e189bd058c4b724559fb80
[ "MIT" ]
null
null
null
setup.py
Wirtos/aioregex
b426fb99769d54d627e189bd058c4b724559fb80
[ "MIT" ]
null
null
null
import setuptools setuptools.setup( name="aioregex", version="0.1", author="Wirtos_new", author_email="Wirtos.new@gmail.com", description="regex to allow both sync and async callables in the sub as repl", url="https://wirtos.github.io/aioregex/", packages=setuptools.find_packages(), pro...
29.136364
82
0.639626
0
0
0
0
0
0
0
0
343
0.535101
df0edbdfa3781bf2e4a9e3ef7d2addd8064bef5a
830
py
Python
scripts/pyqtgraph-develop/pyqtgraph/pixmaps/__init__.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
scripts/pyqtgraph-develop/pyqtgraph/pixmaps/__init__.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
scripts/pyqtgraph-develop/pyqtgraph/pixmaps/__init__.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
""" Allows easy loading of pixmaps used in UI elements. Provides support for frozen environments as well. """ import os, sys, pickle from ..functions import makeQImage from ..Qt import QtGui from ..python2_3 import basestring if sys.version_info[0] == 2: from . import pixmapData_2 as pixmapData else: ...
29.642857
74
0.687952
0
0
0
0
0
0
0
0
268
0.322892
df0f2509e6da533aefb1f279bb6e3f848aa2f366
7,920
py
Python
defx/metrics/f1_measure.py
DFKI-NLP/defx
0c8b7a5ff4904a54e28f187b938198744e4a450a
[ "MIT" ]
5
2020-04-29T07:41:58.000Z
2021-12-09T10:07:08.000Z
defx/metrics/f1_measure.py
DFKI-NLP/defx
0c8b7a5ff4904a54e28f187b938198744e4a450a
[ "MIT" ]
1
2020-10-17T16:51:06.000Z
2020-10-27T13:44:35.000Z
defx/metrics/f1_measure.py
DFKI-NLP/defx
0c8b7a5ff4904a54e28f187b938198744e4a450a
[ "MIT" ]
null
null
null
from statistics import mean from typing import Dict, List, Optional, Set from collections import defaultdict import torch from allennlp.common.checks import ConfigurationError from allennlp.nn.util import get_lengths_from_binary_sequence_mask from allennlp.data.vocabulary import Vocabulary from allennlp.training.metr...
42.580645
96
0.597348
7,447
0.940278
0
0
7,478
0.944192
0
0
1,531
0.193308
df102fd4bc161dbff752d14a5d6d5415a2686808
78
py
Python
test/test.py
hcamacho4200/dev_opts_training
6ce91cbeb30af7eae29c084f6180d53f64f5e9b0
[ "Apache-2.0" ]
1
2021-10-03T22:23:06.000Z
2021-10-03T22:23:06.000Z
test/test.py
hcamacho4200/dev_opts_training
6ce91cbeb30af7eae29c084f6180d53f64f5e9b0
[ "Apache-2.0" ]
null
null
null
test/test.py
hcamacho4200/dev_opts_training
6ce91cbeb30af7eae29c084f6180d53f64f5e9b0
[ "Apache-2.0" ]
1
2021-12-11T19:24:59.000Z
2021-12-11T19:24:59.000Z
def test_test(): """A generic test :return: """ assert True
9.75
21
0.512821
0
0
0
0
0
0
0
0
39
0.5
df10a23870978fcf9c8629fcbb01b511ca18a8b5
833
py
Python
create.py
felipesantoos/mython
ef4e91a1177ecdd3a6ecea5cd6a6605a084ea5a6
[ "MIT" ]
null
null
null
create.py
felipesantoos/mython
ef4e91a1177ecdd3a6ecea5cd6a6605a084ea5a6
[ "MIT" ]
null
null
null
create.py
felipesantoos/mython
ef4e91a1177ecdd3a6ecea5cd6a6605a084ea5a6
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- # Importação das bibliotecas necessárias. import mysql.connector import datetime # Configuração da conexão. connection = mysql.connector.connect( host="localhost", user="root", password="", database="teste" ) # Variável que executará as operações. cursor = connection.cursor(...
21.358974
68
0.711885
0
0
0
0
0
0
0
0
499
0.582264
df114fd76f5bb86b26cb7eeb35dd8decd3116f90
10,814
py
Python
pydm/tests/widgets/test_enum_combo_box.py
KurtJacobson/pydm
5a5cbc6cdb218b77335a3c4ad57a4a49e060e20d
[ "BSD-3-Clause-LBNL" ]
89
2016-05-25T22:01:48.000Z
2022-03-02T16:21:03.000Z
pydm/tests/widgets/test_enum_combo_box.py
KurtJacobson/pydm
5a5cbc6cdb218b77335a3c4ad57a4a49e060e20d
[ "BSD-3-Clause-LBNL" ]
653
2016-10-15T01:45:02.000Z
2022-03-31T23:36:39.000Z
pydm/tests/widgets/test_enum_combo_box.py
KurtJacobson/pydm
5a5cbc6cdb218b77335a3c4ad57a4a49e060e20d
[ "BSD-3-Clause-LBNL" ]
56
2016-10-10T14:02:06.000Z
2022-03-24T14:35:24.000Z
# Unit Tests for the Enum Combo Box import pytest from logging import ERROR from qtpy.QtCore import Slot, Qt from ...widgets.enum_combo_box import PyDMEnumComboBox from ... import data_plugins # -------------------- # POSITIVE TEST CASES # -------------------- def test_construct(qtbot): """ Test the const...
35.92691
118
0.69447
0
0
0
0
9,929
0.918162
0
0
5,623
0.519974
df122415da47ec1ae7bcf4c6c1f60a16cd13570e
7,421
py
Python
byol_train.py
jhvics1/pytorch-byol
e66a5f72a7d124578109fcee43062eb88b0fabf1
[ "MIT" ]
null
null
null
byol_train.py
jhvics1/pytorch-byol
e66a5f72a7d124578109fcee43062eb88b0fabf1
[ "MIT" ]
null
null
null
byol_train.py
jhvics1/pytorch-byol
e66a5f72a7d124578109fcee43062eb88b0fabf1
[ "MIT" ]
null
null
null
import os import random import argparse import multiprocessing import numpy as np import torch from torchvision import models, transforms from torch.utils.data import DataLoader, Dataset from pathlib import Path from PIL import Image from utils import Bar, config, mkdir_p, AverageMeter from datetime import datetime fro...
38.450777
118
0.566905
896
0.120738
0
0
0
0
0
0
2,527
0.34052
df144e0efba2d31bbcba42a1f4cb228efa1dd83b
406
py
Python
electrum/networks/auxpow_mixin.py
ZenyattaAbosom/AbosomElectrum
02748b0b14e37385d6e77591d122e592740222bf
[ "MIT" ]
4
2020-06-27T22:43:34.000Z
2021-04-12T02:29:30.000Z
electrum/networks/auxpow_mixin.py
ZenyattaAbosom/AbosomElectrum
02748b0b14e37385d6e77591d122e592740222bf
[ "MIT" ]
21
2020-06-20T15:02:50.000Z
2021-04-07T10:14:59.000Z
electrum/networks/auxpow_mixin.py
ZenyattaAbosom/AbosomElectrum
02748b0b14e37385d6e77591d122e592740222bf
[ "MIT" ]
13
2020-06-28T08:13:28.000Z
2021-12-28T00:11:56.000Z
class AuxPowMixin(object): AUXPOW_START_HEIGHT = 0 AUXPOW_CHAIN_ID = 0x0001 BLOCK_VERSION_AUXPOW_BIT = 0 @classmethod def is_auxpow_active(cls, header) -> bool: height_allows_auxpow = header['block_height'] >= cls.AUXPOW_START_HEIGHT version_allows_auxpow = header['version'] & cls.B...
40.6
80
0.743842
405
0.997537
0
0
283
0.697044
0
0
23
0.05665
df1524fa7728c1adb3ef0c319a786a66845f1e94
159
py
Python
Problems/dicecup.py
rikgj/Kattis
2e34dee307aef5acea5837732bf9f27f8c548e9c
[ "MIT" ]
null
null
null
Problems/dicecup.py
rikgj/Kattis
2e34dee307aef5acea5837732bf9f27f8c548e9c
[ "MIT" ]
null
null
null
Problems/dicecup.py
rikgj/Kattis
2e34dee307aef5acea5837732bf9f27f8c548e9c
[ "MIT" ]
null
null
null
from sys import stdin a,b = [int(x) for x in stdin.readline().split(' ')] diff = abs(a-b) +1 a = min(a,b) +1 print(a) for x in range(1,diff): print(a+x)
15.9
51
0.591195
0
0
0
0
0
0
0
0
3
0.018868
df15ead6214feb74fc04cc18939e4d0ebbd4fa53
2,338
py
Python
Castessoft_Python/Castessoft_Dahianna.py
JuanDiegoCastellanos/All-in-one-Python-Full
ba28a3d129a060d5a83c1d99ff97cf5c9d3d2afa
[ "MIT" ]
1
2021-11-23T02:46:50.000Z
2021-11-23T02:46:50.000Z
Castessoft_Python/Castessoft_Dahianna.py
JuanDiegoCastellanos/All-in-one-Python-Full
ba28a3d129a060d5a83c1d99ff97cf5c9d3d2afa
[ "MIT" ]
null
null
null
Castessoft_Python/Castessoft_Dahianna.py
JuanDiegoCastellanos/All-in-one-Python-Full
ba28a3d129a060d5a83c1d99ff97cf5c9d3d2afa
[ "MIT" ]
null
null
null
import os class Cajero: def __init__(self): self.continuar = True self.monto = 5000 self.menu() def contraseña(self): contador = 1 while contador <= 3: x = int(input("ingrese su contraseña:" )) if x == 5467: print("Contraseña ...
31.173333
92
0.47006
2,321
0.98766
0
0
0
0
0
0
773
0.328936
df16a9b6f456a271a02043344bd7fec5b2e043ce
77,732
py
Python
modules.py
faber6/kings-raid-daily
07b5a6fc9a827dd7e536ff9643217393fb86c097
[ "MIT" ]
null
null
null
modules.py
faber6/kings-raid-daily
07b5a6fc9a827dd7e536ff9643217393fb86c097
[ "MIT" ]
null
null
null
modules.py
faber6/kings-raid-daily
07b5a6fc9a827dd7e536ff9643217393fb86c097
[ "MIT" ]
null
null
null
from threading import Thread, enumerate from random import choice from time import sleep as slp from time import time as tiime from os import mkdir, getcwd, path as pth from subprocess import run as run_ from math import ceil from traceback import format_exc from sys import exit import logging, json, ctypes from ppadb...
48.980466
246
0.519503
60,036
0.772207
0
0
0
0
0
0
21,848
0.281018
df193d81eacd388f5ab18d96aacd2c5b1b7b5976
548
py
Python
sarikasama/0012/0012.py
saurabh896/python-1
f8d3aedf4c0fe6e24dfa3269ea7e642c9f7dd9b7
[ "MIT" ]
3,976
2015-01-01T15:49:39.000Z
2022-03-31T03:47:56.000Z
sarikasama/0012/0012.py
oyesam7/python-1
220734af09fa09a6f615d4f1b4612a0ab75d91d1
[ "MIT" ]
97
2015-01-11T02:59:46.000Z
2022-03-16T14:01:56.000Z
sarikasama/0012/0012.py
oyesam7/python-1
220734af09fa09a6f615d4f1b4612a0ab75d91d1
[ "MIT" ]
3,533
2015-01-01T06:19:30.000Z
2022-03-28T13:14:54.000Z
#!/usr/bin/env python3 #filter sensitive words in user's input def replace_sensitive_words(input_word): s_words = [] with open('filtered_words','r') as f: line = f.readline() while line != '': s_words.append(line.strip()) line = f.readline() for word in s_words: ...
27.4
55
0.600365
0
0
0
0
0
0
0
0
102
0.186131
df1b5b5a58e2e52b261ca94c9d20882cbf00caf2
1,172
py
Python
moceansdk/modules/command/mc_object/tg_request_contact.py
d3no/mocean-sdk-python
cbc215a0eb8aa26c04afb940eab6482f23150c75
[ "MIT" ]
2
2019-10-31T02:37:43.000Z
2021-07-25T02:45:27.000Z
moceansdk/modules/command/mc_object/tg_request_contact.py
d3no/mocean-sdk-python
cbc215a0eb8aa26c04afb940eab6482f23150c75
[ "MIT" ]
18
2019-05-30T01:09:34.000Z
2022-01-04T07:31:47.000Z
moceansdk/modules/command/mc_object/tg_request_contact.py
d3no/mocean-sdk-python
cbc215a0eb8aa26c04afb940eab6482f23150c75
[ "MIT" ]
4
2019-04-19T08:34:47.000Z
2021-07-21T02:02:07.000Z
from builtins import super from moceansdk.modules.command.mc_object import AbstractMc class TgRequestContact(AbstractMc): def __init__(self, param=None): super().__init__(param) self.set_button_text('Share button') def action(self): return 'send-telegram' def required_key(self):...
29.3
65
0.610068
1,083
0.924061
0
0
0
0
0
0
234
0.199659
df1b80f7d7fc1e3bfcdf6202b6edd9c8fbec5f5f
5,418
py
Python
tests/engine/backend/test_multiprocess_backend.py
sanchitcop19/web-api-async
a3fff70c3b62678f3c8ef8cc07f7c9b4fe155c69
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/engine/backend/test_multiprocess_backend.py
sanchitcop19/web-api-async
a3fff70c3b62678f3c8ef8cc07f7c9b4fe155c69
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/engine/backend/test_multiprocess_backend.py
sanchitcop19/web-api-async
a3fff70c3b62678f3c8ef8cc07f7c9b4fe155c69
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
"""Test the execute method of the synchronous backend.""" import os import shutil import time import unittest from vizier.datastore.fs.factory import FileSystemDatastoreFactory from vizier.engine.backend.multiprocess import MultiProcessBackend from vizier.engine.controller import WorkflowController from vizier.engine...
33.444444
99
0.658546
3,931
0.725544
0
0
0
0
0
0
669
0.123477
df1b9a8dd49a7cba3147ab1d0bd9b08eace69dbb
1,496
py
Python
main.py
Stormjotne/oslomet-disease-model
6292d5b6f30fd385fccb3815994700cadd75c9fb
[ "MIT" ]
2
2021-09-06T11:43:39.000Z
2022-02-18T11:49:21.000Z
main.py
Stormjotne/oslomet-disease-model
6292d5b6f30fd385fccb3815994700cadd75c9fb
[ "MIT" ]
3
2021-09-15T12:10:42.000Z
2021-11-08T19:32:21.000Z
main.py
Stormjotne/oslomet-disease-model
6292d5b6f30fd385fccb3815994700cadd75c9fb
[ "MIT" ]
null
null
null
from time import sleep from random import random, uniform from OMDM import Evolution """ Run the model optimization program we're creating from this script. """ hyper_parameters = { "number_of_generations": 10, "genome_length": 6, "mutation_probability": 0.2, ...
36.487805
102
0.635695
0
0
0
0
0
0
0
0
709
0.47393
df1f060044c4759d5a15d50dfadd88be86823530
688
py
Python
pyoat/__init__.py
berkanlafci/pyoat
b0cee99adde3c14c5d94f26f6e893a0b2e1fcae2
[ "MIT" ]
5
2022-03-07T16:30:58.000Z
2022-03-28T13:42:01.000Z
pyoat/__init__.py
berkanlafci/pyoat
b0cee99adde3c14c5d94f26f6e893a0b2e1fcae2
[ "MIT" ]
1
2022-03-28T13:41:42.000Z
2022-03-28T13:41:42.000Z
pyoat/__init__.py
berkanlafci/pyoat
b0cee99adde3c14c5d94f26f6e893a0b2e1fcae2
[ "MIT" ]
null
null
null
#----- # Description : Import classes/functions from subfolders # Date : February 2021 # Author : Berkan Lafci # E-mail : lafciberkan@gmail.com #----- # package version __version__ = "1.0.0" # oa recon codes from pyoat.reconstruction import cpuBP, cpuMB, modelOA # data readers from pyoat.rea...
25.481481
93
0.767442
0
0
0
0
0
0
0
0
264
0.383721
df1f23556aeeff57ddaf501491d64b2becebf8b3
680
py
Python
game/cactus.py
gmunumel/trex404
3821e8695a0d9e85d70127a1c8b6bdb2a13f1e38
[ "MIT" ]
null
null
null
game/cactus.py
gmunumel/trex404
3821e8695a0d9e85d70127a1c8b6bdb2a13f1e38
[ "MIT" ]
null
null
null
game/cactus.py
gmunumel/trex404
3821e8695a0d9e85d70127a1c8b6bdb2a13f1e38
[ "MIT" ]
null
null
null
from game.globals import * from game.lib import load_sprite_sheet import pygame, random class Cactus(pygame.sprite.Sprite): def __init__(self, speed = 5, sizeX = -1, sizeY = -1): pygame.sprite.Sprite.__init__(self, self.containers) self.images, self.rect = load_sprite_sheet('cacti-small.png', 3, 1, sizeX, si...
32.380952
85
0.683824
591
0.869118
0
0
0
0
0
0
17
0.025
df1f50b2cee471c44a5439e1ae4ca45519f52060
15,624
py
Python
src/api/auth/views/token_views.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
84
2021-06-30T06:20:23.000Z
2022-03-22T03:05:49.000Z
src/api/auth/views/token_views.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
7
2021-06-30T06:21:16.000Z
2022-03-29T07:36:13.000Z
src/api/auth/views/token_views.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
40
2021-06-30T06:21:26.000Z
2022-03-29T12:42:26.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ---------------------------------------------...
40.268041
111
0.609319
13,740
0.845122
0
0
11,971
0.736314
0
0
9,148
0.562677
df1fe7022c513f9daa84d71c86c0ba7d7afec1ce
1,396
py
Python
fdrtd/builtins/util/kvstorage.py
chart21/fdrtd
c5f8ba84f8e367580572f2759683dfd3789b0b80
[ "MIT" ]
null
null
null
fdrtd/builtins/util/kvstorage.py
chart21/fdrtd
c5f8ba84f8e367580572f2759683dfd3789b0b80
[ "MIT" ]
10
2021-08-29T00:03:36.000Z
2022-02-18T09:19:38.000Z
fdrtd/builtins/util/kvstorage.py
chart21/fdrtd
c5f8ba84f8e367580572f2759683dfd3789b0b80
[ "MIT" ]
2
2021-08-28T21:44:10.000Z
2021-12-16T23:23:58.000Z
""" contains microservice KeyValueStorage """ import uuid as _uuid from fdrtd.server.microservice import Microservice class KeyValueStorage(Microservice): """stores and retrieves values by key""" def __init__(self, bus, endpoint): super().__init__(bus, endpoint) self.storages = {'default': ...
30.347826
55
0.626791
1,273
0.911891
0
0
0
0
0
0
358
0.256447
df22c7df4259c94d4e73cee307d40b33d12c2f03
739
py
Python
tests/unit/handlers/test_HTTPSClientAuthHandler.py
sivel/requisitor
c6b10d400111998591ea9e21148c9cd7e905a453
[ "Apache-2.0" ]
7
2020-04-17T04:05:19.000Z
2020-05-15T14:35:21.000Z
tests/unit/handlers/test_HTTPSClientAuthHandler.py
sivel/requisitor
c6b10d400111998591ea9e21148c9cd7e905a453
[ "Apache-2.0" ]
null
null
null
tests/unit/handlers/test_HTTPSClientAuthHandler.py
sivel/requisitor
c6b10d400111998591ea9e21148c9cd7e905a453
[ "Apache-2.0" ]
null
null
null
import pytest from requisitor.session import Session def test_client_cert_auth(mocker): conn = mocker.patch('http.client.HTTPSConnection', side_effect=RuntimeError) s = Session() with pytest.raises(RuntimeError): s.request('GET', 'https://foo.bar', cert=('cert', 'key')) ...
26.392857
67
0.644114
0
0
0
0
0
0
0
0
167
0.225981
df2344b9d30d0dc68153136f3c88de8e8dd0db2a
370
py
Python
Dataset/Leetcode/valid/35/31.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/valid/35/31.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/valid/35/31.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
class Solution: def XXX(self, nums: List[int], target: int) -> int: l, r = 0, len(nums)-1 # 找到第一个大于或等于target的位置 while l<r: m = (l+r) // 2 if nums[m] >= target: r = m else: l = m + 1 if nums[r] >= target: ...
20.555556
55
0.381081
393
0.992424
0
0
0
0
0
0
47
0.118687
df2437ca766dc3a07e7da531239e5dd32c32401c
1,773
py
Python
gracc-oneoffs/remove-odd-procs/remove-odd-procs.py
opensciencegrid/gracc-tools
86297d0a8b6b208b6c661473647fdc69f438afec
[ "Apache-2.0" ]
null
null
null
gracc-oneoffs/remove-odd-procs/remove-odd-procs.py
opensciencegrid/gracc-tools
86297d0a8b6b208b6c661473647fdc69f438afec
[ "Apache-2.0" ]
1
2017-06-17T19:25:51.000Z
2017-06-19T15:33:22.000Z
gracc-oneoffs/remove-odd-procs/remove-odd-procs.py
opensciencegrid/gracc-tools
86297d0a8b6b208b6c661473647fdc69f438afec
[ "Apache-2.0" ]
2
2017-06-16T20:07:38.000Z
2017-06-17T15:03:18.000Z
#!/usr/bin/python import elasticsearch from elasticsearch_dsl import Search, A, Q #import logging import sys import os #logging.basicConfig(level=logging.WARN) #es = elasticsearch.Elasticsearch( # ['https://gracc.opensciencegrid.org/q'], # timeout=300, use_ssl=True, verify_certs=False) es = elasticsea...
30.568966
128
0.667795
0
0
0
0
0
0
0
0
882
0.497462
df2507bcc55adf702b1c6993e0b76f7f643ef8d6
849
py
Python
Hasoc/create_folds.py
tezike/Hasoc
b29c5ec877a1751b04f86227a6ad264be8c06d81
[ "Apache-2.0" ]
1
2020-11-24T07:48:55.000Z
2020-11-24T07:48:55.000Z
Hasoc/create_folds.py
tezike/Hasoc
b29c5ec877a1751b04f86227a6ad264be8c06d81
[ "Apache-2.0" ]
null
null
null
Hasoc/create_folds.py
tezike/Hasoc
b29c5ec877a1751b04f86227a6ad264be8c06d81
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/create_folds.ipynb (unless otherwise specified). __all__ = ['df', 'df', 'y', 'kf', 'df', 'y'] # Cell import os import pandas as pd from sklearn.model_selection import StratifiedKFold # Cell df = pd.read_csv(os.path.join('../data', 'en_task_a', 'hasoc_2020_en_train_new...
29.275862
96
0.684335
0
0
0
0
0
0
0
0
284
0.334511
df25b7352e71e86d55c9c932e24f93a40dcbb932
6,976
py
Python
heat/tests/test_components.py
citrix-openstack-build/heat
fa31873529481472e037e3ce157b87f8057fe622
[ "Apache-2.0" ]
null
null
null
heat/tests/test_components.py
citrix-openstack-build/heat
fa31873529481472e037e3ce157b87f8057fe622
[ "Apache-2.0" ]
null
null
null
heat/tests/test_components.py
citrix-openstack-build/heat
fa31873529481472e037e3ce157b87f8057fe622
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
31.853881
78
0.502437
6,218
0.891342
0
0
0
0
0
0
2,304
0.330275
df2669595a23ceb9c2346db6112762dd8108f2e5
55,075
py
Python
pycstruct/pycstruct.py
midstar/pycstruct
3430507e24a84ceb3ad409ddb43ed7f0934d48d2
[ "MIT" ]
14
2020-07-05T08:58:48.000Z
2022-01-25T04:43:41.000Z
pycstruct/pycstruct.py
zbx911/pycstruct
3430507e24a84ceb3ad409ddb43ed7f0934d48d2
[ "MIT" ]
15
2020-11-15T10:52:46.000Z
2021-05-21T08:54:05.000Z
pycstruct/pycstruct.py
zbx911/pycstruct
3430507e24a84ceb3ad409ddb43ed7f0934d48d2
[ "MIT" ]
2
2021-02-13T13:34:40.000Z
2022-01-25T04:40:14.000Z
"""pycstruct definitions Copyright 2021 by Joel Midstjärna. All rights reserved. This file is part of the pycstruct python library and is released under the "MIT License Agreement". Please see the LICENSE file that should have been included as part of this package. """ # pylint: disable=too-many-lines, protected-acce...
36.692205
95
0.544458
52,213
0.948017
0
0
1,129
0.020499
0
0
29,171
0.52965
df271127c105441127867b0671133734b58e3154
1,103
py
Python
cosymlib/simulation/__init__.py
GrupEstructuraElectronicaSimetria/cosymlib
04ac536c7c75b638e84079bacd0ece70226fdc03
[ "MIT" ]
null
null
null
cosymlib/simulation/__init__.py
GrupEstructuraElectronicaSimetria/cosymlib
04ac536c7c75b638e84079bacd0ece70226fdc03
[ "MIT" ]
8
2020-12-11T00:58:46.000Z
2021-07-16T11:27:46.000Z
cosymlib/simulation/__init__.py
GrupEstructuraElectronicaSimetria/cosymlib
04ac536c7c75b638e84079bacd0ece70226fdc03
[ "MIT" ]
null
null
null
import huckelpy from huckelpy import file_io class ExtendedHuckel: def __init__(self, geometry, charge=0): self._EH = huckelpy.ExtendedHuckel(geometry.get_positions(), geometry.get_symbols(), charge=charge) self._alpha_electrons = None self._beta_electrons = None self._total_elect...
30.638889
107
0.696283
1,055
0.956482
0
0
0
0
0
0
10
0.009066
df2add4292563c4782461ccc1a9f4bd18f1826e0
293
py
Python
ex012.py
sml07/Meus-Estudos-Python
8f06ec8ad170674cd0cc5cf792b5647dbb894a1c
[ "MIT" ]
null
null
null
ex012.py
sml07/Meus-Estudos-Python
8f06ec8ad170674cd0cc5cf792b5647dbb894a1c
[ "MIT" ]
null
null
null
ex012.py
sml07/Meus-Estudos-Python
8f06ec8ad170674cd0cc5cf792b5647dbb894a1c
[ "MIT" ]
null
null
null
#Faça um algoritimo que leia o preço de um produto e mostre o seu novo preço com 5% de desconto. price = float(input("Digite o preço do produto: ")) sale = price - (price * 0.05) print("O valor bruto do produto é: {:.2f}R$.".format(price)) print("Com o desconto de 5%: {:.2f}R$".format(sale))
48.833333
96
0.682594
0
0
0
0
0
0
0
0
201
0.674497
df2c143e3b261adc27b58c068491f0de1cd09b82
514
py
Python
tests/r/test_bcdeter.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
199
2017-07-24T01:34:27.000Z
2022-01-29T00:50:55.000Z
tests/r/test_bcdeter.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
46
2017-09-05T19:27:20.000Z
2019-01-07T09:47:26.000Z
tests/r/test_bcdeter.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
45
2017-07-26T00:10:44.000Z
2022-03-16T20:44:59.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import shutil import sys import tempfile from observations.r.bcdeter import bcdeter def test_bcdeter(): """Test module bcdeter.py by downloading bcdeter.csv and testing shape of extracted data has 95...
21.416667
43
0.752918
0
0
0
0
0
0
0
0
126
0.245136
df2cb555b3dc2db771abca035af0535436996ced
47
py
Python
multi_parser/shared/__init__.py
ilya-mezentsev/multi-parser
2d418f38a102fdad826912d4335242a269a26602
[ "MIT" ]
14
2020-08-09T06:12:06.000Z
2022-03-10T13:16:57.000Z
multi_parser/shared/__init__.py
ilya-mezentsev/multi-parser
2d418f38a102fdad826912d4335242a269a26602
[ "MIT" ]
14
2020-08-05T06:18:30.000Z
2021-12-13T21:19:38.000Z
example/store/serializers/__init__.py
defineimpossible/django-rest-batteries
d83dc67b6e91ae1a9c7625606a66b59d83936947
[ "MIT" ]
null
null
null
from .request import * from .response import *
15.666667
23
0.744681
0
0
0
0
0
0
0
0
0
0
df2d3c177128f55f32693c0a0f67186e9894a707
4,900
py
Python
wmf_embed/core/lang_embedding.py
shilad/wmf-embeddings
353556dfbb36e1f70eec7e618cfd989d7ae08de5
[ "Apache-2.0" ]
null
null
null
wmf_embed/core/lang_embedding.py
shilad/wmf-embeddings
353556dfbb36e1f70eec7e618cfd989d7ae08de5
[ "Apache-2.0" ]
null
null
null
wmf_embed/core/lang_embedding.py
shilad/wmf-embeddings
353556dfbb36e1f70eec7e618cfd989d7ae08de5
[ "Apache-2.0" ]
null
null
null
import logging import math import os.path import re import annoy import numpy as np from gensim.models import KeyedVectors from gensim.utils import to_unicode from smart_open import smart_open from .utils import NP_FLOAT def from_mikolov(lang, inpath, outpath): if not os.path.isdir(outpath): os.makedirs(outpath)...
31.612903
96
0.584898
3,732
0.761633
0
0
0
0
0
0
388
0.079184
df2e07d7991cf110f3461188f42f2cc6d3136eb8
13,819
py
Python
test/util/test_function_factory.py
ediphy-dwild/gpytorch
559c78a6446237ed7cc8e1cc7cf4ed8bf31a3c8a
[ "MIT" ]
null
null
null
test/util/test_function_factory.py
ediphy-dwild/gpytorch
559c78a6446237ed7cc8e1cc7cf4ed8bf31a3c8a
[ "MIT" ]
null
null
null
test/util/test_function_factory.py
ediphy-dwild/gpytorch
559c78a6446237ed7cc8e1cc7cf4ed8bf31a3c8a
[ "MIT" ]
null
null
null
import math import torch import unittest import gpytorch import numpy as np from torch.autograd import Variable from gpytorch.utils import approx_equal, function_factory from gpytorch.lazy import NonLazyVariable _exact_gp_mll_class = function_factory.exact_gp_mll_factory() class TestFunctionFactory(unittest.TestCas...
33.460048
87
0.530284
13,491
0.976265
0
0
0
0
0
0
44
0.003184
df2e0882b40078ee113337bd905da77e518c2210
5,016
py
Python
tests/boardfarm_plugins/boardfarm_prplmesh/tests/ap_config_bss_tear_down.py
SWRT-dev/easymesh
12d902edde77599e074c0535f7256499b08f7494
[ "BSD-3-Clause", "BSD-2-Clause-Patent", "MIT" ]
null
null
null
tests/boardfarm_plugins/boardfarm_prplmesh/tests/ap_config_bss_tear_down.py
SWRT-dev/easymesh
12d902edde77599e074c0535f7256499b08f7494
[ "BSD-3-Clause", "BSD-2-Clause-Patent", "MIT" ]
null
null
null
tests/boardfarm_plugins/boardfarm_prplmesh/tests/ap_config_bss_tear_down.py
SWRT-dev/easymesh
12d902edde77599e074c0535f7256499b08f7494
[ "BSD-3-Clause", "BSD-2-Clause-Patent", "MIT" ]
null
null
null
# SPDX-License-Identifier: BSD-2-Clause-Patent # SPDX-FileCopyrightText: 2020 the prplMesh contributors (see AUTHORS.md) # This code is subject to the terms of the BSD+Patent license. # See LICENSE file for more details. from .prplmesh_base_test import PrplMeshBaseTest from boardfarm.exceptions import SkipTest from ca...
50.16
100
0.547049
4,679
0.932815
0
0
0
0
0
0
2,014
0.401515
df2f4471a03807c5058e593384972868df67d33c
709
py
Python
taller_estructuras_de_control/codigo_python_ejercicios/ejercicio_9.py
JMosqueraM/algoritmos_y_programacion
30dc179b976f1db24401b110496250fbcb98938e
[ "MIT" ]
null
null
null
taller_estructuras_de_control/codigo_python_ejercicios/ejercicio_9.py
JMosqueraM/algoritmos_y_programacion
30dc179b976f1db24401b110496250fbcb98938e
[ "MIT" ]
null
null
null
taller_estructuras_de_control/codigo_python_ejercicios/ejercicio_9.py
JMosqueraM/algoritmos_y_programacion
30dc179b976f1db24401b110496250fbcb98938e
[ "MIT" ]
null
null
null
#Calcular el salario neto de un tnrabajador en fucion del numero de horas trabajadas, el precio de la hora #y el descuento fijo al sueldo base por concepto de impuestos del 20% horas = float(input("Ingrese el numero de horas trabajadas: ")) precio_hora = float(input("Ingrese el precio por hora trabajada: ")) sueldo_ba...
59.083333
175
0.753173
0
0
0
0
0
0
0
0
515
0.726375
df321ec897b131393422f40ec400fe5025edb45a
3,189
py
Python
cs15211/BattleshipsInABoard.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
1
2021-07-05T01:53:30.000Z
2021-07-05T01:53:30.000Z
cs15211/BattleshipsInABoard.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
null
null
null
cs15211/BattleshipsInABoard.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
1
2018-01-08T07:14:08.000Z
2018-01-08T07:14:08.000Z
__source__ = 'https://github.com/kamyu104/LeetCode/blob/master/Python/battleships-in-a-board.py' # Time: O(m * n) # Space: O(1) # # # Description: 419. Battleships in a Board # # Given an 2D board, count how many different battleships are in it. # The battleships are represented with 'X's, empty slots are represented ...
31.574257
105
0.558169
588
0.184384
0
0
0
0
0
0
2,568
0.805268
df32fca4523247442d3692d3063e54af001152c8
8,823
py
Python
catch_video.py
ZXin0305/hri
b91d89158fc2d05ca4d3ea3ba4a7b9f69b0221a2
[ "Apache-2.0" ]
null
null
null
catch_video.py
ZXin0305/hri
b91d89158fc2d05ca4d3ea3ba4a7b9f69b0221a2
[ "Apache-2.0" ]
null
null
null
catch_video.py
ZXin0305/hri
b91d89158fc2d05ca4d3ea3ba4a7b9f69b0221a2
[ "Apache-2.0" ]
null
null
null
import rospy from sensor_msgs.msg import Image from cv_bridge import CvBridge import message_filters import cv2 import torch import torchvision.transforms as transforms from exps.stage3_root2.config import cfg # from demo import process_video from model.main_model.smap import SMAP from model.refine_model.refinenet imp...
44.560606
131
0.591976
6,816
0.765757
0
0
0
0
0
0
1,539
0.172902
df33b007b3652a76cfc302baf9ffe1c7ec0e5ef1
3,176
py
Python
bouncer.py
pard68/epub-bouncer
6a4e09e24816ac4fc25450148665901db9166202
[ "MIT" ]
null
null
null
bouncer.py
pard68/epub-bouncer
6a4e09e24816ac4fc25450148665901db9166202
[ "MIT" ]
null
null
null
bouncer.py
pard68/epub-bouncer
6a4e09e24816ac4fc25450148665901db9166202
[ "MIT" ]
null
null
null
from typing import Dict import correct_spellings import epub_handling import xml_handling import argparse import string import re # --------------------------------------------------------------------------------------------------- def correct_file_contents(corrections : Dict[str, str], file_contents : str): file...
39.209877
105
0.675378
0
0
0
0
0
0
0
0
885
0.278652
df33dc1de2ad7edcc4ac043bb10df37be20e5ae7
2,119
py
Python
detect.py
MahmudulAlam/Object-Detection-Using-GPM
52662eb9f8bf98fc8b2282bb8edd409a49e99bf9
[ "MIT" ]
1
2022-02-15T21:18:18.000Z
2022-02-15T21:18:18.000Z
detect.py
MahmudulAlam/Object-Detection-Using-GPM
52662eb9f8bf98fc8b2282bb8edd409a49e99bf9
[ "MIT" ]
2
2022-01-14T16:09:36.000Z
2022-03-07T14:54:36.000Z
detect.py
MahmudulAlam/Object-Detection-Using-GPM
52662eb9f8bf98fc8b2282bb8edd409a49e99bf9
[ "MIT" ]
null
null
null
import cv2 import pickle import numpy as np from flag import Flag flag = Flag() with open('assets/colors.h5', 'rb') as f: colors = pickle.loads(f.read()) with open('label.txt', 'r') as f: classes = f.readlines() def detector(image, label): image = np.asarray(image * 255., np.uint8) image = cv2.cvtCo...
34.737705
119
0.568193
0
0
0
0
0
0
0
0
254
0.119868
df340b5a3a3411a900f306d493ae8fc3d70d7cb5
760
py
Python
instabot/liking.py
jakerobinson19/instabot
a5a2d23cc3791d79a2cfeb469144eb92c24e402c
[ "MIT" ]
1
2020-03-03T03:54:56.000Z
2020-03-03T03:54:56.000Z
instabot/liking.py
jakerobinson19/instabot
a5a2d23cc3791d79a2cfeb469144eb92c24e402c
[ "MIT" ]
null
null
null
instabot/liking.py
jakerobinson19/instabot
a5a2d23cc3791d79a2cfeb469144eb92c24e402c
[ "MIT" ]
null
null
null
import retrieve import validation from time_functions import time_delay from selenium.webdriver import ActionChains def like_pic(browser): heart = retrieve.like_button(browser) time_delay() if validation.already_liked(heart): heart.click() def like_pic_in_feed(browser, number = 1): loop = 1 wh...
24.516129
60
0.663158
0
0
0
0
0
0
0
0
54
0.071053
df342c2f47ed154f18acbafb3221d18351eb0056
1,261
py
Python
tollan/utils/qt/colors.py
toltec-astro/tollan
36a78224ceef4145be1c5acca734b5c317eb7ba8
[ "BSD-3-Clause" ]
null
null
null
tollan/utils/qt/colors.py
toltec-astro/tollan
36a78224ceef4145be1c5acca734b5c317eb7ba8
[ "BSD-3-Clause" ]
null
null
null
tollan/utils/qt/colors.py
toltec-astro/tollan
36a78224ceef4145be1c5acca734b5c317eb7ba8
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python import matplotlib.colors as mc import numpy as np import re class Palette(object): black = "#000000" white = "#ffffff" blue = "#73cef4" green = "#bdffbf" orange = "#ffa500" purple = "#af00ff" red = "#ff6666" yellow = "#ffffa0" @staticmethod def _is_hex...
24.25
67
0.516257
1,174
0.931007
0
0
580
0.459952
0
0
147
0.116574
df3491f1b4f4fb22d702912bfddd659bd45a728d
8,941
py
Python
mom/itertools.py
ands904/ands904-tinypyclone
6a5427940a03058abf08de2a20aa45a929fd21ad
[ "ECL-2.0", "Apache-2.0" ]
16
2015-01-06T19:21:19.000Z
2021-11-17T16:57:26.000Z
mom/itertools.py
ands904/ands904-tinypyclone
6a5427940a03058abf08de2a20aa45a929fd21ad
[ "ECL-2.0", "Apache-2.0" ]
1
2019-04-15T11:18:32.000Z
2019-04-15T11:18:32.000Z
mom/itertools.py
ands904/ands904-tinypyclone
6a5427940a03058abf08de2a20aa45a929fd21ad
[ "ECL-2.0", "Apache-2.0" ]
3
2015-06-17T04:15:35.000Z
2019-04-15T11:16:43.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """:synopsis: Implements :mod:`itertools` for older versions of Python. :module: mom.itertools :copyright: 2010-2011 by Daniel Neuhäuser :license: BSD, PSF Borrowed from brownie.itools. """ from __future__ import absolute_import import itertools from mom import builtins...
30.515358
80
0.683369
870
0.097294
6,449
0.721203
276
0.030866
0
0
5,734
0.641244
df36ad0e12226dcc75dd2b44297a2b45a5264918
6,377
py
Python
Sampling_based_Planning/rrt_3D/env3D.py
CodesHub/PathPlanning
8271d9a0e30d7d9d0f20d61a2f85b8fe199209fa
[ "MIT" ]
3,693
2020-07-15T15:41:07.000Z
2022-03-31T17:26:46.000Z
Sampling_based_Planning/rrt_3D/env3D.py
Alanaab/PathPlanning
8c12192d6952fcd2c3f8ba3c98e3593b27049a40
[ "MIT" ]
26
2020-08-27T04:56:59.000Z
2022-03-14T02:17:05.000Z
Sampling_based_Planning/rrt_3D/env3D.py
Alanaab/PathPlanning
8c12192d6952fcd2c3f8ba3c98e3593b27049a40
[ "MIT" ]
799
2020-07-17T04:02:05.000Z
2022-03-31T12:56:29.000Z
# this is the three dimensional configuration space for rrt # !/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: yue qi """ import numpy as np # from utils3D import OBB2AABB def R_matrix(z_angle,y_angle,x_angle): # s angle: row; y angle: pitch; z angle: yaw # generate rotation matrix in SO3 ...
42.798658
125
0.538341
4,213
0.660655
0
0
0
0
0
0
1,377
0.215932
df3715d9a9064f79f11dad87ba56f6a3d27743a1
289
py
Python
tests/test_wrong_url.py
alexella1/python-ascii_magic
df189da5dc59d4cd6f6fe003a75c99539247851f
[ "MIT" ]
null
null
null
tests/test_wrong_url.py
alexella1/python-ascii_magic
df189da5dc59d4cd6f6fe003a75c99539247851f
[ "MIT" ]
null
null
null
tests/test_wrong_url.py
alexella1/python-ascii_magic
df189da5dc59d4cd6f6fe003a75c99539247851f
[ "MIT" ]
null
null
null
from context import ascii_magic try: output = ascii_magic.from_url('https://wow.zamimg.com/uploads/blog/images/20516-afterlives-ardenweald-4k-desktop-wallpapers.jpg') ascii_magic.to_terminal(output) except OSError as e: print(f'Could not load the image, server said: {e.code} {e.msg}')
41.285714
130
0.782007
0
0
0
0
0
0
0
0
156
0.539792
df38488be49b126da2ba8c4b38d9a97d5b60ae28
2,706
py
Python
book/code/imdb - project4+5 scrape popular film list and poster.py
marcus-pham/test
bcbc7c34a672ae6c7e9bdc811934c4003134ae0d
[ "MIT" ]
null
null
null
book/code/imdb - project4+5 scrape popular film list and poster.py
marcus-pham/test
bcbc7c34a672ae6c7e9bdc811934c4003134ae0d
[ "MIT" ]
null
null
null
book/code/imdb - project4+5 scrape popular film list and poster.py
marcus-pham/test
bcbc7c34a672ae6c7e9bdc811934c4003134ae0d
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup from selenium import webdriver import requests import time class Film(object): """docstring for film""" def __init__(self): self.title = "" self.rank = "" self.year_of_production = "" self.link = "" def create_phantom_driver(): driver = webdriver.PhantomJS(executable_path = ...
20.5
96
0.682927
149
0.055063
0
0
0
0
0
0
785
0.290096
df38d7c15904593405fbc7ec4f71c2079a0aa639
1,409
py
Python
mqtt_io/modules/sensor/mcp3008.py
DominicWindisch/mqtt-io
f3f8b17232e4c11401d7b5bf124e8722ec3a0f3a
[ "MIT" ]
231
2016-12-27T09:51:11.000Z
2021-03-03T18:14:37.000Z
mqtt_io/modules/sensor/mcp3008.py
DominicWindisch/mqtt-io
f3f8b17232e4c11401d7b5bf124e8722ec3a0f3a
[ "MIT" ]
173
2017-02-26T16:33:42.000Z
2021-03-02T18:24:55.000Z
mqtt_io/modules/sensor/mcp3008.py
DominicWindisch/mqtt-io
f3f8b17232e4c11401d7b5bf124e8722ec3a0f3a
[ "MIT" ]
92
2017-02-26T16:25:23.000Z
2021-03-02T16:05:53.000Z
""" MCP3008 analog to digital converter """ import logging from typing import cast from mqtt_io.types import ConfigType, SensorValueType from . import GenericSensor REQUIREMENTS = ("adafruit-mcp3008",) CONFIG_SCHEMA = { "spi_port": dict(type="integer", required=False, empty=False, default=0), "spi_device":...
25.618182
79
0.625976
906
0.643009
0
0
0
0
0
0
468
0.33215
df3a00f301a09ed853ce444e464928c561356ba2
1,031
py
Python
aristaflow/worklist_model.py
riuns/aristaflowpy
58ad48310366484379fc519d649c564c762f89f9
[ "MIT" ]
null
null
null
aristaflow/worklist_model.py
riuns/aristaflowpy
58ad48310366484379fc519d649c564c762f89f9
[ "MIT" ]
null
null
null
aristaflow/worklist_model.py
riuns/aristaflowpy
58ad48310366484379fc519d649c564c762f89f9
[ "MIT" ]
1
2021-07-13T10:35:36.000Z
2021-07-13T10:35:36.000Z
""" Worklist model classes """ # AristaFlow REST Libraries from af_worklist_manager.models.qualified_agent import QualifiedAgent from af_worklist_manager.models.worklist_revision import WorklistRevision from af_worklist_manager.models.worklist_update_configuration import WorklistUpdateConfiguration class Worklist(obj...
28.638889
96
0.706111
728
0.706111
0
0
0
0
0
0
157
0.152279
df3ca98f6de6dd3416b0ed3855860078017dafec
163,982
py
Python
tests/examples/minlplib/arki0019.py
ouyang-w-19/decogo
52546480e49776251d4d27856e18a46f40c824a1
[ "MIT" ]
2
2021-07-03T13:19:10.000Z
2022-02-06T10:48:13.000Z
tests/examples/minlplib/arki0019.py
ouyang-w-19/decogo
52546480e49776251d4d27856e18a46f40c824a1
[ "MIT" ]
1
2021-07-04T14:52:14.000Z
2021-07-15T10:17:11.000Z
tests/examples/minlplib/arki0019.py
ouyang-w-19/decogo
52546480e49776251d4d27856e18a46f40c824a1
[ "MIT" ]
null
null
null
# NLP written by GAMS Convert at 04/21/18 13:51:02 # # Equation counts # Total E G L N X C B # 3 2 0 1 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
97.260973
120
0.592053
0
0
0
0
0
0
0
0
697
0.00425
df3d6de4c0225786e943add2dd3dc174ee168668
1,304
py
Python
bin/build_upset_input.py
NCBI-Hackathons/AssesSV
73c61db1e915df6e76933a75fac7904e25b07884
[ "MIT" ]
4
2018-11-12T02:08:45.000Z
2021-11-21T15:24:03.000Z
bin/build_upset_input.py
NCBI-Hackathons/AssesSV
73c61db1e915df6e76933a75fac7904e25b07884
[ "MIT" ]
null
null
null
bin/build_upset_input.py
NCBI-Hackathons/AssesSV
73c61db1e915df6e76933a75fac7904e25b07884
[ "MIT" ]
2
2018-11-10T21:04:11.000Z
2018-11-10T21:44:39.000Z
#!/usr/bin/env python3 from glob import glob import pandas as pd import os import gzip import sys path_to_vcf_files = sys.argv[1] true_variants = sys.argv[2] vcf_files = glob(path_to_vcf_files + "/*tp-base.vcf") print(vcf_files) all_variants = [] summary = {} ## Build master list of True Variants with gzip.open(true...
30.325581
86
0.654141
0
0
0
0
0
0
0
0
329
0.252301
df3f58815ff66d9dcb98bc560bc4e1a7dda2766a
3,448
py
Python
Apple EFI Package Extractor/Linux_Pre-Alpha/Apple_EFI_Package.py
Coool/BIOSUtilities
319246a09adc207ea18201357ecf6af82df25e4d
[ "BSD-2-Clause-Patent" ]
null
null
null
Apple EFI Package Extractor/Linux_Pre-Alpha/Apple_EFI_Package.py
Coool/BIOSUtilities
319246a09adc207ea18201357ecf6af82df25e4d
[ "BSD-2-Clause-Patent" ]
null
null
null
Apple EFI Package Extractor/Linux_Pre-Alpha/Apple_EFI_Package.py
Coool/BIOSUtilities
319246a09adc207ea18201357ecf6af82df25e4d
[ "BSD-2-Clause-Patent" ]
null
null
null
#!/usr/bin/env python3 """ Apple EFI Package Apple EFI Package Extractor Copyright (C) 2019-2021 Plato Mavropoulos """ print('Apple EFI Package Extractor v2.0_Linux_a1') import os import sys import zlib import shutil import subprocess if len(sys.argv) >= 2 : pkg = sys.argv[1:] else : pkg = [] in_path = input('\n...
33.803922
136
0.686195
0
0
0
0
0
0
0
0
785
0.227668
df4048ff5c3a54d37d423b8ae11ce64e3577a99f
3,344
py
Python
sourcing_code_pro.py
kiwi0fruit/open-fonts
deb211dd1e08becf3b9300b02365cd79415c64d4
[ "MIT" ]
30
2018-02-21T10:19:45.000Z
2022-02-23T15:45:34.000Z
sourcing_code_pro.py
kiwi0fruit/open-fonts
deb211dd1e08becf3b9300b02365cd79415c64d4
[ "MIT" ]
33
2018-02-09T15:38:46.000Z
2021-12-08T21:40:26.000Z
sourcing_code_pro.py
kiwi0fruit/open-fonts
deb211dd1e08becf3b9300b02365cd79415c64d4
[ "MIT" ]
4
2019-11-18T03:14:07.000Z
2022-02-23T03:59:00.000Z
# -*- coding: utf-8 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that...
38
161
0.621711
0
0
0
0
0
0
0
0
2,230
0.659178
df4060697a7eb303c5884fc6599a1897ddcbd97e
4,264
bzl
Python
apple/bundling/debug_symbol_actions.bzl
kastiglione/rules_apple
3745c3f03b9d29a04671fd4fac96468ca7031fd6
[ "Apache-2.0" ]
2
2019-09-01T06:06:40.000Z
2020-11-10T00:37:01.000Z
apple/bundling/debug_symbol_actions.bzl
c-parsons/rules_apple
f75c4b1be219cb32704d900bd1a42ab200eab445
[ "Apache-2.0" ]
null
null
null
apple/bundling/debug_symbol_actions.bzl
c-parsons/rules_apple
f75c4b1be219cb32704d900bd1a42ab200eab445
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Bazel 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 applicable la...
39.481481
82
0.695826
0
0
0
0
0
0
0
0
2,706
0.634615
df43165460434d52e608ecfd552ac420215fb6a5
414
py
Python
uplift/tree/_utils.py
Antiguru11/uplift
ffaa5bcd20d6aa264fa3b2d191327c86384e4f7c
[ "Apache-2.0" ]
null
null
null
uplift/tree/_utils.py
Antiguru11/uplift
ffaa5bcd20d6aa264fa3b2d191327c86384e4f7c
[ "Apache-2.0" ]
null
null
null
uplift/tree/_utils.py
Antiguru11/uplift
ffaa5bcd20d6aa264fa3b2d191327c86384e4f7c
[ "Apache-2.0" ]
null
null
null
import numpy as np def group_stats(y, w, groups): uts = list() nts = list() nc = (w == 0).sum() if nc == 0: yc = 0 else: yc = y[w == 0].mean() for group in groups: ng = (w == group).sum() if ng == 0: uts.append(-yc) else: uts.ap...
18
49
0.442029
0
0
0
0
0
0
0
0
0
0
df4381be0a6af61c9a8d19296067917654a1c8b3
3,958
py
Python
ipyannotator/ipytyping/annotations.py
itepifanio/ipyannotator
eac99f71d8d39e02a10c21807508b0c064077806
[ "Apache-2.0" ]
null
null
null
ipyannotator/ipytyping/annotations.py
itepifanio/ipyannotator
eac99f71d8d39e02a10c21807508b0c064077806
[ "Apache-2.0" ]
null
null
null
ipyannotator/ipytyping/annotations.py
itepifanio/ipyannotator
eac99f71d8d39e02a10c21807508b0c064077806
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/00c_annotation_types.ipynb (unless otherwise specified). __all__ = [] # Internal Cell from pathlib import Path from collections.abc import MutableMapping from typing import Dict, Optional, Iterable, Any, Union from ipywidgets import Layout from ..mltypes import OutputIm...
29.102941
104
0.641991
2,212
0.558868
0
0
0
0
0
0
492
0.124305
df4403fc1193fbecc76726cf60c46006752e81e6
3,001
py
Python
optapy-core/tests/test_inverse_relation.py
optapy/optapy
0240f744f592d964110c86d1054ce63cf8c38452
[ "Apache-2.0" ]
85
2021-07-26T11:42:51.000Z
2022-03-29T14:14:27.000Z
optapy-core/tests/test_inverse_relation.py
optapy/optapy
0240f744f592d964110c86d1054ce63cf8c38452
[ "Apache-2.0" ]
22
2021-07-21T21:10:16.000Z
2022-03-31T17:49:00.000Z
optapy-core/tests/test_inverse_relation.py
optapy/optapy
0240f744f592d964110c86d1054ce63cf8c38452
[ "Apache-2.0" ]
9
2021-07-15T12:07:32.000Z
2022-02-09T02:11:55.000Z
import optapy import optapy.score import optapy.config import optapy.constraint @optapy.planning_entity class InverseRelationEntity: def __init__(self, code, value=None): self.code = code self.value = value @optapy.planning_variable(object, ['value_range']) def get_value(self): re...
31.260417
109
0.683439
1,292
0.430523
0
0
1,709
0.569477
0
0
81
0.026991
df4589c5936fa29d3d24eba4e44f5da8d49bf94e
714
py
Python
pizza_store/models/user.py
astsu-dev/pizza-store-backend
902f6e5e2c88ba029b2bff61da8fc4684664ead9
[ "MIT" ]
2
2021-07-10T15:47:45.000Z
2021-12-13T18:09:30.000Z
pizza_store/models/user.py
astsu-dev/pizza-store-backend
902f6e5e2c88ba029b2bff61da8fc4684664ead9
[ "MIT" ]
null
null
null
pizza_store/models/user.py
astsu-dev/pizza-store-backend
902f6e5e2c88ba029b2bff61da8fc4684664ead9
[ "MIT" ]
null
null
null
import datetime import uuid from pizza_store.enums.role import Role from pydantic import BaseModel class UserBase(BaseModel): username: str email: str class UserCreate(UserBase): """User register model""" password: str class UserIn(BaseModel): """User login model.""" username: str p...
13.730769
39
0.683473
590
0.826331
0
0
0
0
0
0
48
0.067227
df45b74210e776a21d70e6e881d80b85c80991df
874
py
Python
mautrix/types/event/batch.py
tulir/mautrix-appservice-python
d180603445bb0bc465a7b2ff918c4ac28a5dbfc2
[ "MIT" ]
1
2018-08-24T13:33:30.000Z
2018-08-24T13:33:30.000Z
mautrix/types/event/batch.py
tulir/mautrix-appservice-python
d180603445bb0bc465a7b2ff918c4ac28a5dbfc2
[ "MIT" ]
4
2018-07-10T11:43:46.000Z
2018-09-03T22:08:02.000Z
mautrix/types/event/batch.py
tulir/mautrix-appservice-python
d180603445bb0bc465a7b2ff918c4ac28a5dbfc2
[ "MIT" ]
2
2018-07-03T04:07:08.000Z
2018-09-10T03:13:59.000Z
# Copyright (c) 2022 Tulir Asokan, Sumner Evans # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from typing import Any from attr import dataclass import attr from .....
26.484848
96
0.735698
437
0.5
0
0
459
0.525172
0
0
458
0.524027
df46b6684766e46f0cbbc49ea5d3900fae1ae16f
885
py
Python
dbks/runtime.py
vincentlam/dbks
a6dedd6281100666b0e8eb6a5a838362d3260fc5
[ "MIT" ]
null
null
null
dbks/runtime.py
vincentlam/dbks
a6dedd6281100666b0e8eb6a5a838362d3260fc5
[ "MIT" ]
null
null
null
dbks/runtime.py
vincentlam/dbks
a6dedd6281100666b0e8eb6a5a838362d3260fc5
[ "MIT" ]
null
null
null
class Runtime: @staticmethod def v3(major: str, feature: str, ml_type: str = None, scala_version: str = "2.12"): if ml_type and ml_type.lower() not in ["cpu", "gpu"]: raise ValueError('"ml_type" can only be "cpu" or "gpu"!') return "".join( [ f"{major}.", ...
31.607143
87
0.531073
884
0.99887
0
0
853
0.963842
0
0
241
0.272316
df46e87e30c896bf3a86559f322c509578a51604
118
py
Python
dvc/path/s3.py
zb0th/dvc
5fdbc1882f73162419d5b84ed47a33e9e321f151
[ "Apache-2.0" ]
null
null
null
dvc/path/s3.py
zb0th/dvc
5fdbc1882f73162419d5b84ed47a33e9e321f151
[ "Apache-2.0" ]
null
null
null
dvc/path/s3.py
zb0th/dvc
5fdbc1882f73162419d5b84ed47a33e9e321f151
[ "Apache-2.0" ]
null
null
null
from dvc.scheme import Schemes from .base import PathCloudBASE class PathS3(PathCloudBASE): scheme = Schemes.S3
16.857143
31
0.779661
52
0.440678
0
0
0
0
0
0
0
0
df471a58961450769299367eb0ca2a94b53911da
2,729
py
Python
filter_distance_01-1.py
jgpattis/Desres-sars-cov-2-apo-mpro
90c07414040c0ea0bf54028e2f194d6509c8f526
[ "MIT" ]
null
null
null
filter_distance_01-1.py
jgpattis/Desres-sars-cov-2-apo-mpro
90c07414040c0ea0bf54028e2f194d6509c8f526
[ "MIT" ]
null
null
null
filter_distance_01-1.py
jgpattis/Desres-sars-cov-2-apo-mpro
90c07414040c0ea0bf54028e2f194d6509c8f526
[ "MIT" ]
null
null
null
#! /usr/bin/env/ python # filter out CA distances with large minimum # filter out CA distances with small standard deviations # save to file for later use # will plot distances used import mdtraj as md import pyemma.coordinates as coor import numpy as np import pickle from util.plot_structure_util import plot_vmd_cyli...
36.878378
158
0.706486
0
0
0
0
0
0
0
0
690
0.25284
df48425c447623027c723c6ed55ecb2c6c99a346
4,206
py
Python
src/panoptoindexconnector/implementations/coveo_implementation.py
bschlintz/panopto-index-connector
54599c972c00f44f1c2e7b40583e3e0a439f7f4e
[ "Apache-2.0" ]
null
null
null
src/panoptoindexconnector/implementations/coveo_implementation.py
bschlintz/panopto-index-connector
54599c972c00f44f1c2e7b40583e3e0a439f7f4e
[ "Apache-2.0" ]
null
null
null
src/panoptoindexconnector/implementations/coveo_implementation.py
bschlintz/panopto-index-connector
54599c972c00f44f1c2e7b40583e3e0a439f7f4e
[ "Apache-2.0" ]
null
null
null
""" Methods for the connector application to convert and sync content to the target endpoint Start with this template to implement these methods for the connector application """ # Standard Library Imports import json import logging import os # Third party import requests # Global constants DIR = os.path.dirname(os...
30.478261
119
0.612696
0
0
0
0
0
0
0
0
2,031
0.482882
df4b2deb2486efb9c3adbc90f171c364722baebb
6,255
py
Python
dashboard/scripts/webscraper.py
lynetteoh/COVID19dashboard
61193d35acf004999443c47a30f0b9f9c6220c03
[ "MIT" ]
null
null
null
dashboard/scripts/webscraper.py
lynetteoh/COVID19dashboard
61193d35acf004999443c47a30f0b9f9c6220c03
[ "MIT" ]
null
null
null
dashboard/scripts/webscraper.py
lynetteoh/COVID19dashboard
61193d35acf004999443c47a30f0b9f9c6220c03
[ "MIT" ]
null
null
null
# script for daily update from bs4 import BeautifulSoup # from urllib.request import urlopen import requests import csv import time from datetime import datetime, timedelta import os from pathlib import Path from dashboard.models import Case, Country, District, State, Zone def run(): scrapeStateStats() def scrapeC...
41.151316
582
0.692886
0
0
0
0
0
0
0
0
1,802
0.28809
df4cf960f5cccdcad0be7331412c12f64dc1a259
9,022
py
Python
GAN/Architectures/models/conditional_gan.py
FlipWebApps/computer-vision-playground
94cf8f0ac49c5d01ea5d1ebb14f857d4af2b0aef
[ "MIT" ]
null
null
null
GAN/Architectures/models/conditional_gan.py
FlipWebApps/computer-vision-playground
94cf8f0ac49c5d01ea5d1ebb14f857d4af2b0aef
[ "MIT" ]
4
2020-01-28T22:52:04.000Z
2021-08-25T15:38:35.000Z
GAN/Architectures/models/conditional_gan.py
FlipWebApps/computer-vision-playground
94cf8f0ac49c5d01ea5d1ebb14f857d4af2b0aef
[ "MIT" ]
null
null
null
import numpy as np from keras.layers import Concatenate, Input, Dense, Reshape, Flatten, Dropout, multiply, \ BatchNormalization, Activation, Embedding, ZeroPadding2D, Conv2DTranspose from keras.layers.advanced_activations import LeakyReLU from keras.layers.convolutional import UpSampling2D, Conv2D from keras.mode...
44.885572
102
0.615606
8,561
0.948903
0
0
0
0
0
0
2,238
0.24806
df4d062b612a14812a64e95f016eeeac5bbd7645
9,704
py
Python
ema.py
rsprouse/ema_head_correction
fda63950951cdcfd04d56604d18a7f448c9fde03
[ "BSD-3-Clause" ]
null
null
null
ema.py
rsprouse/ema_head_correction
fda63950951cdcfd04d56604d18a7f448c9fde03
[ "BSD-3-Clause" ]
1
2019-04-09T22:00:44.000Z
2019-04-09T22:00:44.000Z
ema.py
rsprouse/ema_head_correction
fda63950951cdcfd04d56604d18a7f448c9fde03
[ "BSD-3-Clause" ]
1
2019-03-27T19:54:47.000Z
2019-03-27T19:54:47.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Oct 14 21:19:42 2017 @author: ubuntu """ import numpy as np from numpy import cross,dot from numpy.linalg import norm import pandas as pd import os def read_ndi_data(mydir, file_name,sensors,subcolumns): ''' Read data produced by NDI WaveFront ...
37.038168
110
0.629637
0
0
0
0
0
0
0
0
5,869
0.604802
df4d44c34dc573aeaadace851604ddc345ba3d4d
2,879
py
Python
applications/convection_diffusion_application/tests/test_apply_thermal_face_process.py
AndreaVoltan/MyKratos7.0
e977752722e8ef1b606f25618c4bf8fd04c434cc
[ "BSD-4-Clause" ]
2
2020-04-30T19:13:08.000Z
2021-04-14T19:40:47.000Z
applications/convection_diffusion_application/tests/test_apply_thermal_face_process.py
Jacklwln/Kratos
12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de
[ "BSD-4-Clause" ]
1
2020-04-30T19:19:09.000Z
2020-05-02T14:22:36.000Z
applications/convection_diffusion_application/tests/test_apply_thermal_face_process.py
Jacklwln/Kratos
12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de
[ "BSD-4-Clause" ]
1
2020-06-12T08:51:24.000Z
2020-06-12T08:51:24.000Z
from __future__ import print_function, absolute_import, division import KratosMultiphysics import KratosMultiphysics.KratosUnittest as UnitTest import KratosMultiphysics.ConvectionDiffusionApplication as ConvectionDiffusionApplication class ApplyThermalFaceProcessTest(UnitTest.TestCase): def runTest(self): ...
48.79661
111
0.72421
2,530
0.878777
0
0
0
0
0
0
579
0.201111