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
78c5f95d9ee1374a6eed04e598b5352269b67477
78
py
Python
gym-minigrid/__init__.py
kebaek/minigrid
3808c1401ea7846febf88d0a2fb2aa39e4a4913f
[ "MIT" ]
5
2021-09-29T18:53:37.000Z
2022-03-01T08:03:42.000Z
gym-minigrid/__init__.py
kebaek/minigrid
3808c1401ea7846febf88d0a2fb2aa39e4a4913f
[ "MIT" ]
null
null
null
gym-minigrid/__init__.py
kebaek/minigrid
3808c1401ea7846febf88d0a2fb2aa39e4a4913f
[ "MIT" ]
null
null
null
# Import the envs module so that envs register themselves import gym_minigrid
26
57
0.833333
0
0
0
0
0
0
0
0
57
0.730769
78c876141f5329c52ad1e038a8ee03869db886d7
6,705
py
Python
ketu/characterization/prepare.py
dfm/turnstile
13a9a3b489b458396a6ad1e8a2d1e89a0dd6312d
[ "MIT" ]
10
2015-02-19T09:13:24.000Z
2020-04-25T10:50:38.000Z
ketu/characterization/prepare.py
dfm/turnstile
13a9a3b489b458396a6ad1e8a2d1e89a0dd6312d
[ "MIT" ]
1
2015-07-10T19:50:31.000Z
2015-07-11T03:51:15.000Z
ketu/characterization/prepare.py
dfm/turnstile
13a9a3b489b458396a6ad1e8a2d1e89a0dd6312d
[ "MIT" ]
7
2015-04-20T06:42:28.000Z
2019-02-25T03:04:45.000Z
# -*- coding: utf-8 -*- from __future__ import division, print_function __all__ = ["prepare_characterization"] import kplr import transit import numpy as np from scipy.stats import beta import matplotlib.pyplot as pl import george from george import kernels from ..prepare import Prepare from ..download import Down...
31.928571
73
0.513497
3,561
0.531096
0
0
0
0
0
0
735
0.10962
78c9b51f8e253459950c6aba31616db59d9ecbca
1,242
py
Python
docs/python/f_1st_partial_ex4.py
Voldemort373/Notes-and-Reference
796885e315e9c349ff1cb37760abc56327547140
[ "CC-BY-4.0", "CC0-1.0" ]
30
2018-11-12T09:03:45.000Z
2021-12-09T02:20:08.000Z
docs/python/f_1st_partial_ex4.py
Voldemort373/Notes-and-Reference
796885e315e9c349ff1cb37760abc56327547140
[ "CC-BY-4.0", "CC0-1.0" ]
36
2018-11-11T21:32:31.000Z
2019-02-02T16:18:11.000Z
docs/python/f_1st_partial_ex4.py
Voldemort373/Notes-and-Reference
796885e315e9c349ff1cb37760abc56327547140
[ "CC-BY-4.0", "CC0-1.0" ]
8
2018-11-14T17:09:21.000Z
2020-05-28T16:18:12.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2018, Silvio Peroni <essepuntato@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any purpose # with or without fee is hereby granted, provided that the above copyright notice # and this permission notice appear in all copies. # # THE SOFTWARE I...
33.567568
97
0.691626
0
0
0
0
0
0
0
0
870
0.700483
78c9bc9408903efdc0986a05e0b857a063a87fe5
12,849
py
Python
examples/pvmlnet_classify.py
claudio-unipv/pvml
9f583c2658218003bba2efa70cdbb7499b22d843
[ "MIT" ]
3
2020-03-30T11:17:17.000Z
2021-05-15T10:27:30.000Z
examples/pvmlnet_classify.py
claudio-unipv/pvml
9f583c2658218003bba2efa70cdbb7499b22d843
[ "MIT" ]
null
null
null
examples/pvmlnet_classify.py
claudio-unipv/pvml
9f583c2658218003bba2efa70cdbb7499b22d843
[ "MIT" ]
2
2020-07-15T09:42:42.000Z
2021-09-14T07:24:50.000Z
#!/usr/bin/env python3 import pvml import numpy as np import sys try: import PIL.Image except ImportError: print("To use this script you need the `Pillow' libray") print("Install it with 'pip install Pillow' or 'pip3 install Pillow'") sys.exit() IMAGENET_CLASSES = list(map(str.strip, """ tench, g...
57.361607
95
0.770332
0
0
0
0
0
0
0
0
11,998
0.933769
78cb4d79d62529d58ce3023b98597dd72ee5c35a
1,916
py
Python
DataBase/Mongo/MongoTest.py
InverseLina/python-practice
496d2020916d8096a32131cdedd25a4da7b7735e
[ "Apache-2.0" ]
null
null
null
DataBase/Mongo/MongoTest.py
InverseLina/python-practice
496d2020916d8096a32131cdedd25a4da7b7735e
[ "Apache-2.0" ]
null
null
null
DataBase/Mongo/MongoTest.py
InverseLina/python-practice
496d2020916d8096a32131cdedd25a4da7b7735e
[ "Apache-2.0" ]
null
null
null
import pymongo from bson.son import SON from pymongo import MongoClient # encoding=utf-8 __author__ = 'Hinsteny' print(pymongo.get_version_string()) class SingleClient(object): ''' Single Client hold the client object ''' client = MongoClient('127.0.0.1', 27017) client.the_database.authenticate...
28.597015
171
0.606472
441
0.230167
0
0
0
0
0
0
410
0.213987
78cd90912da668d8ba7cfecb75291ed8ec65c67c
933
py
Python
python/std_scripts/numerical_operations.py
IamPhytan/Cookbook
a903f9098b0d2ddccdf343f740858731242bde97
[ "MIT" ]
null
null
null
python/std_scripts/numerical_operations.py
IamPhytan/Cookbook
a903f9098b0d2ddccdf343f740858731242bde97
[ "MIT" ]
null
null
null
python/std_scripts/numerical_operations.py
IamPhytan/Cookbook
a903f9098b0d2ddccdf343f740858731242bde97
[ "MIT" ]
null
null
null
# # Get divisor and modulo # Often forgotten, often useful # a = 5 b = 3 n, m = divmod(a, b) print(n) # 1 print(m) # 2 # # Next multiple of a number n # Used a lot in CodinGame Clash of Code # n = 3 idx = [*range(10)] res = [a + (n - (a % n)) % n for a in idx] print(idx) # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] print(...
16.368421
93
0.561629
0
0
0
0
0
0
0
0
413
0.442658
78d0276dde967a30b789dae789ec250967368d4b
8,842
py
Python
src/kgmk/nlp/tpn/src/classification.py
kagemeka/python
486ce39d97360b61029527bacf00a87fdbcf552c
[ "MIT" ]
null
null
null
src/kgmk/nlp/tpn/src/classification.py
kagemeka/python
486ce39d97360b61029527bacf00a87fdbcf552c
[ "MIT" ]
null
null
null
src/kgmk/nlp/tpn/src/classification.py
kagemeka/python
486ce39d97360b61029527bacf00a87fdbcf552c
[ "MIT" ]
null
null
null
from _base import * config = config['classification'] tp = TP() tokenizer_path = f'{project_root}/{config["tokenizer_path"]}' tokenizer_gen_path = f'{project_root}/{config["tokenizer_gen_path"]}' def load_category_master(): try: dba = clsDbAccessor() category_master = dba.execQuery("SELECT categor...
38.443478
216
0.662859
0
0
0
0
0
0
0
0
2,870
0.323636
78d0b802679c2bf3956836361c0881169949c091
1,024
py
Python
mezzo-server/mezzo-server.py
AKAMEDIASYSTEM/mezzo
ed864bc2d4768fc8cac5b99f448c714965094693
[ "MIT" ]
null
null
null
mezzo-server/mezzo-server.py
AKAMEDIASYSTEM/mezzo
ed864bc2d4768fc8cac5b99f448c714965094693
[ "MIT" ]
null
null
null
mezzo-server/mezzo-server.py
AKAMEDIASYSTEM/mezzo
ed864bc2d4768fc8cac5b99f448c714965094693
[ "MIT" ]
null
null
null
import os import config import sys import logging import datetime import tornado.web import tornado.ioloop import tornado.options import random import handlers DEBUG = True DIRNAME = os.path.dirname(os.path.abspath(__file__)) STATIC_PATH = os.path.join(DIRNAME, 'static') TEMPLATE_PATH = os.path.join(DIRNAME, 'templat...
23.813953
78
0.695313
0
0
0
0
0
0
0
0
284
0.277344
78d11678dc0b5c1d63f9dbe772a552b6ffe091af
1,227
py
Python
pi_turret/blaster/hyperfire.py
iot-foam-turret/pi-turret
583d72a7625eb702ccde7afe66a085162854555a
[ "MIT" ]
2
2021-05-12T21:13:14.000Z
2022-03-27T15:24:08.000Z
pi_turret/blaster/hyperfire.py
iot-foam-turret/pi-turret
583d72a7625eb702ccde7afe66a085162854555a
[ "MIT" ]
7
2019-09-14T15:21:46.000Z
2019-09-29T02:58:46.000Z
pi_turret/blaster/hyperfire.py
iot-foam-turret/pi-turret
583d72a7625eb702ccde7afe66a085162854555a
[ "MIT" ]
null
null
null
"""Hyperfire Class to model the actual BLASTER. """ import time from pi_turret.dc_motor.motor import DCMotor, FEED_PIN, FLYWHEEL_PIN class Hyperfire: """Hyperfire Class to model the actual BLASTER. """ def __init__(self): self.flywheels = DCMotor(FLYWHEEL_PIN) self.feeder = DCMotor(FEED_P...
23.150943
78
0.590872
982
0.800326
0
0
0
0
0
0
406
0.330888
78d1bbfc4644ff6a02d35970a20eee982aa45909
7,281
py
Python
projects/advanced_lane_lines/lane_detector/utils/camera_utils.py
stoicio/RoboCar
65591e8c217e61d0571df39fe9d9993e5984d8fe
[ "MIT" ]
null
null
null
projects/advanced_lane_lines/lane_detector/utils/camera_utils.py
stoicio/RoboCar
65591e8c217e61d0571df39fe9d9993e5984d8fe
[ "MIT" ]
null
null
null
projects/advanced_lane_lines/lane_detector/utils/camera_utils.py
stoicio/RoboCar
65591e8c217e61d0571df39fe9d9993e5984d8fe
[ "MIT" ]
null
null
null
import json import logging import os import cv2 import numpy as np from tqdm import tqdm logger = logging.getLogger('CameraUtils') class CameraCalibration(object): @staticmethod def get_image_paths(chessboard_img_dir): allowed_extensions = ['.jpg', '.png', '.jpeg'] full_image_paths = [] ...
42.086705
124
0.618734
7,145
0.981321
0
0
786
0.107952
0
0
1,955
0.268507
78d4eb146a133aea0467f8cf0a76b0671ef0d2b6
5,375
py
Python
spirou/sandbox/ccf_tools/analyse_TOI736.py
njcuk9999/apero-utils
f77de4c9123874e5bb6ed6bd03a7de3b27057402
[ "MIT" ]
2
2020-10-08T17:03:45.000Z
2021-03-09T17:49:44.000Z
spirou/sandbox/ccf_tools/analyse_TOI736.py
njcuk9999/apero-utils
f77de4c9123874e5bb6ed6bd03a7de3b27057402
[ "MIT" ]
17
2020-09-24T17:35:38.000Z
2020-12-11T16:10:13.000Z
spirou/sandbox/ccf_tools/analyse_TOI736.py
njcuk9999/apero-utils
f77de4c9123874e5bb6ed6bd03a7de3b27057402
[ "MIT" ]
5
2020-04-10T06:41:00.000Z
2020-12-16T21:09:14.000Z
import numpy as np import matplotlib.pyplot as plt from astropy.table import Table from bisector import * from astropy.time import Time from ccf2rv import * from per_epoch_table import per_epoch_table def sinusoidal(phase,dphase,amp,zp): return np.sin( (phase+dphase))*amp+zp # do not *formally* exclude an order, ...
35.361842
148
0.639814
0
0
0
0
0
0
0
0
1,452
0.27014
78d62e77bb5a0e308415b3859755172e2afc77ca
11,335
py
Python
train_classifier.py
SteveCruz/icpr-syn2real
179065de9552673fa9d627b42044de7cd0ddd08f
[ "MIT" ]
null
null
null
train_classifier.py
SteveCruz/icpr-syn2real
179065de9552673fa9d627b42044de7cd0ddd08f
[ "MIT" ]
null
null
null
train_classifier.py
SteveCruz/icpr-syn2real
179065de9552673fa9d627b42044de7cd0ddd08f
[ "MIT" ]
null
null
null
############################################################################################################################################################## ############################################################################################################################################################## ""...
40.773381
230
0.52307
0
0
0
0
0
0
0
0
5,246
0.462814
78d6a169b3036fe9e92a2cdc8970817da6e3f700
1,072
py
Python
main.py
felixenzogarofalo/PrectionModel
839b3a419d19c486bcb34207a3c583c8ece573ec
[ "MIT" ]
null
null
null
main.py
felixenzogarofalo/PrectionModel
839b3a419d19c486bcb34207a3c583c8ece573ec
[ "MIT" ]
null
null
null
main.py
felixenzogarofalo/PrectionModel
839b3a419d19c486bcb34207a3c583c8ece573ec
[ "MIT" ]
null
null
null
from model.utils.data_engineering import DataEngineering from model.prediction_model.regression import Regression # Create an instance for DataEngineering and load data from CSV csv_path = "data/area_01.csv" data_e = DataEngineering() data_e.load_data(csv_path) data_e.clean_data() # Create new features # "age" featur...
25.52381
76
0.695896
0
0
0
0
0
0
0
0
408
0.379535
78d72d12cf61116aa37a06dd0e9a986b1ccb232d
1,026
py
Python
students/k33401/Litvak_Igor/Lr3/cities/models.py
igorlitvak/ITMO_ICT_WebDevelopment_2021-2022
b12a2c5ab2bcb96683190e20f0a0915b8d185134
[ "MIT" ]
null
null
null
students/k33401/Litvak_Igor/Lr3/cities/models.py
igorlitvak/ITMO_ICT_WebDevelopment_2021-2022
b12a2c5ab2bcb96683190e20f0a0915b8d185134
[ "MIT" ]
null
null
null
students/k33401/Litvak_Igor/Lr3/cities/models.py
igorlitvak/ITMO_ICT_WebDevelopment_2021-2022
b12a2c5ab2bcb96683190e20f0a0915b8d185134
[ "MIT" ]
null
null
null
from django.db import models from django.core.validators import MinValueValidator, MaxValueValidator from django.contrib.auth.models import User class City(models.Model): """City""" class Meta: verbose_name = "City" verbose_name_plural = "Cities" name = models.CharField("City name", max_...
31.090909
103
0.707602
875
0.852827
0
0
0
0
0
0
185
0.180312
151ffc58c6a6ef36936b69dd40f5de9b75b14892
1,927
py
Python
idcheckio_python_client/models/__init__.py
alma/python-IDCHECKIO
66c9f086a5f776820b4b2ae14df114f2f1d6e6a2
[ "Apache-2.0" ]
null
null
null
idcheckio_python_client/models/__init__.py
alma/python-IDCHECKIO
66c9f086a5f776820b4b2ae14df114f2f1d6e6a2
[ "Apache-2.0" ]
null
null
null
idcheckio_python_client/models/__init__.py
alma/python-IDCHECKIO
66c9f086a5f776820b4b2ae14df114f2f1d6e6a2
[ "Apache-2.0" ]
1
2022-03-24T07:20:47.000Z
2022-03-24T07:20:47.000Z
# coding: utf-8 """ IdCheck.IO API Check identity documents OpenAPI spec version: 0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You...
37.784314
126
0.827193
0
0
0
0
0
0
0
0
771
0.400104
1523f297062c94b271f453046aaeb2c896da4afe
1,079
py
Python
setup.py
mpastell/pyageng
6ca71870e6c81bd0841725e0547cd7af6ef9e99c
[ "MIT" ]
12
2016-10-24T23:45:01.000Z
2021-08-19T01:43:30.000Z
setup.py
mpastell/pyageng
6ca71870e6c81bd0841725e0547cd7af6ef9e99c
[ "MIT" ]
null
null
null
setup.py
mpastell/pyageng
6ca71870e6c81bd0841725e0547cd7af6ef9e99c
[ "MIT" ]
5
2017-12-31T02:20:11.000Z
2020-12-30T14:47:24.000Z
#!/usr/bin/env python from setuptools import setup import os import pyageng setup(name='pyageng', version = pyageng.__version__, description='Code for the book "Measurements and Data Analysis for Agricultural Engineers using Python"', author='Matti Pastell', author_email='matti.pastell@helsinki...
32.69697
135
0.651529
0
0
0
0
0
0
0
0
750
0.695088
152410300ce02f61b88ddec4e21ac68de252371f
935
py
Python
Day32/send_quote_monday_using_email.py
CodePuzzler/100-Days-Of-Code-Python
4f6da9dabc73f747266ce0e66057d10754ecc54e
[ "MIT" ]
null
null
null
Day32/send_quote_monday_using_email.py
CodePuzzler/100-Days-Of-Code-Python
4f6da9dabc73f747266ce0e66057d10754ecc54e
[ "MIT" ]
null
null
null
Day32/send_quote_monday_using_email.py
CodePuzzler/100-Days-Of-Code-Python
4f6da9dabc73f747266ce0e66057d10754ecc54e
[ "MIT" ]
null
null
null
# Day32 of my 100DaysOfCode Challenge # send a quote on monday using email import random import smtplib import datetime as dt # function to send email def send_email(_quote): my_email = "abc@example.com" password = "qwerty@1234" # opening connection using 'with', as done for opening a file with smtpli...
28.333333
76
0.678075
0
0
0
0
0
0
0
0
367
0.392513
1524c9829dea3a19277582b4ca26f8bf2c1167f1
324
py
Python
Web/flask/simple2.py
kasztp/python-lessons
2a159ad5e1186c749b96c5d0ede45b7142c6bbb5
[ "MIT" ]
35
2015-05-18T08:08:41.000Z
2022-03-07T09:38:02.000Z
Web/flask/simple2.py
kasztp/python-lessons
2a159ad5e1186c749b96c5d0ede45b7142c6bbb5
[ "MIT" ]
1
2021-09-29T02:08:26.000Z
2021-09-29T02:08:26.000Z
Web/flask/simple2.py
kasztp/python-lessons
2a159ad5e1186c749b96c5d0ede45b7142c6bbb5
[ "MIT" ]
40
2015-04-28T00:38:54.000Z
2022-02-13T14:18:34.000Z
from random import choice from flask import Flask, render_template app = Flask(__name__) @app.route("/") def index(): fortune = choice( 'You will have good health', 'You will not have good health' ) return render_template('simple2.html', fortune=fortune) app.run(host='127.0.0.1', debug=Tr...
21.6
59
0.67284
0
0
0
0
193
0.595679
0
0
86
0.265432
1526ef7cf55091ee19bea03ca2f08af75d7666a3
2,559
py
Python
contacts/testing/test_integration/test_audit.py
rossm6/accounts
74633ce4038806222048d85ef9dfe97a957a6a71
[ "MIT" ]
11
2021-01-23T01:09:54.000Z
2021-01-25T07:16:30.000Z
contacts/testing/test_integration/test_audit.py
rossm6/accounts
74633ce4038806222048d85ef9dfe97a957a6a71
[ "MIT" ]
7
2021-04-06T18:19:10.000Z
2021-09-22T19:45:03.000Z
contacts/testing/test_integration/test_audit.py
rossm6/accounts
74633ce4038806222048d85ef9dfe97a957a6a71
[ "MIT" ]
3
2021-01-23T18:55:32.000Z
2021-02-16T17:47:59.000Z
from accountancy.helpers import bulk_delete_with_history from accountancy.signals import audit_post_delete from contacts.models import Contact from django.test import TestCase from simple_history.models import HistoricalRecords from django.db import models class ContactAuditTests(TestCase): """ Check that the...
34.581081
109
0.601798
2,300
0.898789
0
0
0
0
0
0
983
0.384134
1528eaebe677c388daabca3a03f6965008666a40
6,109
py
Python
cisco_platforms_pillar/CUCMConnectorAXL.py
MatiasBanega/devnet-webinar
990617f042d16c798191efad9284585f4e62e99a
[ "MIT" ]
null
null
null
cisco_platforms_pillar/CUCMConnectorAXL.py
MatiasBanega/devnet-webinar
990617f042d16c798191efad9284585f4e62e99a
[ "MIT" ]
null
null
null
cisco_platforms_pillar/CUCMConnectorAXL.py
MatiasBanega/devnet-webinar
990617f042d16c798191efad9284585f4e62e99a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Cisco CUCM connector class This class creates a connection object via AXL\SOAP to the specified CUCM server using the specified AXL-enabled credentials @author: Alfonso Sandoval Rosas """ import urllib3, logging from ZeepDebugPlugin import * from zeep import Client, xsd from zeep.cache impo...
42.72028
141
0.608774
5,612
0.918645
0
0
1,247
0.204125
0
0
2,189
0.358324
15297f43a9cedd42da9b97021c8f787a4eb27e46
17,512
py
Python
home_user/dj_iot/users/views.py
IoTree/IoTree42
b7bb31f39add4e719a04e63cdd336983f8017137
[ "MIT" ]
4
2020-06-04T08:43:54.000Z
2021-11-15T17:29:23.000Z
home_user/dj_iot/users/views.py
IoTree/IoTree42
b7bb31f39add4e719a04e63cdd336983f8017137
[ "MIT" ]
3
2020-05-02T10:53:03.000Z
2021-05-20T13:17:08.000Z
home_user/dj_iot/users/views.py
IoTree/IoTree42
b7bb31f39add4e719a04e63cdd336983f8017137
[ "MIT" ]
3
2020-10-27T13:06:51.000Z
2022-01-08T14:56:36.000Z
""" //Iotree42 sensor Network //purpose: for handle requests and to process the wep pages //used software: python3, django, time, datetime, rest_framework //for hardware: Debian-Server //design by Sebastian Stadler //on behalf of the university of munich. //NO WARRANTY AND NO LIABILITY //use of the code at your own...
39.8
119
0.600331
288
0.016446
0
0
13,856
0.791229
0
0
4,347
0.24823
15299d729865a3bce0bda4fe56dd32f67a9cb475
4,506
py
Python
art/classifiers/cnn.py
yalechang/adversarial-robustness-toolbox
df4efc86c3ed963c82687b3ab8cd5cdbd5fe5c57
[ "MIT" ]
1
2022-03-02T19:05:12.000Z
2022-03-02T19:05:12.000Z
art/classifiers/cnn.py
yalechang/adversarial-robustness-toolbox
df4efc86c3ed963c82687b3ab8cd5cdbd5fe5c57
[ "MIT" ]
null
null
null
art/classifiers/cnn.py
yalechang/adversarial-robustness-toolbox
df4efc86c3ed963c82687b3ab8cd5cdbd5fe5c57
[ "MIT" ]
null
null
null
# MIT License # # Copyright (C) IBM Corporation 2018 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge...
42.509434
120
0.644918
2,130
0.472703
0
0
0
0
0
0
2,259
0.501332
152a22d4bca66cc2215242c3badf755c586421f1
5,380
py
Python
promoterz/sequence/standard_loop.py
caux/japonicus
3a9f000f1ff1eb01fa569b531ebf682dd73db90d
[ "MIT" ]
null
null
null
promoterz/sequence/standard_loop.py
caux/japonicus
3a9f000f1ff1eb01fa569b531ebf682dd73db90d
[ "MIT" ]
null
null
null
promoterz/sequence/standard_loop.py
caux/japonicus
3a9f000f1ff1eb01fa569b531ebf682dd73db90d
[ "MIT" ]
null
null
null
#!/bin/python from deap import tools from copy import deepcopy import random from deap import algorithms import promoterz import statistics from .. import evolutionHooks def checkPopulation(population, message): if not (len(population)): print(message) def standard_loop(World, locale): # --assertion...
40.149254
113
0.69145
0
0
0
0
0
0
0
0
1,178
0.218959
152be5684baefcb1596d9ac70a5e86c1b23ee43b
1,675
py
Python
docs/source/conf.py
vforgione/logging2
9d620c14d9b5f67e3dc285082330296cf1ecbfcd
[ "MIT" ]
25
2017-05-01T10:24:21.000Z
2022-03-30T18:07:47.000Z
docs/source/conf.py
vforgione/logging2
9d620c14d9b5f67e3dc285082330296cf1ecbfcd
[ "MIT" ]
8
2017-05-01T05:50:31.000Z
2020-06-29T00:51:17.000Z
docs/source/conf.py
vforgione/logging2
9d620c14d9b5f67e3dc285082330296cf1ecbfcd
[ "MIT" ]
4
2019-03-07T15:07:40.000Z
2022-01-05T14:52:21.000Z
#!/usr/bin/env python3 import codecs import os import re import sys sys.path.insert(0, os.path.abspath("../../logging2")) # -- General configuration ------------------------------------------------ extensions = [ "sphinx.ext.autodoc", "sphinx_autodoc_annotation", ] templates_path = ["_templates"] source...
20.180723
87
0.552836
0
0
0
0
0
0
0
0
917
0.547463
152d1cff312cd7c0d9d40008bb1d4a1b6465afe3
3,651
py
Python
silksnake/api/eth.py
torquem-ch/silksnake
68794838e8c2be036f158b2a842ba9201be610a3
[ "Apache-2.0" ]
3
2020-09-16T14:47:58.000Z
2021-03-08T13:26:40.000Z
silksnake/api/eth.py
torquem-ch/silksnake
68794838e8c2be036f158b2a842ba9201be610a3
[ "Apache-2.0" ]
null
null
null
silksnake/api/eth.py
torquem-ch/silksnake
68794838e8c2be036f158b2a842ba9201be610a3
[ "Apache-2.0" ]
1
2021-03-15T11:02:08.000Z
2021-03-15T11:02:08.000Z
# -*- coding: utf-8 -*- """The API equivalent to Ethereum JSON RPC.""" from typing import Tuple, Union from ..core.constants import HASH_SIZE from ..core import chain, reader from ..helpers import hashing from ..remote import kv_remote from ..rlp import sedes from ..stagedsync import stages # pylint: disable=broad-e...
44.52439
119
0.672692
3,323
0.910162
0
0
0
0
0
0
695
0.190359
15306ffbef39ca8ee5c2ab4f5a0173b6cc547bab
3,925
py
Python
tox_add_factor/hooks.py
jayvdb/tox-add-factor
38742451c74a7655592d6930f8f365574cb13ee7
[ "MIT" ]
1
2020-12-17T11:14:00.000Z
2020-12-17T11:14:00.000Z
tox_add_factor/hooks.py
jayvdb/tox-add-factor
38742451c74a7655592d6930f8f365574cb13ee7
[ "MIT" ]
3
2020-10-15T14:49:04.000Z
2020-10-20T07:49:25.000Z
tox_add_factor/hooks.py
jayvdb/tox-add-factor
38742451c74a7655592d6930f8f365574cb13ee7
[ "MIT" ]
null
null
null
"""Tox hook implementations.""" from __future__ import print_function import os import tox try: from tox.reporter import warning except ImportError: warning = lambda s: None from .envlist import add_factors, AFTER, BEFORE @tox.hookimpl def tox_addoption(parser): """Add arguments.""" parser.add_arg...
31.910569
103
0.637452
0
0
0
0
3,685
0.938854
0
0
801
0.204076
1530d85391603c1e9fcd521da0d319ec5ab96b05
6,704
py
Python
EAC-code/Commitment.py
kvakil/BulletProofLib
0cf22deff1746c03f16c3fb62541c5c02990bb3b
[ "MIT" ]
162
2017-11-17T09:46:36.000Z
2022-03-31T09:32:28.000Z
EAC-code/Commitment.py
GENERALBYTESCOM/BulletProofLib
fd154f28c1729f7f9bd20aa6bed10c952ade4e49
[ "MIT" ]
2
2017-11-22T20:05:11.000Z
2019-08-29T10:36:15.000Z
EAC-code/Commitment.py
GENERALBYTESCOM/BulletProofLib
fd154f28c1729f7f9bd20aa6bed10c952ade4e49
[ "MIT" ]
56
2017-11-23T05:25:43.000Z
2022-02-23T07:53:48.000Z
from petlib.ec import EcGroup,EcPt from petlib.ec import _FFI,_C from petlib.bn import Bn from hashlib import sha256 #from memory_profiler import profile def commitment_key_gen(n, trap=None,nid=714): #713 std, 415/714 '''Generates a key for a pedersen-like multicommitment. It outputs a ECgroup specified by n...
35.659574
163
0.641706
0
0
0
0
0
0
0
0
2,828
0.421838
15311f6820c17879300a6f94c1498f7a667b022d
692
py
Python
saleor/graphql/core/enums.py
acabezasg/urpi-master
7c9cd0fbe6d89dad70652482712ca38b21ba6f84
[ "BSD-3-Clause" ]
1
2019-05-02T17:24:05.000Z
2019-05-02T17:24:05.000Z
saleor/graphql/core/enums.py
acabezasg/urpi-master
7c9cd0fbe6d89dad70652482712ca38b21ba6f84
[ "BSD-3-Clause" ]
5
2021-03-09T16:22:37.000Z
2022-02-10T19:10:03.000Z
saleor/graphql/core/enums.py
acabezasg/urpi-master
7c9cd0fbe6d89dad70652482712ca38b21ba6f84
[ "BSD-3-Clause" ]
1
2020-12-26T10:25:37.000Z
2020-12-26T10:25:37.000Z
import graphene from ...core import TaxRateType as CoreTaxRateType from ...core.permissions import MODELS_PERMISSIONS from ...core.weight import WeightUnits from .utils import str_to_enum class ReportingPeriod(graphene.Enum): TODAY = 'TODAY' THIS_MONTH = 'THIS_MONTH' TaxRateType = graphene.Enum( 'TaxRa...
24.714286
74
0.719653
87
0.125723
0
0
0
0
0
0
68
0.098266
153292a4a8a88ea30635e34be38a7e56a8a80956
7,208
py
Python
blseg/backbone/resnet.py
linbo0518/LLSeg
38b6715f2b7be80ac77d8eaa17f73db3f7b01c75
[ "MIT" ]
40
2019-04-22T14:14:52.000Z
2022-01-14T10:18:21.000Z
blseg/backbone/resnet.py
linbo0518/LLSeg
38b6715f2b7be80ac77d8eaa17f73db3f7b01c75
[ "MIT" ]
2
2021-06-02T13:55:31.000Z
2021-07-27T05:41:47.000Z
blseg/backbone/resnet.py
linbo0518/LLSeg
38b6715f2b7be80ac77d8eaa17f73db3f7b01c75
[ "MIT" ]
3
2019-07-28T09:57:51.000Z
2020-09-29T07:39:10.000Z
import torch from torch import nn from .utils import conv3x3 from .base import BackboneBaseModule __all__ = [ "ResNet34", "ResNet50S", ] def _add_stage(block, in_ch, out_ch, stride, use_se, repeat_time): assert repeat_time > 0 and isinstance(repeat_time, int) layers = [block(in_ch, out_ch, stride, us...
35.683168
79
0.54939
6,728
0.933407
0
0
0
0
0
0
124
0.017203
153300f99e7af47597a5718315278775fa25acbe
64
py
Python
setup.py
betoesquivel/PyData29-DataAnalyticsWithAWSLambda
318d1f595e4079544159a0f4802277dc5b25cb47
[ "MIT" ]
4
2016-12-06T20:22:28.000Z
2018-05-04T09:51:45.000Z
setup.py
betoesquivel/PyData29-DataAnalyticsWithAWSLambda
318d1f595e4079544159a0f4802277dc5b25cb47
[ "MIT" ]
null
null
null
setup.py
betoesquivel/PyData29-DataAnalyticsWithAWSLambda
318d1f595e4079544159a0f4802277dc5b25cb47
[ "MIT" ]
1
2021-11-05T22:17:01.000Z
2021-11-05T22:17:01.000Z
#!/usr/bin/env python import sys sys.path = ['lib/'] + sys.path
16
30
0.640625
0
0
0
0
0
0
0
0
27
0.421875
1534543e156931eab7224fef982035431ba8c699
503
py
Python
stlearn/tools/microenv/cci/r_helpers.py
duypham2108/stLearn
91b6bae91b29aba8b4f055bf92da13f1558ddbe8
[ "BSD-3-Clause" ]
null
null
null
stlearn/tools/microenv/cci/r_helpers.py
duypham2108/stLearn
91b6bae91b29aba8b4f055bf92da13f1558ddbe8
[ "BSD-3-Clause" ]
null
null
null
stlearn/tools/microenv/cci/r_helpers.py
duypham2108/stLearn
91b6bae91b29aba8b4f055bf92da13f1558ddbe8
[ "BSD-3-Clause" ]
1
2019-12-12T12:46:55.000Z
2019-12-12T12:46:55.000Z
""" Helper functions for porting R code into python/stLearn. """ import os ro = None pandas2ri = None localconverter = None def rpy2_setup(r_path): """Sets up rpy2.""" os.environ["R_HOME"] = r_path import rpy2.robjects as robjects_ from rpy2.robjects import pandas2ri as pandas2ri_ from rpy2.rob...
20.958333
74
0.729622
0
0
0
0
0
0
0
0
91
0.180915
1535835675e5bdbdd9ebedbf81f869ade75e556f
2,152
py
Python
src/mutation_waterfall/plot.py
dohlee/python-mutation-waterfall
642f13884986df6df82419edbbb0cb2ff396adc7
[ "MIT" ]
1
2019-05-02T01:59:35.000Z
2019-05-02T01:59:35.000Z
src/mutation_waterfall/plot.py
dohlee/python-mutation-waterfall
642f13884986df6df82419edbbb0cb2ff396adc7
[ "MIT" ]
null
null
null
src/mutation_waterfall/plot.py
dohlee/python-mutation-waterfall
642f13884986df6df82419edbbb0cb2ff396adc7
[ "MIT" ]
3
2020-08-19T19:46:28.000Z
2021-10-17T21:03:24.000Z
import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import numpy as np import mutation_waterfall.preprocess as preprocess def plot(mutation_list_file, n_genes=30, ax=None, file=None): """Generates a waterfall plot describing mutational landscape of samples. Args: mutation_list_fil...
31.647059
128
0.657528
0
0
0
0
0
0
0
0
743
0.34526
1536ddab0c3e440ac09a7120c95386059693e88a
1,730
py
Python
leetcode/381.Insert-Delete-GetRandom-Duplicates-allowed.py
sogapalag/problems
0ea7d65448e1177f8b3f81124a82d187980d659c
[ "MIT" ]
1
2020-04-04T14:56:12.000Z
2020-04-04T14:56:12.000Z
leetcode/381.Insert-Delete-GetRandom-Duplicates-allowed.py
sogapalag/problems
0ea7d65448e1177f8b3f81124a82d187980d659c
[ "MIT" ]
null
null
null
leetcode/381.Insert-Delete-GetRandom-Duplicates-allowed.py
sogapalag/problems
0ea7d65448e1177f8b3f81124a82d187980d659c
[ "MIT" ]
null
null
null
import random from collections import defaultdict class RandomizedCollection(object): def __init__(self): """ Initialize your data structure here. """ self.collection = defaultdict(set) self.element = [] def insert(self, val): """ Inserts ...
30.350877
121
0.571676
1,474
0.852023
0
0
0
0
0
0
723
0.417919
15370089ce5fcb552e4d40b96066b973e9871c2f
553
py
Python
Python-code-snippets-201-300/287-pywebview-display-text-and-image.py
abartoha/python-snippets-ref
04e4feada96077f0e849b277204c012194e8fbcd
[ "Unlicense" ]
null
null
null
Python-code-snippets-201-300/287-pywebview-display-text-and-image.py
abartoha/python-snippets-ref
04e4feada96077f0e849b277204c012194e8fbcd
[ "Unlicense" ]
null
null
null
Python-code-snippets-201-300/287-pywebview-display-text-and-image.py
abartoha/python-snippets-ref
04e4feada96077f0e849b277204c012194e8fbcd
[ "Unlicense" ]
null
null
null
"""Code snippets vol-58 287-pywebview display text and image. Requires: pip3 install pywebview display_txt_img.html and model.jpg both in cwd. Origin: https://github.com/r0x0r/pywebview/tree/master/examples """ import webview if __name__ == '__main__': master_window = webview.create_window('Pywebview-text an...
25.136364
77
0.59132
0
0
0
0
0
0
0
0
282
0.509946
153723abc4a87465acdbe4e0af24e7f4398d265c
460
py
Python
pynsett/examples/discourse_example.py
fractalego/python-nlulite
982b780adedebf2c8a1e119f0f8b46ae72a9c384
[ "MIT" ]
26
2019-01-12T21:52:36.000Z
2022-03-30T11:28:52.000Z
pynsett/examples/discourse_example.py
fractalego/python-nlulite
982b780adedebf2c8a1e119f0f8b46ae72a9c384
[ "MIT" ]
2
2022-02-04T12:03:10.000Z
2022-02-09T13:24:07.000Z
pynsett/examples/discourse_example.py
fractalego/python-nlulite
982b780adedebf2c8a1e119f0f8b46ae72a9c384
[ "MIT" ]
3
2019-08-18T18:45:48.000Z
2022-02-04T11:39:38.000Z
import os from pynsett.discourse import Discourse from pynsett.extractor import Extractor from pynsett.knowledge import Knowledge _path = os.path.dirname(__file__) text = "Jane was born on 10 August 1979." knowledge = Knowledge() knowledge.add_rules(open(os.path.join(_path, '../rules/test.rules')).read()) discours...
23
76
0.771739
0
0
0
0
0
0
0
0
55
0.119565
15385c2c32a27dc2532eed862036074f470c9bb8
6,861
py
Python
nombrar_numero.py
roberpot/python-nombrar-numero
135df1822acd0480f7bbe3602d85c1615c509c71
[ "Apache-2.0" ]
null
null
null
nombrar_numero.py
roberpot/python-nombrar-numero
135df1822acd0480f7bbe3602d85c1615c509c71
[ "Apache-2.0" ]
null
null
null
nombrar_numero.py
roberpot/python-nombrar-numero
135df1822acd0480f7bbe3602d85c1615c509c71
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (C) 2016 Roberto García Carvajal # # 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...
34.134328
80
0.56741
0
0
0
0
0
0
0
0
3,909
0.56644
15388b76c9881d845bcff748e013ef5c592637d8
141,183
py
Python
openzgy/test/black.py
equinor/pyzgy
94cd3d9050c3027d042a83b98779da9182041137
[ "Apache-2.0" ]
null
null
null
openzgy/test/black.py
equinor/pyzgy
94cd3d9050c3027d042a83b98779da9182041137
[ "Apache-2.0" ]
null
null
null
openzgy/test/black.py
equinor/pyzgy
94cd3d9050c3027d042a83b98779da9182041137
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """ Black-box end to end tests for OpenZGY. If the old ZGY-Public Python module is available, several of the tests will be run both on the old and the new implementation to verify that they mach. This is a bit messy. Because there are some known bugs in the old code and some deliberate changes ...
45.048819
219
0.613289
2,713
0.019216
178
0.001261
486
0.003442
0
0
51,132
0.362168
1539cf3e5cae3c14764559eae2f60b5775ee8b16
450
py
Python
setup.py
sebasgverde/music-geometry-eval
24a1267282c85bcf4c97dba33e6975e038994ccc
[ "MIT" ]
2
2021-11-06T01:45:40.000Z
2022-01-10T00:16:04.000Z
setup.py
sebasgverde/music-geometry-eval
24a1267282c85bcf4c97dba33e6975e038994ccc
[ "MIT" ]
null
null
null
setup.py
sebasgverde/music-geometry-eval
24a1267282c85bcf4c97dba33e6975e038994ccc
[ "MIT" ]
1
2021-11-05T21:55:47.000Z
2021-11-05T21:55:47.000Z
from setuptools import setup setup(name='music_geometry_eval', version='2.0', description='A python library to automatically evaluate music tonality based on geometry', url='https://github.com/sebasgverde/music-geometry-eval', author='Sebastian Garcia Valencia', author_email='sebasgverde@g...
37.5
96
0.695556
0
0
0
0
0
0
0
0
238
0.528889
1539da9dfc5706c48e724fafc184cafaf0ce8a5d
783
py
Python
nbdevminimum/_nbdev.py
Isaac-Flath/nbdev_minimum
2ed888bdbf672bb3ace8b09a6a5955536c0c4b4c
[ "Apache-2.0" ]
1
2021-06-02T14:22:22.000Z
2021-06-02T14:22:22.000Z
nbdevminimum/_nbdev.py
Isaac-Flath/nbdev_minimum
2ed888bdbf672bb3ace8b09a6a5955536c0c4b4c
[ "Apache-2.0" ]
null
null
null
nbdevminimum/_nbdev.py
Isaac-Flath/nbdev_minimum
2ed888bdbf672bb3ace8b09a6a5955536c0c4b4c
[ "Apache-2.0" ]
1
2021-08-11T08:51:36.000Z
2021-08-11T08:51:36.000Z
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"get_module_text": "00_nb2module.ipynb", "write_module_text": "00_nb2module.ipynb", "clear_all_modules": "00_nb2module.ipynb", "simple_export_one_nb": "00_nb2module.ipynb", ...
34.043478
70
0.671775
0
0
0
0
0
0
0
0
552
0.704981
1539f874694fa29d5e5b0f1fdffa08f018772b5b
3,041
py
Python
D/D.py
budes/Exploracao-Tkinter
594c13e8c6765dc3bc673360c423a4b47c91f197
[ "MIT" ]
null
null
null
D/D.py
budes/Exploracao-Tkinter
594c13e8c6765dc3bc673360c423a4b47c91f197
[ "MIT" ]
null
null
null
D/D.py
budes/Exploracao-Tkinter
594c13e8c6765dc3bc673360c423a4b47c91f197
[ "MIT" ]
null
null
null
from tkinter import * from functools import partial from PIL import Image, ImageTk class Calculadora(): def __init__(self): # Coloquei a instancia Tk e o background self.inst = Tk() self.inst.geometry('720x1200') self.inst['background'] = 'white' # Fontes e imagens usadas fonte = ('Verdana', 12, '...
23.037879
78
0.541927
2,945
0.966207
0
0
0
0
0
0
785
0.257546
153c2c1e71181268aa8af58caed4e86170ecfd56
8,970
py
Python
forum/views.py
RAGNAROSaa/-
833688d556ecc70570a9b464160271ace07380d9
[ "Apache-2.0" ]
5
2016-09-25T02:59:13.000Z
2018-07-18T05:20:58.000Z
forum/views.py
RAGNAROSaa/-
833688d556ecc70570a9b464160271ace07380d9
[ "Apache-2.0" ]
1
2016-12-01T01:11:53.000Z
2016-12-01T01:11:53.000Z
forum/views.py
RAGNAROSaa/-
833688d556ecc70570a9b464160271ace07380d9
[ "Apache-2.0" ]
6
2016-09-24T02:42:57.000Z
2016-11-10T13:35:13.000Z
from django.core.urlresolvers import reverse_lazy, reverse from forum.models import Category, Question, Answer from utils.mixin import AjaxableResponseMixin from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.views.generic.list import ListView from django.views.generic.detail import Det...
36.024096
117
0.711037
8,342
0.929989
0
0
0
0
0
0
1,093
0.121851
153c5a92885b746b060d7efec75186cdd76b342c
191
py
Python
src/src/tensortools/dataset.py
ychnlgy/LipoWithGradients
4fe5228a3dae8bf5d457eef6191ba29314421f6b
[ "MIT" ]
1
2021-08-19T14:28:45.000Z
2021-08-19T14:28:45.000Z
src/src/tensortools/dataset.py
ychnlgy/LipoWithGradients
4fe5228a3dae8bf5d457eef6191ba29314421f6b
[ "MIT" ]
null
null
null
src/src/tensortools/dataset.py
ychnlgy/LipoWithGradients
4fe5228a3dae8bf5d457eef6191ba29314421f6b
[ "MIT" ]
1
2022-03-11T07:20:06.000Z
2022-03-11T07:20:06.000Z
import torch.utils def create_loader(tensors, **kwargs): dataset = torch.utils.data.TensorDataset(*tensors) loader = torch.utils.data.DataLoader(dataset, **kwargs) return loader
27.285714
59
0.73822
0
0
0
0
0
0
0
0
0
0
153d2187272b61b32c8f115e4dcaad581d8b6ca8
660
py
Python
SearaLib/disc_math.py
searayeah/sublime-snippets
deff53a06948691cd5e5d7dcfa85515ddd8fab0b
[ "MIT" ]
null
null
null
SearaLib/disc_math.py
searayeah/sublime-snippets
deff53a06948691cd5e5d7dcfa85515ddd8fab0b
[ "MIT" ]
null
null
null
SearaLib/disc_math.py
searayeah/sublime-snippets
deff53a06948691cd5e5d7dcfa85515ddd8fab0b
[ "MIT" ]
null
null
null
import math def combinations(n, k): """ Unordered, w / o repetitions From n choose k """ return math.factorial(n) / (math.factorial(k) * math.factorial(n - k)) def combinations_with_repetitions(n, k): """ Unordered, w / repetitions Вспомни задачу со спичками, это просто распределение...
17.837838
74
0.60303
0
0
0
0
0
0
0
0
320
0.453901
153de60f15200b47d13663f570f455c6ffc287dc
9,297
py
Python
packings_list.py
kilimetr/zkouska
859a3b7918d76a70cf794e06c08390a2ae807880
[ "BSD-3-Clause-Attribution" ]
null
null
null
packings_list.py
kilimetr/zkouska
859a3b7918d76a70cf794e06c08390a2ae807880
[ "BSD-3-Clause-Attribution" ]
null
null
null
packings_list.py
kilimetr/zkouska
859a3b7918d76a70cf794e06c08390a2ae807880
[ "BSD-3-Clause-Attribution" ]
null
null
null
# author Dominik Capkovic # contact: domcapkovic@gmail.com; https://www.linkedin.com/in/dominik-čapkovič-b0ab8575/ # GitHub: https://github.com/kilimetr packings_str = ''' Raschig Super-Ring | metal | 0.3 | 180000 | 315.0 | 0.960 | 3.560 | 2.340 | 0.750 | 0.760 | 1.500 | 0.450 Raschig Super-Ring | met...
75.585366
116
0.482414
0
0
0
0
0
0
0
0
8,521
0.916237
153e2a6848b0234f1f714c484bd4989e7dfd3df7
117
py
Python
mmdet/ops/__init__.py
GuoBo98/ShipDet
2979c39c5a56be3b99ba77833cfe556a8a0fc97e
[ "Apache-2.0" ]
null
null
null
mmdet/ops/__init__.py
GuoBo98/ShipDet
2979c39c5a56be3b99ba77833cfe556a8a0fc97e
[ "Apache-2.0" ]
null
null
null
mmdet/ops/__init__.py
GuoBo98/ShipDet
2979c39c5a56be3b99ba77833cfe556a8a0fc97e
[ "Apache-2.0" ]
null
null
null
from .roi_align_rotated import RoIAlignRotated, roi_align_rotated __all__ = ['RoIAlignRotated', 'roi_align_rotated']
39
65
0.837607
0
0
0
0
0
0
0
0
36
0.307692
15407f3fe8f1c7f69d1779e6d91d10fdf27f7862
3,779
py
Python
subprojects/sno-snapshot/src/common.py
openshift-psap/gpu-burst
cae1c71737c72caf0e980aa6361aeb0c145b4df3
[ "Apache-2.0" ]
1
2020-07-09T22:30:56.000Z
2020-07-09T22:30:56.000Z
subprojects/sno-snapshot/src/common.py
openshift-psap/gpu-burst
cae1c71737c72caf0e980aa6361aeb0c145b4df3
[ "Apache-2.0" ]
null
null
null
subprojects/sno-snapshot/src/common.py
openshift-psap/gpu-burst
cae1c71737c72caf0e980aa6361aeb0c145b4df3
[ "Apache-2.0" ]
1
2020-07-09T22:30:59.000Z
2020-07-09T22:30:59.000Z
import time, datetime import urllib3 print("Importing OpenShift/Kubernetes packages ...") import kubernetes import ocp_resources import openshift import ocp_resources.node import ocp_resources.machine import openshift.dynamic print("Importing AWS boto3 ...") import boto3 import botocore client_k8s = None client_...
27.583942
103
0.663668
0
0
0
0
0
0
0
0
787
0.208256
1545108723e1d95162092c28d39a13b5a922862e
2,053
py
Python
docs/examples/code/serialization.py
pombredanne/mogwai-2
536650c8abf5befac4269410fdfac5626be02a23
[ "Apache-2.0" ]
43
2015-09-17T14:13:17.000Z
2017-06-18T17:45:40.000Z
docs/examples/code/serialization.py
pombredanne/mogwai-2
536650c8abf5befac4269410fdfac5626be02a23
[ "Apache-2.0" ]
20
2015-09-17T17:25:16.000Z
2020-04-20T15:17:43.000Z
docs/examples/code/serialization.py
pombredanne/mogwai-2
536650c8abf5befac4269410fdfac5626be02a23
[ "Apache-2.0" ]
13
2015-10-12T09:35:43.000Z
2022-01-10T23:55:12.000Z
from mogwai.connection import setup from mogwai.models import Vertex, Edge from mogwai import properties from mogwai import relationships from mogwai._compat import print_ import datetime from pytz import utc from functools import partial import pickle setup('127.0.0.1') class OwnsObject(Edge): label = 'owns_o...
28.915493
79
0.758402
726
0.353629
0
0
0
0
0
0
463
0.225524
1545bae10e175ce363c87f5e99b847280194257d
1,877
py
Python
Practice_Itertools/Permutations_Combinations.py
SugaanthMohan/Python_Tools
7772d4832fb6aa80befa7bb7961ee9a5987f7b48
[ "Unlicense" ]
2
2020-10-05T14:06:51.000Z
2021-04-02T04:39:48.000Z
Practice_Itertools/Permutations_Combinations.py
SugaanthMohan/Python_Tools
7772d4832fb6aa80befa7bb7961ee9a5987f7b48
[ "Unlicense" ]
null
null
null
Practice_Itertools/Permutations_Combinations.py
SugaanthMohan/Python_Tools
7772d4832fb6aa80befa7bb7961ee9a5987f7b48
[ "Unlicense" ]
1
2019-08-20T11:01:37.000Z
2019-08-20T11:01:37.000Z
import itertools def test_product_combinator(container_, repeat_times): """ cartesian product, equivalent to a nested for-loop product('ABCD', repeat=2) AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD """ return list(itertools.product(container_, repeat=repeat_times)) def test_permutation_...
24.376623
125
0.626532
0
0
0
0
0
0
0
0
640
0.34097
154643bad32b0b2a24af7c2c4e6381e45fcf7cf0
1,922
py
Python
test/test_cram.py
Indy2222/mbg-codon-usage
d415076a8150cd712010c0389c71ef22ba9ad850
[ "MIT" ]
null
null
null
test/test_cram.py
Indy2222/mbg-codon-usage
d415076a8150cd712010c0389c71ef22ba9ad850
[ "MIT" ]
null
null
null
test/test_cram.py
Indy2222/mbg-codon-usage
d415076a8150cd712010c0389c71ef22ba9ad850
[ "MIT" ]
null
null
null
from cdnu.ccds import CdsPos, load_ccds from cdnu.cram import load_cds_list def test_load_cds_list(): cds = load_cds_list('./test/cramExample.cram', [CdsPos('first', [(33036411, 33036588)], '21')]) assert len(cds) is 1 single_cds = cds[0] assert single_cds is not None asser...
33.137931
78
0.612383
0
0
0
0
0
0
0
0
514
0.26743
154822303284556e43d319547825ccd2f3e0fac4
622
py
Python
figet/Optim.py
nlpAThits/figet
f628973bfdd49d8b95030c93787d52f07fd1fcb3
[ "MIT" ]
16
2018-04-19T23:54:10.000Z
2021-06-28T15:35:40.000Z
figet/Optim.py
nlpAThits/figet
f628973bfdd49d8b95030c93787d52f07fd1fcb3
[ "MIT" ]
3
2018-06-17T20:50:52.000Z
2019-05-18T08:04:32.000Z
figet/Optim.py
nlpAThits/figet
f628973bfdd49d8b95030c93787d52f07fd1fcb3
[ "MIT" ]
2
2019-04-07T19:17:28.000Z
2020-02-07T15:19:46.000Z
#!/usr/bin/env python # encoding: utf-8 import torch.optim as optim from torch.nn.utils import clip_grad_norm class Optim(object): def __init__(self, lr, max_grad_norm): self.lr = lr self.max_grad_norm = max_grad_norm def set_parameters(self, params): self.params = list(params) ...
24.88
60
0.66881
508
0.81672
0
0
0
0
0
0
38
0.061093
15496d9beace3067196af6dad11d3e5b49c379cc
1,033
py
Python
setup.py
OvalMoney/horus
90d839e9465f5089fa2632dad9f28190db3a829b
[ "MIT" ]
2
2020-07-17T07:43:53.000Z
2020-12-03T11:14:59.000Z
setup.py
OvalMoney/horus
90d839e9465f5089fa2632dad9f28190db3a829b
[ "MIT" ]
1
2020-01-27T15:49:33.000Z
2020-01-27T15:49:33.000Z
setup.py
OvalMoney/horus
90d839e9465f5089fa2632dad9f28190db3a829b
[ "MIT" ]
2
2020-07-17T07:44:04.000Z
2020-12-01T11:10:00.000Z
import io from setuptools import setup, find_packages def make_long_description(): with io.open("README.md", encoding="utf-8") as fp: long_description = fp.read() return long_description setup( name="nephthys", description="Advanced Python Logger", long_description=make_long_description...
29.514286
76
0.64666
0
0
0
0
0
0
0
0
446
0.431752
154c465ae5c00585f053431c72e2c927627c992c
1,420
py
Python
inlineplz/linters/rflint.py
CtrlZvi/inline-plz
208195372a8138dce78a165dd8410a8ce15aea80
[ "0BSD" ]
30
2016-01-11T18:43:38.000Z
2022-01-29T19:09:53.000Z
inlineplz/linters/rflint.py
CtrlZvi/inline-plz
208195372a8138dce78a165dd8410a8ce15aea80
[ "0BSD" ]
237
2016-01-09T23:01:19.000Z
2022-03-01T16:12:10.000Z
inlineplz/linters/rflint.py
CtrlZvi/inline-plz
208195372a8138dce78a165dd8410a8ce15aea80
[ "0BSD" ]
14
2016-01-19T00:51:52.000Z
2022-01-12T20:49:31.000Z
# -*- coding: utf-8 -*- import sys from ..decorators import linter from ..parsers.base import ParserBase @linter( name="robotframework-lint", install=[[sys.executable, "-m", "pip", "install", "-U", "robotframework-lint"]], help_cmd=["rflint", "--help"], run=["rflint"], rundefault=["rflint", "-A"...
30.212766
86
0.48169
972
0.684507
0
0
1,310
0.922535
0
0
237
0.166901
154e0a5afabdd063dcf184a1b9ec15c5e991fb02
6,676
py
Python
catnip/client.py
google/catnip
0b8c8c5f93e32931c97a561180c70c9480462717
[ "Apache-2.0" ]
24
2015-01-15T02:31:52.000Z
2021-08-10T08:46:03.000Z
catnip/client.py
google/catnip
0b8c8c5f93e32931c97a561180c70c9480462717
[ "Apache-2.0" ]
1
2018-01-10T08:37:02.000Z
2018-01-10T08:45:45.000Z
catnip/client.py
google/catnip
0b8c8c5f93e32931c97a561180c70c9480462717
[ "Apache-2.0" ]
11
2015-03-05T09:22:27.000Z
2021-09-05T09:31:01.000Z
# Copyright 2014 Google Inc. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
34.590674
80
0.603805
5,964
0.893349
0
0
0
0
0
0
1,578
0.236369
154e8533b41f0ce6ac61c16ecbfbb8ffcbee0f6b
1,618
py
Python
seminar2/rules.py
savineugenioan/rau-mas-ai
ddab8979fca0fe6f6f42bcc273be75b159185607
[ "Apache-2.0" ]
null
null
null
seminar2/rules.py
savineugenioan/rau-mas-ai
ddab8979fca0fe6f6f42bcc273be75b159185607
[ "Apache-2.0" ]
null
null
null
seminar2/rules.py
savineugenioan/rau-mas-ai
ddab8979fca0fe6f6f42bcc273be75b159185607
[ "Apache-2.0" ]
null
null
null
# IF () THEN () # IF direction = left THEN position = (-1, 0) class RuleAntecedent: def __init__(self, direction=None, world=None): self.direction = direction # up, down, left, right self.world = world # (-1, 0, 0) (-1, 0, 1) class RuleConsequent: def __init__(self, position=None, direction=...
27.896552
59
0.596415
462
0.285185
0
0
0
0
0
0
177
0.109259
154fe42eadedd30b52e9d409a81aab4ed1b44894
437
py
Python
test/dom/ext/test_single_elements.py
jkloth/pyxml
de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d
[ "MIT" ]
2
2018-05-28T23:01:20.000Z
2018-05-29T03:59:38.000Z
test/dom/ext/test_single_elements.py
jkloth/pyxml
de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d
[ "MIT" ]
null
null
null
test/dom/ext/test_single_elements.py
jkloth/pyxml
de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d
[ "MIT" ]
null
null
null
def test(inFile): from xml.dom.ext.reader import HtmlLib from xml.dom import ext from xml.dom import Node from xml.dom.html import HTMLDocument doc = HTMLDocument.HTMLDocument() HtmlLib.FromHtmlStream(inFile,doc) print doc ext.PrettyPrint(doc) if __name__ == '__main__': i...
15.068966
42
0.643021
0
0
0
0
0
0
0
0
13
0.029748
155087d21e98b773714728f3ab09117912df0457
1,455
py
Python
app/models/project.py
lguobin/KB_API
f7180cf430cb8de2eac8fa78e3937666da950c7a
[ "Apache-2.0" ]
null
null
null
app/models/project.py
lguobin/KB_API
f7180cf430cb8de2eac8fa78e3937666da950c7a
[ "Apache-2.0" ]
null
null
null
app/models/project.py
lguobin/KB_API
f7180cf430cb8de2eac8fa78e3937666da950c7a
[ "Apache-2.0" ]
null
null
null
# !/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2021/08/09 11:32:25 # @File : project.py # @Author : K.B.Lam # @Version : 1.0 from .base import _BaseModel from app.extensions import db from app.models.tools import get_username class Project(_BaseModel): __tablename__ = "Project" __bind_ke...
33.068182
99
0.601375
1,238
0.83143
0
0
78
0.052384
0
0
421
0.28274
1550c30a3bf09658744df4a415c92773c8c8951d
5,542
py
Python
labellab-flask/api/controllers/classificationscontroller.py
AkMo3/LabelLab
1f16905bba1a332035d082cfc6337b8551478e05
[ "Apache-2.0" ]
70
2019-01-25T19:16:00.000Z
2022-03-23T14:37:28.000Z
labellab-flask/api/controllers/classificationscontroller.py
AkMo3/LabelLab
1f16905bba1a332035d082cfc6337b8551478e05
[ "Apache-2.0" ]
350
2019-01-30T10:50:34.000Z
2022-03-31T19:58:44.000Z
labellab-flask/api/controllers/classificationscontroller.py
AkMo3/LabelLab
1f16905bba1a332035d082cfc6337b8551478e05
[ "Apache-2.0" ]
140
2019-01-30T08:53:35.000Z
2022-03-25T15:37:12.000Z
from flask.views import MethodView from flask import request, make_response, jsonify, current_app from flask_jwt_extended import (jwt_required, get_jwt_identity, get_raw_jwt) from datetime import datetime from api.helpers.classification import ( get_classified_data, find_by_id, find_all_by_id, save_image, save_to_...
32.034682
90
0.576326
4,796
0.865392
0
0
4,390
0.792133
0
0
1,228
0.221581
1551460d8250cc7f9570e1158c0116db59b95164
684
py
Python
cluster/views.py
zhenyit/django-data-mining
8739dba912e8bd6e9ef7571099fb3cb229ecd0d0
[ "MIT" ]
7
2019-08-07T03:30:43.000Z
2019-08-07T19:40:24.000Z
cluster/views.py
zhenyit/Django-Python-Server
8739dba912e8bd6e9ef7571099fb3cb229ecd0d0
[ "MIT" ]
null
null
null
cluster/views.py
zhenyit/Django-Python-Server
8739dba912e8bd6e9ef7571099fb3cb229ecd0d0
[ "MIT" ]
1
2019-08-06T17:40:40.000Z
2019-08-06T17:40:40.000Z
from django.shortcuts import render # Create your views here. from django.http import HttpResponse from django.http import JsonResponse from django.core import serializers from . import models import numpy as np from sklearn.cluster import KMeans def kmeans(request): response = { 'label': [], 'cl...
25.333333
69
0.678363
0
0
0
0
0
0
0
0
127
0.185673
15514b08bd5a63930470922fc566fbf8d19309de
412
py
Python
setup.py
ebenolson/loadconfig
e16962a0934f64ad7c36e3c0aee2c9e867687b80
[ "MIT" ]
7
2016-07-11T16:49:47.000Z
2021-04-25T10:55:41.000Z
setup.py
ebenolson/loadconfig
e16962a0934f64ad7c36e3c0aee2c9e867687b80
[ "MIT" ]
3
2016-01-22T23:21:09.000Z
2018-09-01T07:58:13.000Z
setup.py
ebenolson/loadconfig
e16962a0934f64ad7c36e3c0aee2c9e867687b80
[ "MIT" ]
3
2016-01-06T00:58:49.000Z
2020-01-10T14:32:43.000Z
#!/usr/bin/env python # Create wheel with: python setup.py bdist_wheel # Install with: pip install -U dist/loadconfig-*.whl from os import environ from re import sub from setuptools import setup for line in open('loadconfig/__init__.py'): if line.startswith('__version__'): version = sub(".+'(.+?)'\...
25.75
58
0.686893
0
0
0
0
0
0
0
0
201
0.487864
1551ac1a6a79309991708839cd5a99e957a025cb
6,263
py
Python
pycdr/pycdr.py
wlchin/pycdr
96e64a05f1b84fd01fbb003d3256e297d6492df4
[ "MIT" ]
null
null
null
pycdr/pycdr.py
wlchin/pycdr
96e64a05f1b84fd01fbb003d3256e297d6492df4
[ "MIT" ]
null
null
null
pycdr/pycdr.py
wlchin/pycdr
96e64a05f1b84fd01fbb003d3256e297d6492df4
[ "MIT" ]
null
null
null
import numpy as np import scipy.sparse as ss import logging import time import warnings from .feature_selection import get_significant_genes from .feature_selection import calculate_minmax warnings.simplefilter("ignore") logging.basicConfig(format='%(process)d - %(levelname)s : %(asctime)s - %(message)s', level=logg...
31.315
111
0.653201
0
0
0
0
0
0
0
0
2,083
0.332588
15530d060380d749b116a3b7a27afff3e009ff61
1,925
py
Python
commands.py
fivunlm/sbb8
9493cfb9d799b57ae4b3bb8a44672fa92736881e
[ "MIT" ]
null
null
null
commands.py
fivunlm/sbb8
9493cfb9d799b57ae4b3bb8a44672fa92736881e
[ "MIT" ]
null
null
null
commands.py
fivunlm/sbb8
9493cfb9d799b57ae4b3bb8a44672fa92736881e
[ "MIT" ]
null
null
null
import re from feed import get_builds def _filter_old_builds(builds): to_remove = [] for build in builds: for b in builds: if b['artifact'] == build['artifact']: partial_b_version = b['version'][:b['version'].rfind('.')] partial_build_version = build['versi...
32.627119
105
0.607792
0
0
0
0
0
0
0
0
463
0.240519
15532dfb542002fe8f2372645ba607827e292a39
2,124
py
Python
src/NLP/NLP.py
dinispeixoto/Kaydara
5a22be3f9e931a00f3f3c9bcd1dbda8e1cce0b4d
[ "MIT" ]
null
null
null
src/NLP/NLP.py
dinispeixoto/Kaydara
5a22be3f9e931a00f3f3c9bcd1dbda8e1cce0b4d
[ "MIT" ]
3
2021-02-08T20:22:41.000Z
2022-03-25T14:38:24.000Z
src/NLP/NLP.py
dinispeixoto/Kaydara
5a22be3f9e931a00f3f3c9bcd1dbda8e1cce0b4d
[ "MIT" ]
null
null
null
from src.APIs import IBMWatsonAPI, FacebookAPI from src.NLP import ReminderNLP, WeatherNLP, NewsNLP, GmailNLP, CalendarNLP from src.MsgBuilder import NLPMB from src.Models import Client import json # processes the client message and select the related API def process_message(client_id, msg): cli = Client.get_clie...
30.782609
107
0.702919
0
0
0
0
0
0
0
0
353
0.166196
1555ea7d41c4bf7bec602435933ff7dd2f16b76a
1,043
py
Python
src/tale/runtime/objects.py
tale-lang/tale
1779f94aa13545e58a1d5a8819b85ad02ada4144
[ "MIT" ]
17
2020-02-11T10:38:19.000Z
2020-09-22T16:36:25.000Z
src/tale/runtime/objects.py
tale-lang/tale
1779f94aa13545e58a1d5a8819b85ad02ada4144
[ "MIT" ]
18
2020-02-14T20:36:25.000Z
2020-05-26T21:52:46.000Z
src/tale/runtime/objects.py
tale-lang/tale
1779f94aa13545e58a1d5a8819b85ad02ada4144
[ "MIT" ]
1
2020-02-16T12:04:07.000Z
2020-02-16T12:04:07.000Z
from typing import Any class TaleObject: """A basic block of Tale's object model. All values in Tale exist only as instances of this class. For example, in the following expression: x = 1 `1` is an instance of `TaleObject`. Attributes: type: An instance of `TaleObject` that repr...
28.189189
74
0.685523
611
0.58581
0
0
0
0
0
0
468
0.448706
15584c787333f66306e7fcabad2c6a63a9103c83
666
py
Python
src/genderumrevelio/misc/jsonfilter.py
Conan88/GenderumRevelio
6e047dba990ff6c7ae05fd8ee8388487c6d32ea9
[ "MIT" ]
null
null
null
src/genderumrevelio/misc/jsonfilter.py
Conan88/GenderumRevelio
6e047dba990ff6c7ae05fd8ee8388487c6d32ea9
[ "MIT" ]
null
null
null
src/genderumrevelio/misc/jsonfilter.py
Conan88/GenderumRevelio
6e047dba990ff6c7ae05fd8ee8388487c6d32ea9
[ "MIT" ]
null
null
null
import json def twitterfilter(filename, outputpath="filteredtweets/", inputpath="unfilteredtweets/"): with open(inputpath + filename + ".json", "r") as f: data = json.load(f) indexs = [] for i in range(0, len(data)): if data[i]["user"].lower() != filename.lower(): ...
28.956522
89
0.548048
0
0
0
0
0
0
0
0
121
0.181682
15590c98b9bcc040e125c855d59afa23bb2ae6d3
1,038
py
Python
linear_search/test_linear_search.py
agconti/searches
930aa4e8c7315d5db039f633b11b337aaf9920d4
[ "MIT" ]
null
null
null
linear_search/test_linear_search.py
agconti/searches
930aa4e8c7315d5db039f633b11b337aaf9920d4
[ "MIT" ]
null
null
null
linear_search/test_linear_search.py
agconti/searches
930aa4e8c7315d5db039f633b11b337aaf9920d4
[ "MIT" ]
null
null
null
import unittest import random from linear_search import linear_search class TestLinearSearch(unittest.TestCase): def setUp(self): self.items_length = 20 self.unsorted_values = [random.random() for i in range(self.items_length)] self.target = random.choice(self.unsorted_values) def te...
32.4375
86
0.712909
917
0.88343
0
0
0
0
0
0
40
0.038536
155a6708533a37b4522eab82627523cc40c0ea99
1,793
py
Python
whowlong/management/commands/agspGetTrajetsAround.py
guillaut5/ttpu
9d47f762a1064000f4443eaf12c3f843570a441e
[ "Apache-2.0" ]
null
null
null
whowlong/management/commands/agspGetTrajetsAround.py
guillaut5/ttpu
9d47f762a1064000f4443eaf12c3f843570a441e
[ "Apache-2.0" ]
null
null
null
whowlong/management/commands/agspGetTrajetsAround.py
guillaut5/ttpu
9d47f762a1064000f4443eaf12c3f843570a441e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Created on 3 mars 2017 @author: guillaume ''' from django.core.management.base import BaseCommand, CommandError import time import logging from django.test.client import Client # Create your tests here. from whowlong.models import Place,Trajet from whowlong.computingtools.calculator impo...
30.389831
132
0.654769
1,283
0.715561
0
0
0
0
0
0
558
0.31121
155c37c9b2d90ac1125a6333fdc53a42a8125eeb
2,759
py
Python
ocdsmerge/util.py
open-contracting/ocds-merge
80c7cb380d191c75f88feefd34b607bc0de13ee1
[ "BSD-3-Clause" ]
4
2017-09-06T06:14:09.000Z
2019-07-05T13:11:40.000Z
ocdsmerge/util.py
open-contracting/ocds-merge
80c7cb380d191c75f88feefd34b607bc0de13ee1
[ "BSD-3-Clause" ]
20
2017-11-25T02:29:41.000Z
2020-01-08T18:45:49.000Z
ocdsmerge/util.py
open-contracting/ocds-merge
80c7cb380d191c75f88feefd34b607bc0de13ee1
[ "BSD-3-Clause" ]
1
2018-11-07T14:05:12.000Z
2018-11-07T14:05:12.000Z
import re from functools import lru_cache import requests from ocdsmerge.exceptions import (MissingDateKeyError, NonObjectReleaseError, NonStringDateValueError, NullDateValueError) @lru_cache() def get_tags(): """ Returns the tags of all versions of OCDS in alphabetical ord...
46.762712
119
0.631388
0
0
0
0
224
0.081189
0
0
1,400
0.50743
155c3cff7ec88893e5e3afc0e765ecc9f4bcd784
2,566
py
Python
geometry_analysis/tests/test_geometry_analysis.py
ErikVazquezM/geometry_analysis
f12cdd04f1d9dbb1547297aa05095aa390bd5ee0
[ "BSD-3-Clause" ]
null
null
null
geometry_analysis/tests/test_geometry_analysis.py
ErikVazquezM/geometry_analysis
f12cdd04f1d9dbb1547297aa05095aa390bd5ee0
[ "BSD-3-Clause" ]
null
null
null
geometry_analysis/tests/test_geometry_analysis.py
ErikVazquezM/geometry_analysis
f12cdd04f1d9dbb1547297aa05095aa390bd5ee0
[ "BSD-3-Clause" ]
null
null
null
""" Unit and regression test for the geometry_analysis package. """ # Import package, test suite, and other packages as needed import geometry_analysis import pytest import sys import numpy as np import math @pytest.fixture() def water_molecule(): name = "water" symbols = ["H", "O", "H"] coordinates = np...
26.729167
84
0.681216
0
0
0
0
619
0.241231
0
0
451
0.17576
155d76276a8be0807befc12dbb2b607bf3e8e928
1,656
py
Python
journal_venv/lib/python3.9/site-packages/cartopy/examples/regridding_arrows.py
ushham/JournalTool
f0ab9b6711b733f3c68a8a94bbb9773ffd3a95fe
[ "MIT" ]
2
2020-07-29T13:23:42.000Z
2020-10-24T08:48:13.000Z
journal_venv/lib/python3.9/site-packages/cartopy/examples/regridding_arrows.py
ushham/JournalTool
f0ab9b6711b733f3c68a8a94bbb9773ffd3a95fe
[ "MIT" ]
null
null
null
journal_venv/lib/python3.9/site-packages/cartopy/examples/regridding_arrows.py
ushham/JournalTool
f0ab9b6711b733f3c68a8a94bbb9773ffd3a95fe
[ "MIT" ]
1
2022-03-10T16:12:09.000Z
2022-03-10T16:12:09.000Z
""" Regridding vectors with quiver ------------------------------ This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in :meth:`cartopy.mpl.geoaxes.GeoAxes.barbs`). Regridding can be an effective way of visualising a vector field, particularly if the data is dense o...
27.6
78
0.652174
0
0
0
0
0
0
0
0
645
0.389493
155f265672b80abeaf4e072085fcf28eb806c6db
1,543
py
Python
letsencrypt/client/tests/log_test.py
rivy/lets-encrypt-preview
759e233aaa36f33c413918e8ebbf1b949af1ce5d
[ "Apache-2.0" ]
null
null
null
letsencrypt/client/tests/log_test.py
rivy/lets-encrypt-preview
759e233aaa36f33c413918e8ebbf1b949af1ce5d
[ "Apache-2.0" ]
null
null
null
letsencrypt/client/tests/log_test.py
rivy/lets-encrypt-preview
759e233aaa36f33c413918e8ebbf1b949af1ce5d
[ "Apache-2.0" ]
1
2020-07-20T00:19:40.000Z
2020-07-20T00:19:40.000Z
"""Tests for letsencrypt.client.log.""" import unittest import mock class DialogHandlerTest(unittest.TestCase): def setUp(self): self.d = mock.MagicMock() # pylint: disable=invalid-name from letsencrypt.client.log import DialogHandler self.handler = DialogHandler(height=2, width=6, d=s...
35.068182
79
0.682437
1,422
0.921581
0
0
0
0
0
0
185
0.119896
155f9a04aa790cb4447a738281b3858fe2e0ef10
309
py
Python
dv2.py
dhruv-varshney/cleargit
e001f2bf594106110488e1aa44a74b95d30e6b4c
[ "MIT" ]
2
2021-05-27T17:45:38.000Z
2021-06-09T17:18:25.000Z
dv2.py
dhruv-varshney/Python
e001f2bf594106110488e1aa44a74b95d30e6b4c
[ "MIT" ]
null
null
null
dv2.py
dhruv-varshney/Python
e001f2bf594106110488e1aa44a74b95d30e6b4c
[ "MIT" ]
null
null
null
val = int(input('enter the number: ')) x=0 y=0 for i in range(1,val+1): if(i%2!=0): x= x+7 else: y = y+6 if(val%2!=0): print(' {} term in accordance to the program is {}'.format(val,x-7)) else: print('{} term in accordance to the program is {}'.format(val,y-6))
12.875
72
0.527508
0
0
0
0
0
0
0
0
109
0.352751
156048287df26174870e86440b151e9aefd7c0af
19,312
py
Python
tests/twitter/test_fetch_savers.py
garrettc/django-ditto
fcf15beb8f9b4d61634efd4a88064df12ee16a6f
[ "MIT" ]
54
2016-08-15T17:32:41.000Z
2022-02-27T03:32:05.000Z
tests/twitter/test_fetch_savers.py
garrettc/django-ditto
fcf15beb8f9b4d61634efd4a88064df12ee16a6f
[ "MIT" ]
229
2015-07-23T12:50:47.000Z
2022-03-24T10:33:20.000Z
tests/twitter/test_fetch_savers.py
garrettc/django-ditto
fcf15beb8f9b4d61634efd4a88064df12ee16a6f
[ "MIT" ]
8
2015-09-10T17:10:35.000Z
2022-03-25T13:05:01.000Z
import datetime from decimal import Decimal import json import os import pytz import tempfile from unittest.mock import patch from freezegun import freeze_time from ditto.core.utils import datetime_now from ditto.core.utils.downloader import DownloadException, filedownloader from django.test import override_settings ...
37.71875
116
0.624948
18,836
0.974293
0
0
3,485
0.180262
0
0
6,316
0.326695
1560cbf480f3901c1a28c49d69f13f6422f71682
659
py
Python
Baum Sweet sequence/Baum-Sweet sequence.py
ajtroyer/Integer-Sequences
d54a84c74b2cfa95e3df8489d5878fa4e8881d73
[ "Unlicense" ]
48
2021-06-28T05:53:43.000Z
2022-03-17T10:37:26.000Z
Baum Sweet sequence/Baum-Sweet sequence.py
PremApk/Integer-Sequences
89a409006d5718c5e9cd9d95748c312337600209
[ "Unlicense" ]
99
2021-06-28T03:16:51.000Z
2022-03-17T00:18:50.000Z
Baum Sweet sequence/Baum-Sweet sequence.py
PremApk/Integer-Sequences
89a409006d5718c5e9cd9d95748c312337600209
[ "Unlicense" ]
140
2021-06-28T06:29:19.000Z
2022-03-30T11:15:45.000Z
def baum_sweet(z): num_of_zeros = [] count_of_zeros = [] if z == "0": n = 1 else: for i in z: if i == "0": num_of_zeros.append(i) else: count_of_zeros.append(num_of_zeros.count("0")) num_of_zeros = [] count_o...
21.966667
62
0.503794
0
0
0
0
0
0
0
0
29
0.044006
15640a5c0d434045a81705bb7b215eb96c897603
626
py
Python
apps/settings/middleware.py
rmdes/tanzawa
d53baa10bd6c217cd18628437a88a43e3bd02b70
[ "Apache-2.0" ]
25
2021-06-13T03:38:44.000Z
2022-03-15T15:53:31.000Z
apps/settings/middleware.py
rmdes/tanzawa
d53baa10bd6c217cd18628437a88a43e3bd02b70
[ "Apache-2.0" ]
59
2021-06-12T23:35:06.000Z
2022-03-24T21:40:24.000Z
apps/settings/middleware.py
rmdes/tanzawa
d53baa10bd6c217cd18628437a88a43e3bd02b70
[ "Apache-2.0" ]
null
null
null
from .models import MSiteSettings class SettingsMiddleware: """Set our settings object on the request""" def __init__(self, get_response): self.get_response = get_response # One-time configuration and initialization. def __call__(self, request): # Code to be executed for each req...
29.809524
75
0.680511
589
0.940895
0
0
0
0
0
0
252
0.402556
15648f3f05ac0f6c6228e523147b6492fa7359ff
288
py
Python
huobi/aa/account_type.py
peterkang2001/Gaea
b0fb7038f55061abc79dc2b3ea2997b268cc39a6
[ "Apache-2.0" ]
null
null
null
huobi/aa/account_type.py
peterkang2001/Gaea
b0fb7038f55061abc79dc2b3ea2997b268cc39a6
[ "Apache-2.0" ]
null
null
null
huobi/aa/account_type.py
peterkang2001/Gaea
b0fb7038f55061abc79dc2b3ea2997b268cc39a6
[ "Apache-2.0" ]
null
null
null
# from aa import Enum # # class Account_Type(Enum): # SPOT = 0 # 现货账户 # OTC = 1 # OTC账户 # MARGIN = 2 # 逐仓杠杆账户,该账户类型以subType区分具体币种对账户 # SUPER = 3 # margin(或cross - margin):全仓杠杆账户 # POINT = 4 # 点卡账户 # MINEPOOL = 5 # 矿池账户 # ETF = 6 # ETF账户 # #
22.153846
50
0.527778
0
0
0
0
0
0
0
0
372
0.96875
1566077a68f63bcb1bb1604faa0f1cbc023913fa
4,335
py
Python
cellrank/tl/_transition_matrix.py
WeilerP/cellrank
c8c2b9f6bd2448861fb414435aee7620ca5a0bad
[ "BSD-3-Clause" ]
172
2020-03-19T19:50:53.000Z
2022-03-28T09:36:04.000Z
cellrank/tl/_transition_matrix.py
WeilerP/cellrank
c8c2b9f6bd2448861fb414435aee7620ca5a0bad
[ "BSD-3-Clause" ]
702
2020-03-19T08:09:04.000Z
2022-03-30T09:55:14.000Z
cellrank/tl/_transition_matrix.py
WeilerP/cellrank
c8c2b9f6bd2448861fb414435aee7620ca5a0bad
[ "BSD-3-Clause" ]
17
2020-04-07T03:11:02.000Z
2022-02-02T20:39:16.000Z
from typing import Union, Callable, Iterable, Optional from typing_extensions import Literal from anndata import AnnData from cellrank import logging as logg from cellrank.ul._docs import d, inject_docs from cellrank.tl._utils import _deprecate from cellrank.tl.kernels import VelocityKernel, ConnectivityKernel from ce...
36.737288
112
0.687659
0
0
0
0
3,824
0.882122
0
0
1,907
0.439908
15673650b27d37a68700c313fcef5b17abf771b6
516
py
Python
tests/users/api/test_user.py
arkhn/fhir-river
a12179c34fad131d16dedc20c61297ed83d805e6
[ "Apache-2.0" ]
42
2020-03-25T16:47:30.000Z
2022-01-31T21:26:38.000Z
tests/users/api/test_user.py
arkhn/fhir-river
a12179c34fad131d16dedc20c61297ed83d805e6
[ "Apache-2.0" ]
367
2020-04-08T12:46:34.000Z
2022-02-16T01:15:32.000Z
tests/users/api/test_user.py
arkhn/fhir-river
a12179c34fad131d16dedc20c61297ed83d805e6
[ "Apache-2.0" ]
3
2020-05-14T08:24:46.000Z
2021-08-04T05:00:16.000Z
import pytest from django.urls import reverse pytestmark = pytest.mark.django_db def test_retrieve_unauthenticated_user(api_client): url = reverse("auth-user-detail") response = api_client.get(url) assert response.status_code == 403, response.data @pytest.mark.as_user def test_retrieve_authenticated...
21.5
55
0.742248
0
0
0
0
247
0.478682
0
0
40
0.077519
1567d9ad382f0a244898929137268b5c664dab10
13,753
py
Python
ngshare_exchange/course_management.py
lauri3k/shhhh
92d985e5dbe4f39ab9bf8103c9ba5376e93c8af8
[ "BSD-3-Clause" ]
1
2021-03-23T04:31:38.000Z
2021-03-23T04:31:38.000Z
ngshare_exchange/course_management.py
lauri3k/shhhh
92d985e5dbe4f39ab9bf8103c9ba5376e93c8af8
[ "BSD-3-Clause" ]
6
2020-06-08T21:38:24.000Z
2021-03-26T05:20:35.000Z
ngshare_exchange/course_management.py
lauri3k/shhhh
92d985e5dbe4f39ab9bf8103c9ba5376e93c8af8
[ "BSD-3-Clause" ]
1
2021-03-23T03:17:33.000Z
2021-03-23T03:17:33.000Z
import os import sys import requests import csv import subprocess import json import argparse from urllib.parse import quote # https://www.geeksforgeeks.org/print-colors-python-terminal/ def prRed(skk, exit=True): print('\033[91m {}\033[00m'.format(skk)) if exit: sys.exit(-1) def prGreen(skk): p...
29.137712
223
0.609612
273
0.01985
0
0
0
0
0
0
3,408
0.2478
15682165775caa290117504af2ff7fc3111f75eb
1,423
py
Python
.c9/metadata/environment/Noda_SF_Project/Noda_SF_Project/settings.py
bopopescu/nodasf
32718c9ba606a7373b20c77710fd3706fc583396
[ "MIT" ]
null
null
null
.c9/metadata/environment/Noda_SF_Project/Noda_SF_Project/settings.py
bopopescu/nodasf
32718c9ba606a7373b20c77710fd3706fc583396
[ "MIT" ]
9
2019-12-05T20:37:07.000Z
2022-02-10T12:34:48.000Z
.c9/metadata/environment/Noda_SF_Project/Noda_SF_Project/settings.py
bopopescu/nodasf
32718c9ba606a7373b20c77710fd3706fc583396
[ "MIT" ]
1
2020-07-25T23:37:21.000Z
2020-07-25T23:37:21.000Z
{"filter":false,"title":"settings.py","tooltip":"/Noda_SF_Project/Noda_SF_Project/settings.py","undoManager":{"mark":3,"position":3,"stack":[[{"start":{"row":38,"column":33},"end":{"row":39,"column":0},"action":"insert","lines":["",""],"id":2},{"start":{"row":39,"column":0},"end":{"row":39,"column":4},"action":"insert"...
1,423
1,423
0.593113
0
0
0
0
0
0
0
0
1,000
0.702741
156946b470a7a457642d3b02e6f6bc4fecddde64
1,968
py
Python
misc/visualizer.py
jacobandreas/nmn2
7e42dd98420f9580fd34185ba670490a5d86fb04
[ "Apache-2.0" ]
427
2016-01-27T01:08:58.000Z
2022-03-22T17:55:34.000Z
misc/visualizer.py
jacobandreas/nmn2
7e42dd98420f9580fd34185ba670490a5d86fb04
[ "Apache-2.0" ]
22
2016-06-01T15:48:36.000Z
2017-07-27T02:07:46.000Z
misc/visualizer.py
jacobandreas/nmn2
7e42dd98420f9580fd34185ba670490a5d86fb04
[ "Apache-2.0" ]
107
2016-02-14T02:11:42.000Z
2022-03-25T06:27:29.000Z
#!/usr/bin/env python2 import numpy as np import os import scipy VIS_DIR = "vis" class Visualizer: def __init__(self): self.active = False def begin(self, dest, max_entries): self.lines = [] self.active = True self.max_entries = max_entries self.next_entry = 0 ...
31.238095
105
0.533028
1,856
0.943089
0
0
0
0
0
0
305
0.15498
1569c967632f707014360811bbac3595ce760ece
6,803
py
Python
ui_error_screen.py
frux-c/ValorantBot
532b40f8f6db4ee3639701bd658da9f78cab82d9
[ "MIT" ]
null
null
null
ui_error_screen.py
frux-c/ValorantBot
532b40f8f6db4ee3639701bd658da9f78cab82d9
[ "MIT" ]
null
null
null
ui_error_screen.py
frux-c/ValorantBot
532b40f8f6db4ee3639701bd658da9f78cab82d9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'error_screen.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. import sys, os ...
45.966216
176
0.679994
5,816
0.854791
0
0
0
0
0
0
1,386
0.203704
156a1cbfdf040c739583016c1ecadb31b207e37f
6,509
py
Python
dnachisel/builtin_specifications/AvoidChanges.py
rfuisz/DnaChisel
1e29a18af88ae249169743746dd4c73a4e027b19
[ "MIT" ]
124
2017-11-14T14:42:25.000Z
2022-03-31T08:02:07.000Z
dnachisel/builtin_specifications/AvoidChanges.py
rfuisz/DnaChisel
1e29a18af88ae249169743746dd4c73a4e027b19
[ "MIT" ]
65
2017-11-15T07:25:38.000Z
2022-01-31T10:38:45.000Z
dnachisel/builtin_specifications/AvoidChanges.py
rfuisz/DnaChisel
1e29a18af88ae249169743746dd4c73a4e027b19
[ "MIT" ]
31
2018-10-18T12:59:47.000Z
2022-02-11T16:54:43.000Z
"""Implementation of AvoidChanges.""" import numpy as np from ..Specification import Specification, SpecEvaluation # from .VoidSpecification import VoidSpecification from ..biotools import ( sequences_differences_array, group_nearby_indices, ) from ..Location import Location class AvoidChanges(Specificatio...
35.961326
84
0.626671
6,218
0.955293
0
0
0
0
0
0
1,524
0.234137
156a46a2364e4b4f08406ce869ce396572c9d10c
2,795
py
Python
users/views.py
samsonosiomwan/Hotels-Management-System
d37bc13faafd2cfc2f0ad4cbe56bc83b64eded36
[ "MIT" ]
null
null
null
users/views.py
samsonosiomwan/Hotels-Management-System
d37bc13faafd2cfc2f0ad4cbe56bc83b64eded36
[ "MIT" ]
null
null
null
users/views.py
samsonosiomwan/Hotels-Management-System
d37bc13faafd2cfc2f0ad4cbe56bc83b64eded36
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from ekohms.models import User from django.contrib.auth.tokens import default_token_generator from django.contrib.sites.shortcuts import get_current_site from django.core.mail import EmailMessage from django.http import HttpResponse from django.shortcuts import render,redi...
35.379747
107
0.675134
0
0
0
0
0
0
0
0
703
0.251521
156b887af38fc2be248562a6c65c5110758d7475
277
py
Python
url.py
beboy01/nan-project
0e43e2b3e3a4e34b47b8a4815312ec137572aa87
[ "MIT" ]
null
null
null
url.py
beboy01/nan-project
0e43e2b3e3a4e34b47b8a4815312ec137572aa87
[ "MIT" ]
null
null
null
url.py
beboy01/nan-project
0e43e2b3e3a4e34b47b8a4815312ec137572aa87
[ "MIT" ]
null
null
null
############# exo ############### # Ne modifiez pas les variables ci-dessous protocole = "https://" nom_du_site = "docstring" extension = "fr" page = "glossaire" # Modifiez le code à partir d'ici URL = f"{protocole+nom_du_site+'.'+extension+'/'+page}" print(URL)
23.083333
56
0.595668
0
0
0
0
0
0
0
0
198
0.71223
156ca789f384099842ba6ca65a15fbac8a66d3ef
3,859
py
Python
authentication/serializers.py
MichaelNjoroge254/Sendit
367d69c30f061dea07c7601c4015dd8322d8426b
[ "MIT" ]
null
null
null
authentication/serializers.py
MichaelNjoroge254/Sendit
367d69c30f061dea07c7601c4015dd8322d8426b
[ "MIT" ]
null
null
null
authentication/serializers.py
MichaelNjoroge254/Sendit
367d69c30f061dea07c7601c4015dd8322d8426b
[ "MIT" ]
null
null
null
from django.db.models.base import Model from rest_framework import serializers from rest_framework.utils import field_mapping from . models import User, UserManager from rest_framework.exceptions import AuthenticationFailed from django.contrib import auth from rest_framework.exceptions import AuthenticationFailed from...
37.105769
105
0.695776
3,215
0.833117
0
0
173
0.04483
0
0
410
0.106245
156f0f7798172ab04ff11fbc879e1ba5277dba3b
1,079
py
Python
setup.py
pltoledo/py-publicbr
84e4cf8b71754217c4814d26c4b76a397fef84fc
[ "MIT" ]
null
null
null
setup.py
pltoledo/py-publicbr
84e4cf8b71754217c4814d26c4b76a397fef84fc
[ "MIT" ]
null
null
null
setup.py
pltoledo/py-publicbr
84e4cf8b71754217c4814d26c4b76a397fef84fc
[ "MIT" ]
null
null
null
from setuptools import setup with open('README.md', encoding='utf-8') as f: long_description = f.read() setup( name = 'py-publicbr', packages = ['publicbr', 'publicbr.cnpj'], version = '0.1', license='MIT', description = 'Extract and consolidate Brazilian public datasets', long_description...
30.828571
81
0.608897
0
0
0
0
0
0
0
0
539
0.499537
15701bb8175673d8adcfe6e80f96492b05abf7ac
313
py
Python
lz4/__init__.py
ajholyoake/python-lz4
c4e16e27971707d84f5436c19dbe2520cc041d35
[ "BSD-3-Clause" ]
null
null
null
lz4/__init__.py
ajholyoake/python-lz4
c4e16e27971707d84f5436c19dbe2520cc041d35
[ "BSD-3-Clause" ]
null
null
null
lz4/__init__.py
ajholyoake/python-lz4
c4e16e27971707d84f5436c19dbe2520cc041d35
[ "BSD-3-Clause" ]
null
null
null
from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed pass VERSION = __version__ from ._version import ( # noqa: F401 library_version_number, library_version_string, )
20.866667
64
0.776358
0
0
0
0
0
0
0
0
38
0.121406
15716dcdfb7770f4233ff53085e3d94e6459e8ac
94
py
Python
simple_orm/table/__init__.py
Dakhnovskiy/simple_orm
c5d89259589b779c905bb2161a59cc7e0888a8cf
[ "Apache-2.0" ]
null
null
null
simple_orm/table/__init__.py
Dakhnovskiy/simple_orm
c5d89259589b779c905bb2161a59cc7e0888a8cf
[ "Apache-2.0" ]
null
null
null
simple_orm/table/__init__.py
Dakhnovskiy/simple_orm
c5d89259589b779c905bb2161a59cc7e0888a8cf
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'Dmitriy.Dakhnovskiy' from .base_table import BaseTable
18.8
34
0.712766
0
0
0
0
0
0
0
0
44
0.468085
157224a749b4260b67c28ec33f01c0b9086b5863
393
py
Python
snuggle/data/types/score.py
halfak/snuggle
384818aaf8a783013b076ada3c74226f10e5dc18
[ "MIT" ]
2
2021-04-26T20:34:25.000Z
2021-11-12T11:26:57.000Z
snuggle/data/types/score.py
halfak/snuggle
384818aaf8a783013b076ada3c74226f10e5dc18
[ "MIT" ]
null
null
null
snuggle/data/types/score.py
halfak/snuggle
384818aaf8a783013b076ada3c74226f10e5dc18
[ "MIT" ]
null
null
null
from . import serializable from .user import User class Score(serializable.Type): def __init__(self, id, user, score=None, attempts=0): self.id = int(id) self.user = User.deserialize(user) self.score = float(score) if score != None else None self.attempts = int(attempts) def add_attempt(self, inc=1): s...
23.117647
54
0.699746
341
0.867684
0
0
0
0
0
0
0
0
15722e6bff2b531a59d977733b7dcfbad85e094b
870
py
Python
iot_device_simulator/timeutil.py
paurosello/community
f2098279e908ef91a768c103841b4ecf13f6546e
[ "Apache-2.0" ]
2
2019-12-08T08:32:23.000Z
2019-12-12T11:37:24.000Z
iot_device_simulator/timeutil.py
marhak/odfe-community
c1f2802205eb11c0fdbbbef909b0e33e90ea2ad5
[ "Apache-2.0" ]
null
null
null
iot_device_simulator/timeutil.py
marhak/odfe-community
c1f2802205eb11c0fdbbbef909b0e33e90ea2ad5
[ "Apache-2.0" ]
null
null
null
''' Copyright 2019, Amazon Web Services Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
30
72
0.766667
0
0
0
0
0
0
0
0
709
0.814943
15770097bf230a6328771ee66ddf68f1a6f8f5d3
1,446
py
Python
pages/views.py
benoitc/dj-pages
d049cb196e7b9f7a6dffa987e82d75cf86565621
[ "MIT" ]
1
2020-01-21T11:12:12.000Z
2020-01-21T11:12:12.000Z
pages/views.py
benoitc/dj-pages
d049cb196e7b9f7a6dffa987e82d75cf86565621
[ "MIT" ]
null
null
null
pages/views.py
benoitc/dj-pages
d049cb196e7b9f7a6dffa987e82d75cf86565621
[ "MIT" ]
null
null
null
# -*- coding: utf-8 - # # This file is part of dj-pages released under the MIT license. # See the NOTICE for more information. from django.conf import settings from django.contrib.auth.models import Group from django.http import Http404, HttpResponse, HttpResponseServerError from django.shortcuts import render_to_res...
27.807692
70
0.675657
0
0
0
0
0
0
0
0
204
0.141079
1577ce3ebf29865269a0cbf508c8f0ae892e5915
2,545
py
Python
src/yass/visual/soft_assignment.py
jaib1/yass
9899c7d63c522a26b160ac7a223c794dfd3e23c6
[ "Apache-2.0" ]
59
2017-10-29T02:21:17.000Z
2022-03-23T01:12:27.000Z
src/yass/visual/soft_assignment.py
jaib1/yass
9899c7d63c522a26b160ac7a223c794dfd3e23c6
[ "Apache-2.0" ]
257
2017-10-25T17:11:36.000Z
2021-10-21T19:12:00.000Z
src/yass/visual/soft_assignment.py
jaib1/yass
9899c7d63c522a26b160ac7a223c794dfd3e23c6
[ "Apache-2.0" ]
24
2017-10-28T19:59:44.000Z
2021-07-14T09:56:45.000Z
"""Providing a class for dealing with soft assignments of spikes at the end.""" import copy as copy import numpy as np from tqdm import tqdm from yass.template import WaveForms from yass.merge.merge import template_dist_linear_align, template_spike_dist_linear_align def get_soft_assignments(templates, templates_ups...
34.863014
89
0.663261
0
0
0
0
0
0
0
0
599
0.235363
1577cf0ad58074e0901998c62043957a5ad89b97
3,473
py
Python
wikiWebCrawler/dumpWikiExtraction.py
chrhenning/image_text_relation
8d09483b48babe9bf90ca15a8cd67e389a0bd00c
[ "Apache-2.0" ]
null
null
null
wikiWebCrawler/dumpWikiExtraction.py
chrhenning/image_text_relation
8d09483b48babe9bf90ca15a8cd67e389a0bd00c
[ "Apache-2.0" ]
null
null
null
wikiWebCrawler/dumpWikiExtraction.py
chrhenning/image_text_relation
8d09483b48babe9bf90ca15a8cd67e389a0bd00c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Tool that dumps all the information we need from the WikiExtraction parser [1] to create our own dataset into a file, such that it is later easily accessible # [1]: https://github.com/attardi/wikiextractor # Important: not efficient code, but it only has to run once on simple wiki, which is sm...
30.734513
159
0.701699
0
0
0
0
0
0
0
0
1,214
0.349554
1578c4686ca3835c9e673bb51e7120e98cb9af4a
1,127
py
Python
mkdat.py
pachenya/MeiroPy
c11f4e1a35a1d31127fb9cb0109faae6c88dcb21
[ "MIT" ]
null
null
null
mkdat.py
pachenya/MeiroPy
c11f4e1a35a1d31127fb9cb0109faae6c88dcb21
[ "MIT" ]
null
null
null
mkdat.py
pachenya/MeiroPy
c11f4e1a35a1d31127fb9cb0109faae6c88dcb21
[ "MIT" ]
null
null
null
# mkdat.py # # To make the list of monsters data. # import string class enuming: def __init__(self, n, namekey, ch='?'): self.n = int(n) self.namekey = str(namekey) self.ch = ch = str(ch) def DEBUGP(self): print(self.n, self.namekey, self.ch) class enuml: def __init__(self, filename, debugmode=F...
18.47541
51
0.507542
921
0.817214
0
0
0
0
0
0
114
0.101154
157999b938d6e8b24890fadfe31e7fc658590d35
1,489
py
Python
nzbhydra/tests/db_prepare.py
Sparklingx/nzbhydra
e2433e1155255ba37341cc79750b104e7dd8889a
[ "Apache-2.0" ]
674
2015-11-06T04:22:47.000Z
2022-02-26T17:31:43.000Z
nzbhydra/tests/db_prepare.py
Sparklingx/nzbhydra
e2433e1155255ba37341cc79750b104e7dd8889a
[ "Apache-2.0" ]
713
2015-11-06T10:48:58.000Z
2018-11-27T16:32:18.000Z
nzbhydra/tests/db_prepare.py
Sparklingx/nzbhydra
e2433e1155255ba37341cc79750b104e7dd8889a
[ "Apache-2.0" ]
106
2015-12-07T11:21:06.000Z
2022-03-11T10:58:41.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import inspect import os import shutil import peewee from builtins import * from playhouse.sqlite_ext import SqliteExtDatabase from playhouse.sqliteq import SqliteQueueD...
31.680851
152
0.727334
0
0
0
0
121
0.081263
0
0
612
0.411014
1579cab3ef9ed7a4d7bf29ebae9393c84448a852
105
py
Python
zhangliqiang/20180402/h4.py
python20180319howmework/homework
c826d7aa4c52f8d22f739feb134d20f0b2c217cd
[ "Apache-2.0" ]
null
null
null
zhangliqiang/20180402/h4.py
python20180319howmework/homework
c826d7aa4c52f8d22f739feb134d20f0b2c217cd
[ "Apache-2.0" ]
null
null
null
zhangliqiang/20180402/h4.py
python20180319howmework/homework
c826d7aa4c52f8d22f739feb134d20f0b2c217cd
[ "Apache-2.0" ]
null
null
null
#4. 利用reduce实现列表中元素求积 from functools import reduce r = reduce(lambda x, y : x * y, (1,3,5)) print(r)
11.666667
40
0.657143
0
0
0
0
0
0
0
0
43
0.338583
157a79f284da8d9cc66390e1b5b8a99dc5554bc6
391
py
Python
garden_api/migrations/0004_auto_20190206_1731.py
401-pi-rates/raspberry-garden
4e0e55e66d73b19c0c0fc8c03f8f34a090ed322d
[ "MIT" ]
1
2019-02-27T01:56:16.000Z
2019-02-27T01:56:16.000Z
garden_api/migrations/0004_auto_20190206_1731.py
joyliao07/raspberry-garden
4e0e55e66d73b19c0c0fc8c03f8f34a090ed322d
[ "MIT" ]
19
2019-02-02T00:53:48.000Z
2021-09-08T00:58:30.000Z
garden_api/migrations/0004_auto_20190206_1731.py
joyliao07/raspberry-garden
4e0e55e66d73b19c0c0fc8c03f8f34a090ed322d
[ "MIT" ]
2
2019-02-27T01:55:53.000Z
2019-03-25T06:49:23.000Z
# Generated by Django 2.1.5 on 2019-02-07 01:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('garden_api', '0003_auto_20190206_1440'), ] operations = [ migrations.AlterField( model_name='soilmoisture', name='ha...
20.578947
50
0.606138
298
0.762148
0
0
0
0
0
0
112
0.286445
157b0ae1f08d4650c9cffb2abc6ff2bb8e194a0e
888
py
Python
webapp/request.py
eude313/goal
8ebc6c3fa3011d11ee106536e0b9d315b1f5cc2b
[ "MIT" ]
null
null
null
webapp/request.py
eude313/goal
8ebc6c3fa3011d11ee106536e0b9d315b1f5cc2b
[ "MIT" ]
null
null
null
webapp/request.py
eude313/goal
8ebc6c3fa3011d11ee106536e0b9d315b1f5cc2b
[ "MIT" ]
null
null
null
import urllib.request,json from .models import Quote # Getting the news base url quote_api = None def configure_request(app): global quote_api quote_api = app.config["QUOTES_API"] def get_quotes(): ''' Function that gets the random quotes ''' get_article_details_url = 'http://quo...
25.371429
89
0.662162
0
0
0
0
0
0
0
0
171
0.192568
157b334c31453897c1c551b1f1fa0ea95b15795f
20,732
py
Python
archive/nexus-api-v2/API/Git/Lab/Schemas/Repository.py
cloud-hybrid/delta
402b00ed5aaa32ccef628361e9635879b7ace44f
[ "BSD-3-Clause" ]
null
null
null
archive/nexus-api-v2/API/Git/Lab/Schemas/Repository.py
cloud-hybrid/delta
402b00ed5aaa32ccef628361e9635879b7ace44f
[ "BSD-3-Clause" ]
null
null
null
archive/nexus-api-v2/API/Git/Lab/Schemas/Repository.py
cloud-hybrid/delta
402b00ed5aaa32ccef628361e9635879b7ace44f
[ "BSD-3-Clause" ]
1
2022-01-03T05:33:15.000Z
2022-01-03T05:33:15.000Z
from . import * from . import Base as Scheme __module__ = __name__ Schema = Scheme.Model class Base(Schema): """ ... """ class Config(Schema.Configuration): title = "Gitlab" + "-" + "{0}".format(__module__.split(".").pop()) class Query(Base): """ API Search-Query Schema """ archive...
29.532764
234
0.625265
20,619
0.994549
0
0
0
0
0
0
7,208
0.347675
157dc1ed4781a29f5affc988be663111c64005ab
509
py
Python
exercise25/exercise.py
check69/advent_code_2020
cae1a04babb7d0c7b8de76b2836476b406390047
[ "MIT" ]
null
null
null
exercise25/exercise.py
check69/advent_code_2020
cae1a04babb7d0c7b8de76b2836476b406390047
[ "MIT" ]
null
null
null
exercise25/exercise.py
check69/advent_code_2020
cae1a04babb7d0c7b8de76b2836476b406390047
[ "MIT" ]
null
null
null
from typing import List FileData = List[str] def read_file(filename: str) -> FileData: with open(filename, "r") as file: return file.readlines() def first_exercise(data: FileData) -> int: return 0 def second_exercise(data: FileData) -> int: return 0 def main(): data = read_file("data")...
18.178571
74
0.666012
0
0
0
0
0
0
0
0
98
0.192534