hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
8288b2e7573b94e2b8720c7f8340a53dcf4d450a
1,004
py
Python
api/wait_for_mysql.py
sieira/pycont
6d1abbf16d22677391bd87ab52a68287fb140d59
[ "BSD-3-Clause" ]
null
null
null
api/wait_for_mysql.py
sieira/pycont
6d1abbf16d22677391bd87ab52a68287fb140d59
[ "BSD-3-Clause" ]
35
2019-11-30T12:03:33.000Z
2021-09-17T08:44:37.000Z
api/wait_for_mysql.py
sieira/pycont
6d1abbf16d22677391bd87ab52a68287fb140d59
[ "BSD-3-Clause" ]
null
null
null
#!/usr/local/bin/python import time import MySQLdb from pycont.settings import DATABASES TIMEOUT_SECONDS = 30 start = time.time() host = DATABASES['default']['HOST'] user = DATABASES['default']['USER'] password = DATABASES['default']['PASSWORD'] port = int(DATABASES['default']['PORT']) db = f'test_{DATABASES["defa...
23.904762
80
0.592629
af1532c5ddec3a20becddb43e782dd1855911c98
219
py
Python
GPSInfo/gpsinfo/__init__.py
jgraber/Python_Scripts
ffdbf17d28521cf5c2a3f7aadfb817e7811f86b7
[ "MIT" ]
null
null
null
GPSInfo/gpsinfo/__init__.py
jgraber/Python_Scripts
ffdbf17d28521cf5c2a3f7aadfb817e7811f86b7
[ "MIT" ]
3
2021-07-01T19:36:30.000Z
2021-08-30T19:59:00.000Z
GPSInfo/gpsinfo/__init__.py
jgraber/Python_Scripts
ffdbf17d28521cf5c2a3f7aadfb817e7811f86b7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Shows GPS metadata in JPEG files .. currentmodule:: gpsinfo .. moduleauthor:: Johnny Graber <JG@JGraber.ch> """ from .version import __version__, __release__ # noqa
18.25
53
0.684932
a9ab3fb34e744494bb3911675531637f1497a10a
2,046
py
Python
conf/dbConf.py
Valuebai/awesome-python-io
8bb3400036843975cb41cbfd85ccfe603596930b
[ "MIT" ]
8
2019-05-01T05:22:44.000Z
2022-03-02T10:04:48.000Z
conf/dbConf.py
Valuebai/awesome-python-io
8bb3400036843975cb41cbfd85ccfe603596930b
[ "MIT" ]
26
2019-03-23T05:10:04.000Z
2022-03-04T09:57:32.000Z
conf/dbConf.py
Valuebai/awesome-python-io
8bb3400036843975cb41cbfd85ccfe603596930b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- '''================================================= @IDE :PyCharm @Author :LuckyHuibo @Date :2019/9/3 10:44 @Desc :封装获取数据库,方便使用 @使用: # 代码上面添加 from conf.dbConf import db_user db.db_name ==================================================''' import yaml from conf.l...
22.483516
63
0.608016
2299cac4f6045243c2c1826391629cbc79c8873a
180
py
Python
statgetter/urls.py
dragonfi/git-repo-stats
8a662dfdd14c6e0b1a58f5908eadf47ecfbb1c9c
[ "MIT" ]
null
null
null
statgetter/urls.py
dragonfi/git-repo-stats
8a662dfdd14c6e0b1a58f5908eadf47ecfbb1c9c
[ "MIT" ]
null
null
null
statgetter/urls.py
dragonfi/git-repo-stats
8a662dfdd14c6e0b1a58f5908eadf47ecfbb1c9c
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url(r'^stats/(?P<repo_url>.*)', views.stats, name='stats'), url(r'^$', views.index, name='index'), ]
20
63
0.627778
b542078a0632d81ab803d71d78497afd10c48d4e
2,212
py
Python
astroquery/alfalfa/tests/test_alfalfa.py
eteq/astroquery
70db53f8f047a2ee3481fd3242e6b364bc1ca639
[ "BSD-3-Clause" ]
1
2021-03-20T00:07:01.000Z
2021-03-20T00:07:01.000Z
astroquery/alfalfa/tests/test_alfalfa.py
eteq/astroquery
70db53f8f047a2ee3481fd3242e6b364bc1ca639
[ "BSD-3-Clause" ]
null
null
null
astroquery/alfalfa/tests/test_alfalfa.py
eteq/astroquery
70db53f8f047a2ee3481fd3242e6b364bc1ca639
[ "BSD-3-Clause" ]
1
2021-03-20T00:07:05.000Z
2021-03-20T00:07:05.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst from contextlib import contextmanager import os import requests from astropy import coordinates from astropy.tests.helper import pytest from ...utils import commons from ...utils.testing_tools import MockResponse from ... import alfalfa DATA_FILES = {'cat...
29.105263
80
0.731465
2db1944a2456c3da59cfd5304ee55305a67ec93d
856
py
Python
tests/test_boolean_operations.py
latera/hyaml
4dc020434d25c182f8477ddd5582398e51501274
[ "Apache-2.0" ]
3
2020-04-12T15:55:11.000Z
2021-08-02T16:26:21.000Z
tests/test_boolean_operations.py
latera/hyaml
4dc020434d25c182f8477ddd5582398e51501274
[ "Apache-2.0" ]
null
null
null
tests/test_boolean_operations.py
latera/hyaml
4dc020434d25c182f8477ddd5582398e51501274
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from unittest import main from tests import TranslationCase as TestCase class TestBooleanOperations(TestCase): def test_conjuction(self): self.assertTranslated("true and false", "True and False") def test_disjunction(self): self.assertTranslated("true or false", "True o...
27.612903
74
0.630841
0713d2f38806d52533d9a6261d83edf814e19d88
8,090
py
Python
tests/test_ftry.py
bryanwb/smonad
ada67fe29b4d5cfa5c7d6b8b7fe6ebe6811fac6b
[ "BSD-3-Clause" ]
null
null
null
tests/test_ftry.py
bryanwb/smonad
ada67fe29b4d5cfa5c7d6b8b7fe6ebe6811fac6b
[ "BSD-3-Clause" ]
null
null
null
tests/test_ftry.py
bryanwb/smonad
ada67fe29b4d5cfa5c7d6b8b7fe6ebe6811fac6b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2012-2014, Philip Xu <pyx@xrefactor.com> # License: BSD New, see LICENSE for details. import pytest from smonad.actions import ftry from smonad.decorators import failsafe from smonad.exceptions import ExtractError from smonad.types import Try, Failure, Success test_range = ran...
23.864307
67
0.598517
70d0cd34f3341c11ec868aefc8033929bb2428ea
1,690
py
Python
pcdet/datasets/nuscenes/test.py
charlesyz/PCDet
1eb6b1dc5a3d563d7532b1c8ee3be007cbeafc80
[ "Apache-2.0" ]
null
null
null
pcdet/datasets/nuscenes/test.py
charlesyz/PCDet
1eb6b1dc5a3d563d7532b1c8ee3be007cbeafc80
[ "Apache-2.0" ]
null
null
null
pcdet/datasets/nuscenes/test.py
charlesyz/PCDet
1eb6b1dc5a3d563d7532b1c8ee3be007cbeafc80
[ "Apache-2.0" ]
null
null
null
import os import yaml from pcdet.datasets.nuscenes import nuscenes_calibration import numpy as np calib = cadc_calibration.Calibration('/home/cyz/cadc_tracker/PCDet/data/cadcd/2018_03_06/calib') print(calib.lidar_to_rect(np.array([[-17.99813181674196, 32.52045143245261, -0.9221325934825185], ...
73.478261
101
0.595266
b55834051108e3be652ff6930d1804f16bdd9c33
813
py
Python
src/webserver/backend/app/app/backend_pre_start.py
badarsebard/OpenSOAR
f0169261ef6d1ce4528236708e53d82de894ec56
[ "Apache-2.0" ]
1
2022-01-12T02:00:22.000Z
2022-01-12T02:00:22.000Z
src/webserver/backend/app/app/backend_pre_start.py
badarsebard/OpenSOAR
f0169261ef6d1ce4528236708e53d82de894ec56
[ "Apache-2.0" ]
null
null
null
src/webserver/backend/app/app/backend_pre_start.py
badarsebard/OpenSOAR
f0169261ef6d1ce4528236708e53d82de894ec56
[ "Apache-2.0" ]
1
2022-01-19T20:56:14.000Z
2022-01-19T20:56:14.000Z
import logging from tenacity import after_log, before_log, retry, stop_after_attempt, wait_fixed from app.database import SessionLocal logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) max_tries = 60 * 5 # 5 minutes wait_seconds = 1 @retry( stop=stop_after_attempt(max_tries), w...
21.394737
81
0.686347
5f851c993a303cbf5eb915fbc608e2db6f98c374
6,666
py
Python
grapheme/api.py
rlaneyjr/grapheme
4e7816c4ec41cd3032b6b9faa44addedf3071b30
[ "MIT" ]
78
2017-08-06T23:44:55.000Z
2022-03-19T01:20:25.000Z
grapheme/api.py
rlaneyjr/grapheme
4e7816c4ec41cd3032b6b9faa44addedf3071b30
[ "MIT" ]
17
2017-07-24T08:39:45.000Z
2022-03-19T01:13:54.000Z
grapheme/api.py
rlaneyjr/grapheme
4e7816c4ec41cd3032b6b9faa44addedf3071b30
[ "MIT" ]
8
2017-08-06T12:31:55.000Z
2022-03-17T22:32:44.000Z
# -*- coding: utf-8 -*- from grapheme.finder import GraphemeIterator, get_last_certain_break_index UNICODE_VERSION = "13.0.0" def graphemes(string): """ Returns an iterator of all graphemes of given string. >>> rainbow_flag = "🏳️‍🌈" >>> [codepoint for codepoint in rainbow_flag] ['🏳', '️', '\...
31.742857
142
0.640564
06982205f4581e67a9e3374984a2ec68d015a05e
26,293
py
Python
py/selenium/webdriver/remote/webelement.py
Sindhura8/selenium
2d47c4283de2900abc598f608d273bcb04f4c8c1
[ "Apache-2.0" ]
1
2021-01-06T07:16:19.000Z
2021-01-06T07:16:19.000Z
py/selenium/webdriver/remote/webelement.py
Sindhura8/selenium
2d47c4283de2900abc598f608d273bcb04f4c8c1
[ "Apache-2.0" ]
null
null
null
py/selenium/webdriver/remote/webelement.py
Sindhura8/selenium
2d47c4283de2900abc598f608d273bcb04f4c8c1
[ "Apache-2.0" ]
2
2020-09-14T07:53:33.000Z
2020-09-15T06:42:18.000Z
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
33.451654
107
0.604534
12e71de0961a847145dbc4fb2127edc8b86d8b7d
3,437
py
Python
controllers/customer_book_controller.py
allen-garvey/gae-library
e66210f2345c92c09e46b9d402a9e1c26bb46539
[ "MIT" ]
null
null
null
controllers/customer_book_controller.py
allen-garvey/gae-library
e66210f2345c92c09e46b9d402a9e1c26bb46539
[ "MIT" ]
null
null
null
controllers/customer_book_controller.py
allen-garvey/gae-library
e66210f2345c92c09e46b9d402a9e1c26bb46539
[ "MIT" ]
null
null
null
from google.appengine.ext import ndb import webapp2 import json from controllers.base_controller import BaseController from models.book import Book from models.customer import Customer # functionality getting all of a customer's checked out books # adding a book to a customer (checking it out) and removing a book # fr...
38.188889
82
0.598487
bd44f58317f4a14c9585d9d918f1d45c1a91f470
4,332
py
Python
edith/app/admin/forms.py
BAM-PFA/edith
a9bca397a7878e76fd6ac148aa122f410751b32c
[ "BSD-2-Clause" ]
8
2018-10-18T19:14:55.000Z
2020-07-29T08:10:46.000Z
edith/app/admin/forms.py
BAM-PFA/edith
a9bca397a7878e76fd6ac148aa122f410751b32c
[ "BSD-2-Clause" ]
27
2018-10-06T22:50:06.000Z
2019-07-08T20:12:27.000Z
edith/app/admin/forms.py
BAM-PFA/resourcespace
40aeb1f40f9283d2e452e75cb98d41ea951d33a6
[ "BSD-2-Clause" ]
1
2018-11-16T18:52:41.000Z
2018-11-16T18:52:41.000Z
from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, PasswordField, BooleanField, ValidationError from wtforms.validators import DataRequired, Email, EqualTo from wtforms.ext.sqlalchemy.fields import QuerySelectField from ..models import Department, User, Data_Source, Metadata_Field class De...
40.485981
92
0.758079
2a1867ca7c93eb14c3b376ba9f3c58e35486439a
2,255
py
Python
miners/ethminer.py
thokaka92/EthMonitoringLinux
dd94eb17bef8e7e702e567a580e1f73d1388d559
[ "MIT" ]
28
2017-07-25T05:55:01.000Z
2021-09-11T01:47:06.000Z
miners/ethminer.py
thokaka92/EthMonitoringLinux
dd94eb17bef8e7e702e567a580e1f73d1388d559
[ "MIT" ]
7
2018-01-15T11:21:02.000Z
2019-01-31T04:46:10.000Z
miners/ethminer.py
thokaka92/EthMonitoringLinux
dd94eb17bef8e7e702e567a580e1f73d1388d559
[ "MIT" ]
14
2017-10-22T14:59:29.000Z
2019-06-18T20:36:08.000Z
#!/usr/bin/python import json import socket import sys from stats import Stats from pprint import pprint class Ethminer(object): def __init__(self, host, port): self.host = host self.port = port self.connected = 0 def getData(self): try: # Create a TCP/IP socket ...
28.1875
86
0.54235
06c0dc91a94ae0d8e6dd1f871d2f5d95fe390802
660
py
Python
partI_basics/Chapter11_testing_your_code/11.1/test_name_fucntion.py
hao-beixi/PythonCrashCourse
194736bac3c22976d7e3fbdc8ea1f13fd30e9879
[ "MIT" ]
null
null
null
partI_basics/Chapter11_testing_your_code/11.1/test_name_fucntion.py
hao-beixi/PythonCrashCourse
194736bac3c22976d7e3fbdc8ea1f13fd30e9879
[ "MIT" ]
null
null
null
partI_basics/Chapter11_testing_your_code/11.1/test_name_fucntion.py
hao-beixi/PythonCrashCourse
194736bac3c22976d7e3fbdc8ea1f13fd30e9879
[ "MIT" ]
null
null
null
import unittest from name_function import get_formatted_name class NamesTestCase(unittest.TestCase): """Tests for 'name_function.py'""" def test_first_last_name(self): """Do names like 'Janis Joplin' work?""" formatted_name = get_formatted_name('janis', 'joplin') self.assertEq...
36.666667
77
0.683333
b11d74836b68e6ba4cb443e77b4ee3fa7d9c9632
130,594
py
Python
pandas/io/stata.py
tehunter/pandas
c57f883e24405fb4ee561ded1612acf4f4f2bdef
[ "BSD-3-Clause" ]
1
2022-01-07T12:43:15.000Z
2022-01-07T12:43:15.000Z
pandas/io/stata.py
oetochi/pandas
fa3dfdb41f0a75c937e85059a5983da5e5d5aac6
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/io/stata.py
oetochi/pandas
fa3dfdb41f0a75c937e85059a5983da5e5d5aac6
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
""" Module contains tools for processing Stata files into DataFrames The StataReader below was originally written by Joe Presbrey as part of PyDTA. It has been extended and improved by Skipper Seabold from the Statsmodels project who also developed the StataWriter and was finally added to pandas in a once again improv...
35.759584
88
0.578112
e1e9da9d25c5563a41a62520c842c6f5153f6558
1,138
py
Python
Spell Compendium/scr/Spell1077 - Cloud of Bewilderment.py
Sagenlicht/ToEE_Mods
a4b07f300df6067f834e09fcbc4c788f1f4e417b
[ "MIT" ]
1
2021-04-26T08:03:56.000Z
2021-04-26T08:03:56.000Z
Spell Compendium/scr/Spell1077 - Cloud of Bewilderment.py
Sagenlicht/ToEE_Mods
a4b07f300df6067f834e09fcbc4c788f1f4e417b
[ "MIT" ]
2
2021-06-11T05:55:01.000Z
2021-08-03T23:41:02.000Z
Spell Compendium/scr/Spell1077 - Cloud of Bewilderment.py
Sagenlicht/ToEE_Mods
a4b07f300df6067f834e09fcbc4c788f1f4e417b
[ "MIT" ]
1
2021-05-17T15:37:58.000Z
2021-05-17T15:37:58.000Z
from toee import * def OnBeginSpellCast(spell): print "Cloud of Bewilderment OnBeginSpellCast" print "spell.target_list=", spell.target_list print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level def OnSpellEffect(spell): print "Cloud of Bewilderment OnSpellEffect" targets...
35.5625
117
0.769772
b7ed01940d1f73518fb1c9b324a8d177525333cb
5,080
py
Python
statarb/src/python/lib/data_handlers/yearn.py
mikimaus78/ml_monorepo
b2c2627ff0e86e27f6829170d0dac168d8e5783b
[ "BSD-3-Clause" ]
51
2019-02-01T19:43:37.000Z
2022-03-16T09:07:03.000Z
statarb/src/python/lib/data_handlers/yearn.py
mikimaus78/ml_monorepo
b2c2627ff0e86e27f6829170d0dac168d8e5783b
[ "BSD-3-Clause" ]
2
2019-02-23T18:54:22.000Z
2019-11-09T01:30:32.000Z
statarb/src/python/lib/data_handlers/yearn.py
mikimaus78/ml_monorepo
b2c2627ff0e86e27f6829170d0dac168d8e5783b
[ "BSD-3-Clause" ]
35
2019-02-08T02:00:31.000Z
2022-03-01T23:17:00.000Z
import datetime import os import os.path import util import config import datafiles import newdb import newdb.xrefsolve database = newdb.get_db() SOURCE = "yahoo" def _parseFile(filepath): #this should only happen when we process the first file ever if filepath is None: return {},None,None,None ...
36.028369
123
0.651378
dcba72a3a010c5052b8857a507d8ae1258bb7d77
3,090
py
Python
nova/api/openstack/compute/plugins/v3/multinic.py
bopopescu/nova-master
58809056f3a219c6ea3667003f906eeaf581fa95
[ "Apache-2.0" ]
7
2017-06-19T19:37:00.000Z
2019-06-16T02:06:14.000Z
nova/api/openstack/compute/plugins/v3/multinic.py
bopopescu/nova-master
58809056f3a219c6ea3667003f906eeaf581fa95
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/plugins/v3/multinic.py
bopopescu/nova-master
58809056f3a219c6ea3667003f906eeaf581fa95
[ "Apache-2.0" ]
6
2015-06-20T16:07:28.000Z
2020-08-19T14:57:59.000Z
# Copyright 2011 OpenStack Foundation # 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 requ...
34.719101
79
0.694175
c3093ad40de216c9d0c67b479f4ade319671ab1e
449
py
Python
class/product.py
selimppc/python-learning
4bf906b4a8773b6605bc30c4270f6eff3cca7fe7
[ "MIT" ]
null
null
null
class/product.py
selimppc/python-learning
4bf906b4a8773b6605bc30c4270f6eff3cca7fe7
[ "MIT" ]
null
null
null
class/product.py
selimppc/python-learning
4bf906b4a8773b6605bc30c4270f6eff3cca7fe7
[ "MIT" ]
null
null
null
class Product: def __init__(self, price): # behave as regular property price self.price = price # adding property decorator to call price. @property def price(self): return self.__price # price setter @price.setter def price(self, value): if value < 0: ...
20.409091
58
0.616927
fcccc58e663977de19f2456fc7b76c2253b2b6d4
1,891
py
Python
python/ntp_code/scapy_wrapper.py
ntpdrop/ieeesp2021
084ac380774351cb032e9c1f48c5c6f7b58372fa
[ "MIT" ]
null
null
null
python/ntp_code/scapy_wrapper.py
ntpdrop/ieeesp2021
084ac380774351cb032e9c1f48c5c6f7b58372fa
[ "MIT" ]
null
null
null
python/ntp_code/scapy_wrapper.py
ntpdrop/ieeesp2021
084ac380774351cb032e9c1f48c5c6f7b58372fa
[ "MIT" ]
null
null
null
from scapy.layers.inet import IP, UDP from scapy.layers.ntp import NTP from scapy.packet import Packet from scapy.sendrecv import sniff, send, sr1 class ScapyWrapper: """ A wrapper class for scapy functionality. """ def next_ntp_packet(self, sniff_interface) -> Packet: """ Sniffs for ...
35.679245
117
0.619778
515b5ee66d18565f1e177d8dae67fc4605459961
6,188
py
Python
plugins/modules/oci_waas_captchas_facts.py
A7rMtWE57x/oci-ansible-collection
80548243a085cd53fd5dddaa8135b5cb43612c66
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_waas_captchas_facts.py
A7rMtWE57x/oci-ansible-collection
80548243a085cd53fd5dddaa8135b5cb43612c66
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_waas_captchas_facts.py
A7rMtWE57x/oci-ansible-collection
80548243a085cd53fd5dddaa8135b5cb43612c66
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2017, 2020 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
33.448649
160
0.666613
acd731ca79dcf6e3169b9f8777339343d8b265a7
813
py
Python
movies/movies/urls.py
Mpreyzner/django-movies
b578285ee7717c39383f6a07b5b0b46a4d66c617
[ "MIT" ]
null
null
null
movies/movies/urls.py
Mpreyzner/django-movies
b578285ee7717c39383f6a07b5b0b46a4d66c617
[ "MIT" ]
null
null
null
movies/movies/urls.py
Mpreyzner/django-movies
b578285ee7717c39383f6a07b5b0b46a4d66c617
[ "MIT" ]
null
null
null
"""movies URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
35.347826
77
0.698647
ac0f8f3fee6a526e1c440612498bff13e374dbb7
10,261
py
Python
tests/handling/daemons/test_daemon_termination.py
bradfair/kopf
06d00944be947bf63a56b10fd4fdc3269d48feb5
[ "MIT" ]
855
2020-08-19T09:40:38.000Z
2022-03-31T19:13:29.000Z
tests/handling/daemons/test_daemon_termination.py
bradfair/kopf
06d00944be947bf63a56b10fd4fdc3269d48feb5
[ "MIT" ]
715
2019-12-23T14:17:35.000Z
2022-03-30T20:54:45.000Z
tests/handling/daemons/test_daemon_termination.py
bradfair/kopf
06d00944be947bf63a56b10fd4fdc3269d48feb5
[ "MIT" ]
97
2019-04-25T09:32:54.000Z
2022-03-30T10:15:30.000Z
import asyncio import contextlib import logging import pytest import kopf async def test_daemon_exits_gracefully_and_instantly_on_resource_deletion( settings, resource, dummy, simulate_cycle, caplog, assert_logs, k8s_mocked, frozen_time, mocker, timer): caplog.set_level(logging.DEBUG) # A d...
39.92607
99
0.704025
478e2b82f6b7001f0bbc41ed94838719a3d91096
3,218
py
Python
sandbox/apps/python/stencil/jacobi2D/app_tuner.py
rcodin/polymage
653487be125dec4950d1c65da4f736fa05fb938f
[ "Apache-2.0" ]
10
2016-07-22T06:53:11.000Z
2021-02-19T06:22:00.000Z
sandbox/apps/python/stencil/jacobi2D/app_tuner.py
rcodin/polymage
653487be125dec4950d1c65da4f736fa05fb938f
[ "Apache-2.0" ]
null
null
null
sandbox/apps/python/stencil/jacobi2D/app_tuner.py
rcodin/polymage
653487be125dec4950d1c65da4f736fa05fb938f
[ "Apache-2.0" ]
2
2017-11-21T20:29:36.000Z
2021-05-21T01:52:05.000Z
from __init__ import * import sys sys.path.insert(0, ROOT+"/apps/python/") from cpp_compiler import * from polymage_jacobi import stencil_jacobi from exec_pipe import custom_exec_jacobi from constructs import * from compiler import * import tuner def auto_tune(app_data): pipe_data = app_data['pipe_data'] ap...
32.505051
76
0.610938
9b43144bf2bfddba615215c1bc3dba435056647f
914
py
Python
kernel/blog/migrations/0008_auto_20180605_2110.py
sageteam/behpack
3b8afb81dc7da70807308af4c8a2d2ab92b1a133
[ "MIT" ]
null
null
null
kernel/blog/migrations/0008_auto_20180605_2110.py
sageteam/behpack
3b8afb81dc7da70807308af4c8a2d2ab92b1a133
[ "MIT" ]
null
null
null
kernel/blog/migrations/0008_auto_20180605_2110.py
sageteam/behpack
3b8afb81dc7da70807308af4c8a2d2ab92b1a133
[ "MIT" ]
null
null
null
# Generated by Django 2.0.6 on 2018-06-05 21:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0007_auto_20180605_2105'), ] operations = [ migrations.AlterField( model_name='news', name='sku', ...
31.517241
126
0.615974
f2f97eff60a83c945a682155d09d706b652b68a5
734
py
Python
hummingbot/strategy/__utils__/trailing_indicators/historical_volatility.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
3,027
2019-04-04T18:52:17.000Z
2022-03-30T09:38:34.000Z
hummingbot/strategy/__utils__/trailing_indicators/historical_volatility.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
4,080
2019-04-04T19:51:11.000Z
2022-03-31T23:45:21.000Z
hummingbot/strategy/__utils__/trailing_indicators/historical_volatility.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
1,342
2019-04-04T20:50:53.000Z
2022-03-31T15:22:36.000Z
from .base_trailing_indicator import BaseTrailingIndicator import numpy as np class HistoricalVolatilityIndicator(BaseTrailingIndicator): def __init__(self, sampling_length: int = 30, processing_length: int = 15): super().__init__(sampling_length, processing_length) def _indicator_calculation(self) -...
38.631579
79
0.717984
5d57940dc33e5253f9b78389558de900624c042a
1,860
py
Python
pytorch-frontend/caffe2/python/operator_test/trigonometric_op_test.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
40
2021-06-01T07:37:59.000Z
2022-03-25T01:42:09.000Z
pytorch-frontend/caffe2/python/operator_test/trigonometric_op_test.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
14
2021-06-01T11:52:46.000Z
2022-03-25T02:13:08.000Z
pytorch-frontend/caffe2/python/operator_test/trigonometric_op_test.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
7
2021-07-20T19:34:26.000Z
2022-03-13T21:07:36.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core from hypothesis import given, settings import caffe2.python.hypothesis_test_util as hu import caffe2.python.serialized_test.serialized_test...
35.09434
84
0.676882
98b8653e5ebf2e409799bcf8d7310e8127c4a76e
2,668
py
Python
tutorial-contents/302_classification.py
violaciao/PyTorch-Tutorial
b2922fd3f3c8d49be3cae275375a88e844278d2a
[ "MIT" ]
null
null
null
tutorial-contents/302_classification.py
violaciao/PyTorch-Tutorial
b2922fd3f3c8d49be3cae275375a88e844278d2a
[ "MIT" ]
null
null
null
tutorial-contents/302_classification.py
violaciao/PyTorch-Tutorial
b2922fd3f3c8d49be3cae275375a88e844278d2a
[ "MIT" ]
1
2019-07-15T03:10:29.000Z
2019-07-15T03:10:29.000Z
""" View more, visit my tutorial page: https://morvanzhou.github.io/tutorials/ My Youtube Channel: https://www.youtube.com/user/MorvanZhou Dependencies: torch: 0.1.11 matplotlib """ import torch from torch.autograd import Variable import torch.nn.functional as F import matplotlib.pyplot as plt torch.manual_seed(1) ...
37.577465
104
0.636807
a7da7e2e1e20960405db827c80352a66550e0abd
3,981
py
Python
src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/sdk/devtestlabs/models/disk.py
saurabsa/azure-cli-old
f77477a98c9aa9cb55daf5b0d2f410d1455a9225
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/sdk/devtestlabs/models/disk.py
saurabsa/azure-cli-old
f77477a98c9aa9cb55daf5b0d2f410d1455a9225
[ "MIT" ]
2
2021-03-25T21:38:56.000Z
2021-11-15T17:46:45.000Z
src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/sdk/devtestlabs/models/disk.py
Visual-Studio-China/azure-cli-int
48c7c7f371a0ecc4ebfd4dcfdc72764beddf5c31
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
45.758621
288
0.632002
ea2bb504948534f70dfd8c64176136a0d48e6120
400
py
Python
50down/titleToNumber.py
NeroCube/leetcode-python-practice
c173add1bd66c385de70f19bc005a635c6584f20
[ "MIT" ]
null
null
null
50down/titleToNumber.py
NeroCube/leetcode-python-practice
c173add1bd66c385de70f19bc005a635c6584f20
[ "MIT" ]
null
null
null
50down/titleToNumber.py
NeroCube/leetcode-python-practice
c173add1bd66c385de70f19bc005a635c6584f20
[ "MIT" ]
null
null
null
''' Excel Sheet Column Number 題目: 將 Excel 中的標題轉換成十進制的數字 想法: - Excel 中 Z 代表26,AA 代表27,AB 代表28 - 所以是一個26近制變10進制的轉換(餘數定理) - ord('A') = 65 Time: O(n) Space: O(1) ''' class Solution(object): def titleToNumber(self, s): """ :type s: str :rtype: int """ result = 0 for ...
16
47
0.54
6def40abd0ce21874cd9f4c2047f01a4e10a3fb3
7,608
py
Python
core/polyaxon/utils/date_utils.py
admariner/polyaxon
ba355c38166047eb11e60de4cee4d7c3b48db323
[ "Apache-2.0" ]
3,200
2017-05-09T11:35:31.000Z
2022-03-28T05:43:22.000Z
core/polyaxon/utils/date_utils.py
admariner/polyaxon
ba355c38166047eb11e60de4cee4d7c3b48db323
[ "Apache-2.0" ]
1,324
2017-06-29T07:21:27.000Z
2022-03-27T12:41:10.000Z
core/polyaxon/utils/date_utils.py
admariner/polyaxon
ba355c38166047eb11e60de4cee4d7c3b48db323
[ "Apache-2.0" ]
341
2017-01-10T23:06:53.000Z
2022-03-10T08:15:18.000Z
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
32.512821
89
0.65234
637163b866d80d5aef1e3c2f9a2ba34caca86ba0
23
py
Python
donation_play/games/gothic_2/__init__.py
tmarenko/donation-play
548a87af48245c8fde7daf95915af606ba6c456e
[ "MIT" ]
null
null
null
donation_play/games/gothic_2/__init__.py
tmarenko/donation-play
548a87af48245c8fde7daf95915af606ba6c456e
[ "MIT" ]
null
null
null
donation_play/games/gothic_2/__init__.py
tmarenko/donation-play
548a87af48245c8fde7daf95915af606ba6c456e
[ "MIT" ]
null
null
null
from .cheater import *
11.5
22
0.73913
d95b7573a3f7d66827a6e71825f2259eacf4bcdb
10,239
py
Python
mmdnn/conversion/caffe/mapper.py
trishitapingolia/MMdnn
80f7a46774c2b76dc157030c52a86a0be7595739
[ "MIT" ]
1
2021-12-07T01:27:04.000Z
2021-12-07T01:27:04.000Z
mmdnn/conversion/caffe/mapper.py
Ontheroad123/MMdnn
80f7a46774c2b76dc157030c52a86a0be7595739
[ "MIT" ]
null
null
null
mmdnn/conversion/caffe/mapper.py
Ontheroad123/MMdnn
80f7a46774c2b76dc157030c52a86a0be7595739
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division import numpy as np from mmdnn.conversion.caffe.errors import ConversionError from mmdnn.conversion.caffe.common_graph import Node from mmdnn.conversion.caffe.network import DEFAULT_PADDING from mmdnn.conversion.caffe.utils import get_lower_case fro...
35.552083
147
0.611974
d51fbb6bdc30da844ea224f9dc34f5465ff4843f
17,224
py
Python
adafruit_lsm9ds1.py
Flodip/Adafruit_CircuitPython_LSM9DS1
e5ca448cb2009aa82eb557c7a73dc1317cf9b657
[ "MIT" ]
null
null
null
adafruit_lsm9ds1.py
Flodip/Adafruit_CircuitPython_LSM9DS1
e5ca448cb2009aa82eb557c7a73dc1317cf9b657
[ "MIT" ]
null
null
null
adafruit_lsm9ds1.py
Flodip/Adafruit_CircuitPython_LSM9DS1
e5ca448cb2009aa82eb557c7a73dc1317cf9b657
[ "MIT" ]
null
null
null
# The MIT License (MIT) # # Copyright (c) 2017 Tony DiCola for Adafruit Industries # # 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 righ...
34.866397
93
0.751045
87189ebb9fc567311ff59b9fa6af34bdadf6e9bd
229
py
Python
Regex/Metacharacters/dolar.py
beatrizflorenccio/Projects-Python
fc584167a2816dc89f22baef0fa0f780af796c98
[ "MIT" ]
1
2021-10-10T08:18:45.000Z
2021-10-10T08:18:45.000Z
Regex/Metacharacters/dolar.py
beatrizflorenccio/Projects-Python
fc584167a2816dc89f22baef0fa0f780af796c98
[ "MIT" ]
null
null
null
Regex/Metacharacters/dolar.py
beatrizflorenccio/Projects-Python
fc584167a2816dc89f22baef0fa0f780af796c98
[ "MIT" ]
null
null
null
# Metacharacter dolar # Usado para verificar correspondencia no final da expressão import re txt = 'robocup' x = re.search('[p$]', txt) if x != None: print('correspondencia encontrada') else: print('nao corresponde')
16.357143
60
0.69869
63da2aac4d0f4304dc4d35435e16c5405922fda3
1,113
py
Python
server/model_utils.py
Herr-Whit/covid_nlp
0b84829f6b2d64978807d1c18e8298d8990d780b
[ "MIT" ]
null
null
null
server/model_utils.py
Herr-Whit/covid_nlp
0b84829f6b2d64978807d1c18e8298d8990d780b
[ "MIT" ]
null
null
null
server/model_utils.py
Herr-Whit/covid_nlp
0b84829f6b2d64978807d1c18e8298d8990d780b
[ "MIT" ]
null
null
null
import pathlib from glob import glob import pickle from sklearn.pipeline import Pipeline from spacy.lang.en import English from spacy.lang.en.stop_words import STOP_WORDS from sklearn.linear_model import LogisticRegression from sklearn.feature_extraction.text import TfidfVectorizer # nlp = English() # # # def featuriz...
28.538462
110
0.63522
d693f7998cd119d66af6095b4f984a0707d4c19f
95,669
py
Python
src/toil_vg/vg_construct.py
xchang1/toil-vg
15eb6cd679590f3a326c6bf6194ff63aad32f108
[ "Apache-2.0" ]
null
null
null
src/toil_vg/vg_construct.py
xchang1/toil-vg
15eb6cd679590f3a326c6bf6194ff63aad32f108
[ "Apache-2.0" ]
null
null
null
src/toil_vg/vg_construct.py
xchang1/toil-vg
15eb6cd679590f3a326c6bf6194ff63aad32f108
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ vg_construct.py: construct a graph from a vcf and fasta """ import argparse, sys, os, os.path, errno, random, subprocess, shutil, itertools, glob, tarfile import doctest, re, json, collections, time, timeit import logging, logging.handlers, struct, socket, threading import string import getp...
51.853117
195
0.592825
c7b306efcfcf03db8f2d309fea41d1e0f4abcb0e
6,026
py
Python
src/m8_still_more_mutation.py
jacobsme1/16-SequencesAndMutation
5f748d8f9573b0741e998ffc0b72c8f34c0c73af
[ "MIT" ]
null
null
null
src/m8_still_more_mutation.py
jacobsme1/16-SequencesAndMutation
5f748d8f9573b0741e998ffc0b72c8f34c0c73af
[ "MIT" ]
null
null
null
src/m8_still_more_mutation.py
jacobsme1/16-SequencesAndMutation
5f748d8f9573b0741e998ffc0b72c8f34c0c73af
[ "MIT" ]
null
null
null
""" This module lets you practice MUTATION of lists. In this module, you mutate by DELETING elements of a list. Authors: David Mutchler, Amanda Stouder, Chandan Rupakheti, Katie Dion, Claude Anderson, Delvin Defoe, Curt Clifton, their colleagues, and Max Jacobs. """ # DONE: 1. PUT YOUR NAME IN T...
38.139241
73
0.531862
a9acdf5c030c66303a762ca94c23574ee4c701fd
2,050
py
Python
src/Components/qfed/qfed/planck.py
GEOS-ESM/AeroApps
874dad6f34420c014d98eccbe81a061bdc0110cf
[ "NASA-1.3", "ECL-2.0", "Apache-2.0" ]
2
2020-12-02T14:23:30.000Z
2021-12-31T15:39:30.000Z
src/Components/qfed/qfed/planck.py
GEOS-ESM/AeroApps
874dad6f34420c014d98eccbe81a061bdc0110cf
[ "NASA-1.3", "ECL-2.0", "Apache-2.0" ]
9
2020-04-15T16:22:14.000Z
2022-03-24T13:59:25.000Z
src/Components/qfed/qfed/planck.py
GEOS-ESM/AeroApps
874dad6f34420c014d98eccbe81a061bdc0110cf
[ "NASA-1.3", "ECL-2.0", "Apache-2.0" ]
null
null
null
""" Planck function and its inverse, derived from J. Joiner IDL code. Uses GLA TOVS consistent constants. This software is hereby placed in the public domain. Arlindo.daSilva@nasa.gov """ from numpy import * from pylab import normpdf # Constant consistent with GLATOVS C = (1.19104e-5, 1.43833) def planck(k,T): ...
23.295455
67
0.555122
00eeed46ea1dd2995e66e18b7ad77dde55cfa603
1,353
py
Python
tests/test.py
galuhsahid/mariantranslate
a1bf7335714a1bfb6dd6d30a2572baddbe4bdea8
[ "MIT" ]
1
2021-12-04T04:36:01.000Z
2021-12-04T04:36:01.000Z
tests/test.py
galuhsahid/mariantranslate
a1bf7335714a1bfb6dd6d30a2572baddbe4bdea8
[ "MIT" ]
3
2021-08-19T19:29:23.000Z
2021-08-19T19:30:32.000Z
tests/test.py
galuhsahid/mariantranslate
a1bf7335714a1bfb6dd6d30a2572baddbe4bdea8
[ "MIT" ]
null
null
null
import pytest from translator import Translator class TestTranslator: @pytest.fixture(autouse=True) def setup(self): self.en_id_translator = Translator("en", "id") def test_single_translate(self): text_en = "Due to the limited vegetation cover of the Faroe Islands, it is relatively easy t...
43.645161
133
0.691057
7b4bd33a8ed89adf170576fcd5a5a45bb5352cf7
947
py
Python
Packages/matplotlib-2.2.2/lib/mpl_examples/pyplots/whats_new_1_subplot3d.py
NightKirie/NCKU_NLP_2108_industry3
23ac13644b140587e23cfeffb114c7c6f46f17a2
[ "MIT" ]
1
2018-06-11T07:36:04.000Z
2018-06-11T07:36:04.000Z
Packages/matplotlib-2.2.2/lib/mpl_examples/pyplots/whats_new_1_subplot3d.py
NightKirie/NCKU_NLP_2108_industry3
23ac13644b140587e23cfeffb114c7c6f46f17a2
[ "MIT" ]
null
null
null
Packages/matplotlib-2.2.2/lib/mpl_examples/pyplots/whats_new_1_subplot3d.py
NightKirie/NCKU_NLP_2108_industry3
23ac13644b140587e23cfeffb114c7c6f46f17a2
[ "MIT" ]
4
2018-05-19T11:31:20.000Z
2018-07-01T20:58:29.000Z
""" ===================== Whats New 1 Subplot3d ===================== """ from mpl_toolkits.mplot3d.axes3d import Axes3D from matplotlib import cm #from matplotlib.ticker import LinearLocator, FixedLocator, FormatStrFormatter import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = fig.add_subplot(...
25.594595
78
0.68321
e57088868684d3b1c8d941bf6329d3c7b680c413
9,473
py
Python
toontown/shtiker/DisguisePage.py
LittleNed/toontown-stride
1252a8f9a8816c1810106006d09c8bdfe6ad1e57
[ "Apache-2.0" ]
1
2018-06-16T23:06:38.000Z
2018-06-16T23:06:38.000Z
toontown/shtiker/DisguisePage.py
NoraTT/Historical-Commits-Project-Altis-Source
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
[ "Apache-2.0" ]
null
null
null
toontown/shtiker/DisguisePage.py
NoraTT/Historical-Commits-Project-Altis-Source
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
[ "Apache-2.0" ]
4
2019-06-20T23:45:23.000Z
2020-10-14T20:30:15.000Z
from toontown.shtiker import ShtikerPage from direct.gui.DirectGui import * from panda3d.core import * from panda3d.direct import * from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from toontown.suit import SuitDNA from toontown.battle import SuitBattleGlobals from toontown.miniga...
53.219101
246
0.653858
7cfbfc6ed8f52badecc9a3773082549a63a48ed7
4,512
py
Python
mnist/main.py
andreh7/pytorch-examples
2dca10404443ce3178343c07ba6e22af13efb006
[ "BSD-3-Clause" ]
168
2017-02-28T20:07:08.000Z
2021-09-03T08:24:42.000Z
mnist/main.py
andreh7/pytorch-examples
2dca10404443ce3178343c07ba6e22af13efb006
[ "BSD-3-Clause" ]
34
2017-04-30T21:30:17.000Z
2021-08-20T12:12:48.000Z
mnist/main.py
andreh7/pytorch-examples
2dca10404443ce3178343c07ba6e22af13efb006
[ "BSD-3-Clause" ]
63
2017-02-03T07:12:51.000Z
2022-01-26T23:33:44.000Z
from __future__ import print_function import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.autograd import Variable # Training settings parser = argparse.ArgumentParser(description='PyTorch MNIST Example')...
39.578947
95
0.615913
0fb187deac214d4a991ecf40d8a5d9fca1d17b1c
5,095
py
Python
examples/ExecutionPools/Remote/test_plan.py
YinjunZhu/testplan
8feeb92a15211454213c5ab279f1e4396a6d59a8
[ "Apache-2.0" ]
1
2021-07-21T08:28:41.000Z
2021-07-21T08:28:41.000Z
examples/ExecutionPools/Remote/test_plan.py
YinjunZhu/testplan
8feeb92a15211454213c5ab279f1e4396a6d59a8
[ "Apache-2.0" ]
null
null
null
examples/ExecutionPools/Remote/test_plan.py
YinjunZhu/testplan
8feeb92a15211454213c5ab279f1e4396a6d59a8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # This plan contains tests that demonstrate failures as well. """ Parallel test execution in a remote pool. """ import os import sys import socket import getpass import shutil import tempfile from testplan import test_plan from testplan import Task from testplan.runners.pools import RemotePool ...
34.194631
79
0.669676
15e2b0829d5d388635fd97df68bad9657d79b076
6,556
py
Python
muspinsim/input/input.py
stur86/muspinsim
17c035475aa3fd4278f8c270c9a40cc214631b42
[ "MIT" ]
2
2021-02-23T12:34:42.000Z
2021-04-28T09:33:33.000Z
muspinsim/input/input.py
stur86/muspinsim
17c035475aa3fd4278f8c270c9a40cc214631b42
[ "MIT" ]
1
2021-02-02T14:27:43.000Z
2021-02-08T17:32:55.000Z
muspinsim/input/input.py
stur86/muspinsim
17c035475aa3fd4278f8c270c9a40cc214631b42
[ "MIT" ]
1
2021-04-26T14:03:50.000Z
2021-04-26T14:03:50.000Z
"""input.py Class to read in input files for the muspinsim script """ import re from io import StringIO import numpy as np from collections import namedtuple from muspinsim.input.keyword import ( InputKeywords, MuSpinEvaluateKeyword, MuSpinCouplingKeyword, ) class MuSpinInputError(Exception): pass...
30.779343
87
0.515558
7014ebe37edc286896c3286bcc5a73c29d0f144a
3,279
py
Python
1_shinno/sample/attention.py
yfur/dl-chainer
c1917710c80fd6b3dc4cded81700b92bbc349302
[ "Apache-2.0" ]
null
null
null
1_shinno/sample/attention.py
yfur/dl-chainer
c1917710c80fd6b3dc4cded81700b92bbc349302
[ "Apache-2.0" ]
null
null
null
1_shinno/sample/attention.py
yfur/dl-chainer
c1917710c80fd6b3dc4cded81700b92bbc349302
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import numpy as np import chainer from chainer import cuda, Function, gradient_check, Variable, \ optimizers, serializers, utils from chainer import Link, Chain, ChainList import chainer.functions as F import chainer.links as L jvocab = {} jlines = ope...
30.361111
96
0.526685
944903400d2c3b58d0c1d8841806cd54b30d415c
9,490
py
Python
from_cpython/Lib/test/test_pkg.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-02-06T14:28:45.000Z
2020-02-06T14:28:45.000Z
from_cpython/Lib/test/test_pkg.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
from_cpython/Lib/test/test_pkg.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-02-06T14:29:00.000Z
2020-02-06T14:29:00.000Z
# expected: fail # Test packages (dotted-name import) import sys import os import tempfile import textwrap import unittest from test import test_support # Helpers to create and destroy hierarchies. def cleanout(root): names = os.listdir(root) for name in names: fullname = os.path.join(root, name) ...
32.278912
76
0.506639
b3341458234a098618417d531e2b1da304922ab3
1,727
py
Python
samples/generated_samples/aiplatform_generated_aiplatform_v1_featurestore_service_create_entity_type_sync.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
180
2020-09-23T17:21:15.000Z
2022-03-30T17:25:47.000Z
samples/generated_samples/aiplatform_generated_aiplatform_v1_featurestore_service_create_entity_type_sync.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
601
2020-09-23T16:23:44.000Z
2022-03-31T19:08:23.000Z
samples/generated_samples/aiplatform_generated_aiplatform_v1_featurestore_service_create_entity_type_sync.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
109
2020-09-23T16:22:04.000Z
2022-03-28T21:18:29.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
33.862745
86
0.76491
19174b7a72a8b56637398d87ee0861ea16f4a54b
4,498
py
Python
tests/test_n2v_utils.py
mbinfokyaw/n2v
480d94a4e87c08c26e4e8c301468b125682b67f3
[ "BSD-3-Clause" ]
1
2021-12-06T14:37:48.000Z
2021-12-06T14:37:48.000Z
tests/test_n2v_utils.py
mbinfokyaw/n2v
480d94a4e87c08c26e4e8c301468b125682b67f3
[ "BSD-3-Clause" ]
null
null
null
tests/test_n2v_utils.py
mbinfokyaw/n2v
480d94a4e87c08c26e4e8c301468b125682b67f3
[ "BSD-3-Clause" ]
1
2021-04-18T22:10:33.000Z
2021-04-18T22:10:33.000Z
import numpy as np from n2v.utils import n2v_utils def test_get_subpatch(): patch = np.arange(100) patch.shape = (10,10) subpatch_target = np.array([[11, 12, 13, 14, 15], [21, 22, 23, 24, 25], [31, 32, 33, 34, 35], ...
27.260606
76
0.526901
20dcaee977e66054a76b67c68e422c844bffa372
286
py
Python
PManager/services/service_queue.py
srisankethu/opengift.io
fc490332bd0252610b55a68c1fff1c4f704fcbd4
[ "Apache-2.0" ]
1
2020-08-30T23:12:08.000Z
2020-08-30T23:12:08.000Z
PManager/services/service_queue.py
lenarhus/opengift.io
db37494eac141e795c8d9d5b262d54cd6f20fb15
[ "Apache-2.0" ]
null
null
null
PManager/services/service_queue.py
lenarhus/opengift.io
db37494eac141e795c8d9d5b262d54cd6f20fb15
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- __author__ = 'Rayleigh' import redis from tracker import settings service_queue = redis.StrictRedis( host=settings.ORDERS_REDIS_HOST, port=settings.ORDERS_REDIS_PORT, db=settings.ORDERS_REDIS_DB, password=settings.ORDERS_REDIS_PASSWORD ).publish
23.833333
43
0.769231
24d886e0dbb1393e454efbff417109c03492290b
59
py
Python
01-HelloWorld/hello.py
SafinaM/boost-python-examples
27c61c7477bcdd69ce608d75b59b8cdad237b322
[ "BSL-1.0" ]
794
2015-01-08T19:33:18.000Z
2022-03-31T13:15:01.000Z
01-HelloWorld/hello.py
SafinaM/boost-python-examples
27c61c7477bcdd69ce608d75b59b8cdad237b322
[ "BSL-1.0" ]
36
2015-10-15T14:21:42.000Z
2022-03-28T07:06:43.000Z
01-HelloWorld/hello.py
SafinaM/boost-python-examples
27c61c7477bcdd69ce608d75b59b8cdad237b322
[ "BSL-1.0" ]
266
2015-01-02T22:11:49.000Z
2022-03-03T07:35:39.000Z
#!/usr/bin/env python import hello print (hello.greet())
9.833333
21
0.694915
3c6132f8106c89451796753a4627cf99a4536a85
9,335
py
Python
week03/04.MusicLibrary/music_library.py
TsvetomirTsvetkov/Python-Course-101
1c5ea4631128c22effe3c4ee5a18c43f5e79d463
[ "MIT" ]
null
null
null
week03/04.MusicLibrary/music_library.py
TsvetomirTsvetkov/Python-Course-101
1c5ea4631128c22effe3c4ee5a18c43f5e79d463
[ "MIT" ]
null
null
null
week03/04.MusicLibrary/music_library.py
TsvetomirTsvetkov/Python-Course-101
1c5ea4631128c22effe3c4ee5a18c43f5e79d463
[ "MIT" ]
null
null
null
# music_library.py """ For my solution, I've decided not to use the datetime library. """ from random import randint import json import os def serialize_song(obj): if isinstance(obj, Song): info = obj.title + "-" + obj.artist + "-" + obj.album + "-" + str(obj._length) return info else: raise TypeEr...
26.902017
107
0.676058
d54153586f1aec2c5747ecdfc0e4f2df9996755d
6,849
py
Python
bindings/python/ensmallen_graph/datasets/string/streptomycesspnrrls340.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/streptomycesspnrrls340.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/streptomycesspnrrls340.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Streptomyces sp. NRRLS340. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2...
35.858639
223
0.709155
e9063e26c831da7f3095ef07cee6ae2364e83752
1,043
py
Python
app/core/migrations/0004_recipe.py
achavesjimenez/recipe-app-api
9337ac6e249fdaad3b1a77d3c2e943a23c5ccef3
[ "MIT" ]
null
null
null
app/core/migrations/0004_recipe.py
achavesjimenez/recipe-app-api
9337ac6e249fdaad3b1a77d3c2e943a23c5ccef3
[ "MIT" ]
null
null
null
app/core/migrations/0004_recipe.py
achavesjimenez/recipe-app-api
9337ac6e249fdaad3b1a77d3c2e943a23c5ccef3
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2020-07-30 16:17 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0003_ingredient'), ] operations = [ migrations.CreateModel( ...
35.965517
118
0.604027
b2f32d0cf36a337b59633c23da68b521509a528d
340
py
Python
code/sevenWonders.py
matthewReff/Kattis-Problems
848628af630c990fb91bde6256a77afad6a3f5f6
[ "MIT" ]
8
2020-02-21T22:21:01.000Z
2022-02-16T05:30:54.000Z
code/sevenWonders.py
matthewReff/Kattis-Problems
848628af630c990fb91bde6256a77afad6a3f5f6
[ "MIT" ]
null
null
null
code/sevenWonders.py
matthewReff/Kattis-Problems
848628af630c990fb91bde6256a77afad6a3f5f6
[ "MIT" ]
3
2020-08-05T05:42:35.000Z
2021-08-30T05:39:51.000Z
def seven_wonders(): rawInput=raw_input() cards=[0,0,0] total = 0 for i in rawInput: if i =="T": cards[0]+=1 elif i == "C": cards[1]+=1 else: cards[2]+=1 for i in cards: total+=i**2 cards.sort() total+=cards[0]*7 print t...
20
24
0.464706
8bcf567222ed17b748773d1dfaf2a07f83ea1776
1,747
py
Python
status.py
bUsernameIsUnavailable/Proiect-Inginerie-Software
4dae6a079bd16ad970eb63aa907159e87aa565b8
[ "MIT" ]
null
null
null
status.py
bUsernameIsUnavailable/Proiect-Inginerie-Software
4dae6a079bd16ad970eb63aa907159e87aa565b8
[ "MIT" ]
3
2022-01-31T18:18:03.000Z
2022-02-01T22:24:25.000Z
status.py
bUsernameIsUnavailable/Proiect-Inginerie-Software
4dae6a079bd16ad970eb63aa907159e87aa565b8
[ "MIT" ]
3
2022-02-02T15:10:56.000Z
2022-02-03T16:49:08.000Z
from db import get_db from weather import get_humidity_from_weather_api, get_precipitation_from_weather_api def get_ideal_parameters(humidity, precipitation, soil_moisture, system_temperature): ideal_temperature = 20 ideal_moisture = 50 if precipitation is None: precipitation = 0 if soil_moist...
30.649123
101
0.68174
2734a4560639e3cdb5604cda00f594ff6e592fce
12,973
py
Python
tests/admin_views/test_autocomplete_view.py
imjvdn/scratch-game-1
5dffd79f17e0b66d3d2e57262749311aca28e850
[ "PSF-2.0", "BSD-3-Clause" ]
7
2020-01-13T18:26:41.000Z
2021-04-20T04:22:26.000Z
tests/admin_views/test_autocomplete_view.py
imjvdn/scratch-game-1
5dffd79f17e0b66d3d2e57262749311aca28e850
[ "PSF-2.0", "BSD-3-Clause" ]
7
2021-03-26T03:13:38.000Z
2022-03-12T00:42:03.000Z
tests/admin_views/test_autocomplete_view.py
imjvdn/scratch-game-1
5dffd79f17e0b66d3d2e57262749311aca28e850
[ "PSF-2.0", "BSD-3-Clause" ]
11
2019-09-14T20:57:30.000Z
2022-01-19T17:59:26.000Z
import json import time from django.contrib import admin from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.admin.views.autocomplete import AutocompleteJsonView from django.contrib.auth.models import Permission, User from django.contrib.contenttypes.models import ContentType from django.h...
48.048148
112
0.68789
82ddfe123a19942b2678edb03597e8cce4de9c62
12,649
py
Python
colour/adaptation/cmccat2000.py
rift-labs-developer/colour
15112dbe824aab0f21447e0db4a046a28a06f43a
[ "BSD-3-Clause" ]
1,380
2015-01-10T12:30:33.000Z
2022-03-30T10:19:57.000Z
colour/adaptation/cmccat2000.py
rift-labs-developer/colour
15112dbe824aab0f21447e0db4a046a28a06f43a
[ "BSD-3-Clause" ]
638
2015-01-02T10:49:05.000Z
2022-03-29T10:16:22.000Z
colour/adaptation/cmccat2000.py
rift-labs-developer/colour
15112dbe824aab0f21447e0db4a046a28a06f43a
[ "BSD-3-Clause" ]
250
2015-01-21T15:27:19.000Z
2022-03-30T10:23:58.000Z
# -*- coding: utf-8 -*- """ CMCCAT2000 Chromatic Adaptation Model ===================================== Defines the *CMCCAT2000* chromatic adaptation model objects: - :class:`colour.adaptation.InductionFactors_CMCCAT2000` - :class:`colour.VIEWING_CONDITIONS_CMCCAT2000` - :func:`colour.adaptation.chromatic_adapt...
34.279133
79
0.529923
8429a86cac92c0522eaeeafbb263a13adb796a18
2,003
py
Python
xpower/Algorithms/BuyEveryDay.py
UpSea/ZipLineMid
1e0cdcfa7974f412dbee32809cffdaf2de6b4971
[ "MIT" ]
null
null
null
xpower/Algorithms/BuyEveryDay.py
UpSea/ZipLineMid
1e0cdcfa7974f412dbee32809cffdaf2de6b4971
[ "MIT" ]
null
null
null
xpower/Algorithms/BuyEveryDay.py
UpSea/ZipLineMid
1e0cdcfa7974f412dbee32809cffdaf2de6b4971
[ "MIT" ]
1
2021-04-10T06:05:05.000Z
2021-04-10T06:05:05.000Z
# -*- coding: utf-8 -*- import zipline as zp class BuyEveryDay(zp.TradingAlgorithm): def __init__(self, *args, **kwargs): super(BuyEveryDay, self).__init__(*args, **kwargs) print('BuyEveryDay.__init__()') def initialize(self): print("<---BuyEveryDay.initialize() start") pr...
44.511111
133
0.546181
16f8e123bda588bb780297f2d097cedb6c187974
30,183
py
Python
venv/Lib/site-packages/direct/p3d/HostInfo.py
ferris77/pacman
9d793146189630b4305af0bc7af65ce822b3998f
[ "MIT" ]
null
null
null
venv/Lib/site-packages/direct/p3d/HostInfo.py
ferris77/pacman
9d793146189630b4305af0bc7af65ce822b3998f
[ "MIT" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
Lib/site-packages/direct/p3d/HostInfo.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
1
2021-04-09T00:02:59.000Z
2021-04-09T00:02:59.000Z
""" .. deprecated:: 1.10.0 The p3d packaging system has been replaced with the new setuptools-based system. See the :ref:`distribution` manual section. """ __all__ = ["HostInfo"] from panda3d.core import HashVal, Filename, PandaSystem, DocumentSpec, Ramfile from panda3d.core import ConfigVariableInt from panda3...
39.871863
121
0.576318
8d260f4d7143d25534949ddbda8bdbacb79966a4
5,374
py
Python
src/packagedcode/cargo.py
doc22940/scancode-toolk
588b9a9411730e99d763d715ae9f38575744aaee
[ "Apache-2.0", "CC0-1.0" ]
1
2020-06-24T16:03:52.000Z
2020-06-24T16:03:52.000Z
src/packagedcode/cargo.py
doc22940/scancode-toolk
588b9a9411730e99d763d715ae9f38575744aaee
[ "Apache-2.0", "CC0-1.0" ]
1
2021-06-02T02:50:07.000Z
2021-06-02T02:50:07.000Z
src/packagedcode/cargo.py
hwpplayers/scancode-toolkit
72850bd57a1a841e5a6a6e4120223a00c4189046
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
# Copyright (c) 2019 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use ...
29.527473
97
0.692966
3d523674c10ce1d584e0b5039537da8875a2d45b
4,009
py
Python
options/train_options.py
DaBaiTuuu/SynthCP
42b6e6185f572dd1bf82bba2878014f5283dbe27
[ "MIT" ]
54
2020-09-09T09:07:48.000Z
2022-03-15T12:19:56.000Z
options/train_options.py
DaBaiTuuu/SynthCP
42b6e6185f572dd1bf82bba2878014f5283dbe27
[ "MIT" ]
12
2020-10-27T17:40:40.000Z
2021-09-06T21:10:32.000Z
options/train_options.py
DaBaiTuuu/SynthCP
42b6e6185f572dd1bf82bba2878014f5283dbe27
[ "MIT" ]
8
2020-10-12T09:28:01.000Z
2021-04-21T14:43:28.000Z
""" Copyright (C) 2019 NVIDIA Corporation. All rights reserved. Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). """ from .base_options import BaseOptions class TrainOptions(BaseOptions): def initialize(self, parser): BaseOptions.initialize(self, ...
74.240741
173
0.703417
bd15c472f906d140ef00546b94634b33eb43240f
714
py
Python
topy/__init__.py
TarcisioLOliveira/topy
060da675e6494fee63fa5547befcb1f8ecc39fdc
[ "MIT" ]
1
2021-01-25T00:13:34.000Z
2021-01-25T00:13:34.000Z
topy/__init__.py
TarcisioLOliveira/topy
060da675e6494fee63fa5547befcb1f8ecc39fdc
[ "MIT" ]
null
null
null
topy/__init__.py
TarcisioLOliveira/topy
060da675e6494fee63fa5547befcb1f8ecc39fdc
[ "MIT" ]
null
null
null
""" # ============================================================================== # ToPy -- Topology optimization with Python. # Copyright (C) 2012, 2015, 2016, 2017 William Hunter. # Copyright (C) 2020, 2021, Tarcísio L. de Oliveira # ============================================================================== "...
26.444444
80
0.560224
9a958077eb6190cdb4ab192230850e04169ee430
4,947
py
Python
user/tests/test_user_api.py
khaledzaki2017/Recipe-app-api
c525b2764866fc3b8501baf9d8e9c7cc0374080b
[ "MIT" ]
null
null
null
user/tests/test_user_api.py
khaledzaki2017/Recipe-app-api
c525b2764866fc3b8501baf9d8e9c7cc0374080b
[ "MIT" ]
null
null
null
user/tests/test_user_api.py
khaledzaki2017/Recipe-app-api
c525b2764866fc3b8501baf9d8e9c7cc0374080b
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status CREATE_USER_URL = reverse('user:create') TOKEN_URL = reverse('user:token') ME_URL = reverse('user:me') def create_user(**params...
34.594406
77
0.64625
2e7321b99fedbfce4eac11e701130afb05edb2c1
8,565
py
Python
TimeWrapper_JE/venv/Lib/site-packages/pygments/lexers/_lua_builtins.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
TimeWrapper_JE/venv/Lib/site-packages/pygments/lexers/_lua_builtins.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
TimeWrapper_JE/venv/Lib/site-packages/pygments/lexers/_lua_builtins.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
""" pygments.lexers._lua_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file contains the names and modules of lua functions It is able to re-generate itself, but for adding new functions you probably have to add some callbacks (see function module_callbacks). Do not edit the MODULES dict...
29.232082
80
0.468301
5decec2368ff2f737b5e7fd0c748bc5098b941fe
208
py
Python
app/utils.py
DCBergantini/markd_table
4ce6fa880920bd0f4fcd73c4a787ccfcc971fbee
[ "MIT" ]
null
null
null
app/utils.py
DCBergantini/markd_table
4ce6fa880920bd0f4fcd73c4a787ccfcc971fbee
[ "MIT" ]
null
null
null
app/utils.py
DCBergantini/markd_table
4ce6fa880920bd0f4fcd73c4a787ccfcc971fbee
[ "MIT" ]
2
2022-01-15T01:27:15.000Z
2022-01-18T18:57:30.000Z
def get_unique_values(list: list): unique_list=[] for item in list: if item not in unique_list: unique_list.append(item) return unique_list __name__=="__main__"
13.866667
36
0.615385
fff703f27d714fc09d38b8c75435e07a0cdd2a08
1,085
py
Python
azure-servicefabric/azure/servicefabric/models/entity_health_state_chunk_list.py
SUSE/azure-sdk-for-python
324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f
[ "MIT" ]
2
2020-07-29T14:22:17.000Z
2020-11-06T18:47:40.000Z
azure-servicefabric/azure/servicefabric/models/entity_health_state_chunk_list.py
SUSE/azure-sdk-for-python
324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f
[ "MIT" ]
1
2016-08-01T07:37:04.000Z
2016-08-01T07:37:04.000Z
azure-servicefabric/azure/servicefabric/models/entity_health_state_chunk_list.py
SUSE/azure-sdk-for-python
324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f
[ "MIT" ]
1
2020-12-12T21:04:41.000Z
2020-12-12T21:04:41.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
35
79
0.623041
ca32b4b5999e8abf6ec12d057a3a243cf2eda0aa
6,534
py
Python
src/sentry/integrations/github_enterprise/webhook.py
sigismund/sentry
421a512cd3b4a4c9ed660af536dc5bc4c12a287c
[ "BSD-3-Clause" ]
1
2019-05-28T06:18:03.000Z
2019-05-28T06:18:03.000Z
src/sentry/integrations/github_enterprise/webhook.py
sigismund/sentry
421a512cd3b4a4c9ed660af536dc5bc4c12a287c
[ "BSD-3-Clause" ]
6
2018-10-19T10:04:23.000Z
2019-12-09T20:29:12.000Z
src/sentry/integrations/github_enterprise/webhook.py
sigismund/sentry
421a512cd3b4a4c9ed660af536dc5bc4c12a287c
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import import hashlib import hmac import logging import six from django.http import HttpResponse from django.utils.crypto import constant_time_compare from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from ...
33.680412
150
0.667126
12aef745bf6a8b9faf2356fd833ade0e8f08d97f
2,037
py
Python
dogia/wallet/sign_coin_solutions.py
dogia-coin/dogia-blockchain
16ea0a09777354905150c216e1fab60141296473
[ "Apache-2.0" ]
null
null
null
dogia/wallet/sign_coin_solutions.py
dogia-coin/dogia-blockchain
16ea0a09777354905150c216e1fab60141296473
[ "Apache-2.0" ]
null
null
null
dogia/wallet/sign_coin_solutions.py
dogia-coin/dogia-blockchain
16ea0a09777354905150c216e1fab60141296473
[ "Apache-2.0" ]
null
null
null
import inspect from typing import List, Any import blspy from blspy import AugSchemeMPL from dogia.types.coin_solution import CoinSolution from dogia.types.spend_bundle import SpendBundle from dogia.util.condition_tools import conditions_dict_for_solution, pkm_pairs_for_conditions_dict async def sign_coin_solutions...
39.173077
110
0.689249
dd80015de7b1762c7dce04218da5261a69d29d0d
438
py
Python
basic_coding/Day1/perfect_number.py
pralhad88/samyakDemo
197ad256a70f969c1be06ca9f25fd45f16ed793d
[ "MIT" ]
2
2020-04-14T08:31:39.000Z
2021-11-02T11:22:19.000Z
basic_coding/Day1/perfect_number.py
pralhad88/BasicPython
197ad256a70f969c1be06ca9f25fd45f16ed793d
[ "MIT" ]
null
null
null
basic_coding/Day1/perfect_number.py
pralhad88/BasicPython
197ad256a70f969c1be06ca9f25fd45f16ed793d
[ "MIT" ]
null
null
null
# If you want cheack only one number is perfect or not x = int(input("Enter number")) sum1 = 0 for i in range(1,x): if x % i == 0: print(i) sum1=sum1+i if sum1 == x: print(x,"perfect number hai") # If you want to cheak multiple number is perfect number is or not. x = int(input("Enter number")) for i in range(1,...
20.857143
67
0.625571
f1ede6bb60c650777caa1a39ceab94dffef273d8
23,706
py
Python
python/ray/tune/ray_trial_executor.py
gaocegege/ray
03d05c8765bb6cfd30fdbbcd4577dc22c5dc5af7
[ "Apache-2.0" ]
1
2019-08-21T08:31:10.000Z
2019-08-21T08:31:10.000Z
python/ray/tune/ray_trial_executor.py
GitAlanWong/ray
c852213b8349b6b9e9e7353573e2259a1b9ef925
[ "Apache-2.0" ]
null
null
null
python/ray/tune/ray_trial_executor.py
GitAlanWong/ray
c852213b8349b6b9e9e7353573e2259a1b9ef925
[ "Apache-2.0" ]
2
2019-09-04T13:27:51.000Z
2019-09-17T04:20:38.000Z
# coding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import math import os import random import time import traceback import ray from ray.tune.error import AbortTrialExecution from ray.tune.logger import NoopLogger from ray.tune.tr...
40.043919
79
0.597486
7ca650ad105a0de0a548ba831dfc6672d4df339a
1,469
py
Python
Jarvan/Modules/admin.py
jabezborja/Jarvan-AI
fe3b1ede98cbc2213fcedb886c282e5236e97bfa
[ "MIT" ]
1
2021-03-07T11:53:54.000Z
2021-03-07T11:53:54.000Z
Jarvan/Modules/admin.py
jabezborja/Jarvan
fe3b1ede98cbc2213fcedb886c282e5236e97bfa
[ "MIT" ]
null
null
null
Jarvan/Modules/admin.py
jabezborja/Jarvan
fe3b1ede98cbc2213fcedb886c282e5236e97bfa
[ "MIT" ]
2
2020-12-18T02:13:44.000Z
2021-05-04T00:00:20.000Z
from VA.speaker import speak from VA.audio import recordAudio import sqlite3 import os class Admin: """docstring for Admin""" def __init__(self, arg): super(Admin, self).__init__() self.arg = arg def admin(self, response, conn, intCon): os.system('cls') speak("Setup mode activated") print("To deactivate...
22.257576
93
0.669163
14b66d2e6eeb022c640612636d30183177939c4e
541
py
Python
polling_stations/apps/data_importers/management/commands/import_calderdale.py
smsmith97/UK-Polling-Stations
ecbd98cb99e89e97354da3960b0063aa36181b11
[ "BSD-3-Clause" ]
29
2015-03-10T08:41:34.000Z
2022-01-12T08:51:38.000Z
polling_stations/apps/data_importers/management/commands/import_calderdale.py
smsmith97/UK-Polling-Stations
ecbd98cb99e89e97354da3960b0063aa36181b11
[ "BSD-3-Clause" ]
4,112
2015-04-01T21:27:38.000Z
2022-03-31T19:22:11.000Z
polling_stations/apps/data_importers/management/commands/import_calderdale.py
smsmith97/UK-Polling-Stations
ecbd98cb99e89e97354da3960b0063aa36181b11
[ "BSD-3-Clause" ]
31
2015-03-18T14:52:50.000Z
2022-02-24T10:31:07.000Z
from data_importers.management.commands import BaseDemocracyCountsCsvImporter class Command(BaseDemocracyCountsCsvImporter): council_id = "CLD" addresses_name = "2021-04-16T12:55:22.326313/CMBC Polling Districts.csv" stations_name = "2021-04-16T12:55:22.326313/CMBC Polling Stations.csv" elections = ["...
33.8125
77
0.713494
cd8cb68eeb05e8bc7b7b4ffc8d08399a4fd68a68
1,104
py
Python
goal_prox/models.py
clvrai/goal_prox_il
7c809b2ee575a69a14997068db06f3c1f3c8bd08
[ "MIT" ]
4
2021-11-17T20:19:34.000Z
2022-03-31T04:21:26.000Z
goal_prox/models.py
clvrai/goal_prox_il
7c809b2ee575a69a14997068db06f3c1f3c8bd08
[ "MIT" ]
null
null
null
goal_prox/models.py
clvrai/goal_prox_il
7c809b2ee575a69a14997068db06f3c1f3c8bd08
[ "MIT" ]
null
null
null
import torch.nn as nn from rlf.rl.model import BaseNet, Flatten, MLPBase class GwImgEncoder(BaseNet): """ Custom image encoder to support the Grid World environment with image observations (rather than flattened observations). This is important for large grids. """ def __init__(self, obs_shap...
31.542857
110
0.575181
4d91e927efd81b30e720f3516f6730132d7c9afa
2,589
py
Python
saq/modules/alerts.py
ace-ecosystem/ACE
d17b5ef4bccf923ec6be5115fabe40f0627dab2d
[ "Apache-2.0" ]
24
2019-09-21T21:09:45.000Z
2022-03-15T19:48:13.000Z
saq/modules/alerts.py
ace-ecosystem/ACE
d17b5ef4bccf923ec6be5115fabe40f0627dab2d
[ "Apache-2.0" ]
54
2019-09-16T20:06:30.000Z
2021-08-18T22:22:08.000Z
saq/modules/alerts.py
ace-ecosystem/ACE
d17b5ef4bccf923ec6be5115fabe40f0627dab2d
[ "Apache-2.0" ]
9
2019-09-08T13:35:55.000Z
2021-01-03T15:23:37.000Z
# vim: sw=4:ts=4:et import fcntl import gc import json import logging import os import os.path import saq import saq import saq.database from saq.analysis import Analysis, Observable from saq.constants import * from saq.database import get_db_connection, use_db, ALERT, DatabaseSession from saq.error import report_ex...
31.962963
103
0.675937
b3e62fc8f8fbf158640d5856fba004f8390e6d5a
236
py
Python
wagtail_adminsortable/models.py
Lh4cKg/wagtail-admin-sortable
4a48e855773913eb3ee74b6f9479bc126d6c4ec4
[ "MIT" ]
4
2019-11-20T19:02:49.000Z
2020-11-12T13:10:39.000Z
wagtail_adminsortable/models.py
Lh4cKg/wagtail-admin-sortable
4a48e855773913eb3ee74b6f9479bc126d6c4ec4
[ "MIT" ]
null
null
null
wagtail_adminsortable/models.py
Lh4cKg/wagtail-admin-sortable
4a48e855773913eb3ee74b6f9479bc126d6c4ec4
[ "MIT" ]
4
2021-03-22T08:05:32.000Z
2022-03-10T17:18:08.000Z
from django.db import models class AdminSortable(models.Model): order = models.IntegerField(null=True, blank=True, editable=False) sortable_field = 'order' class Meta: abstract = True ordering = ['order']
21.454545
70
0.673729
a533c2eff86901d3c745879949d1f6451e8ec84a
5,208
py
Python
Inference_Pretrained/models.py
majedelhelou/BUIFD
58ee380546e120195ce02f6e0829dd2e0f2667cf
[ "MIT" ]
11
2020-04-26T22:27:22.000Z
2021-11-02T14:40:13.000Z
Inference_Pretrained/models.py
IVRL/BUIFD
167bc0319a290ada91f4b991c09d05449dc0685d
[ "MIT" ]
1
2021-05-09T12:46:05.000Z
2021-05-24T16:35:25.000Z
Inference_Pretrained/models.py
majedelhelou/BUIFD
58ee380546e120195ce02f6e0829dd2e0f2667cf
[ "MIT" ]
5
2020-05-02T13:40:14.000Z
2021-06-09T16:29:46.000Z
import torch import torch.nn as nn import os class DnCNN_RL(nn.Module): def __init__(self, channels, num_of_layers=17): super(DnCNN_RL, self).__init__() self.dncnn = DnCNN(channels=channels, num_of_layers=num_of_layers) def forward(self, x): noise = self.dncnn(x) return noise...
32.962025
152
0.660714
48847f2669865b79b9258a63732c27c179141462
1,575
py
Python
234_palindromeLinkedList.py
stuti-rastogi/leetcode-python-solutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
4
2018-07-24T08:36:42.000Z
2019-08-25T17:48:47.000Z
234_palindromeLinkedList.py
stuti-rastogi/leetcodesolutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
null
null
null
234_palindromeLinkedList.py
stuti-rastogi/leetcodesolutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
null
null
null
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def isPalindrome(self, head): """ :type head: ListNode :rtype: bool """ # stack = [] # if (not head):...
24.230769
45
0.434921
85962af2028761d8f8f20279df4c5d0fda3c6d5a
3,020
py
Python
test/Auth_test.py
narhen/sensordata-api
6941c59c8d8e16b372f866f1f5c6946cdee5d871
[ "MIT" ]
null
null
null
test/Auth_test.py
narhen/sensordata-api
6941c59c8d8e16b372f866f1f5c6946cdee5d871
[ "MIT" ]
null
null
null
test/Auth_test.py
narhen/sensordata-api
6941c59c8d8e16b372f866f1f5c6946cdee5d871
[ "MIT" ]
null
null
null
#!/usr/bin/env python from flask.ext.bcrypt import Bcrypt from common.db import Storage import mock import unittest from auth import Auth, AuthenticatedUser class AuthTestCase(unittest.TestCase): def test_authenticate_success(self): username, password = "user", "pass" mock_storage = mock.create_a...
39.736842
91
0.715894
61c3c93db87ee6ed0ada07a61363630fd29facf4
6,971
py
Python
kubernetes/client/models/v1beta1_daemon_set_list.py
pllsxyc/python
442ebc019056c2dc246be94f85cf61f1e1d26a88
[ "Apache-2.0" ]
1
2019-10-07T13:54:36.000Z
2019-10-07T13:54:36.000Z
kubernetes/client/models/v1beta1_daemon_set_list.py
pllsxyc/python
442ebc019056c2dc246be94f85cf61f1e1d26a88
[ "Apache-2.0" ]
8
2020-10-28T01:18:36.000Z
2021-06-11T01:06:15.000Z
kubernetes/client/models/v1beta1_daemon_set_list.py
pllsxyc/python
442ebc019056c2dc246be94f85cf61f1e1d26a88
[ "Apache-2.0" ]
1
2021-03-16T16:05:33.000Z
2021-03-16T16:05:33.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.16 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
33.839806
312
0.628174
35e272419ca3d9cdb054c4ca3dc2574415ebc83c
6,607
py
Python
py3status/modules/spotify.py
joernnilsson/py3status
a5f5e9663fd510aacd017256728bb06c3b0b6abe
[ "BSD-3-Clause" ]
null
null
null
py3status/modules/spotify.py
joernnilsson/py3status
a5f5e9663fd510aacd017256728bb06c3b0b6abe
[ "BSD-3-Clause" ]
null
null
null
py3status/modules/spotify.py
joernnilsson/py3status
a5f5e9663fd510aacd017256728bb06c3b0b6abe
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Display song currently playing in Spotify. Configuration parameters: button_next: button to switch to next song (default None) button_play_pause: button to toggle play/pause (default None) button_previous: button to switch to previous song (default None) cache_timeout: how o...
31.018779
91
0.584683
86e5c6ec7159d9946594bec8ef433899edf5a1da
16,671
py
Python
methlab/shop/models.py
LDO-CERT/methlab
cf6f30cd1c47727a596ebafba2b1213808bd552c
[ "MIT" ]
4
2021-03-17T10:09:31.000Z
2021-12-20T22:50:59.000Z
methlab/shop/models.py
LDO-CERT/methlab
cf6f30cd1c47727a596ebafba2b1213808bd552c
[ "MIT" ]
5
2021-03-19T13:54:43.000Z
2021-10-01T20:21:03.000Z
methlab/shop/models.py
LDO-CERT/methlab
cf6f30cd1c47727a596ebafba2b1213808bd552c
[ "MIT" ]
null
null
null
from django.db import models from django.db.models import Q from django.contrib.auth import get_user_model from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation from django.contrib.contenttypes.models import ContentType from django.db.models.fields.related import ForeignKey from django.templ...
31.936782
88
0.658029
d052213245c7080100fd281bfab462530319295c
14,101
py
Python
robocorp-python-ls-core/src/robocorp_ls_core/workspace.py
anton264/robotframework-lsp
6f8f89b88ec56b767f6d5e9cf0d3fb58847e5844
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
robocorp-python-ls-core/src/robocorp_ls_core/workspace.py
anton264/robotframework-lsp
6f8f89b88ec56b767f6d5e9cf0d3fb58847e5844
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
robocorp-python-ls-core/src/robocorp_ls_core/workspace.py
anton264/robotframework-lsp
6f8f89b88ec56b767f6d5e9cf0d3fb58847e5844
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Original work Copyright 2017 Palantir Technologies, Inc. (MIT) # Original work Copyright 2020 Open Law Library. (Apache 2) # See ThirdPartyNotices.txt in the project root for license information. # All modifications Copyright (c) Robocorp Technologies Inc. # All rights reserved. # # Licensed under the Apache License,...
33.257075
124
0.628821
40b576cd90b3010b534cb969dd47fc94c27a6265
347
py
Python
sampi/sdes/util.py
Jonathan-Lindbloom/sampi
2953e19d60df77b617779daaf90712f4f1099ff8
[ "MIT" ]
null
null
null
sampi/sdes/util.py
Jonathan-Lindbloom/sampi
2953e19d60df77b617779daaf90712f4f1099ff8
[ "MIT" ]
null
null
null
sampi/sdes/util.py
Jonathan-Lindbloom/sampi
2953e19d60df77b617779daaf90712f4f1099ff8
[ "MIT" ]
null
null
null
import numpy as np def draw_brownian(t, nsamps=1): """Generates an array of sample paths of brownian motion over the given time index. Assumes t0 = 0. """ wt = np.random.randn(len(t), nsamps) wt[0, :] = 0 wt[1:,:] *= np.sqrt(np.repeat(np.diff(t)[:, np.newaxis], nsamps, axis=1)) wt = wt.cumsum...
20.411765
103
0.608069
419f65f48f536c4001d7d49e4f9d3d7e38e05f77
571
py
Python
yanmark42/prog_in_py/ex_1/maxbw2numb.py
oss-python/Exercises-py
52694b6f87b7cf9bb817dfa8410332c24c51eda2
[ "MIT" ]
null
null
null
yanmark42/prog_in_py/ex_1/maxbw2numb.py
oss-python/Exercises-py
52694b6f87b7cf9bb817dfa8410332c24c51eda2
[ "MIT" ]
23
2020-04-29T10:47:34.000Z
2020-09-12T12:17:38.000Z
yanmark42/prog_in_py/ex_1/maxbw2numb.py
oss-python/exercises-py
52694b6f87b7cf9bb817dfa8410332c24c51eda2
[ "Unlicense" ]
4
2020-04-04T09:18:06.000Z
2020-04-16T21:56:43.000Z
# Given two numbers the program prints the greater # Implemented errors to be sure the user only inputs a number and not a letter or a symbol print('Input 2 numbers\n') while True: try: a = int(input('The first: ')) break except ValueError: print("Just numbers!") while True: try: ...
21.961538
90
0.611208
ebcd2c4bdd403681190e36f0637197ef977eedc9
661
py
Python
001132StepikITclassPy/Stepik001132ITclassPyсh06_loopWhile_p01st05TASK04_20210224_secrets.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
001132StepikITclassPy/Stepik001132ITclassPyсh06_loopWhile_p01st05TASK04_20210224_secrets.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
001132StepikITclassPy/Stepik001132ITclassPyсh06_loopWhile_p01st05TASK04_20210224_secrets.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
''' Напишите программу, которая предлагает ввести пароль и не переходит к выполнению основной части, пока не введён правильный пароль. Основная часть – вывод на экран «секретных сведений». Sample Input 1: 1501 Sample Output 1: Введите пароль: Пароль верный! Секретные сведения: я учусь в IT-классе. Sample Input 2: 0...
20.65625
184
0.73525
341e21c4d05db72ffdc7bcd347d876032d63b87d
4,405
py
Python
city_scrapers/spiders/chi_police_retirement.py
sameerchandra/city-scrapers
c6e466a06f610e56fa876b6e93a53a347d732536
[ "MIT" ]
1
2019-03-18T03:12:25.000Z
2019-03-18T03:12:25.000Z
city_scrapers/spiders/chi_police_retirement.py
sameerchandra/city-scrapers
c6e466a06f610e56fa876b6e93a53a347d732536
[ "MIT" ]
1
2019-10-05T04:05:48.000Z
2019-10-05T04:05:48.000Z
city_scrapers/spiders/chi_police_retirement.py
firejava/city-scrapers
749f40bf1bd933726768d7d67e5211aef13af547
[ "MIT" ]
null
null
null
import re from datetime import datetime from city_scrapers_core.constants import BOARD, COMMITTEE from city_scrapers_core.items import Meeting from city_scrapers_core.spiders import CityScrapersSpider class ChiPoliceRetirementSpider(CityScrapersSpider): name = "chi_police_retirement" agency = "Policemen's An...
37.974138
100
0.592054
29f6277105d71d2982c128b796f88e0bbe94322a
6,099
py
Python
src/dispatch/plugins/dispatch_google/groups/plugin.py
mclueppers/dispatch
b9e524ca10e5b2e95490b388db61c58e79e975e2
[ "Apache-2.0" ]
1
2020-07-20T23:03:51.000Z
2020-07-20T23:03:51.000Z
src/dispatch/plugins/dispatch_google/groups/plugin.py
mclueppers/dispatch
b9e524ca10e5b2e95490b388db61c58e79e975e2
[ "Apache-2.0" ]
null
null
null
src/dispatch/plugins/dispatch_google/groups/plugin.py
mclueppers/dispatch
b9e524ca10e5b2e95490b388db61c58e79e975e2
[ "Apache-2.0" ]
null
null
null
""" .. module: dispatch.plugins.dispatch_google_groups.plugin :platform: Unix :copyright: (c) 2019 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. """ import logging import time from typing import Any, List from googleapiclient.errors import HttpError from tenacity imp...
34.851429
103
0.65355
f33d08dbfb5f9e6395dd92aa0d3d8a1576764f03
14,035
py
Python
Orio/orio/module/loop/submodule/opencl/opencl.py
HPCL/nametbd
1b588cd6ce94ab39a8ba6f89d9eb64e1d3726af5
[ "MIT" ]
null
null
null
Orio/orio/module/loop/submodule/opencl/opencl.py
HPCL/nametbd
1b588cd6ce94ab39a8ba6f89d9eb64e1d3726af5
[ "MIT" ]
null
null
null
Orio/orio/module/loop/submodule/opencl/opencl.py
HPCL/nametbd
1b588cd6ce94ab39a8ba6f89d9eb64e1d3726af5
[ "MIT" ]
null
null
null
# # Loop transformation submodule that implements OpenCL kernel generation # import os, ast import orio.module.loop.submodule.submodule import orio.main.util.globals as g import transformation OPENCL_DEVICE_QUERY_SKELET = r''' #include <stdio.h> #include <stdlib.h> #ifdef __APPLE__ #include <OpenCL/opencl.h> #else #i...
38.452055
171
0.572711
766ab72121cc18bd9dcde763548c8ff995bf894c
860
py
Python
submissions/valid-sudoku/solution.py
Wattyyy/LeetCode
13a9be056d0a0c38c2f8c8222b11dc02cb25a935
[ "MIT" ]
null
null
null
submissions/valid-sudoku/solution.py
Wattyyy/LeetCode
13a9be056d0a0c38c2f8c8222b11dc02cb25a935
[ "MIT" ]
1
2022-03-04T20:24:32.000Z
2022-03-04T20:31:58.000Z
submissions/valid-sudoku/solution.py
Wattyyy/LeetCode
13a9be056d0a0c38c2f8c8222b11dc02cb25a935
[ "MIT" ]
null
null
null
# https://leetcode.com/problems/valid-sudoku class Solution: def isValidSudoku(self, board: List[List[str]]) -> bool: row = [set() for _ in range(9)] col = [set() for _ in range(9)] matrix = [[set() for _ in range(3)] for __ in range(3)] for i in range(9): for j in ran...
26.875
63
0.398837
c376286ccd3a9fbd714f15729b2949a883024f1f
3,633
py
Python
empirical-analyses/bin/plot-div-models.py
joaks1/msbayes-experiments
72fcf3c26f6d92bdcc39343372552f45d72d8f7f
[ "CC-BY-4.0" ]
null
null
null
empirical-analyses/bin/plot-div-models.py
joaks1/msbayes-experiments
72fcf3c26f6d92bdcc39343372552f45d72d8f7f
[ "CC-BY-4.0" ]
null
null
null
empirical-analyses/bin/plot-div-models.py
joaks1/msbayes-experiments
72fcf3c26f6d92bdcc39343372552f45d72d8f7f
[ "CC-BY-4.0" ]
null
null
null
#! /usr/bin/env python import os import sys from pymsbayes import plotting from pymsbayes.utils import parsing from pymsbayes.utils.messaging import get_logger import project_util _LOG = get_logger(__name__) def get_div_model_result_path(dmc_sim_result, iteration_index): path = (dmc_sim_result.get_result_path_p...
34.932692
91
0.661712
d9e0f54b724d3b44db158c6d57e7220d28cf7b8a
9,668
py
Python
tensorflow/contrib/slim/python/slim/evaluation_test.py
AlexChrisF/udacity
b7f85a74058fc63ccb7601c418450ab934ef5953
[ "Apache-2.0" ]
522
2016-06-08T02:15:50.000Z
2022-03-02T05:30:36.000Z
tensorflow/contrib/slim/python/slim/evaluation_test.py
AlexChrisF/udacity
b7f85a74058fc63ccb7601c418450ab934ef5953
[ "Apache-2.0" ]
48
2016-07-26T00:11:55.000Z
2022-02-23T13:36:33.000Z
tensorflow/contrib/slim/python/slim/evaluation_test.py
AlexChrisF/udacity
b7f85a74058fc63ccb7601c418450ab934ef5953
[ "Apache-2.0" ]
108
2016-06-16T15:34:05.000Z
2022-03-12T13:23:11.000Z
# Copyright 2016 The TensorFlow 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 applica...
37.618677
84
0.716798
9adc1a7df990d30f98fa1a596515b68594c12ed7
33
py
Python
misc/sys.py
NaaYaa-oops/py-change-mac-address
df5d50519ca42c3b269eb6795ef697acee8e14de
[ "MIT" ]
null
null
null
misc/sys.py
NaaYaa-oops/py-change-mac-address
df5d50519ca42c3b269eb6795ef697acee8e14de
[ "MIT" ]
null
null
null
misc/sys.py
NaaYaa-oops/py-change-mac-address
df5d50519ca42c3b269eb6795ef697acee8e14de
[ "MIT" ]
null
null
null
import sys sys.tracebacklimit = 0
16.5
22
0.818182
a71867e953311004a5f7695795e8dc130fcbfe10
2,887
py
Python
backend/kesaseteli/applications/migrations/0015_set_real_schools.py
City-of-Helsinki/kesaseteli
964f801c2dba72c4105b6e436b12b821b199d6d2
[ "MIT" ]
2
2021-05-10T09:28:35.000Z
2021-05-17T12:15:34.000Z
backend/kesaseteli/applications/migrations/0015_set_real_schools.py
City-of-Helsinki/yjdh
1c07576b456d2be9c3171363450ed46de2c1bbcb
[ "MIT" ]
931
2021-05-21T15:24:35.000Z
2022-03-31T20:07:40.000Z
backend/kesaseteli/applications/migrations/0015_set_real_schools.py
City-of-Helsinki/yjdh
1c07576b456d2be9c3171363450ed46de2c1bbcb
[ "MIT" ]
6
2021-07-06T11:07:02.000Z
2022-02-07T12:42:21.000Z
from django.db import migrations, transaction REAL_SCHOOL_LIST = [ "Aleksis Kiven peruskoulu", "Apollon yhteiskoulu", "Arabian peruskoulu", "Aurinkolahden peruskoulu", "Botby grundskola", "Elias-koulu", "Englantilainen koulu", "Grundskolan Norsen", "Haagan peruskoulu", "Helsing...
28.303922
74
0.692068
ea2b909b86a10ecd9b7601b658352748794199cc
1,564
py
Python
zwave_js_server/model/log_config.py
firstof9/zwave-js-server-python
728d1e44277b8c69fac06eba1f8362c281762bf7
[ "Apache-2.0" ]
53
2021-01-09T18:47:34.000Z
2022-03-16T21:54:41.000Z
zwave_js_server/model/log_config.py
firstof9/zwave-js-server-python
728d1e44277b8c69fac06eba1f8362c281762bf7
[ "Apache-2.0" ]
130
2021-01-06T21:34:46.000Z
2022-03-29T18:44:14.000Z
zwave_js_server/model/log_config.py
firstof9/zwave-js-server-python
728d1e44277b8c69fac06eba1f8362c281762bf7
[ "Apache-2.0" ]
17
2021-01-07T21:55:29.000Z
2022-03-29T08:08:50.000Z
"""Provide a model for the log config.""" from dataclasses import dataclass from typing import Optional, TypedDict, cast from ..const import LogLevel class LogConfigDataType(TypedDict, total=False): """Represent a log config data dict type.""" enabled: bool level: int logToFile: bool filename: s...
30.666667
95
0.629156
ccb8e9205e5f29123f69441b5cc34b69fa35a6bb
47,131
py
Python
seaborn/matrix.py
llzenoll/seaborn
56743dbf2663f30bf55949b3dfe984bf6177ba6a
[ "BSD-3-Clause" ]
2
2019-01-13T19:21:05.000Z
2021-04-01T05:12:15.000Z
seaborn/matrix.py
llzenoll/seaborn
56743dbf2663f30bf55949b3dfe984bf6177ba6a
[ "BSD-3-Clause" ]
null
null
null
seaborn/matrix.py
llzenoll/seaborn
56743dbf2663f30bf55949b3dfe984bf6177ba6a
[ "BSD-3-Clause" ]
null
null
null
"""Functions to visualize matrices of data.""" from __future__ import division import itertools import matplotlib as mpl from matplotlib.collections import LineCollection import matplotlib.pyplot as plt from matplotlib import gridspec import numpy as np import pandas as pd from scipy.cluster import hierarchy from . i...
36.198925
97
0.592179
c6e31c27fbb5c2121b5ac1d8cbc87c8f10872a92
584
py
Python
mining/compute_probabilities_of_finality.py
kevaundray/research
16f20848c614b580071fed3d2ff1dc69688fa4f4
[ "MIT" ]
1,351
2015-09-22T08:17:10.000Z
2022-03-31T22:48:07.000Z
mining/compute_probabilities_of_finality.py
kevaundray/research
16f20848c614b580071fed3d2ff1dc69688fa4f4
[ "MIT" ]
42
2016-08-31T14:43:29.000Z
2021-12-05T23:10:31.000Z
mining/compute_probabilities_of_finality.py
LaudateCorpus1/research
6e8b7b367e7f1b18b4b92151df01dfeaa0774a23
[ "MIT" ]
334
2015-09-20T10:15:23.000Z
2022-03-28T17:46:57.000Z
import math BLKTIME = 17 X = 0.28 faclog = [1] for i in range(5000): faclog.append(faclog[-1] * len(faclog)) def fac(x): return faclog[x] def poisson(expected, actual): if expected == 0: return 1 if actual == 0 else 0 return 2.718281828 ** (-expected + actual * math.log(expected) - math.log(f...
20.857143
91
0.590753
66409d417fd78fc45ab30d9be9a83009f9b61d51
11,333
py
Python
src/mp_api/core/client.py
jmmshn/api
5254a453f6ec749793639e4ec08bea14628c7dc3
[ "BSD-3-Clause-LBNL" ]
null
null
null
src/mp_api/core/client.py
jmmshn/api
5254a453f6ec749793639e4ec08bea14628c7dc3
[ "BSD-3-Clause-LBNL" ]
159
2020-11-16T16:02:31.000Z
2022-03-28T15:03:38.000Z
src/mp_api/core/client.py
jmmshn/api
5254a453f6ec749793639e4ec08bea14628c7dc3
[ "BSD-3-Clause-LBNL" ]
null
null
null
# coding: utf-8 """ This module provides classes to interface with the Materials Project REST API v3 to enable the creation of data structures and pymatgen objects using Materials Project data. """ import json import platform import sys from json import JSONDecodeError from typing import Dict, Optional, List, Union fr...
33.430678
109
0.552016
a4cb52605fe8e8c60ad805fef6821b8c6f16b98e
846
py
Python
catalog/forms.py
T1mL3arn/MDN-Django-Tutorial
4738e7acce61a163f119817a35b22c5c3b98bf5a
[ "MIT" ]
1
2019-01-10T10:45:48.000Z
2019-01-10T10:45:48.000Z
catalog/forms.py
T1mL3arn/MDN-Django-Tutorial
4738e7acce61a163f119817a35b22c5c3b98bf5a
[ "MIT" ]
3
2020-02-12T03:10:44.000Z
2021-06-20T05:55:51.000Z
catalog/forms.py
T1mL3arn/MDN-Django-Tutorial
4738e7acce61a163f119817a35b22c5c3b98bf5a
[ "MIT" ]
null
null
null
import datetime from django import forms from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ class RenewBookForm(forms.Form): renewal_date = forms.DateField(help_text='Enter a date between now and 4 weeks (default 3).') def clean_renewal_date(self): ...
35.25
97
0.676123