hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
247
max_forks_repo_name
stringlengths
4
130
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
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
afef63e10dcab315e8a8228baa2f5594926db8a5
1,079
py
Python
thp_log.py
alson/dmm-logging
1fa854e6ed6b06ed4d8c273e5396cf1db105ca20
[ "MIT" ]
null
null
null
thp_log.py
alson/dmm-logging
1fa854e6ed6b06ed4d8c273e5396cf1db105ca20
[ "MIT" ]
null
null
null
thp_log.py
alson/dmm-logging
1fa854e6ed6b06ed4d8c273e5396cf1db105ca20
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import time import datetime import csv import os import board import busio import adafruit_bme280 OUTPUT_FILE='thp_log.csv' SAMPLE_INTERVAL=5 i2c = busio.I2C(board.SCL, board.SDA) sensor = adafruit_bme280.Adafruit_BME280_I2C(i2c) sensor.mode = adafruit_bme280.MODE_FORCE sensor.overscan_pressure = ...
29.162162
99
0.706209
#!/usr/bin/python3 import time import datetime import csv import os import board import busio import adafruit_bme280 OUTPUT_FILE='thp_log.csv' SAMPLE_INTERVAL=5 i2c = busio.I2C(board.SCL, board.SDA) sensor = adafruit_bme280.Adafruit_BME280_I2C(i2c) sensor.mode = adafruit_bme280.MODE_FORCE sensor.overscan_pressure = ...
0
0
0
0
0
0
0
0
0
82ee445da32209bb33260fd34c61970b16d52a9e
3,155
py
Python
customer_app/benchmark/security_aes/tests/benchmark_security_aes_ecb_tc_test.py
zhiqiang-hu/bl_iot_sdk
154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d
[ "Apache-2.0" ]
3
2020-10-29T04:58:44.000Z
2020-11-02T07:44:32.000Z
customer_app/benchmark/security_aes/tests/benchmark_security_aes_ecb_tc_test.py
zhiqiang-hu/bl_iot_sdk
154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d
[ "Apache-2.0" ]
null
null
null
customer_app/benchmark/security_aes/tests/benchmark_security_aes_ecb_tc_test.py
zhiqiang-hu/bl_iot_sdk
154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d
[ "Apache-2.0" ]
3
2020-10-28T17:37:41.000Z
2022-01-28T07:14:31.000Z
from __future__ import print_function from __future__ import unicode_literals if __name__ == '__main__': benchmark_security_aes_tc()
40.448718
116
0.572742
from __future__ import print_function from __future__ import unicode_literals import time import re from tiny_test_fw import DUT, App, TinyFW from ttfw_bl import BL602App, BL602DUT @TinyFW.test_method(app=BL602App.BL602App, dut=BL602DUT.BL602TyMbDUT, test_suite_name='benchmark_security_aes_tc') def benchmark_securit...
0
2,888
0
0
0
0
0
15
112
45f79c66e0dabbe1b0db161c8db69c2ca4745715
2,579
py
Python
anchorman/main.py
sahemmen/anchorman
69e027089ae3ff4be364776f3b76a3e5471015d1
[ "Apache-2.0" ]
9
2015-05-26T21:53:48.000Z
2020-03-07T19:50:40.000Z
anchorman/main.py
sahemmen/anchorman
69e027089ae3ff4be364776f3b76a3e5471015d1
[ "Apache-2.0" ]
2
2017-07-20T12:54:18.000Z
2021-03-25T21:43:37.000Z
anchorman/main.py
sahemmen/anchorman
69e027089ae3ff4be364776f3b76a3e5471015d1
[ "Apache-2.0" ]
4
2015-05-05T12:08:45.000Z
2020-03-07T19:50:29.000Z
# -*- coding: utf-8 -*- from anchorman.elements import create_element from anchorman.elements import remove_elements from anchorman.intervals import all_intervals from anchorman.result import applicables from anchorman.result import augment_result from anchorman.settings import get_config from anchorman.utils import se...
32.64557
77
0.687088
# -*- coding: utf-8 -*- from anchorman.elements import create_element from anchorman.elements import remove_elements from anchorman.intervals import all_intervals from anchorman.result import applicables from anchorman.result import augment_result from anchorman.settings import get_config from anchorman.utils import lo...
0
0
0
0
0
0
0
10
22
002d04e41fa08a3e43a3b793555cadb925d10e8f
4,361
py
Python
conjureup/controllers/juju/jaaslogin/gui.py
iMichka/conjure-up
8e4599e6f58b52163384150d8d71e7802462d126
[ "MIT" ]
1
2019-06-26T23:39:13.000Z
2019-06-26T23:39:13.000Z
conjureup/controllers/juju/jaaslogin/gui.py
iMichka/conjure-up
8e4599e6f58b52163384150d8d71e7802462d126
[ "MIT" ]
null
null
null
conjureup/controllers/juju/jaaslogin/gui.py
iMichka/conjure-up
8e4599e6f58b52163384150d8d71e7802462d126
[ "MIT" ]
1
2020-10-05T14:42:31.000Z
2020-10-05T14:42:31.000Z
_controller_class = JaaSLoginController
37.594828
77
0.585645
import asyncio from subprocess import CalledProcessError from conjureup import controllers, juju from conjureup.app_config import app from conjureup.consts import JAAS_DOMAIN from conjureup.ui.views.interstitial import InterstitialView from conjureup.ui.views.jaas import JaaSLoginView class JaaSLoginController: ...
0
0
1,179
2,829
0
0
0
132
178
5313cc1b55ce340e0ced60e01b49fcdf40cb5991
1,285
py
Python
demo/demo_resource.py
nearform/udaru-anomaly-detection
ffae43713ef51135f6cf32e9244a5af098f888fe
[ "Apache-2.0" ]
4
2018-06-11T15:35:07.000Z
2021-03-16T14:19:31.000Z
demo/demo_resource.py
nearform/udaru-anomaly-detection
ffae43713ef51135f6cf32e9244a5af098f888fe
[ "Apache-2.0" ]
null
null
null
demo/demo_resource.py
nearform/udaru-anomaly-detection
ffae43713ef51135f6cf32e9244a5af098f888fe
[ "Apache-2.0" ]
1
2019-04-04T16:36:19.000Z
2019-04-04T16:36:19.000Z
import pickle import os.path as path from udaru_anomaly_detection import check_length, check_distribution, check_gramma from udaru_anomaly_detection.tests.generator import generate_resource dirname = path.dirname(path.realpath(__file__)) modeldir = path.join(dirname, 'models') train_dataset = list(generate_resource...
29.204545
90
0.691829
import pickle import os.path as path from udaru_anomaly_detection \ import check_length, check_distribution, check_gramma from udaru_anomaly_detection.tests.generator import generate_resource dirname = path.dirname(path.realpath(__file__)) modeldir = path.join(dirname, 'models') train_dataset = list(generate_re...
0
0
0
0
0
0
0
6
0
d25d18a9752c9dbc3d347b2aacb549f2b89da931
7,557
py
Python
src/Methods/DataFrom2Persons/Univariate/Continuous/Nonlinear/PhaseSynchro_Strobo.py
syncpy/SyncPy
70f990971a4b4215549559134812c7469c87c88f
[ "CECILL-B" ]
20
2015-11-27T10:08:57.000Z
2021-11-17T22:19:36.000Z
src/Methods/DataFrom2Persons/Univariate/Continuous/Nonlinear/PhaseSynchro_Strobo.py
syncpy/SyncPy
70f990971a4b4215549559134812c7469c87c88f
[ "CECILL-B" ]
3
2015-11-13T13:08:04.000Z
2022-02-03T15:42:40.000Z
src/Methods/DataFrom2Persons/Univariate/Continuous/Nonlinear/PhaseSynchro_Strobo.py
syncpy/SyncPy
70f990971a4b4215549559134812c7469c87c88f
[ "CECILL-B" ]
14
2015-12-17T09:25:43.000Z
2021-02-26T14:37:48.000Z
### This file is a part of the Syncpy library. ### Copyright 2015, ISIR / Universite Pierre et Marie Curie (UPMC) ### Main contributor(s): Giovanna Varni, Marie Avril, ### syncpy@isir.upmc.fr ### ### This software is a computer program whose for investigating ### synchrony in a fast and exhaustive way. ### ### This ...
37.410891
149
0.633585
### This file is a part of the Syncpy library. ### Copyright 2015, ISIR / Universite Pierre et Marie Curie (UPMC) ### Main contributor(s): Giovanna Varni, Marie Avril, ### syncpy@isir.upmc.fr ### ### This software is a computer program whose for investigating ### synchrony in a fast and exhaustive way. ### ### This ...
0
175
0
5,232
0
0
0
38
268
7c461884250dd350511eefdec3ef7e9eb5f5a91e
2,430
py
Python
webapp/mysite/urls.py
kvnlee5818/immunichain
8c3e6a38772117554f54a855b0d6d92bdeb413e2
[ "Apache-2.0" ]
null
null
null
webapp/mysite/urls.py
kvnlee5818/immunichain
8c3e6a38772117554f54a855b0d6d92bdeb413e2
[ "Apache-2.0" ]
null
null
null
webapp/mysite/urls.py
kvnlee5818/immunichain
8c3e6a38772117554f54a855b0d6d92bdeb413e2
[ "Apache-2.0" ]
null
null
null
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
46.730769
97
0.70823
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
0
0
0
0
0
0
0
9
0
cc0ce0cb8882bb89ac197f9e7f53e8a97d9b5f79
3,620
py
Python
homeassistant/components/wirelesstag/sensor.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
11
2018-02-16T15:35:47.000Z
2020-01-14T15:20:00.000Z
homeassistant/components/wirelesstag/sensor.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
79
2020-07-23T07:13:37.000Z
2022-03-22T06:02:37.000Z
homeassistant/components/wirelesstag/sensor.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
6
2018-02-04T03:48:55.000Z
2022-01-24T20:37:04.000Z
"""Sensor support for Wireless Sensor Tags platform.""" import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_MONITORED_CONDITIONS import homeassistant.helpers.config_validation as cv from . import DOMAIN as WIRELESSTAG_DOMAIN _LOGGE...
30.940171
86
0.671547
"""Sensor support for Wireless Sensor Tags platform.""" import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.const import CONF_MONITORED_CONDITIONS from homeassistant.core import callback import homeassistant.helpers.config_validation as ...
0
1,036
293
845
0
0
0
122
67
776569ab8035ca48ed9e4d124ffbe78db9d599de
872
py
Python
src/consumergroup_function.py
hash89/kafka-client
ce4cbc3451c1b22190431fb42694b3b03765ae4e
[ "Apache-2.0" ]
2
2016-07-07T20:27:50.000Z
2016-11-30T14:08:40.000Z
src/consumergroup_function.py
hash89/kafka-cli
ce4cbc3451c1b22190431fb42694b3b03765ae4e
[ "Apache-2.0" ]
null
null
null
src/consumergroup_function.py
hash89/kafka-cli
ce4cbc3451c1b22190431fb42694b3b03765ae4e
[ "Apache-2.0" ]
2
2016-07-20T08:44:02.000Z
2020-12-17T11:49:10.000Z
import os # Exemple # main.py consumergroup list # main.py consumergroup describe groupe1 KAFKA_HOME = str(os.getenv("KAFKA_HOME")) KAFKA_BROKERS = str(os.getenv("KAFKA_BROKERS")) KAFKA_ZOOKEEPER = str(os.getenv("KAFKA_ZOOKEEPER")) KAFKA_CONNECT = str(os.getenv("KAFKA_BROKERS")) if not os.getenv("KAFKA_CONNECT...
33.538462
119
0.698394
import os from print_function import consumergroup_usage # Exemple # main.py consumergroup list # main.py consumergroup describe groupe1 KAFKA_HOME = str(os.getenv("KAFKA_HOME")) KAFKA_BROKERS = str(os.getenv("KAFKA_BROKERS")) KAFKA_ZOOKEEPER = str(os.getenv("KAFKA_ZOOKEEPER")) KAFKA_CONNECT = str(os.getenv("...
0
0
0
0
0
300
0
25
98
ad6a42bee36661cc34cc8092771874fe049cb50e
121
py
Python
light_simple_access/__init__.py
Sarcares/HAss-TM-Integrations
9a5df6dd204830bb4dd2d9b9ebca52ded3128115
[ "MIT" ]
null
null
null
light_simple_access/__init__.py
Sarcares/HAss-TM-Integrations
9a5df6dd204830bb4dd2d9b9ebca52ded3128115
[ "MIT" ]
null
null
null
light_simple_access/__init__.py
Sarcares/HAss-TM-Integrations
9a5df6dd204830bb4dd2d9b9ebca52ded3128115
[ "MIT" ]
null
null
null
"""A Light designed to have access to other component's private data when is toggled.""" DOMAIN = "light_simple_access"
30.25
88
0.760331
"""A Light designed to have access to other component's private data when is toggled.""" DOMAIN = "light_simple_access"
0
0
0
0
0
0
0
0
0
0890e37be17b79a33848678f47c5a1a9bac0fadf
572
py
Python
recipes/sota/2019/lm_analysis/generate_shuffle_dev_other_tts.py
Zilv1128/test1
49fbb1392e69b5194c077df9847505ec995b4e3d
[ "BSD-3-Clause" ]
5,921
2017-12-29T17:04:46.000Z
2021-04-16T00:37:35.000Z
recipes/sota/2019/lm_analysis/generate_shuffle_dev_other_tts.py
piEYj/wav2letter
49fbb1392e69b5194c077df9847505ec995b4e3d
[ "BSD-3-Clause" ]
949
2018-01-01T06:36:58.000Z
2021-04-16T06:49:05.000Z
recipes/sota/2019/lm_analysis/generate_shuffle_dev_other_tts.py
piEYj/wav2letter
49fbb1392e69b5194c077df9847505ec995b4e3d
[ "BSD-3-Clause" ]
1,032
2017-12-30T09:47:51.000Z
2021-04-11T11:40:00.000Z
import os import sys import numpy numpy.random.seed(42) with open(os.path.join(sys.argv[1], "dev-other.lst"), "r") as f: data = [line.strip() for line in f] for n, seed_val in enumerate([0, 2, 3, 4, 5]): numpy.random.seed(42 + seed_val) data = numpy.random.permutation(data) with open("tts_shuffle...
24.869565
64
0.589161
import os import sys import numpy numpy.random.seed(42) with open(os.path.join(sys.argv[1], "dev-other.lst"), "r") as f: data = [line.strip() for line in f] for n, seed_val in enumerate([0, 2, 3, 4, 5]): numpy.random.seed(42 + seed_val) data = numpy.random.permutation(data) with open("tts_shuffle...
0
0
0
0
0
0
0
0
0
9cbdee298bdd8205c220856018755461a8ee7cab
11,730
py
Python
main.py
smjnab/WiPee
50cba36ffe71dc667386fcdfd074dd7931b99222
[ "MIT" ]
1
2018-07-09T08:58:21.000Z
2018-07-09T08:58:21.000Z
main.py
smjnab/WiPee
50cba36ffe71dc667386fcdfd074dd7931b99222
[ "MIT" ]
null
null
null
main.py
smjnab/WiPee
50cba36ffe71dc667386fcdfd074dd7931b99222
[ "MIT" ]
1
2018-08-19T12:54:08.000Z
2018-08-19T12:54:08.000Z
import time import machine from network import WLAN from machine import Pin ################################################################################################### # CONFIG NETWORK ################################################################################################### ip = 'EDIT_ME' ...
31.788618
112
0.475533
import time import json import machine import os from network import WLAN from machine import Pin from MQTTLib import AWSIoTMQTTClient ################################################################################################### # CONFIG NETWORK ##################################################################...
0
0
0
0
0
4,002
0
-7
179
bc44cb4ec32e0b44a50c55da9147dbc5909b89e3
104
py
Python
fangSpider/mysqlcfg.py
Yoyocyw/newtest
4fa756c0bb972a2fa5db8a6bc0da57d995bcef71
[ "MIT" ]
4
2020-06-02T15:44:47.000Z
2022-03-17T17:25:52.000Z
fangSpider/mysqlcfg.py
Yoyocyw/newtest
4fa756c0bb972a2fa5db8a6bc0da57d995bcef71
[ "MIT" ]
null
null
null
fangSpider/mysqlcfg.py
Yoyocyw/newtest
4fa756c0bb972a2fa5db8a6bc0da57d995bcef71
[ "MIT" ]
1
2020-06-01T00:27:42.000Z
2020-06-01T00:27:42.000Z
host = '127.0.0.1' user = 'root' passwd = '12345678' database ='fangSpider' TABLENAME = 'loupanindexzzz'
20.8
28
0.701923
host = '127.0.0.1' user = 'root' passwd = '12345678' database ='fangSpider' TABLENAME = 'loupanindexzzz'
0
0
0
0
0
0
0
0
0
bd2f004b5518c582a9a3301e52251456e0007e6e
401
py
Python
dta.py
ripon1763/hdss_chakaria
0b8484c14c3596defab6133860c598b23bb07a34
[ "MIT" ]
1
2021-12-29T03:21:03.000Z
2021-12-29T03:21:03.000Z
python/dta.py
ripon1763/hdss_chakaria
0b8484c14c3596defab6133860c598b23bb07a34
[ "MIT" ]
null
null
null
python/dta.py
ripon1763/hdss_chakaria
0b8484c14c3596defab6133860c598b23bb07a34
[ "MIT" ]
null
null
null
import sys import pandas as pd import json import os import numpy as np #opening the json file f = open(sys.argv[1]+".json", "r") x=f.read() # parse x: data = json.loads(x) # Creates DataFrame. df = pd.DataFrame(data) df = df.fillna(value=np.nan) f.close() #print(df) df.to_stata(sys.argv[2...
13.827586
44
0.638404
import sys import pandas as pd import json import os import numpy as np #opening the json file f = open(sys.argv[1]+".json", "r") x=f.read() # parse x: data = json.loads(x) # Creates DataFrame. df = pd.DataFrame(data) df = df.fillna(value=np.nan) f.close() #print(df) df.to_stata(sys.argv[2...
0
0
0
0
0
0
0
0
0
0ef88c1ca74c7758876d4f67d246529cb17041a8
11,680
py
Python
legislature/views.py
SpringtideCollectiveOrg/openhousens.ca
050547f5caf6e02a3f463312920f4ff54decfdea
[ "MIT" ]
8
2015-04-14T19:28:13.000Z
2021-08-12T13:56:14.000Z
legislature/views.py
opennorth/openhousens.ca
050547f5caf6e02a3f463312920f4ff54decfdea
[ "MIT" ]
6
2015-05-12T17:03:27.000Z
2016-01-25T23:57:22.000Z
legislature/views.py
opennorth/openhousens.ca
050547f5caf6e02a3f463312920f4ff54decfdea
[ "MIT" ]
1
2019-06-26T13:51:47.000Z
2019-06-26T13:51:47.000Z
import re STOPWORDS = frozenset([ # nltk.corpus.stopwords.words('english') 'i', 'me', 'my', 'myself', 'we', 'our', 'ours', 'ourselves', 'you', 'your', 'yours', 'yourself', 'yourselves', 'he', 'him', 'his', 'himself', 'she', 'her', 'hers', 'herself', 'it', 'its', 'itself', 'they', 'them', 'their', 'thei...
41.565836
213
0.672432
import calendar import json import re from collections import defaultdict from heapq import nlargest from operator import itemgetter from django import forms from django.db.models import Count from django.shortcuts import get_object_or_404, render_to_response from django.utils.html import strip_tags from django.views....
9
0
0
6,047
0
1,470
0
341
741
5653a4f98e27ee08e30198f78393edee24a1ff4a
5,414
py
Python
main.py
TinSlim/Crypto-USD-GoalTelegramBot
807ea54c31e2784699c5280328497131301bca31
[ "MIT" ]
null
null
null
main.py
TinSlim/Crypto-USD-GoalTelegramBot
807ea54c31e2784699c5280328497131301bca31
[ "MIT" ]
null
null
null
main.py
TinSlim/Crypto-USD-GoalTelegramBot
807ea54c31e2784699c5280328497131301bca31
[ "MIT" ]
null
null
null
from telegram.ext import Updater from telegram.ext import CommandHandler updater = Updater(token=TOKEN_VAR, use_context=True) dispatcher = updater.dispatcher job_queue = updater.job_queue url = "https://api.binance.com/api/v3/ticker/price" currency = {} #### Handlers SetUp #### start_handler = Comm...
36.33557
116
0.664389
from telegram.ext import Updater from telegram.ext import CommandHandler from telegram.ext import JobQueue from telegram.ext import Job import time import requests import json import os.path from VARIABLES import * updater = Updater(token=TOKEN_VAR, use_context=True) dispatcher = updater.dispatcher job_queue = update...
10
0
0
0
0
4,227
0
-12
342
605bc7ebf061c05739b5ccbb5e53a74c2115ae55
8,426
py
Python
caluma/workflow/tests/test_case.py
ganwell/caluma
62d2d11cc908f9da1026f2ca05b95476970fdd7a
[ "MIT" ]
null
null
null
caluma/workflow/tests/test_case.py
ganwell/caluma
62d2d11cc908f9da1026f2ca05b95476970fdd7a
[ "MIT" ]
null
null
null
caluma/workflow/tests/test_case.py
ganwell/caluma
62d2d11cc908f9da1026f2ca05b95476970fdd7a
[ "MIT" ]
null
null
null
from .. import models
28.562712
87
0.478994
import pytest from ...core.relay import extract_global_id from ...form.models import Question from .. import models @pytest.mark.parametrize( "case__status,result_count", [(models.Case.STATUS_RUNNING, 1), (models.Case.STATUS_COMPLETED, 0)], ) def test_query_all_cases(db, snapshot, case, result_count, flow, s...
0
4,044
0
0
0
4,073
0
28
251
8cd136383a96b797ed0f10bcf6ea29aac8012441
607
py
Python
bookstore/news/migrations/0004_remove_articlelike_article_remove_articlelike_user_and_more.py
M0673N/bookstore
ec9477550ba46f9ffde3817cf676e97b0239263d
[ "MIT" ]
null
null
null
bookstore/news/migrations/0004_remove_articlelike_article_remove_articlelike_user_and_more.py
M0673N/bookstore
ec9477550ba46f9ffde3817cf676e97b0239263d
[ "MIT" ]
null
null
null
bookstore/news/migrations/0004_remove_articlelike_article_remove_articlelike_user_and_more.py
M0673N/bookstore
ec9477550ba46f9ffde3817cf676e97b0239263d
[ "MIT" ]
null
null
null
# Generated by Django 4.0.3 on 2022-04-08 10:27
21.678571
61
0.558484
# Generated by Django 4.0.3 on 2022-04-08 10:27 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('news', '0003_rename_articlereview_articlecomment'), ] operations = [ migrations.RemoveField( model_name='articlelike', name=...
0
0
0
501
0
0
0
11
46
e0105e4e4ce82096a090026123f8f13e64c222fe
169
py
Python
Chapter 7/rental_car.py
WilliamJaber/Python-Crash-Course
d87621785011039fbe0b42f0d8b6cd2364246577
[ "MIT" ]
null
null
null
Chapter 7/rental_car.py
WilliamJaber/Python-Crash-Course
d87621785011039fbe0b42f0d8b6cd2364246577
[ "MIT" ]
null
null
null
Chapter 7/rental_car.py
WilliamJaber/Python-Crash-Course
d87621785011039fbe0b42f0d8b6cd2364246577
[ "MIT" ]
5
2021-09-22T16:53:47.000Z
2022-03-24T00:56:49.000Z
car_input = input('Welcome, what kind of car would you like to rent?\n' ) print(f"{car_input.upper()}?? sure, we have different models {car_input}'s let me show you!" )
56.333333
94
0.710059
car_input = input('Welcome, what kind of car would you like to rent?\n' ) print(f"{car_input.upper()}?? sure, we have different models {car_input}'s let me show you!" )
0
0
0
0
0
0
0
0
0
3c0d5626786ff05db8378f30f76be6da62be5b78
1,856
py
Python
client/TraceGenerator.py
mengyingzhou/FlexHTTP
40a931fa910f3709b9ff79ad5e10ce8c01c1c246
[ "BSD-3-Clause" ]
1
2022-03-16T17:19:10.000Z
2022-03-16T17:19:10.000Z
client/TraceGenerator.py
mengyingzhou/FlexHTTP
40a931fa910f3709b9ff79ad5e10ce8c01c1c246
[ "BSD-3-Clause" ]
null
null
null
client/TraceGenerator.py
mengyingzhou/FlexHTTP
40a931fa910f3709b9ff79ad5e10ce8c01c1c246
[ "BSD-3-Clause" ]
null
null
null
import pickle if __name__ == "__main__": tg = TraceGenerator( use_existing_trace=False, url_nums=240, trace_length=2400, ) trace = tg.generate_new_trace() with open('data/trace.pickle', 'wb') as fp: pickle.dump(trace, fp)
32
151
0.641703
import os import sys import re import json import random import pickle import numpy as np class TraceGenerator: def __init__(self, use_existing_trace: bool, url_nums: int, trace_length: int, existing_trace="data/trace.pickle") -> None: self.use_existing_trace = use_existing_trace self.url_nums = u...
0
0
0
1,484
0
0
0
-56
155
f74f127df27a736a758c2f4e3e35729ef9654edc
896
py
Python
BarCrawlrServerTest/model/planTest.py
Kaybass/BarCrawlrServer
d196000d5807324a745fc9498f6f70cd3253ec22
[ "MIT" ]
null
null
null
BarCrawlrServerTest/model/planTest.py
Kaybass/BarCrawlrServer
d196000d5807324a745fc9498f6f70cd3253ec22
[ "MIT" ]
null
null
null
BarCrawlrServerTest/model/planTest.py
Kaybass/BarCrawlrServer
d196000d5807324a745fc9498f6f70cd3253ec22
[ "MIT" ]
null
null
null
import unittest myPlan = "{" +\ "\"name\":\"Alex's Plan\"," +\ "\"places\":[" +\ "{" +\ "\"name\":\"Joe's Bar\"," +\ "\"address\":\"10 King's Street, Burlington, 05401 VT\"," +\ "\"lon\":0.0," +\ "\"lat\":0...
24.216216
76
0.38058
import unittest from BarCrawlrServer.model.plan import plan import json myPlan = "{" +\ "\"name\":\"Alex's Plan\"," +\ "\"places\":[" +\ "{" +\ "\"name\":\"Joe's Bar\"," +\ "\"address\":\"10 King's Street, Burlington, 05401 VT\"," +\ ...
0
0
0
136
0
0
0
12
69
c692153be0b70f3cb73ccc960431a7b3fe88c2b4
485
py
Python
cgi-bin/ejemplo json.py
msolivera/Phyton
1322fa2ff4bb06a17350fefa7e5268c0969e5b53
[ "bzip2-1.0.6" ]
null
null
null
cgi-bin/ejemplo json.py
msolivera/Phyton
1322fa2ff4bb06a17350fefa7e5268c0969e5b53
[ "bzip2-1.0.6" ]
null
null
null
cgi-bin/ejemplo json.py
msolivera/Phyton
1322fa2ff4bb06a17350fefa7e5268c0969e5b53
[ "bzip2-1.0.6" ]
null
null
null
import json data = {"Fruteria": [ {"Fruta": [ {"Nombre":"Manzana","Cantidad":10}, {"Nombre":"Pera","Cantidad":20}, {"Nombre":"Naranja","Cantidad":30} ] }, {"Verdura": [ {"Nombre":"Lechuga","Cantidad":80}, {"Nombre":"Tomate","Cantidad":15}, {"Nombre":"Pepino","Cantidad":50} ] } ]} #encode...
40.416667
298
0.591753
import json data = {"Fruteria": [ {"Fruta": [ {"Nombre":"Manzana","Cantidad":10}, {"Nombre":"Pera","Cantidad":20}, {"Nombre":"Naranja","Cantidad":30} ] }, {"Verdura": [ {"Nombre":"Lechuga","Cantidad":80}, {"Nombre":"Tomate","Cantidad":15}, {"Nombre":"Pepino","Cantidad":50} ] } ]} #encode...
0
0
0
0
0
0
0
0
0
a539b3c55084dd08cebfe1da7463e90a35e13cf3
1,638
py
Python
winery/pena.py
H-B-P/DURKON
bc5f8677df07c08d16017f0925dcc1ad3a660c7b
[ "Unlicense" ]
null
null
null
winery/pena.py
H-B-P/DURKON
bc5f8677df07c08d16017f0925dcc1ad3a660c7b
[ "Unlicense" ]
null
null
null
winery/pena.py
H-B-P/DURKON
bc5f8677df07c08d16017f0925dcc1ad3a660c7b
[ "Unlicense" ]
null
null
null
if __name__ == '__main__': model = {"BIG_C":1.0,"conts":{"x":[[0,0],[1,1]]}, "cats":[]} print(penalize_this_cont_col(model,"x", {"contStraight":0.01})) model = {"BIG_C":1.0,"conts":{"x":[[0,0],[1,1]]}, "cats":[]} print(penalize_this_cont_col(model,"x", {"contGroup":0.01}))
40.95
161
0.668498
import pandas as pd import numpy as np import math import copy def apply_pena(value, pena, boringValue=1): if value>boringValue: return max(boringValue, value-pena) else: return min(boringValue, value+pena) def penalize_this_cont_col(model, col, penalties={"contStraight":0.01, "contGroup":0.01}, boringValue=1):...
0
0
0
0
0
1,225
0
-25
157
d0cfd5bb425a8d8aecd9b0e72779f444c5e9713d
2,045
py
Python
bigchaindb/backend/rethinkdb/changefeed.py
ldmberman/bigchaindb
d2685052a676bf7bb274135a559b501c4cb17db7
[ "Apache-2.0" ]
null
null
null
bigchaindb/backend/rethinkdb/changefeed.py
ldmberman/bigchaindb
d2685052a676bf7bb274135a559b501c4cb17db7
[ "Apache-2.0" ]
null
null
null
bigchaindb/backend/rethinkdb/changefeed.py
ldmberman/bigchaindb
d2685052a676bf7bb274135a559b501c4cb17db7
[ "Apache-2.0" ]
null
null
null
import logging from bigchaindb import backend from bigchaindb.backend.utils import module_dispatch_registrar logger = logging.getLogger(__name__) register_changefeed = module_dispatch_registrar(backend.changefeed)
34.083333
74
0.685086
import time import logging import rethinkdb as r from bigchaindb import backend from bigchaindb.backend.exceptions import BackendError from bigchaindb.backend.changefeed import ChangeFeed from bigchaindb.backend.utils import module_dispatch_registrar from bigchaindb.backend.rethinkdb.connection import RethinkDBConnect...
0
359
0
782
401
0
0
104
179
7c8c7a3d648bad08ce00b6866f3687f2f6863860
6,788
py
Python
src/contractExtractor/lockedEtherExtractor/judgePath.py
xf97/HuangGai
40a349be6102d5eb63893fb914659405ae162d93
[ "MIT" ]
23
2020-09-20T02:10:44.000Z
2022-03-22T12:58:13.000Z
src/contractExtractor/lockedEtherExtractor/judgePath.py
contractshark/HuangGai
1b26f77b043aa5903774420964c61ab370eb6c7a
[ "MIT" ]
3
2020-09-22T15:28:33.000Z
2022-01-22T07:48:53.000Z
src/contractExtractor/lockedEtherExtractor/judgePath.py
contractshark/HuangGai
1b26f77b043aa5903774420964c61ab370eb6c7a
[ "MIT" ]
5
2021-07-15T02:45:09.000Z
2022-03-21T13:36:40.000Z
#!/usr/bin/python #-*- coding: utf-8 -*- ''' ''' ''' slither slither function-summary human-summary->->Receive ETHpayable requirerequireassert auth ''' # #cache CACHE_PATH = "./cache/" #transfer TRANSFER_FLAG = "transfer" #send SEND_FLAG = "send" # ADDRESS_PAYABLE_FLAG = "address payable" #value VALUE_FLAG = "v...
27.370968
178
0.686948
#!/usr/bin/python #-*- coding: utf-8 -*- ''' 该部分程序用于判断目标合约是否包含转钱出去的语句 ''' ''' 可用工具:slither真是个宝藏工具 slither可能可用的功能: 合约各个函数的调用图 文件中各个合约的继承关系 最子类合约的构造函数执行结果 function-summary里有每个函数读写、内外部调用的总结 human-summary里有对每个合约功能的概述->可以用来判断->不能用来判断,对于Receive ETH而言,只判断payable关键字而不判断合约是否真的可以接收以太币 require显示出每个合约的每个函数中用到的require和assert 最子类合...
2,184
0
0
5,269
0
0
0
-24
188
50c7d88d537a900f3c7d5f436fb1a51bf443291b
666
py
Python
setup.py
rven/python-teamleader
021383836188620f473c526ad63ad03e7bd5ba26
[ "MIT" ]
null
null
null
setup.py
rven/python-teamleader
021383836188620f473c526ad63ad03e7bd5ba26
[ "MIT" ]
1
2016-12-07T20:02:18.000Z
2016-12-07T20:02:18.000Z
setup.py
rven/python-teamleader
021383836188620f473c526ad63ad03e7bd5ba26
[ "MIT" ]
4
2016-11-22T08:43:50.000Z
2020-01-08T15:25:59.000Z
from setuptools import setup from teamleader import __prog__, __version__ setup( name=__prog__, version=__version__, description='python-teamleader', long_description='Library for accessing the Teamleader API (http://apidocs.teamleader.be/)', author='Ruben Van den Bossche, Matteo De Wint', ...
28.956522
96
0.744745
from setuptools import setup, find_packages from teamleader import __prog__, __version__ setup( name=__prog__, version=__version__, description='python-teamleader', long_description='Library for accessing the Teamleader API (http://apidocs.teamleader.be/)', author='Ruben Van den Bossche, Matteo...
0
0
0
0
0
0
0
15
0
19f3d91d7ff991af16bdda77a638794cdafaa972
62
py
Python
tests/data_fixtures/dummy_package/__init__.py
sveetch/Optimus
983aebeccd2ada7a5a0ab96f9296d4bba1112022
[ "MIT" ]
2
2019-05-31T00:23:15.000Z
2021-04-26T07:26:16.000Z
tests/data_fixtures/dummy_package/__init__.py
sveetch/Optimus
983aebeccd2ada7a5a0ab96f9296d4bba1112022
[ "MIT" ]
27
2015-04-21T14:43:26.000Z
2022-01-29T00:42:53.000Z
tests/data_fixtures/dummy_package/__init__.py
sveetch/Optimus
983aebeccd2ada7a5a0ab96f9296d4bba1112022
[ "MIT" ]
1
2017-05-21T17:32:28.000Z
2017-05-21T17:32:28.000Z
""" Just a dummy package to test again importing modules. """
15.5
53
0.709677
""" Just a dummy package to test again importing modules. """
0
0
0
0
0
0
0
0
0
a0b34001bdb3bccaf6f0340403b5d2d9e4ddb0ed
1,067
py
Python
tests/smoke_test.py
aivora-beamng/tool-competition-av
4dbff979b6f3bc8a510f508f0073876117ca2f8c
[ "MIT" ]
null
null
null
tests/smoke_test.py
aivora-beamng/tool-competition-av
4dbff979b6f3bc8a510f508f0073876117ca2f8c
[ "MIT" ]
null
null
null
tests/smoke_test.py
aivora-beamng/tool-competition-av
4dbff979b6f3bc8a510f508f0073876117ca2f8c
[ "MIT" ]
null
null
null
# # This illustrates how the code_pipeline can be used to run the sample test generator # import unittest if __name__ == '__main__': unittest.main()
36.793103
103
0.500469
# # This illustrates how the code_pipeline can be used to run the sample test generator # import unittest from click.testing import CliRunner class RunOneGeneratorTest(unittest.TestCase): def test_code_pipeline(self): BEAMNG_HOME="C://BeamNG.tech.v0.23.5.1" BEAMNG_USER="C://BeamNG.tech.v0.23.5.1...
0
0
0
853
0
0
0
14
45
a53d12ef529ba41b16cbe66dcb5156df8063977a
1,953
py
Python
gene2variant.py
Lyn16/Assignment5
06409d3862beb36b2ebd1bf791fa548bcfafb795
[ "MIT" ]
null
null
null
gene2variant.py
Lyn16/Assignment5
06409d3862beb36b2ebd1bf791fa548bcfafb795
[ "MIT" ]
null
null
null
gene2variant.py
Lyn16/Assignment5
06409d3862beb36b2ebd1bf791fa548bcfafb795
[ "MIT" ]
null
null
null
#!/usr/bin/env python import re import fileinput import json import urllib Lookup = {} key = raw_input("Please type your gene name, all caps, and press enter: ") #print var_matches for line in fileinput.input(['/home/jiawen/data/Homo_sapiens.GRCh37.75.gtf']): gene_id_matches = re.findall('gene_id \"(.*?)\";',line) ...
40.6875
134
0.648746
#!/usr/bin/env python import re import fileinput import json import urllib Lookup = {} key = raw_input("Please type your gene name, all caps, and press enter: ") #print var_matches for line in fileinput.input(['/home/jiawen/data/Homo_sapiens.GRCh37.75.gtf']): gene_id_matches = re.findall('gene_id \"(.*?)\";',line) ...
0
0
0
0
0
0
0
0
0
adbef39e18616ca223c34e494e4394f14d726ab7
1,026
py
Python
apps/topics/views.py
Mozilla-GitHub-Standards/93f18f14efcf5fdfc0e04f9bf247f66baf46663f37b1d2087ab8d850abc90803
4e374b4d52dfb9039ebe543e7f27682189022307
[ "BSD-3-Clause" ]
2
2015-04-06T15:20:29.000Z
2016-12-30T12:25:11.000Z
apps/topics/views.py
Mozilla-GitHub-Standards/93f18f14efcf5fdfc0e04f9bf247f66baf46663f37b1d2087ab8d850abc90803
4e374b4d52dfb9039ebe543e7f27682189022307
[ "BSD-3-Clause" ]
2
2019-02-17T17:38:02.000Z
2019-03-28T03:49:16.000Z
apps/topics/views.py
Mozilla-GitHub-Standards/93f18f14efcf5fdfc0e04f9bf247f66baf46663f37b1d2087ab8d850abc90803
4e374b4d52dfb9039ebe543e7f27682189022307
[ "BSD-3-Clause" ]
1
2019-03-28T03:49:18.000Z
2019-03-28T03:49:18.000Z
from django.shortcuts import get_object_or_404 import jingo from projects.models import Project from topics.models import Topic def all(request): """Show a list of topics.""" # note that we get the list of topics from the bundled context processor projects = Project.objects.all() return jingo.render...
27
76
0.669591
from django.shortcuts import get_object_or_404 import jingo from projects.models import Project from topics.models import Topic def all(request): """Show a list of topics.""" # note that we get the list of topics from the bundled context processor projects = Project.objects.all() return jingo.render...
0
0
0
0
0
0
0
0
0
2b8f6e13c03d804280229707d0e260f038d4a42b
1,841
py
Python
templates/quick_replies.py
harpribot/Qbeak
7d38be94a6f152ad2c79d79e341f05d6ebb87621
[ "MIT" ]
null
null
null
templates/quick_replies.py
harpribot/Qbeak
7d38be94a6f152ad2c79d79e341f05d6ebb87621
[ "MIT" ]
null
null
null
templates/quick_replies.py
harpribot/Qbeak
7d38be94a6f152ad2c79d79e341f05d6ebb87621
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2016 Swapnil Agarwal 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, mer...
41.840909
78
0.77132
""" The MIT License (MIT) Copyright (c) 2016 Swapnil Agarwal 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, mer...
0
0
0
0
0
608
0
12
46
1c9296bd53aa485c120dc184d56ed748065e2ee1
18,876
py
Python
hddcoin/hodl/cli/cmd_commit.py
u4ma-hdd/hddcoin-blockchain
4199d1f1d87e129ae9c08bf50dd48ec3b2c08727
[ "Apache-2.0" ]
5
2021-11-07T23:06:27.000Z
2022-01-15T21:55:01.000Z
hddcoin/hodl/cli/cmd_commit.py
u4ma-hdd/hddcoin-blockchain
4199d1f1d87e129ae9c08bf50dd48ec3b2c08727
[ "Apache-2.0" ]
10
2021-09-15T14:37:28.000Z
2021-10-06T17:15:03.000Z
hddcoin/hodl/cli/cmd_commit.py
u4ma-hdd/hddcoin-blockchain
4199d1f1d87e129ae9c08bf50dd48ec3b2c08727
[ "Apache-2.0" ]
3
2021-11-12T15:17:36.000Z
2022-03-23T23:43:12.000Z
# -*- coding: utf-8 -*- # NOTES: # - this file contains the CLI implementation for `hddcoin hodl commit` from __future__ import annotations import hddcoin.hodl import hddcoin.hodl.exc as exc # Set the threshold for minimum useful/recommended fee value # - this is a rough recommendation based on the minimum fee per...
47.666667
105
0.581744
# -*- coding: utf-8 -*- # NOTES: # - this file contains the CLI implementation for `hddcoin hodl commit` from __future__ import annotations import asyncio import decimal import pathlib import sys import time import typing as th import aiohttp import blspy # type: ignore import yaml import hddcoin.hodl import hddcoi...
0
0
10,698
0
0
6,440
0
-8
532
fe0f61cc55e83d60be1a931c3a593b7225f95b99
4,935
py
Python
lingcorpora/corpora/bam_corpus.py
akv17/lingcorpora.py
2097bd8f54207648a51055f3e870c2d6a4fdbc25
[ "MIT" ]
null
null
null
lingcorpora/corpora/bam_corpus.py
akv17/lingcorpora.py
2097bd8f54207648a51055f3e870c2d6a4fdbc25
[ "MIT" ]
null
null
null
lingcorpora/corpora/bam_corpus.py
akv17/lingcorpora.py
2097bd8f54207648a51055f3e870c2d6a4fdbc25
[ "MIT" ]
null
null
null
TEST_QUERIES = {'test_single_query': 'walasa', 'test_multi_query': ['walasa', 'yr'] } __doc__ = \ """ API for Bamana corpus (http://maslinsky.spb.ru/bonito/index.html). Args: query: str or List([str]): query or queries (currently only exact search by word or phrase is ava...
34.270833
147
0.532928
from ..params_container import Container from requests import get from bs4 import BeautifulSoup from html import unescape from ..target import Target TEST_QUERIES = {'test_single_query': 'walasa', 'test_multi_query': ['walasa', 'yɔrɔ'] } __doc__ = \ """ API for Bamana corpus (http...
4
0
0
3,916
0
0
0
40
133
6028085245ab39199bcf58cb1b9d69b85b8d0e09
4,229
py
Python
montecarlo/rules/rule_invoker.py
andreaolgiati/montecarlo_tf
d3d37961170a70577ed55cd873c1ead87a79aaf6
[ "Apache-2.0" ]
null
null
null
montecarlo/rules/rule_invoker.py
andreaolgiati/montecarlo_tf
d3d37961170a70577ed55cd873c1ead87a79aaf6
[ "Apache-2.0" ]
null
null
null
montecarlo/rules/rule_invoker.py
andreaolgiati/montecarlo_tf
d3d37961170a70577ed55cd873c1ead87a79aaf6
[ "Apache-2.0" ]
null
null
null
from tornasole.core.utils import get_logger logger = get_logger() if __name__ == '__main__': import argparse parser = argparse.ArgumentParser(description='Rule invoker takes the below arguments and' 'any argument taken by the rules. The arguments not' ...
37.758929
99
0.675337
from tornasole.exceptions import * from tornasole.core.utils import get_logger from tornasole.trials import create_trial from tornasole.rules.generic import * import inspect logger = get_logger() def create_trials(comma_separated_trial_dirs, **kwargs): trials = [] for tr_dir in comma_separated_trial_dirs.split('...
0
0
0
0
0
2,646
0
42
203
8365e3b2852c197ed0823518e9e7340213b7df7b
3,272
py
Python
conf_site/urls.py
jasongrout/conf_site
6b3beb21de8d847cba65dcb6da84464b40739d48
[ "MIT" ]
null
null
null
conf_site/urls.py
jasongrout/conf_site
6b3beb21de8d847cba65dcb6da84464b40739d48
[ "MIT" ]
null
null
null
conf_site/urls.py
jasongrout/conf_site
6b3beb21de8d847cba65dcb6da84464b40739d48
[ "MIT" ]
null
null
null
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.admin.views.decorators import staff_member_required from django.urls import path from django.views.generic.base import TemplateView try: import ...
34.083333
76
0.691626
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.admin.views.decorators import staff_member_required from django.urls import path from django.views.generic.base import TemplateView try: import ...
0
0
0
0
0
0
0
34
0
92e61502e813c2461bdc0e583c923ff6fca567ac
7,423
py
Python
sdk/python/pulumi_azure_native/apimanagement/v20191201/get_api_operation.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/apimanagement/v20191201/get_api_operation.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/apimanagement/v20191201/get_api_operation.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi import pulumi.runtime from typing import Optional from ... import _utilities __all__ = [ 'GetApiOperationResult', 'AwaitableGetAp...
36.566502
198
0.645561
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
0
4,585
0
593
0
0
0
35
91
be90df891e7440f2e68888ffc2d6f4da5c00521d
3,966
py
Python
model_search/registry_test.py
LinqCod/model_search
d90bc39994bc2a5f5028035ac954f796eda03310
[ "Apache-2.0" ]
null
null
null
model_search/registry_test.py
LinqCod/model_search
d90bc39994bc2a5f5028035ac954f796eda03310
[ "Apache-2.0" ]
null
null
null
model_search/registry_test.py
LinqCod/model_search
d90bc39994bc2a5f5028035ac954f796eda03310
[ "Apache-2.0" ]
null
null
null
# 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 agreed to in writing, ...
28.328571
79
0.745587
# 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 agreed to in writing, ...
0
376
0
2,303
0
106
0
12
321
c182a86f0d7b1a73c9b07f4f4efa5bacad85503e
855
py
Python
ted_2008_2010/get_only_contract_awards.py
pudo/ted
88bbf7cafb1d8a8be0303c947245fe3c533f068b
[ "MIT" ]
5
2015-12-17T15:21:40.000Z
2018-01-31T17:57:23.000Z
ted_2008_2010/get_only_contract_awards.py
civicdataeu/monnet
88bbf7cafb1d8a8be0303c947245fe3c533f068b
[ "MIT" ]
1
2015-12-10T11:08:40.000Z
2015-12-10T11:08:40.000Z
ted_2008_2010/get_only_contract_awards.py
civicdataeu/monnet
88bbf7cafb1d8a8be0303c947245fe3c533f068b
[ "MIT" ]
9
2015-12-09T11:57:10.000Z
2020-07-14T04:16:55.000Z
import glob # test_i = open(sys.argv[1]) for i in glob.glob('*_META_ORG'): newdata = get_contracts(open(i)) #print newdata with open(i+"CN.xml", "w") as output: output.write(' '.join(str(doc) for doc in newdata)) # [1] in 2008 and 2009 are <proc> and <natnotice> often the same, except of cases where natnotic...
29.482759
121
0.649123
from bs4 import BeautifulSoup as bs import sys,glob def get_contracts(filename): print "opening..." # big files, takes time awards = [] # newdata soup = bs(filename, "lxml") for doc in soup.find_all("doc"): # each notice is a <doc> if doc.natnotice['code'] == "7": # we only want contract aw...
0
0
0
0
0
333
0
18
45
32894b1ed4057f16f8d438d9d30602550d7cb641
170
py
Python
__init__.py
DrGuy/imageprocess
f37f4a69511cd7b6b9e72f9dee65c84f1cfaca5a
[ "CC-BY-4.0" ]
null
null
null
__init__.py
DrGuy/imageprocess
f37f4a69511cd7b6b9e72f9dee65c84f1cfaca5a
[ "CC-BY-4.0" ]
1
2017-10-11T13:00:18.000Z
2017-10-11T13:00:18.000Z
__init__.py
DrGuy/imageprocess
f37f4a69511cd7b6b9e72f9dee65c84f1cfaca5a
[ "CC-BY-4.0" ]
null
null
null
#/usr/bin/python # -*- coding: utf-8 -*- __author__ = "Guy Serbin" __version__ = "1.0.4" __all__ = ["imageprocess", "ENVIfile", "modistools"] __main__ = "imageprocess"
18.888889
52
0.658824
#/usr/bin/python # -*- coding: utf-8 -*- __author__ = "Guy Serbin" __version__ = "1.0.4" __all__ = ["imageprocess", "ENVIfile", "modistools"] __main__ = "imageprocess"
0
0
0
0
0
0
0
0
0
ac4f94fcbefd9ff38443a81fad1db4a34dbd31a7
302
py
Python
__init__.py
paultownsend/supybot-soccer
407ea79133237631ebb0c8e9cae8a4a2223fa6cd
[ "MIT" ]
null
null
null
__init__.py
paultownsend/supybot-soccer
407ea79133237631ebb0c8e9cae8a4a2223fa6cd
[ "MIT" ]
null
null
null
__init__.py
paultownsend/supybot-soccer
407ea79133237631ebb0c8e9cae8a4a2223fa6cd
[ "MIT" ]
null
null
null
from importlib import reload from . import config, plugin __version__ = "1.0.0" __author__ = "Paul Townsend <pault@pault.org>" __url__ = "https://github.com/paultownsend/supybot-soccer" # In case we're being reloaded. reload(config) reload(plugin) Class = plugin.Class configure = config.configure
20.133333
58
0.758278
from importlib import reload from . import config, plugin __version__ = "1.0.0" __author__ = "Paul Townsend <pault@pault.org>" __url__ = "https://github.com/paultownsend/supybot-soccer" # In case we're being reloaded. reload(config) reload(plugin) Class = plugin.Class configure = config.configure
0
0
0
0
0
0
0
0
0
ee858b4d22b5741d27b013f35d3871ae8e5a5b78
2,132
py
Python
services/api/endpoints/accounts/resource.py
Sirius207/HousesAPI
6f1ef5fcb3fbd70f82b700b84be31daa9c58bda8
[ "MIT" ]
null
null
null
services/api/endpoints/accounts/resource.py
Sirius207/HousesAPI
6f1ef5fcb3fbd70f82b700b84be31daa9c58bda8
[ "MIT" ]
6
2021-06-05T16:54:41.000Z
2021-06-22T11:43:50.000Z
services/api/endpoints/accounts/resource.py
Sirius207/HousesAPI
6f1ef5fcb3fbd70f82b700b84be31daa9c58bda8
[ "MIT" ]
2
2021-06-05T16:51:46.000Z
2021-06-06T05:04:21.000Z
""" Module for /api/account method """
30.457143
84
0.616792
""" Module for /api/account method """ import uuid from datetime import datetime, timedelta from typing import Dict, Tuple from flask_restful import Resource, reqparse from werkzeug.exceptions import abort from api.endpoints.accounts.auth import authorization_validator from api.endpoints.accounts.model import Account...
0
1,327
0
375
0
0
0
189
201
7adef6b21da48a2eb827d6a6f1597c43d9d1d54a
1,352
py
Python
clare/clare/infrastructure/deleters.py
dnguyen0304/room-list-watcher
7ac4d5172de22dd8906662da521995c8e06c2617
[ "MIT" ]
null
null
null
clare/clare/infrastructure/deleters.py
dnguyen0304/room-list-watcher
7ac4d5172de22dd8906662da521995c8e06c2617
[ "MIT" ]
null
null
null
clare/clare/infrastructure/deleters.py
dnguyen0304/room-list-watcher
7ac4d5172de22dd8906662da521995c8e06c2617
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
24.581818
101
0.558432
# -*- coding: utf-8 -*- from clare.common.messaging import consumer class Nop(consumer.deleters.Deleter): def delete(self, message): pass def __repr__(self): repr_ = '{}()' return repr_.format(self.__class__.__name__) class SqsFifoQueue(consumer.deleters.Deleter): def __init_...
0
0
0
1,235
0
0
0
22
69
b0995c5b2962ad4ca67b4f66fa79553ca9f16d60
34,861
py
Python
elementpath/tdop.py
sthagen/sissaschool-elementpath
fbb07c03451790e7896d354a57120d6c4bedcc18
[ "MIT" ]
1
2021-09-16T14:44:42.000Z
2021-09-16T14:44:42.000Z
elementpath/tdop.py
sthagen/elementpath
fbb07c03451790e7896d354a57120d6c4bedcc18
[ "MIT" ]
null
null
null
elementpath/tdop.py
sthagen/elementpath
fbb07c03451790e7896d354a57120d6c4bedcc18
[ "MIT" ]
null
null
null
# # Copyright (c), 2018-2020, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/licenses/MIT. # # @author Davide Brunato <brunato@...
40.820843
100
0.586759
# # Copyright (c), 2018-2020, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/licenses/MIT. # # @author Davide Brunato <brunato@...
0
11,043
0
20,775
0
137
0
219
252
0d438692dc0c23d539a2e217a4da8db5743782ff
260
py
Python
preparation/transformers/__init__.py
cderunz/MTCopula
c33ceac91d66fa02275b985161e5876f07c62787
[ "MIT" ]
1
2022-02-12T17:28:27.000Z
2022-02-12T17:28:27.000Z
preparation/transformers/__init__.py
cderunz/MTCopula
c33ceac91d66fa02275b985161e5876f07c62787
[ "MIT" ]
null
null
null
preparation/transformers/__init__.py
cderunz/MTCopula
c33ceac91d66fa02275b985161e5876f07c62787
[ "MIT" ]
1
2021-09-17T00:26:14.000Z
2021-09-17T00:26:14.000Z
from preparation.transformers.base import BaseTransformer from preparation.transformers.categorical import (CategoricalTransformer, OneHotEncodingTransformer) __all__ = [ 'BaseTransformer', 'CategoricalTransformer', 'OneHotEncodingTransformer', ]
28.888889
100
0.815385
from preparation.transformers.base import BaseTransformer from preparation.transformers.categorical import (CategoricalTransformer, OneHotEncodingTransformer) __all__ = [ 'BaseTransformer', 'CategoricalTransformer', 'OneHotEncodingTransformer', ]
0
0
0
0
0
0
0
0
0
3d9d7aa43c0ced03c7653f2043f1ab7b0cbe3c30
808
py
Python
tools/gen_fft.py
jibonaronno/OpenMV-openmv
ec7bca0a3d0407f632d86b57ac2bdc6dc84f0252
[ "MIT" ]
2
2021-03-23T21:47:34.000Z
2022-02-14T15:23:01.000Z
util/gen_fft.py
guohuijiang1234/openmv
9c3e9109ec1a2b68bb34107557945bfa379d3a0e
[ "MIT" ]
2
2018-11-13T06:47:24.000Z
2019-05-15T06:21:55.000Z
util/gen_fft.py
guohuijiang1234/openmv
9c3e9109ec1a2b68bb34107557945bfa379d3a0e
[ "MIT" ]
1
2021-01-08T03:41:16.000Z
2021-01-08T03:41:16.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, math # https://www.nayuki.io/page/fast-fourier-transform-in-x86-assembly sys.stdout.write("const float cos_table[512] = {\n") for i in range(512): if not (i % 8): sys.stdout.write(" ") sys.stdout.write("%9.6ff" % math.cos((math.pi * i) / 512...
26.933333
67
0.530941
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, math # https://www.nayuki.io/page/fast-fourier-transform-in-x86-assembly sys.stdout.write("const float cos_table[512] = {\n") for i in range(512): if not (i % 8): sys.stdout.write(" ") sys.stdout.write("%9.6ff" % math.cos((math.pi * i) / 512...
0
0
0
0
0
0
0
0
0
7f546afac0654c925a50353095b64ec6c5e346b9
1,495
py
Python
scripts/check_rf.py
ngshya/ssl-play
ef70793a07aa3424502c7443c44de3e5f18ee2be
[ "MIT" ]
null
null
null
scripts/check_rf.py
ngshya/ssl-play
ef70793a07aa3424502c7443c44de3e5f18ee2be
[ "MIT" ]
3
2020-09-25T22:30:43.000Z
2022-02-09T23:34:19.000Z
scripts/check_rf.py
ngshya/ssl-play
ef70793a07aa3424502c7443c44de3e5f18ee2be
[ "MIT" ]
1
2021-01-11T20:33:23.000Z
2021-01-11T20:33:23.000Z
import sys import os sys.path.append('.') import logging logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO) logging.getLogger('matplotlib').setLevel(logging.WARNING) import numpy as np from sslplay.data.digits import DataDigits from sslplay.model.random_forest import ModelRF from sslplay.uti...
23
75
0.679599
import sys import os sys.path.append('.') import os import logging logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO) logging.getLogger('matplotlib').setLevel(logging.WARNING) import pandas as pd import numpy as np import time from sslplay.data.digits import DataDigits from sslplay.model.ra...
0
0
0
0
0
0
0
10
113
7f563ee7157c978935c6db9d4f07fc217f6faa69
869
py
Python
py_solutions_51-60/Euler_57.py
tijko/Project-Euler
d953a2bf6932c2c4e1235409fedf760add65a0ba
[ "MIT" ]
null
null
null
py_solutions_51-60/Euler_57.py
tijko/Project-Euler
d953a2bf6932c2c4e1235409fedf760add65a0ba
[ "MIT" ]
1
2022-03-15T02:49:09.000Z
2022-03-15T02:49:09.000Z
py_solutions_51-60/Euler_57.py
tijko/Project-Euler
d953a2bf6932c2c4e1235409fedf760add65a0ba
[ "MIT" ]
null
null
null
# square root of two -- how many iterations under 1001 contain a numerator with more digits than the denominator? import timeit start = timeit.default_timer() print "Answer: %s" % euler_57() stop = timeit.default_timer() print "Time: %f" % (stop - start)
25.558824
114
0.627158
# square root of two -- how many iterations under 1001 contain a numerator with more digits than the denominator? import timeit start = timeit.default_timer() def numr_gen(): prev_n = 1 numerator = 3 for _ in xrange(1001): yield numerator next_n = (numerator * 2) + prev_n prev_n...
0
0
0
0
361
171
0
0
69
11a160580c4cd8a6fd888a4d8a7dfb152c09a2db
2,202
py
Python
aio_quakeml_client/xml_parser/event.py
exxamalte/python-aio-quakeml-client
9d2a9786f7e6d89828feecd20661fc100a78659b
[ "Apache-2.0" ]
null
null
null
aio_quakeml_client/xml_parser/event.py
exxamalte/python-aio-quakeml-client
9d2a9786f7e6d89828feecd20661fc100a78659b
[ "Apache-2.0" ]
null
null
null
aio_quakeml_client/xml_parser/event.py
exxamalte/python-aio-quakeml-client
9d2a9786f7e6d89828feecd20661fc100a78659b
[ "Apache-2.0" ]
null
null
null
"""Event.""" from __future__ import annotations import logging _LOGGER = logging.getLogger(__name__)
27.525
62
0.612171
"""Event.""" from __future__ import annotations import logging from typing import List from ..consts import ( XML_TAG_CREATIONINFO, XML_TAG_DESCRIPTION, XML_TAG_MAGNITUDE, XML_TAG_ORIGIN, ) from .creation_info import CreationInfo from .description import Description from .element import Element from ....
0
1,586
0
179
0
0
0
155
178
c75135beb6dae01675615368713e9bffecec2ad3
2,152
py
Python
app/main/controller/todos_controller.py
codacy-badger/playground
69301100c3851f10d99e04b3d61666890ca05436
[ "MIT" ]
null
null
null
app/main/controller/todos_controller.py
codacy-badger/playground
69301100c3851f10d99e04b3d61666890ca05436
[ "MIT" ]
51
2019-12-17T20:36:57.000Z
2022-02-18T16:45:26.000Z
app/main/controller/todos_controller.py
codacy-badger/playground
69301100c3851f10d99e04b3d61666890ca05436
[ "MIT" ]
1
2020-08-27T09:52:01.000Z
2020-08-27T09:52:01.000Z
from app.main.model.todo_dto import TodoDTO api = TodoDTO.api _todo = TodoDTO.todo
27.589744
74
0.623141
from flask import request from flask_restplus import Resource, cors from app.main.model.todo_dto import TodoDTO from app.main.service.todo_service import ( get_all_todos, save_new_todo, get_todo, delete_todo, ) from app.main.util.auth_decorator import token_required api = TodoDTO.api _todo = TodoDTO....
0
1,779
0
0
0
0
0
151
134
19849188bed782c930798e2e24a367fcc7a7551b
11,323
py
Python
ebook.py
russiandesman/kindle-tools
1f24c2f1d47aabb12cef0d7aedbfe3bc7d3556cb
[ "MIT" ]
null
null
null
ebook.py
russiandesman/kindle-tools
1f24c2f1d47aabb12cef0d7aedbfe3bc7d3556cb
[ "MIT" ]
null
null
null
ebook.py
russiandesman/kindle-tools
1f24c2f1d47aabb12cef0d7aedbfe3bc7d3556cb
[ "MIT" ]
null
null
null
#!/usr/bin/env python #author:Richard Peng #project:Kindelabra #website:http://www.richardpeng.com/projects/kindelabra/ #repository:https://github.com/richardpeng/Kindelabra #license:Creative Commons GNU GPL v2 # (http://creativecommons.org/licenses/GPL/2.0/) KINDLEROOT = '/mnt/us' '''Kindlet metadata parsing ''' ''...
36.882736
138
0.567959
#!/usr/bin/env python #author:Richard Peng #project:Kindelabra #website:http://www.richardpeng.com/projects/kindelabra/ #repository:https://github.com/richardpeng/Kindelabra #license:Creative Commons GNU GPL v2 # (http://creativecommons.org/licenses/GPL/2.0/) import struct import zipfile import re import codecs impor...
0
0
0
10,469
0
180
0
-64
338
cd9e39de6540c7617614c7a4791fe5eb92e907f4
3,357
py
Python
staff-attendence-system.py
kk456852/Staff-attendance-system
9a60b9a0f490852d42e2c404a9933aba181ed2be
[ "Apache-2.0" ]
2
2019-05-13T09:11:30.000Z
2019-06-14T00:11:10.000Z
staff-attendence-system.py
kk456852/Staff-attendance-system
9a60b9a0f490852d42e2c404a9933aba181ed2be
[ "Apache-2.0" ]
null
null
null
staff-attendence-system.py
kk456852/Staff-attendance-system
9a60b9a0f490852d42e2c404a9933aba181ed2be
[ "Apache-2.0" ]
4
2019-04-25T00:54:04.000Z
2019-04-25T01:09:14.000Z
from app import create_app app = create_app() def create_test_data(): """""" from itertools import chain from datetime import date, time, datetime from app.model import (Department, Leave, Role, Overtime, SignSheet, User, WorkArrangement) signsheet = [SignSheet(ID=1, staffID=1, ...
34.608247
159
0.585046
import os from app import create_app, db app = create_app() @app.cli.command() def test(): """Run the unit tests.""" import unittest tests = unittest.TestLoader().discover('tests') unittest.TextTestRunner(verbosity=2).run(tests) @app.cli.command() def ipy(): """Open IPython Debug Shell""" ...
114
669
0
0
0
114
0
65
118
251b2b9fd211fb423c365b4333759b8132836b96
938
py
Python
setup.py
yuvalk8s/nnplot
30a0dc18bceca032c5d116ce8893a9482a57b568
[ "MIT" ]
7
2020-02-18T18:02:48.000Z
2021-10-09T20:22:29.000Z
setup.py
yuvalk8s/nnplot
30a0dc18bceca032c5d116ce8893a9482a57b568
[ "MIT" ]
null
null
null
setup.py
yuvalk8s/nnplot
30a0dc18bceca032c5d116ce8893a9482a57b568
[ "MIT" ]
1
2021-11-04T01:05:16.000Z
2021-11-04T01:05:16.000Z
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="nnplot", # packages = ['nnplot'], version="1.0.1", author="Yuval Ai", author_email="yuval_a@rad.com", description="Plot Neural Networks and the weights of the links between their nodes...
34.740741
94
0.654584
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="nnplot", # packages = ['nnplot'], version="1.0.1", author="Yuval Ai", author_email="yuval_a@rad.com", description="Plot Neural Networks and the weights of the links between their nodes...
0
0
0
0
0
0
0
0
0
62f3c0c1e9a3442d1010138b52e0f8149062e2ef
350
py
Python
slack_bot/slack_bot.py
joeirimpan/slack-bot
a74845bd3e119fc05cce2d6ea183887c167ad7c1
[ "MIT" ]
null
null
null
slack_bot/slack_bot.py
joeirimpan/slack-bot
a74845bd3e119fc05cce2d6ea183887c167ad7c1
[ "MIT" ]
null
null
null
slack_bot/slack_bot.py
joeirimpan/slack-bot
a74845bd3e119fc05cce2d6ea183887c167ad7c1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
18.421053
45
0.517143
# -*- coding: utf-8 -*- import requests import json class Slack: def __init__(self, url): self.base_url = url self.session = requests.Session() def notify(self, **kwargs): return self.session.post( self.base_url, data={ 'payload': json.dumps(kwa...
0
0
0
274
0
0
0
-16
67
d9e48fd3aab4f5eff46849a1a1f46fa98720ad29
5,744
py
Python
senzwifi/session.py
sockless-coding/python-senz-wifi-module
b7d9326b139478b9f141e2f94ba627cb48345571
[ "MIT" ]
null
null
null
senzwifi/session.py
sockless-coding/python-senz-wifi-module
b7d9326b139478b9f141e2f94ba627cb48345571
[ "MIT" ]
null
null
null
senzwifi/session.py
sockless-coding/python-senz-wifi-module
b7d9326b139478b9f141e2f94ba627cb48345571
[ "MIT" ]
null
null
null
""" Senz Wifi Session """ def _validate_response(response): """ Verify that response is OK """ if response.status_code == 200: return raise ResponseError(response.status_code, response.text)
28.295567
128
0.574861
""" Senz Wifi Session """ import json import requests import os import urllib3 from . import urls def _validate_response(response): """ Verify that response is OK """ if response.status_code == 200: return raise ResponseError(response.status_code, response.text) class Error(Exception): ''' S...
0
0
0
5,338
0
0
0
-38
226
cbfbfbc845428456669bf15e0b55d04e7fba0503
12,552
py
Python
train.py
demirklvc/text2painting
130330a56506f9e37b97cb6a5c503422f7f9f0df
[ "MIT" ]
55
2020-07-08T14:37:15.000Z
2022-03-11T10:25:53.000Z
train.py
demirklvc/text2painting
130330a56506f9e37b97cb6a5c503422f7f9f0df
[ "MIT" ]
1
2020-07-10T05:31:15.000Z
2020-09-08T09:36:08.000Z
train.py
demirklvc/text2painting
130330a56506f9e37b97cb6a5c503422f7f9f0df
[ "MIT" ]
9
2020-09-06T15:32:24.000Z
2022-01-16T09:41:48.000Z
import argparse import os import sys import time import torch.nn as nn from torch.utils.data import DataLoader if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('--model', type=str, help='Model file to load') parser.add_argument('--reset_lr', action='store_true', help='Res...
50.612903
163
0.5674
import argparse import glob import os import sys import time from multiprocessing import cpu_count import matplotlib.pyplot as plt import numpy as np import pandas as pd from PIL import Image, ImageFilter import torch import torch.nn as nn from gensim.models import Word2Vec from torch.utils.data import DataLoader i...
0
0
0
0
0
0
0
47
178
b6bd1c256cff4711fbb0e203aa17d2f2b67af617
620
py
Python
py_hanabi/hint_stat.py
krinj/hanabi-simulator
b77b04aa09bab8bd8d7b784e04bf8b9d5d76d1a6
[ "MIT" ]
1
2018-09-28T00:47:52.000Z
2018-09-28T00:47:52.000Z
py_hanabi/hint_stat.py
krinj/hanabi-simulator
b77b04aa09bab8bd8d7b784e04bf8b9d5d76d1a6
[ "MIT" ]
null
null
null
py_hanabi/hint_stat.py
krinj/hanabi-simulator
b77b04aa09bab8bd8d7b784e04bf8b9d5d76d1a6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Collect the results for a given hint command. """ __author__ = "Jakrin Juangbhanich" __email__ = "juangbhanich.k@gmail.com"
25.833333
71
0.641935
# -*- coding: utf-8 -*- """ Collect the results for a given hint command. """ __author__ = "Jakrin Juangbhanich" __email__ = "juangbhanich.k@gmail.com" class HintStat: def __init__(self): self.enables_play: int = 0 self.enables_discard: int = 0 self.total_play_gain: float = 0 sel...
0
0
0
442
0
0
0
0
23
c5efbba99c30680e6615b5759511464b47354e3a
212
py
Python
src/Qt.py
hedlx/machuchu
4926a931f81ccd892261a9b13c9d3cf78cc72c01
[ "MIT" ]
null
null
null
src/Qt.py
hedlx/machuchu
4926a931f81ccd892261a9b13c9d3cf78cc72c01
[ "MIT" ]
3
2021-07-07T20:05:26.000Z
2021-07-07T20:11:35.000Z
src/Qt.py
hedlx/machuchu
4926a931f81ccd892261a9b13c9d3cf78cc72c01
[ "MIT" ]
null
null
null
# TODO: Maybe export all from PyQt5.QtCore.Qt? # Because Qt.Key_W is better than Qt.Qt.Key_W
26.5
51
0.745283
from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtOpenGL import * from PyQt5.QtWidgets import * # TODO: Maybe export all from PyQt5.QtCore.Qt? # Because Qt.Key_W is better than Qt.Qt.Key_W
0
0
0
0
0
0
0
24
88
8cde2bb97ff767925915232bc0605b45108c7bc0
3,491
py
Python
functions/get_all_task_status.py
macrae/go-jira
6c1bdbc49733968020bd71c9fa783aa0c242dc5b
[ "MIT" ]
null
null
null
functions/get_all_task_status.py
macrae/go-jira
6c1bdbc49733968020bd71c9fa783aa0c242dc5b
[ "MIT" ]
null
null
null
functions/get_all_task_status.py
macrae/go-jira
6c1bdbc49733968020bd71c9fa783aa0c242dc5b
[ "MIT" ]
null
null
null
from jira_api import get_all_tasks from jira_api import flatten_dict import pandas as pd import numpy as np import datetime import json import yaml import urllib3 import os urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # load JIRA username and password jira_creds = yaml.load(open('./user_dev.yml'...
27.706349
93
0.654254
from jira_api import get_all_tasks from jira_api import flatten_dict import pandas as pd import numpy as np import datetime import json import yaml import urllib3 import os urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # load JIRA username and password jira_creds = yaml.load(open('./user_dev.yml'...
0
0
0
0
0
602
0
0
100
41601a96627daf0e4a9592f0b6e3c8bf4df9fba4
970
py
Python
web/secure_db.py
wangandrewt/bike-survey
081eee9e30b6c4537a7e9d74f06c936610d0b346
[ "Apache-2.0" ]
1
2016-05-19T06:59:13.000Z
2016-05-19T06:59:13.000Z
web/secure_db.py
wangandrewt/bike-survey
081eee9e30b6c4537a7e9d74f06c936610d0b346
[ "Apache-2.0" ]
null
null
null
web/secure_db.py
wangandrewt/bike-survey
081eee9e30b6c4537a7e9d74f06c936610d0b346
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ Creates a secure, random password for the Django user 'admin' """ import hashlib import imp import os import sqlite3 import django from django.contrib.auth.models import User django.setup() # Load the OpenShift helper library lib_path = os.environ['OPENSHIFT_REPO_DIR'] + 'web/' modinfo = imp....
28.529412
76
0.768041
#!/usr/bin/env python """ Creates a secure, random password for the Django user 'admin' """ import hashlib import imp import os import sqlite3 import django from django.contrib.auth.models import User django.setup() # Load the OpenShift helper library lib_path = os.environ['OPENSHIFT_REPO_DIR'] + 'web/' modinfo = imp....
0
0
0
0
0
0
0
0
0
cb8afdcbe72606189c6a6e1720f7445460fa6a55
2,356
py
Python
tests/server_test.py
Aaronearlerichardson/Server_gui_client
3cfd325056648c187ed21fefe6894585686b1aa2
[ "MIT" ]
null
null
null
tests/server_test.py
Aaronearlerichardson/Server_gui_client
3cfd325056648c187ed21fefe6894585686b1aa2
[ "MIT" ]
null
null
null
tests/server_test.py
Aaronearlerichardson/Server_gui_client
3cfd325056648c187ed21fefe6894585686b1aa2
[ "MIT" ]
null
null
null
import os filename = os.path.join("tests", "b64.txt") with open(filename, "r") as fobj: b64_str = fobj.read() type_keys = {"a": int, "b": float, "c": str, "d": list}
29.45
77
0.54584
import os import pytest import server as serv filename = os.path.join("tests", "b64.txt") with open(filename, "r") as fobj: b64_str = fobj.read() type_keys = {"a": int, "b": float, "c": str, "d": list} @pytest.mark.parametrize("my_input, expected", [ (1, 1), ("1", 1), ("one", False), (0j + 1, 1...
0
1,773
0
0
0
254
0
-8
161
8b8f2793b362ac4e977215886724f630413ce520
8,523
py
Python
scripts/comment.py
jjl284/blog
d1034cc91ca03766b989e324f4126bd978c0735e
[ "MIT" ]
null
null
null
scripts/comment.py
jjl284/blog
d1034cc91ca03766b989e324f4126bd978c0735e
[ "MIT" ]
null
null
null
scripts/comment.py
jjl284/blog
d1034cc91ca03766b989e324f4126bd978c0735e
[ "MIT" ]
1
2020-03-23T07:08:04.000Z
2020-03-23T07:08:04.000Z
#!/bin/python # Python3 script which continuously reads Gmail messages and uploads them to GitHub # # This script assumes there exists a credentials directory (which is .gitignored) containing: # - oauth secret api key # - stored oauth access token for the gmail account # - GitHub personal access token # # This also re...
38.219731
154
0.647777
#!/bin/python # Python3 script which continuously reads Gmail messages and uploads them to GitHub # # This script assumes there exists a credentials directory (which is .gitignored) containing: # - oauth secret api key # - stored oauth access token for the gmail account # - GitHub personal access token # # This also re...
3
0
0
0
0
2,443
0
-22
135
93b7051a28be44fcb5c4926edab392ea7af58666
3,307
py
Python
utility/IUPACData.py
chasesagar/chasebio
8f0af491176e7c77b6734bd32d08973ffef35182
[ "MIT" ]
1
2021-04-20T12:59:45.000Z
2021-04-20T12:59:45.000Z
utility/IUPACData.py
chasesagar/chasebio
8f0af491176e7c77b6734bd32d08973ffef35182
[ "MIT" ]
8
2021-03-19T03:31:31.000Z
2022-01-13T02:44:43.000Z
utility/IUPACData.py
chasesagar/chasebio
8f0af491176e7c77b6734bd32d08973ffef35182
[ "MIT" ]
1
2021-03-20T00:11:33.000Z
2021-03-20T00:11:33.000Z
nucleotides = ["A", "C", "G", "T"] # Average masses of monophosphate deoxy nucleotides unambiguous_dna_weights = {"A": 331.2218, "C": 307.1971, "G": 347.2212, "T": 322.2085} # Monoisotopic masses of monophospate deoxy nucleotides monoisotopic_unambiguous_dna_weights = { "A": 331.06817, "C": 307.056936, "...
26.886179
86
0.410039
nucleotides = ["A", "C", "G", "T"] # Average masses of monophosphate deoxy nucleotides unambiguous_dna_weights = {"A": 331.2218, "C": 307.1971, "G": 347.2212, "T": 322.2085} # Monoisotopic masses of monophospate deoxy nucleotides monoisotopic_unambiguous_dna_weights = { "A": 331.06817, "C": 307.056936, "...
0
0
0
0
0
0
0
0
0
a9ea4a7a5d9fbc68c751b328abf72772a189f366
710
py
Python
setup.py
gjbadros/pybinarymoip
f75e1f2b12163add322bc75a3655670b599900f4
[ "MIT" ]
null
null
null
setup.py
gjbadros/pybinarymoip
f75e1f2b12163add322bc75a3655670b599900f4
[ "MIT" ]
null
null
null
setup.py
gjbadros/pybinarymoip
f75e1f2b12163add322bc75a3655670b599900f4
[ "MIT" ]
null
null
null
from distutils.core import setup setup( name='pybinarymoip', version='0.0.8', license='MIT', description='Python library for Binary Media over IP (MOIP), used for Home Assistant', author='Greg J. Badros', author_email='badros@gmail.com', url='http://github.com/gjbadros/pybinarymoip', pa...
32.272727
90
0.623944
from distutils.core import setup setup( name='pybinarymoip', version='0.0.8', license='MIT', description='Python library for Binary Media over IP (MOIP), used for Home Assistant', author='Greg J. Badros', author_email='badros@gmail.com', url='http://github.com/gjbadros/pybinarymoip', pa...
0
0
0
0
0
0
0
0
0
238298abba240f5a4a191e058eddc7655955c6c0
5,148
py
Python
datafeeds/client/indexfeeds.py
liuqiuxi/datafeeds
50d1615a96f7d17d3ecd8ab661c4e1d5f43b9e8d
[ "MIT" ]
1
2021-03-16T03:12:44.000Z
2021-03-16T03:12:44.000Z
datafeeds/client/indexfeeds.py
liuqiuxi/datafeeds
50d1615a96f7d17d3ecd8ab661c4e1d5f43b9e8d
[ "MIT" ]
null
null
null
datafeeds/client/indexfeeds.py
liuqiuxi/datafeeds
50d1615a96f7d17d3ecd8ab661c4e1d5f43b9e8d
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- # @Time : 2019-12-30 13:41 # @Author : liuqiuxi # @Email : liuqiuxi1990@gmail.com # @File : indexfeeds.py # @Project : datafeeds # @Software: PyCharm # @Remark : This is all data source index feeds
50.470588
119
0.636558
# -*- coding:utf-8 -*- # @Time : 2019-12-30 13:41 # @Author : liuqiuxi # @Email : liuqiuxi1990@gmail.com # @File : indexfeeds.py # @Project : datafeeds # @Software: PyCharm # @Remark : This is all data source index feeds import datetime from datafeeds.utils import BarFeedConfig from datafeeds im...
0
4,431
0
0
0
0
0
208
248
01b91e65054464018215fdf30d60cf5a39203600
854
py
Python
python/main.py
luac/barnowl-python
c6dc14ca9851b1b9cd72cd30388e471a2a6d4dfd
[ "MIT" ]
null
null
null
python/main.py
luac/barnowl-python
c6dc14ca9851b1b9cd72cd30388e471a2a6d4dfd
[ "MIT" ]
null
null
null
python/main.py
luac/barnowl-python
c6dc14ca9851b1b9cd72cd30388e471a2a6d4dfd
[ "MIT" ]
null
null
null
from perl import BarnOwl m = BarnOwl.Module.Python
28.466667
80
0.640515
from perl import BarnOwl m = BarnOwl.Module.Python def cmd_python(cmd, *args): BarnOwl.message(repr(eval(' '.join(args)))) def cmd_ppython(cmd, *args): BarnOwl.popless_text(repr(eval(' '.join(args)))) def cmd_epython(cmd, *args): BarnOwl.start_edit_win("Enter Python code:", m.cb_epython) def cb_epython(...
0
0
0
0
0
688
0
0
115
a7e6cbe101ffbde3c629660b6b6c4087841d2e23
5,474
py
Python
workon/contrib/auth/views/password.py
dalou/django-workon
ef63c0a81c00ef560ed693e435cf3825f5170126
[ "BSD-3-Clause" ]
null
null
null
workon/contrib/auth/views/password.py
dalou/django-workon
ef63c0a81c00ef560ed693e435cf3825f5170126
[ "BSD-3-Clause" ]
null
null
null
workon/contrib/auth/views/password.py
dalou/django-workon
ef63c0a81c00ef560ed693e435cf3825f5170126
[ "BSD-3-Clause" ]
null
null
null
# encoding: utf-8 import workon.utils
33.582822
126
0.653087
# encoding: utf-8 from django import forms from django.conf import settings from django.views import generic from django.utils.translation import ugettext_lazy as _ from django.shortcuts import redirect, get_object_or_404 from django.utils.http import base36_to_int, int_to_base36 from django.contrib import auth, messa...
4
0
0
4,887
0
0
0
253
289
d67a346be48bb74004ade0ff20e23c292f728d8d
5,445
py
Python
nomcc/closer.py
nominum/nomcc
55c8616d089d824fb530f5f18c26f8add236aa18
[ "Apache-2.0" ]
5
2019-06-01T01:32:23.000Z
2021-07-01T15:20:45.000Z
nomcc/closer.py
nominum/nomcc
55c8616d089d824fb530f5f18c26f8add236aa18
[ "Apache-2.0" ]
null
null
null
nomcc/closer.py
nominum/nomcc
55c8616d089d824fb530f5f18c26f8add236aa18
[ "Apache-2.0" ]
5
2020-03-27T19:23:06.000Z
2021-06-02T13:48:25.000Z
# Copyright (C) 2019 Akamai Technologies, Inc. # Copyright (C) 2011-2016 Nominum, 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 #...
32.410714
77
0.604224
# Copyright (C) 2019 Akamai Technologies, Inc. # Copyright (C) 2011-2016 Nominum, 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 #...
0
0
0
3,246
0
1,128
0
-15
91
b7b05a5ec75747bdfa50f5922f44625a37329a23
33,662
py
Python
blackbox.py
cmliepold/blackbox
efbc37af985bcf43ee7a8cf31f0d38a12c2f9aac
[ "MIT" ]
null
null
null
blackbox.py
cmliepold/blackbox
efbc37af985bcf43ee7a8cf31f0d38a12c2f9aac
[ "MIT" ]
null
null
null
blackbox.py
cmliepold/blackbox
efbc37af985bcf43ee7a8cf31f0d38a12c2f9aac
[ "MIT" ]
1
2018-06-07T22:09:07.000Z
2018-06-07T22:09:07.000Z
#!/usr/bin/env python import sys import multiprocessing as mp import numpy as np import blackboxhelper as bbh import argparse VERSION = 180709 def get_default_executor(): """ Provide a default executor (a context manager returning an object with a map method). This is the multiprocessing Pool object ...
33.164532
185
0.601271
#!/usr/bin/env python import sys import multiprocessing as mp import numpy as np import scipy.optimize as op import copy import blackboxhelper as bbh import utils as u from skopt import Optimizer import skopt.acquisition as acq import argparse from sklearn.gaussian_process import GaussianProcessRegressor from sklearn....
0
149
0
0
0
22,303
0
133
797
7d57842d9147e14f980a808dc798c180d1c13ae8
4,319
py
Python
popit.py
zarbod/PopIt
e5659bcd5e75283213cacef79cdbb88fb407824e
[ "MIT" ]
1
2021-07-11T07:47:35.000Z
2021-07-11T07:47:35.000Z
popit.py
zarbod/PopIt
e5659bcd5e75283213cacef79cdbb88fb407824e
[ "MIT" ]
null
null
null
popit.py
zarbod/PopIt
e5659bcd5e75283213cacef79cdbb88fb407824e
[ "MIT" ]
null
null
null
pop = PopIt() pop.run_game()
31.297101
129
0.460292
from player import Player import time from tkinter import * from tkinter.ttk import * from ttkthemes import themed_tk as tk class PopIt: def __init__(self): self.board = [[0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0]] self.buttons_pressed ...
0
0
0
4,124
0
0
0
14
140
d4a7e06bc392a5bf1ed6d69ae8dccd6a7c801389
100
py
Python
pydantic/version.py
pydevd/pydantic
cd50601172462b49cdf09e4d988906ba8f14af87
[ "MIT" ]
25
2019-06-30T04:37:49.000Z
2022-03-19T19:57:37.000Z
pydantic/version.py
pydevd/pydantic
cd50601172462b49cdf09e4d988906ba8f14af87
[ "MIT" ]
1
2018-11-22T15:52:55.000Z
2018-11-22T15:57:42.000Z
pydantic/version.py
pydevd/pydantic
cd50601172462b49cdf09e4d988906ba8f14af87
[ "MIT" ]
4
2021-06-25T06:34:49.000Z
2022-02-07T01:52:10.000Z
from distutils.version import StrictVersion __all__ = ['VERSION'] VERSION = StrictVersion('0.14')
16.666667
43
0.76
from distutils.version import StrictVersion __all__ = ['VERSION'] VERSION = StrictVersion('0.14')
0
0
0
0
0
0
0
0
0
9b5e900eba246b9eee13324a3216956d734947f4
2,605
py
Python
python/medium/rotting_oranges.py
hanaa-abdelgawad/leetcode
0bbbe0bf137f242e032db284b9bdede4e30d5d9c
[ "MIT" ]
3
2020-10-15T07:34:53.000Z
2021-12-07T21:44:55.000Z
python/medium/rotting_oranges.py
hanaa-abdelgawad/leetcode
0bbbe0bf137f242e032db284b9bdede4e30d5d9c
[ "MIT" ]
null
null
null
python/medium/rotting_oranges.py
hanaa-abdelgawad/leetcode
0bbbe0bf137f242e032db284b9bdede4e30d5d9c
[ "MIT" ]
2
2020-09-05T03:28:41.000Z
2022-02-10T23:09:13.000Z
#!/usr/bin/env python # # description: Rotting Oranges # difficulty: Medium # leetcode_num: 994 # leetcode_url: https://leetcode.com/problems/rotting-oranges/ # # You are given an m x n grid where each cell can have one of three values: # 0 representing an empty cell, # 1 representing a fresh orange, or # 2 representin...
26.85567
111
0.585029
#!/usr/bin/env python # # description: Rotting Oranges # difficulty: Medium # leetcode_num: 994 # leetcode_url: https://leetcode.com/problems/rotting-oranges/ # # You are given an m x n grid where each cell can have one of three values: # 0 representing an empty cell, # 1 representing a fresh orange, or # 2 representin...
0
0
0
91
0
1,000
0
-2
90
833c00d4faa886766dba9d5c0420f0b885cde88e
6,257
py
Python
ansible/lib/ansible/modules/core/cloud/rackspace/rax_cdb_user.py
kiv-box/kafka
debec1c4bc8c43776070ee447a53b55fef42bd52
[ "Apache-2.0" ]
null
null
null
ansible/lib/ansible/modules/core/cloud/rackspace/rax_cdb_user.py
kiv-box/kafka
debec1c4bc8c43776070ee447a53b55fef42bd52
[ "Apache-2.0" ]
null
null
null
ansible/lib/ansible/modules/core/cloud/rackspace/rax_cdb_user.py
kiv-box/kafka
debec1c4bc8c43776070ee447a53b55fef42bd52
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python -tt # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distrib...
28.312217
77
0.626179
#!/usr/bin/python -tt # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distrib...
0
0
0
0
0
3,718
0
27
185
9e6651b4a0174b37f4bba63bbd02d4a62490fdae
20,402
py
Python
SciFlow/BPNN.py
larsbratholm/YAMLP
b3f55727fe7e301ec780d033e2aea13bc94cb265
[ "MIT" ]
1
2020-03-17T03:27:17.000Z
2020-03-17T03:27:17.000Z
SciFlow/BPNN.py
larsbratholm/YAMLP
b3f55727fe7e301ec780d033e2aea13bc94cb265
[ "MIT" ]
null
null
null
SciFlow/BPNN.py
larsbratholm/YAMLP
b3f55727fe7e301ec780d033e2aea13bc94cb265
[ "MIT" ]
1
2020-03-17T02:59:08.000Z
2020-03-17T02:59:08.000Z
""" This module implements a Behler-Parinello Neural network that is compatible with Scikit learn and can therefore be used with Osprey hyperparameter optimisation. This code was written following closely the code written by Zachary Ulissi (Department of Chemical Engineering, Stanford University) in the tflow.py modul...
38.713472
157
0.610577
""" This module implements a Behler-Parinello Neural network that is compatible with Scikit learn and can therefore be used with Osprey hyperparameter optimisation. This code was written following closely the code written by Zachary Ulissi (Department of Chemical Engineering, Stanford University) in the tflow.py modul...
0
0
0
18,803
0
618
0
107
275
d9144cd56665162624eb8df4adb9f7ef95cf544b
3,130
py
Python
model.py
anson0221/NLP-disaster-tweets-in-Kaggle
51b734515199e976afacc7823767a9660612de00
[ "MIT" ]
null
null
null
model.py
anson0221/NLP-disaster-tweets-in-Kaggle
51b734515199e976afacc7823767a9660612de00
[ "MIT" ]
null
null
null
model.py
anson0221/NLP-disaster-tweets-in-Kaggle
51b734515199e976afacc7823767a9660612de00
[ "MIT" ]
null
null
null
import torch.nn as nn
31.3
96
0.567412
import torch import torch.nn as nn from transformers import AutoModel import torch.nn.functional as F class sentencesVec(nn.Module): def __init__(self, bert: str="vinai/bertweet-base", layer_index: int=-2): super(sentencesVec, self).__init__() self.bert_tweet = AutoModel.from_pretrained(bert, outp...
0
0
0
2,980
0
0
0
14
113
e41a3c6587583969b3bc0b876ebd11706048c5f0
888
py
Python
chat_view.py
topseli/PyChat
0edd91d15e9b2d79673504cbb9582124a4d876de
[ "0BSD" ]
null
null
null
chat_view.py
topseli/PyChat
0edd91d15e9b2d79673504cbb9582124a4d876de
[ "0BSD" ]
null
null
null
chat_view.py
topseli/PyChat
0edd91d15e9b2d79673504cbb9582124a4d876de
[ "0BSD" ]
null
null
null
# -*- coding: utf-8 -*- """ chat_view.py - presenter for the chat""" __author__ = "topseli" __license__ = "0BSD" if __name__ == '__main__': run()
21.142857
75
0.65991
# -*- coding: utf-8 -*- """ chat_view.py - presenter for the chat""" __author__ = "topseli" __license__ = "0BSD" import os import sys from PyQt5 import QtWidgets, uic from PyQt5.QtCore import pyqtSignal, pyqtSlot class ChatView(QtWidgets.QWidget): send_signal = pyqtSignal(str) def __init__(self): ...
0
140
0
295
0
151
0
12
136
7e3114b4593eb59444893b9eeb2719f1780214ce
22,505
py
Python
felpy/model/wavefront.py
twguest/FELPy
90ed49cc4bddd2188f3284168152d043144ae1fb
[ "Apache-2.0" ]
null
null
null
felpy/model/wavefront.py
twguest/FELPy
90ed49cc4bddd2188f3284168152d043144ae1fb
[ "Apache-2.0" ]
null
null
null
felpy/model/wavefront.py
twguest/FELPy
90ed49cc4bddd2188f3284168152d043144ae1fb
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ FELPY __author__ = "Trey Guest" __credits__ = ["Trey Guest"] __license__ = "EuXFEL" __version__ = "0.2.1" __maintainer__ = "Trey Guest" __email__ = "trey.guest@xfel.eu" __status__ = "Developement" """ import numpy as np from wpg.wpg_uti_wf import calculate_fwhm from felpy.utils.vis_utils i...
30.577446
152
0.535303
# -*- coding: utf-8 -*- """ FELPY __author__ = "Trey Guest" __credits__ = ["Trey Guest"] __license__ = "EuXFEL" __version__ = "0.2.1" __maintainer__ = "Trey Guest" __email__ = "trey.guest@xfel.eu" __status__ = "Developement" """ from wpg.srw import srwlpy from wpg.wavefront import Wavefront as WPG_Wavefront from ma...
0
4,987
0
15,122
0
0
0
412
422
e70594316b2191c4c8a21ca8368e222f003cee13
1,598
py
Python
linux/lib/python2.7/dist-packages/blueman/main/SpeedCalc.py
nmercier/linux-cross-gcc
a5b0028fd2b72ec036a4725e93ba29d73cb753a6
[ "BSD-3-Clause" ]
3
2015-10-31T10:39:25.000Z
2019-04-27T20:19:33.000Z
linux/lib/python2.7/dist-packages/blueman/main/SpeedCalc.py
nmercier/linux-cross-gcc
a5b0028fd2b72ec036a4725e93ba29d73cb753a6
[ "BSD-3-Clause" ]
null
null
null
linux/lib/python2.7/dist-packages/blueman/main/SpeedCalc.py
nmercier/linux-cross-gcc
a5b0028fd2b72ec036a4725e93ba29d73cb753a6
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2008 Valmantas Paliksa <walmis at balticum-tv dot lt> # Copyright (C) 2008 Tadas Dailyda <tadas at dailyda dot com> # # Licensed under the GNU General Public License Version 3 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
28.035088
71
0.692115
# Copyright (C) 2008 Valmantas Paliksa <walmis at balticum-tv dot lt> # Copyright (C) 2008 Tadas Dailyda <tadas at dailyda dot com> # # Licensed under the GNU General Public License Version 3 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
0
0
0
730
0
0
0
-10
46
ecd0e88c2a30f0dab7b44dd70e2371ff894acb01
76,391
py
Python
sekwencja_new.py
chemiczny/PDB_supramolecular_search
524ebad2c979779b20dcd90c2657fd725b1051d0
[ "Beerware" ]
null
null
null
sekwencja_new.py
chemiczny/PDB_supramolecular_search
524ebad2c979779b20dcd90c2657fd725b1051d0
[ "Beerware" ]
null
null
null
sekwencja_new.py
chemiczny/PDB_supramolecular_search
524ebad2c979779b20dcd90c2657fd725b1051d0
[ "Beerware" ]
null
null
null
#Script generated by SupremolecularAnalyser import sys sys.path.insert(0, "/net/archive/groups/plggkatksdh/pyplotTest") import matplotlib.pyplot as plt import pandas as pd import numpy as np import matplotlib as mpl from os.path import isdir, join, basename from os import makedirs, remove from glob import ...
51.580689
493
0.63768
#Script generated by SupremolecularAnalyser import sys sys.path.insert(0, "/net/archive/groups/plggkatksdh/pyplotTest") import matplotlib.pyplot as plt from simpleFilters import * import pandas as pd import numpy as np import matplotlib as mpl import matplotlib.colors as mcolors from os.path import isdir, ...
6
0
0
0
0
10,810
0
22
427
c20a3b1b81fe636777886c3c4dc85376b33f9200
3,241
py
Python
scripts/cron/app_nightly_dist_clean.py
opensha/opensha-svn-archive
77203dab6745320a5130fda85978ebe1a4e097c8
[ "Apache-2.0" ]
null
null
null
scripts/cron/app_nightly_dist_clean.py
opensha/opensha-svn-archive
77203dab6745320a5130fda85978ebe1a4e097c8
[ "Apache-2.0" ]
null
null
null
scripts/cron/app_nightly_dist_clean.py
opensha/opensha-svn-archive
77203dab6745320a5130fda85978ebe1a4e097c8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os, sys, datetime, operator numArgs = len(sys.argv) if numArgs == 1: rootDir = "/var/www/html/apps/opensha" elif numArgs == 2: rootDir = sys.argv[1] else: print "USAGE: " + sys.argv[0] + " [dir]" sys.exit(2) if not os.path.isdir(rootDir): print rootDir + " is not a directory!" ...
26.785124
105
0.676026
#!/usr/bin/env python import os, sys, datetime, operator numArgs = len(sys.argv) if numArgs == 1: rootDir = "/var/www/html/apps/opensha" elif numArgs == 2: rootDir = sys.argv[1] else: print "USAGE: " + sys.argv[0] + " [dir]" sys.exit(2) if not os.path.isdir(rootDir): print rootDir + " is not a directory!" ...
0
0
0
509
0
2,285
0
0
92
cccd2933bcc467bd7cc5aff266b3c97ce5182656
3,054
py
Python
pyboi/memory/mbc1.py
tomis007/pyboi
cff297d60593812d6885854f77c11815b181677a
[ "MIT" ]
2
2017-02-26T16:54:37.000Z
2017-06-17T14:50:45.000Z
pyboi/memory/mbc1.py
tomis007/pyboi
cff297d60593812d6885854f77c11815b181677a
[ "MIT" ]
null
null
null
pyboi/memory/mbc1.py
tomis007/pyboi
cff297d60593812d6885854f77c11815b181677a
[ "MIT" ]
null
null
null
import logging logging.basicConfig(level=logging.DEBUG) log = logging.getLogger(name='mbc1')
28.542056
62
0.493451
from .rambank import RAMBank import logging from enum import Enum logging.basicConfig(level=logging.DEBUG) log = logging.getLogger(name='mbc1') class MBC1: """ Memory Bank Controller 1 Memory from 0x0-0x7fff is both read from and writen to for control of MBC Registers ... Attributes ------...
0
0
0
2,887
0
0
0
7
67
2f7139552b42cbb101a24a9da24e139df246755a
1,265
py
Python
clientTCP.py
Asdvamp/CEH-python-Scripts
f7a670aab6fe71b3112cffa9e62f14a09c77a213
[ "MIT" ]
null
null
null
clientTCP.py
Asdvamp/CEH-python-Scripts
f7a670aab6fe71b3112cffa9e62f14a09c77a213
[ "MIT" ]
null
null
null
clientTCP.py
Asdvamp/CEH-python-Scripts
f7a670aab6fe71b3112cffa9e62f14a09c77a213
[ "MIT" ]
null
null
null
import socket import sys import time PORT = 0 buffer = 1024 server = ("127.0.0.1", 12345) clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) try: clientsocket.bind((socket.gethostbyname(""), PORT)) print(socket.gethostbyname("")) except: print("[Binding Error] : Exiting...") sys.exit(1) while ...
20.737705
67
0.669565
import socket import sys import time PORT = 0 buffer = 1024 server = ("127.0.0.1", 12345) clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) try: clientsocket.bind((socket.gethostbyname(""), PORT)) print(socket.gethostbyname("")) except: print("[Binding Error] : Exiting...") sys.exit(1) while ...
0
0
0
0
0
0
0
0
0
6142bf15efa5cd74c53b78e90f8e0bdd787f1b6a
2,812
py
Python
benchmark.py
Elmari/speech-to-text-benchmark
f440e7f2c27f486fc016b749f99a10350aa82920
[ "Apache-2.0" ]
null
null
null
benchmark.py
Elmari/speech-to-text-benchmark
f440e7f2c27f486fc016b749f99a10350aa82920
[ "Apache-2.0" ]
null
null
null
benchmark.py
Elmari/speech-to-text-benchmark
f440e7f2c27f486fc016b749f99a10350aa82920
[ "Apache-2.0" ]
null
null
null
import argparse import editdistance from num2words import num2words if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--engine_type', type=str, required=True) args = parser.parse_args() print('Engine type is %s' % str(args.engine_type)) dataset = Dataset.create(...
37.493333
102
0.598151
import argparse import editdistance from num2words import num2words from dataset import * from engine import * if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--engine_type', type=str, required=True) args = parser.parse_args() print('Engine type is %s' % str(args....
0
0
0
0
0
0
0
-1
45
a2239b8d7267a6fdf4a25a2f233abaf592b5b5ed
5,765
py
Python
docs/conf.py
mofeing/doc2dash
dada75258a6bdc8060d0d9f663236f357d924c59
[ "MIT" ]
null
null
null
docs/conf.py
mofeing/doc2dash
dada75258a6bdc8060d0d9f663236f357d924c59
[ "MIT" ]
null
null
null
docs/conf.py
mofeing/doc2dash
dada75258a6bdc8060d0d9f663236f357d924c59
[ "MIT" ]
null
null
null
import codecs import os import re def read(*parts): """ Build an absolute path from *parts* and and return the contents of the resulting file. Assume UTF-8 encoding. """ here = os.path.abspath(os.path.dirname(__file__)) with codecs.open(os.path.join(here, *parts), "rb", "utf-8") as f: ...
28.969849
79
0.670425
import codecs import os import re def read(*parts): """ Build an absolute path from *parts* and and return the contents of the resulting file. Assume UTF-8 encoding. """ here = os.path.abspath(os.path.dirname(__file__)) with codecs.open(os.path.join(here, *parts), "rb", "utf-8") as f: ...
0
0
0
0
0
0
0
0
0
025c16a5d4f7b4b6522caa18802a07735b40b340
1,913
py
Python
tools/prettypatch_pull_requests.py
osteele/assignment-tools
10b7b48965ed363c370a05fdf69876f21bb2fafb
[ "MIT" ]
null
null
null
tools/prettypatch_pull_requests.py
osteele/assignment-tools
10b7b48965ed363c370a05fdf69876f21bb2fafb
[ "MIT" ]
null
null
null
tools/prettypatch_pull_requests.py
osteele/assignment-tools
10b7b48965ed363c370a05fdf69876f21bb2fafb
[ "MIT" ]
null
null
null
#!/usr/bin/env python import argparse import os import sys import subprocess import github3 PROJECT_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..') BUILD_DIR = os.path.join(PROJECT_DIR, './build') GITHUB_API_TOKEN = os.environ.get('HOMEBREW_GITHUB_API_TOKEN') if GITHUB_API_TOKEN: gh = githu...
32.982759
102
0.677993
#!/usr/bin/env python import argparse import os import sys import subprocess import github3 PROJECT_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..') BUILD_DIR = os.path.join(PROJECT_DIR, './build') GITHUB_API_TOKEN = os.environ.get('HOMEBREW_GITHUB_API_TOKEN') if GITHUB_API_TOKEN: gh = githu...
0
0
0
0
0
897
0
0
23
b9858471e7f97db0a3e8b6c8f470e9d42e5532e4
7,080
py
Python
app/cachedmodel/manager.py
Uniquode/uniquode2
385f3e0b26383c042d8da64b52350e82414580ea
[ "MIT" ]
null
null
null
app/cachedmodel/manager.py
Uniquode/uniquode2
385f3e0b26383c042d8da64b52350e82414580ea
[ "MIT" ]
null
null
null
app/cachedmodel/manager.py
Uniquode/uniquode2
385f3e0b26383c042d8da64b52350e82414580ea
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- DOES_NOT_EXIST_CACHE_TIMEOUT = 60 * 5 DELETED_CACHE_TIMEOUT = 60 LOOKUP_CACHE_TIMEOUT = 60 * 60
39.333333
118
0.628107
# -*- coding: utf-8 -*- from django.db import models from django.utils.functional import empty from .utils.lazymodel import model_cache_key, OBJECT_DOES_NOT_EXIST, get_model_cache from .utils.modelutils import ( lookup_cache_key, model_cache_deleted_cache_key, model_row_cache_enabled, save_lookup_cache...
0
0
0
6,404
0
135
0
236
181
06b2a275a99e245ea6d31706360934f5e7203579
12,901
py
Python
code/tools.py
LCLinVictory/WeeTP
ec5b69372459ce4dfa9b29d148ed9fd8c0dd397b
[ "BSD-3-Clause" ]
1
2019-02-10T18:48:28.000Z
2019-02-10T18:48:28.000Z
code/tools.py
LCLinVictory/WeeTP
ec5b69372459ce4dfa9b29d148ed9fd8c0dd397b
[ "BSD-3-Clause" ]
null
null
null
code/tools.py
LCLinVictory/WeeTP
ec5b69372459ce4dfa9b29d148ed9fd8c0dd397b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Dec 01 21:52:18 2018 @author: LCL """ from __future__ import division # for / and // #from collections import Counter # for merge dict import os # for file path global CodeUpperPath CodeUpperPath = os.path.abspath('..') ''' https://blog.csdn.net/fred1653/article/details/...
38.056047
140
0.480118
# -*- coding: utf-8 -*- """ Created on Sat Dec 01 21:52:18 2018 @author: LCL """ from __future__ import division # for / and // #from collections import Counter # for merge dict import sys # for exit() import os # for file path global CodeUpperPath CodeUpperPath = os.path.abspath('..') ''' https://blog.csdn.net/...
108
0
0
4,742
0
7,327
0
-11
177
0737a4243c0c9b5fd0afcef540ec5cccc5082236
792
py
Python
packages/pyre/flow/Status.py
BryanRiel/pyre
179359634a7091979cced427b6133dd0ec4726ea
[ "BSD-3-Clause" ]
null
null
null
packages/pyre/flow/Status.py
BryanRiel/pyre
179359634a7091979cced427b6133dd0ec4726ea
[ "BSD-3-Clause" ]
null
null
null
packages/pyre/flow/Status.py
BryanRiel/pyre
179359634a7091979cced427b6133dd0ec4726ea
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # michael a.g. avzis # orthologue # (c) 1998-2018 all rights reserved # # support # declaration # end of file
17.217391
78
0.569444
# -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2018 all rights reserved # # support import pyre # declaration class Status(pyre.tracker): """ A helper that watches over a component's traits and records value changes """ # public data raw = True # meta-methods ...
4
0
0
614
0
0
0
-10
44
522afae7c01a2910773be3d2d11c138ee610e42e
3,973
py
Python
utils/tickers.py
GrovesD2/ma_crossover
ad46039fce50f8ed1bff2c262495cf6bcb9f9f8a
[ "MIT" ]
null
null
null
utils/tickers.py
GrovesD2/ma_crossover
ad46039fce50f8ed1bff2c262495cf6bcb9f9f8a
[ "MIT" ]
null
null
null
utils/tickers.py
GrovesD2/ma_crossover
ad46039fce50f8ed1bff2c262495cf6bcb9f9f8a
[ "MIT" ]
null
null
null
''' Functionality to get ticker names and data ''' import os import random import pandas as pd import yfinance as yf def get_random_tickers(n: int) -> list: ''' From the available ticker data, randomly select n tickers. ''' return random.sample(get_all_ticker_names(), n) def get_tickers_exc_sample(n: ...
27.212329
82
0.580418
''' Functionality to get ticker names and data ''' import os import random import pandas as pd import yfinance as yf def get_random_tickers(n: int) -> list: ''' From the available ticker data, randomly select n tickers. ''' return random.sample(get_all_ticker_names(), n) def get_tickers_exc_sample(n: ...
0
0
0
0
0
0
0
0
0
43500413718fc916a165dd88bc9ba6753eeb6eb9
2,251
py
Python
info/libs/yuntongxun/sms.py
ymxz375417299/Information
27ae3839554e638fb74c9729d88e02cf623bc01e
[ "MIT" ]
null
null
null
info/libs/yuntongxun/sms.py
ymxz375417299/Information
27ae3839554e638fb74c9729d88e02cf623bc01e
[ "MIT" ]
null
null
null
info/libs/yuntongxun/sms.py
ymxz375417299/Information
27ae3839554e638fb74c9729d88e02cf623bc01e
[ "MIT" ]
null
null
null
# conding=utf-8 # "-"ACCOUNT SID _accountSid = '8a216da86812593601682c07861e1cad' # Token-AUTH TOKEN ...
43.288462
197
0.487783
# conding=utf-8 from .CCPRestSDK import REST # 说明:主账号,登陆云通讯网站后,可在"控制台-应用"中看到开发者主账号ACCOUNT SID _accountSid = '8a216da86812593601682c07861e1cad' # 说明:主账号Token,登陆云通讯网站后,可在控制台-应用中看到开发者主账号AU...
981
0
0
797
0
0
0
7
46
5f4d75ae5a046786437251ab0073f732f6f9bc5c
190
py
Python
mysite/settings_prod.py
dennybiasiolli/django-interven
009908021f1960d47920d783179593523b912a6e
[ "MIT" ]
null
null
null
mysite/settings_prod.py
dennybiasiolli/django-interven
009908021f1960d47920d783179593523b912a6e
[ "MIT" ]
31
2020-01-03T05:56:56.000Z
2022-03-29T11:49:02.000Z
mysite/settings_prod.py
dennybiasiolli/django-interven
009908021f1960d47920d783179593523b912a6e
[ "MIT" ]
3
2020-10-03T08:57:48.000Z
2021-10-01T07:17:08.000Z
DEBUG = False REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] = ( 'rest_framework.renderers.JSONRenderer', 'utils.api.BrowsableAPIRendererWithoutForms', )
19
49
0.768421
from .settings_base import * DEBUG = False REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] = ( 'rest_framework.renderers.JSONRenderer', 'utils.api.BrowsableAPIRendererWithoutForms', )
0
0
0
0
0
0
0
7
22
88751f108e19ee9b3a9520149943789b09a98130
93
py
Python
locale/pot/api/examples/_autosummary/pyvista-examples-downloads-download_rectilinear_grid-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
4
2020-08-07T08:19:19.000Z
2020-12-04T09:51:11.000Z
locale/pot/api/examples/_autosummary/pyvista-examples-downloads-download_rectilinear_grid-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
19
2020-08-06T00:24:30.000Z
2022-03-30T19:22:24.000Z
locale/pot/api/examples/_autosummary/pyvista-examples-downloads-download_rectilinear_grid-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
1
2021-03-09T07:50:40.000Z
2021-03-09T07:50:40.000Z
from pyvista import examples dataset = examples.download_rectilinear_grid() # doctest:+SKIP
31
63
0.817204
from pyvista import examples dataset = examples.download_rectilinear_grid() # doctest:+SKIP
0
0
0
0
0
0
0
0
0
9aee3d26ad4ce3b4a87638d72f226df6133d68bf
408
py
Python
backend/todomvc/backend/admin.py
kveretennicov/multidomvc
2a83bd449e42b167ba1fef20f10a878f1509e723
[ "MIT" ]
null
null
null
backend/todomvc/backend/admin.py
kveretennicov/multidomvc
2a83bd449e42b167ba1fef20f10a878f1509e723
[ "MIT" ]
null
null
null
backend/todomvc/backend/admin.py
kveretennicov/multidomvc
2a83bd449e42b167ba1fef20f10a878f1509e723
[ "MIT" ]
null
null
null
from django.contrib import admin from . import models admin.site.register(models.ToDoList, ToDoListAdmin) admin.site.register(models.ToDoItem, ToDoItemAdmin)
19.428571
51
0.794118
from django.contrib import admin from reversion.admin import VersionAdmin from . import models class ToDoItemInline(admin.TabularInline): model = models.ToDoItem class ToDoListAdmin(VersionAdmin): inlines = [ToDoItemInline] class ToDoItemAdmin(VersionAdmin): model = models.ToDoItem admin.site.regis...
0
0
0
134
0
0
0
19
91
2d7e051f4ff4b5938d4970c60a6abb0164536558
3,837
py
Python
TP1/calculadoraAlfaLambda.py
brunograssano/Analisis_Numerico_fiuba
104949391c931c7a1ca6d4d12221756ed34083d7
[ "MIT" ]
1
2021-05-17T21:06:52.000Z
2021-05-17T21:06:52.000Z
TP1/calculadoraAlfaLambda.py
brunograssano/Analisis_Numerico_fiuba
104949391c931c7a1ca6d4d12221756ed34083d7
[ "MIT" ]
null
null
null
TP1/calculadoraAlfaLambda.py
brunograssano/Analisis_Numerico_fiuba
104949391c931c7a1ca6d4d12221756ed34083d7
[ "MIT" ]
1
2021-05-19T00:02:06.000Z
2021-05-19T00:02:06.000Z
import numpy as np def OrdenDeConvergencia(xNmenos2, xNmenos1, xN, xNmas1): """ Calcula el orden de convergencia para determinado punto aplicando la division que se realiza en la definicion. Si algun denominador resultase nulo, no se devolvera una constante, se devuelve None. """ a = xNmas...
34.881818
122
0.625489
import numpy as np def OrdenDeConvergencia(xNmenos2, xNmenos1, xN, xNmas1): """ Calcula el orden de convergencia para determinado punto aplicando la division que se realiza en la definicion. Si algun denominador resultase nulo, no se devolvera una constante, se devuelve None. """ a = xNmas...
0
0
0
0
0
0
0
0
0
502897465f47aa62c8bf135cc51f3e332608d5cf
553
py
Python
rock_paper_and_scissors.py
agolla0440/my_python_workbook
3595037467e89e0950d0c356b2ba087e574e2bd9
[ "Apache-2.0" ]
null
null
null
rock_paper_and_scissors.py
agolla0440/my_python_workbook
3595037467e89e0950d0c356b2ba087e574e2bd9
[ "Apache-2.0" ]
null
null
null
rock_paper_and_scissors.py
agolla0440/my_python_workbook
3595037467e89e0950d0c356b2ba087e574e2bd9
[ "Apache-2.0" ]
null
null
null
print(play())
22.12
84
0.531646
import random def play(): user = input(" What is your choice," "'r',(r is for rock) 'p',(p is for paper) 's'(s s for scissors): ") computer = random.choice(['r', 'p', 's']) if user == computer: return "It's a tie" if is_win(user, computer): return "Congrats you won" ...
0
0
0
0
0
475
0
-8
68
73268b9790ba7ee864ef28e6bef4f4b01f51c046
4,529
py
Python
student_mentor_dataset_cleaning/training/utils.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-19T04:26:12.000Z
2022-03-19T04:26:12.000Z
student_mentor_dataset_cleaning/training/utils.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
student_mentor_dataset_cleaning/training/utils.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
33.058394
95
0.729962
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
0
0
0
1,236
1,567
423
0
76
207
cb611a6a71960c6225710e5169c7f07dfb8e152c
4,107
py
Python
tests/plot/test_plot_all.py
AssafZohar/eddington-matplotlib
d638098a3f059ffc48ab550de06deb4173563253
[ "Apache-2.0" ]
null
null
null
tests/plot/test_plot_all.py
AssafZohar/eddington-matplotlib
d638098a3f059ffc48ab550de06deb4173563253
[ "Apache-2.0" ]
null
null
null
tests/plot/test_plot_all.py
AssafZohar/eddington-matplotlib
d638098a3f059ffc48ab550de06deb4173563253
[ "Apache-2.0" ]
null
null
null
from pathlib import Path from eddington import FitData import numpy as np from tests.plot import dummy_func should_print_results = True should_plot_fitting = True should_plot_residuals = True should_plot_data = False xmin = 0.2 xmax = 9.8 func = dummy_func data = FitData.random(dummy_func) a = np.array([1, 2]) outp...
29.978102
83
0.714147
import pytest from pathlib import Path from eddington import FitData from mock import Mock import numpy as np from pytest_cases import fixture_plus from eddington_matplotlib import plot_all from tests.plot import dummy_func should_print_results = True should_plot_fitting = True should_plot_residuals = True should_p...
0
909
0
0
0
2,562
0
28
250
c437072d6edb163882890435449934dd8a096841
1,783
py
Python
server.py
sarantocs/online-chat-server
dc266342c54000a78e0a1d382b8e15da9046833f
[ "MIT" ]
null
null
null
server.py
sarantocs/online-chat-server
dc266342c54000a78e0a1d382b8e15da9046833f
[ "MIT" ]
null
null
null
server.py
sarantocs/online-chat-server
dc266342c54000a78e0a1d382b8e15da9046833f
[ "MIT" ]
null
null
null
import socket import threading PORT = 9090 HOST = socket.gethostbyname(socket.gethostname()) #local host server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((HOST, PORT)) clients = [] def start(): """ Thread to accept clients :return: None """ server.listen()...
24.094595
84
0.53954
import socket import threading PORT = 9090 HOST = socket.gethostbyname(socket.gethostname()) #local host server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((HOST, PORT)) clients = [] def start(): """ Thread to accept clients :return: None """ server.listen()...
0
0
0
0
0
0
0
0
0
b162687a24227d6d088ccca9575e4c0027dff366
1,445
py
Python
gaussianFunction.py
git-prashant/gaussianPlume
84b27c6964be5e7b735c651498a0726ceaed252e
[ "MIT" ]
9
2019-08-31T07:51:00.000Z
2021-09-20T09:47:57.000Z
gaussianFunction.py
git-prashant/gaussianPlume
84b27c6964be5e7b735c651498a0726ceaed252e
[ "MIT" ]
null
null
null
gaussianFunction.py
git-prashant/gaussianPlume
84b27c6964be5e7b735c651498a0726ceaed252e
[ "MIT" ]
4
2019-09-24T02:44:35.000Z
2021-06-26T03:51:44.000Z
from scipy.special import erfcinv as erfcinv
30.104167
81
0.651903
import numpy as np import sys from scipy.special import erfcinv as erfcinv from calc_sigmas import calc_sigmas def gauss_func(Q,u,dir1,x,y,z,xs,ys,H,Dy,Dz,STABILITY): u1=u x1=x-xs # shift the coordinates so that stack is centre point y1=y-ys # components of u in x and y directions wx=u1*np.sin((dir1-1...
0
0
0
0
0
1,306
0
0
90
e66af6647fa921716cb36a5edc48d8a24b8f2c92
2,578
py
Python
segmentPlane.py
pcorrado/ChestFlowSlicer
58f230eb1e6405b4a5f611f4f8aca6cd8602f608
[ "MIT" ]
null
null
null
segmentPlane.py
pcorrado/ChestFlowSlicer
58f230eb1e6405b4a5f611f4f8aca6cd8602f608
[ "MIT" ]
null
null
null
segmentPlane.py
pcorrado/ChestFlowSlicer
58f230eb1e6405b4a5f611f4f8aca6cd8602f608
[ "MIT" ]
null
null
null
import sys if __name__ == "__main__": filePath = sys.argv[1]
33.480519
173
0.638092
import numpy as np import matplotlib.pyplot as plt from math import sqrt, floor, ceil from scipy.interpolate import RegularGridInterpolator from scipy.ndimage import label import random import warnings import sys import os import csv import cv2 from sklearn.cluster import KMeans from PIL import Image from ...
0
0
0
0
0
2,108
0
53
347
ecb122f56f095959febe419420d10c3d94a712f0
4,773
py
Python
tools.py
tomachito/aram
d30626284b127cd665c2cfce54720b14ff87bdbd
[ "MIT" ]
null
null
null
tools.py
tomachito/aram
d30626284b127cd665c2cfce54720b14ff87bdbd
[ "MIT" ]
null
null
null
tools.py
tomachito/aram
d30626284b127cd665c2cfce54720b14ff87bdbd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import numpy.linalg as la import scipy as sp # ================ ARRAY ================ # ================ STATS ================ msqrt = lambda M : [np.matmul(u,np.diag(np.sqrt(s))) for u,s,vh in [la.svd(M)]][0] matern = lambda r,r0,nu : 2**(1-nu)/sp.special.gamma(nu)...
38.184
103
0.555625
# -*- coding: utf-8 -*- import numpy as np import numpy.linalg as la import scipy as sp # ================ ARRAY ================ def make_array(array_shape,max_fov,max_n_det): valid_array_types = ['flower', 'hex', 'square'] if array_shape=='flower': phi = np.pi*(3.-np.sqrt(5.)) # golden angle ...
0
0
0
0
0
4,027
0
0
215