hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
846eee1f9835a8d69195c6aee569d75cbf67c8ca
716
py
Python
lang/py/pylib/code/struct/struct_buffers.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
13
2020-01-04T07:37:38.000Z
2021-08-31T05:19:58.000Z
lang/py/pylib/code/struct/struct_buffers.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
3
2020-06-05T22:42:53.000Z
2020-08-24T07:18:54.000Z
lang/py/pylib/code/struct/struct_buffers.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
9
2020-10-19T04:53:06.000Z
2021-08-31T05:20:01.000Z
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. # """ """ __version__ = "$Id$" #end_pymotw_header import struct import binascii s = struct.Struct('I 2s f') values = (1, 'ab', 2.7) print 'Original:', values print print 'ctypes string buffer' import ctypes b = ctypes....
19.351351
55
0.685754
0
0
0
0
0
0
0
0
251
0.350559
8470cc594037f191b3b43b6897fa69a25d35dce1
2,890
py
Python
tests/test_time_res_method.py
GispoCoding/datacube-ows
4ffe14ccf9f382bff8f4a33fc54729d3e18b670e
[ "Apache-2.0" ]
null
null
null
tests/test_time_res_method.py
GispoCoding/datacube-ows
4ffe14ccf9f382bff8f4a33fc54729d3e18b670e
[ "Apache-2.0" ]
null
null
null
tests/test_time_res_method.py
GispoCoding/datacube-ows
4ffe14ccf9f382bff8f4a33fc54729d3e18b670e
[ "Apache-2.0" ]
null
null
null
import pytest from datetime import datetime import pytz from datacube_ows.ows_configuration import OWSProductLayer, TIMERES_RAW, TIMERES_MON, TIMERES_YR def dummy_timeres_layer(time_res): prod = product_layer = OWSProductLayer.__new__(OWSProductLayer) prod.time_resolution = time_res return prod class Th...
30.104167
96
0.689619
114
0.039446
0
0
555
0.192042
0
0
134
0.046367
8472be5ff4c0eb90b45ae9ec3a6f3d498c42634d
8,846
py
Python
ini/types.py
ClementJ18/ini_parser
68bee79af6319cc967c3fa13e4ba7b5ef0485fa0
[ "MIT" ]
null
null
null
ini/types.py
ClementJ18/ini_parser
68bee79af6319cc967c3fa13e4ba7b5ef0485fa0
[ "MIT" ]
null
null
null
ini/types.py
ClementJ18/ini_parser
68bee79af6319cc967c3fa13e4ba7b5ef0485fa0
[ "MIT" ]
null
null
null
from .utils import to_float from .enums import * import regex import sys from itertools import zip_longest from collections import defaultdict class Bool: @classmethod def convert(cls, parser, value): value = parser.get_macro(value) if isinstance(value, bool): return value ...
30.191126
144
0.553697
8,028
0.907529
0
0
2,328
0.26317
0
0
674
0.076193
8473a16363e9a185f76eb2bc8c324f1926385713
8,299
py
Python
ina233.py
scottvr/pi-ina233
906d4349fffbe06a14c9fd9bf9dc2f32c50ccdc2
[ "MIT" ]
1
2021-02-21T09:18:47.000Z
2021-02-21T09:18:47.000Z
ina233.py
scottvr/pi-ina233
906d4349fffbe06a14c9fd9bf9dc2f32c50ccdc2
[ "MIT" ]
null
null
null
ina233.py
scottvr/pi-ina233
906d4349fffbe06a14c9fd9bf9dc2f32c50ccdc2
[ "MIT" ]
1
2021-07-27T06:08:34.000Z
2021-07-27T06:08:34.000Z
""" This library supports the TI INA233 current and power monitor with a Raspberry PI using SMBus/I2C. By scottvr for 1SimplePhone.com """ from smbus2 import SMBus class INA233: CLEAR_FAULTS = 0x03 RESTORE_DEFAULT_ALL = 0x12 CAPABILITY = 0x19 IOUT_OC_WARN_LIMIT = 0x4A VI...
35.314894
106
0.599108
8,132
0.979759
0
0
0
0
0
0
1,529
0.184217
8474415733d26503f0e0b41a1a2b80c15eaec5b3
530
py
Python
but/trades/serializers/api_sell_base.py
yevgnenll/but
2cb3d7b8fd4b898440f9a74ee4b6b8fbdff32bb1
[ "MIT" ]
4
2017-02-25T04:46:41.000Z
2021-03-16T21:41:51.000Z
but/trades/serializers/api_sell_base.py
yevgnenll/but
2cb3d7b8fd4b898440f9a74ee4b6b8fbdff32bb1
[ "MIT" ]
18
2016-04-09T07:29:33.000Z
2017-04-06T04:39:54.000Z
but/trades/serializers/api_sell_base.py
yevgnenll/but
2cb3d7b8fd4b898440f9a74ee4b6b8fbdff32bb1
[ "MIT" ]
null
null
null
from rest_framework import serializers from trades.models import Sell class SellBaseModelSerializer(serializers.ModelSerializer): username = serializers.CharField( source="user.username", ) class Meta: model = Sell fields = ( 'pk', 'title', ...
19.62963
59
0.475472
456
0.860377
0
0
0
0
0
0
100
0.188679
847868d3c9616a1cdde5e7750cd9b87f9b453bed
988
py
Python
application/__init__.py
oicr-gsi/dashi
34bf96a7d447095df525df3ad27dbe10f4e3dde0
[ "MIT" ]
2
2020-03-27T21:20:20.000Z
2022-02-09T07:42:51.000Z
application/__init__.py
oicr-gsi/dashi
34bf96a7d447095df525df3ad27dbe10f4e3dde0
[ "MIT" ]
89
2019-06-06T18:31:19.000Z
2022-03-07T20:38:36.000Z
application/__init__.py
oicr-gsi/dashi
34bf96a7d447095df525df3ad27dbe10f4e3dde0
[ "MIT" ]
2
2019-06-06T17:50:53.000Z
2019-06-06T17:52:32.000Z
from flask import Flask from flask_caching import Cache from prometheus_flask_exporter import PrometheusMetrics import pandas import sys import numpy ## Set up Flask application, attach extensions, and load configuration def create_app(debug=False): # pandas debug options pandas.set_option('display.max_rows',...
26
70
0.711538
0
0
0
0
0
0
0
0
293
0.296559
8478a40f6283841cbeef90271865092b9e8ed207
3,484
py
Python
bootstrap.py
ptweir/pyresampling
7d81e2b3b2af57e43e24dddd2e04918f73f9f290
[ "MIT" ]
4
2015-11-18T18:27:38.000Z
2017-01-18T18:20:22.000Z
bootstrap.py
ptweir/pyresampling
7d81e2b3b2af57e43e24dddd2e04918f73f9f290
[ "MIT" ]
null
null
null
bootstrap.py
ptweir/pyresampling
7d81e2b3b2af57e43e24dddd2e04918f73f9f290
[ "MIT" ]
null
null
null
import numpy as np import collections try: from scipy.stats import scoreatpercentile except: # in case no scipy scoreatpercentile = False def _confidence_interval_1d(A, alpha=.05, metric=np.mean, numResamples=10000, interpolate=True): """Calculates bootstrap confidence interval along one dimensional ar...
43.55
129
0.705511
0
0
0
0
0
0
0
0
1,451
0.416475
84791502a9e42427caeb5f730a6711482d65741e
806
py
Python
suasor/suasor/auxilium.py
campovski/suasor
11bd745b8e023d9cf79ce23bec992e23a6427613
[ "MIT" ]
null
null
null
suasor/suasor/auxilium.py
campovski/suasor
11bd745b8e023d9cf79ce23bec992e23a6427613
[ "MIT" ]
14
2018-04-09T15:51:18.000Z
2018-04-16T13:44:22.000Z
suasor/suasor/auxilium.py
campovski/suasor
11bd745b8e023d9cf79ce23bec992e23a6427613
[ "MIT" ]
null
null
null
import datetime import os from .models import Log, LogType from .settings import DEBUG, DIR_DATA, DIR_DATA_DEBUG, DIR_DATA_IMAGES, DIR_DATA_PEOPLE, DIR_DATA_LOG """ Writes information about error that occured (like name or image could not be extracted). @param at: The name of function that this error occured in @p...
32.24
101
0.684864
0
0
0
0
0
0
0
0
229
0.284119
847c619b59a80ff4f78080c906715a33d7fa95e3
14,327
py
Python
05/solution.py
AlecRosenbaum/adventofcode2017
9214a64db77492790d30bbd22e835535d05abb25
[ "MIT" ]
null
null
null
05/solution.py
AlecRosenbaum/adventofcode2017
9214a64db77492790d30bbd22e835535d05abb25
[ "MIT" ]
null
null
null
05/solution.py
AlecRosenbaum/adventofcode2017
9214a64db77492790d30bbd22e835535d05abb25
[ "MIT" ]
null
null
null
""" Day 5 challenge """ import attr def solution_part_one(arg): instructions = arg[:] n = 0 pos = 0 while pos < len(instructions): idx = pos pos += instructions[idx] instructions[idx] += 1 n += 1 return n def solution_part_two(arg): instructions = arg[:] ...
13.710048
42
0.209046
0
0
0
0
0
0
0
0
33
0.002303
847cbacea93949610c39623fec080a8c96e35146
2,091
py
Python
twitchchat_display/main.py
shughes-uk/twitchchat_display
b81157ead7007703f4f795ea4c0d4f1cd3d553ce
[ "MIT" ]
1
2015-12-17T08:12:14.000Z
2015-12-17T08:12:14.000Z
twitchchat_display/main.py
shughes-uk/twitchchat_display
b81157ead7007703f4f795ea4c0d4f1cd3d553ce
[ "MIT" ]
null
null
null
twitchchat_display/main.py
shughes-uk/twitchchat_display
b81157ead7007703f4f795ea4c0d4f1cd3d553ce
[ "MIT" ]
2
2015-09-22T00:46:44.000Z
2015-11-04T01:29:15.000Z
#!/usr/bin/env python # This Python file uses the following encoding: utf-8 import logging.config import signal import sys import time from pathlib import Path import click import pygame from twitchchat import twitch_chat from .config import get_config, logging_config from .display import TwitchChatDisplay logger =...
28.256757
80
0.645146
0
0
0
0
1,584
0.757532
0
0
483
0.23099
847e369447b3cdbbad166cace6b991fbfe990141
19,440
py
Python
confclass.py
eladn/confclass
5008d1ee5a18b02135a4a981b4eeab7ce9a62ab6
[ "Apache-2.0" ]
null
null
null
confclass.py
eladn/confclass
5008d1ee5a18b02135a4a981b4eeab7ce9a62ab6
[ "Apache-2.0" ]
null
null
null
confclass.py
eladn/confclass
5008d1ee5a18b02135a4a981b4eeab7ce9a62ab6
[ "Apache-2.0" ]
null
null
null
import typing from typing import Optional, Callable, Iterable, Iterator, Dict, Union import dataclasses import argparse from functools import partial import yaml import os __all__ = [ 'confclass', 'confparam' ] # A sentinel object to detect if a parameter is supplied or not. # Use an empty class to give it ...
43.882619
117
0.641358
7,278
0.374383
9,299
0.478344
598
0.030761
0
0
3,957
0.203549
847e429caaf13eb7d884539ae5c14baada32ea44
2,469
py
Python
src/samstatic_flask/app.py
city10th/samstatic_flask
f8a8934f724d85ab2eb7ae680aa7d14747377a94
[ "MIT" ]
null
null
null
src/samstatic_flask/app.py
city10th/samstatic_flask
f8a8934f724d85ab2eb7ae680aa7d14747377a94
[ "MIT" ]
null
null
null
src/samstatic_flask/app.py
city10th/samstatic_flask
f8a8934f724d85ab2eb7ae680aa7d14747377a94
[ "MIT" ]
null
null
null
from functools import lru_cache from flask import Flask from flask.ctx import RequestContext from .config import Option from .ctx import RequestContextWithSamStatic from .helper import set_samstatic_default_parm class FlaskWithSamStatic(Flask): def __init__(self, *Flask_args, **Flask_kwargs): super().__i...
44.089286
120
0.689753
2,252
0.91211
0
0
0
0
0
0
442
0.17902
847f1e5232818e65137a7c49cccb4f03a7eb9c35
3,334
py
Python
deploy/auto_scaling.py
danielSbastos/blue-green-aws
bb78448edd2496d69f4802ef7337ce648a965be3
[ "MIT" ]
null
null
null
deploy/auto_scaling.py
danielSbastos/blue-green-aws
bb78448edd2496d69f4802ef7337ce648a965be3
[ "MIT" ]
null
null
null
deploy/auto_scaling.py
danielSbastos/blue-green-aws
bb78448edd2496d69f4802ef7337ce648a965be3
[ "MIT" ]
null
null
null
import time from deploy.support import Client class AutoScaling: def __init__(self, state_file_content): self.auto_scaling_client = Client.auto_scaling() self.state_file_content = state_file_content def enter_standby(self, instances_ids, green_blue): if not self.state_file_content[g...
40.168675
99
0.670966
3,284
0.985003
0
0
0
0
0
0
577
0.173065
847fd9cb96497848a266a48adad5af45d252833f
4,594
py
Python
client/views.py
adwalkz/DjangoDataAnalysis
1a888fc3a5dc34651a3b25d476e985ff39d8e305
[ "MIT" ]
4
2021-08-04T17:02:56.000Z
2021-09-30T07:07:04.000Z
client/views.py
adwalkz/DjangoDataAnalysis
1a888fc3a5dc34651a3b25d476e985ff39d8e305
[ "MIT" ]
null
null
null
client/views.py
adwalkz/DjangoDataAnalysis
1a888fc3a5dc34651a3b25d476e985ff39d8e305
[ "MIT" ]
null
null
null
from django.shortcuts import render, get_object_or_404, get_list_or_404 from django.db.models import Count, Avg, Max, Min from ts.models import * from .models import SurveyQuestion, SurveyQuestionChoice, SurveyResponse import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from fpdf import FPDF cl...
28.534161
139
0.597736
770
0.16761
0
0
0
0
0
0
859
0.186983
84806a239925de030e3ae5a0bfc49d874839118d
690
py
Python
plaso/formatters/android_webviewcache.py
ir4n6/plaso
010f9cbdfc82e21ed6658657fd09a7b44115c464
[ "Apache-2.0" ]
27
2019-04-05T12:01:49.000Z
2022-02-08T02:26:25.000Z
plaso/formatters/android_webviewcache.py
ir4n6/plaso
010f9cbdfc82e21ed6658657fd09a7b44115c464
[ "Apache-2.0" ]
null
null
null
plaso/formatters/android_webviewcache.py
ir4n6/plaso
010f9cbdfc82e21ed6658657fd09a7b44115c464
[ "Apache-2.0" ]
8
2019-11-28T08:06:34.000Z
2020-08-29T13:53:30.000Z
# -*- coding: utf-8 -*- """The Android WebViewCache database event formatter.""" from __future__ import unicode_literals from plaso.formatters import interface from plaso.formatters import manager # TODO: move to android_webview.py. class AndroidWebViewCacheFormatter(interface.ConditionalEventFormatter): """Forma...
24.642857
73
0.757971
376
0.544928
0
0
0
0
0
0
277
0.401449
84832d14bd00eb58e3c0522651cfb1e530dade7e
244
py
Python
output/models/nist_data/list_pkg/language/schema_instance/nistschema_sv_iv_list_language_length_4_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/list_pkg/language/schema_instance/nistschema_sv_iv_list_language_length_4_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/list_pkg/language/schema_instance/nistschema_sv_iv_list_language_length_4_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.list_pkg.language.schema_instance.nistschema_sv_iv_list_language_length_4_xsd.nistschema_sv_iv_list_language_length_4 import NistschemaSvIvListLanguageLength4 __all__ = [ "NistschemaSvIvListLanguageLength4", ]
40.666667
187
0.889344
0
0
0
0
0
0
0
0
35
0.143443
848522d0c16945038ba7b546ab13ef5b66ef936b
78
py
Python
src/chat/urls.py
alehpineda/django_webchat
1fef369d04c9bff0b506a152d4a82d7fa14a53f2
[ "MIT" ]
null
null
null
src/chat/urls.py
alehpineda/django_webchat
1fef369d04c9bff0b506a152d4a82d7fa14a53f2
[ "MIT" ]
null
null
null
src/chat/urls.py
alehpineda/django_webchat
1fef369d04c9bff0b506a152d4a82d7fa14a53f2
[ "MIT" ]
null
null
null
from django.urls import path, re_path app_name = 'chat' urlpatterns = [ ]
8.666667
37
0.692308
0
0
0
0
0
0
0
0
6
0.076923
8485f70cfa4995ce66447c98e07379ae489ca9e8
10,556
py
Python
hstgrism/grismapcorr.py
bkornpob/hstgrism
f65d37454c486e1681a9f70eecbc0f3ca83c2324
[ "MIT" ]
null
null
null
hstgrism/grismapcorr.py
bkornpob/hstgrism
f65d37454c486e1681a9f70eecbc0f3ca83c2324
[ "MIT" ]
null
null
null
hstgrism/grismapcorr.py
bkornpob/hstgrism
f65d37454c486e1681a9f70eecbc0f3ca83c2324
[ "MIT" ]
null
null
null
# Kornpob Bhirombhakdi # kbhirombhakdi@stsci.edu import numpy as np from scipy.interpolate import interp2d import copy class GrismApCorr: """ GrismApCorr is a class containing tables for aperture correction (i.e., apcorr = f(wavelength, apsize)) in aXe reduction. These tables are from ISRs. Interpolaton model...
56.449198
313
0.464286
10,434
0.988443
0
0
0
0
0
0
3,122
0.295756
84863eae140817ec0c54b39184cf63b3eb2511d1
15,051
py
Python
Structures/Interceptor.py
saisua/Scraper
ae9f93fbb0b3350cd5c8ba8e87b7ad63461d9a30
[ "MIT" ]
null
null
null
Structures/Interceptor.py
saisua/Scraper
ae9f93fbb0b3350cd5c8ba8e87b7ad63461d9a30
[ "MIT" ]
13
2020-06-19T13:31:16.000Z
2020-06-19T14:05:44.000Z
Structures/Interceptor.py
saisua/Scraper2
ae9f93fbb0b3350cd5c8ba8e87b7ad63461d9a30
[ "MIT" ]
null
null
null
print("Starting Interceptor imports... ") import sys import socket from multiprocessing import Manager, Process from re import search, sub from os import getcwd import io import pyshark import pem from pyshark.capture.capture import Capture from pyshark.capture.live_capture import LiveCapture from pyshark.packet.pack...
42.27809
124
0.626071
10,863
0.721746
1,952
0.129692
702
0.046641
2,229
0.148096
7,141
0.474454
8488ee1fb62a274d4553e3c32bfb9b276cd72576
354
py
Python
pyoctoprintapi/server.py
rfleming71/pyoctoprintapi
5058d163beee11329315ced814bb6aec04142d8a
[ "MIT" ]
null
null
null
pyoctoprintapi/server.py
rfleming71/pyoctoprintapi
5058d163beee11329315ced814bb6aec04142d8a
[ "MIT" ]
1
2021-11-12T05:47:05.000Z
2021-11-12T05:47:05.000Z
pyoctoprintapi/server.py
rfleming71/pyoctoprintapi
5058d163beee11329315ced814bb6aec04142d8a
[ "MIT" ]
null
null
null
"""Define information about the octoprint server""" class OctoprintServerInfo: """Current job information""" def __init__(self, raw: dict): self._raw = raw @property def safe_mode(self) -> str or None: return self._raw.get("safemode") @property def version(self) -> str: ...
23.6
51
0.635593
300
0.847458
0
0
169
0.477401
0
0
99
0.279661
8489217661ac1eae3afe68e1e0d39ce20002a5f3
538
py
Python
sources/rnt/mediane/normalizations/enumeration.py
bryan-brancotte/rank-aggregation-with-ties
15fffb0b1bee3d6cef7090486a7c910e5f51195d
[ "Apache-2.0" ]
null
null
null
sources/rnt/mediane/normalizations/enumeration.py
bryan-brancotte/rank-aggregation-with-ties
15fffb0b1bee3d6cef7090486a7c910e5f51195d
[ "Apache-2.0" ]
11
2018-04-04T08:24:30.000Z
2021-03-19T21:45:04.000Z
sources/rnt/mediane/normalizations/enumeration.py
bryan-brancotte/rank-aggregation-with-ties
15fffb0b1bee3d6cef7090486a7c910e5f51195d
[ "Apache-2.0" ]
1
2018-10-25T09:13:41.000Z
2018-10-25T09:13:41.000Z
from django.utils.translation import ugettext_lazy as _ NONE = 'None' UNIFICATION = 'UNIF' PROJECTION = 'PROJ' __tuple_list = ((UNIFICATION, _(UNIFICATION)), (PROJECTION, _(PROJECTION)), (NONE, _(NONE)),) def as_tuple_list(): return __tuple_list def get_from(id_enum): for k, v in __tuple_list: if ...
20.692308
93
0.654275
0
0
0
0
0
0
0
0
84
0.156134
8489289f1dc2f046552b0600de1034290547537c
348
py
Python
EvoMusicCompanion/ea/util.py
Jerryhu1/MasterThesis
0e9fe1b9ae7620bbf4c7546d8d408ccea992ec5b
[ "MIT" ]
null
null
null
EvoMusicCompanion/ea/util.py
Jerryhu1/MasterThesis
0e9fe1b9ae7620bbf4c7546d8d408ccea992ec5b
[ "MIT" ]
null
null
null
EvoMusicCompanion/ea/util.py
Jerryhu1/MasterThesis
0e9fe1b9ae7620bbf4c7546d8d408ccea992ec5b
[ "MIT" ]
null
null
null
from music21 import interval, pitch def transpose_piece(piece, key): k = piece.analyze('key') if k.tonicPitchNameWithCase.islower(): return None i = interval.Interval(k.tonic, pitch.Pitch(key)) new_piece = piece.transpose(i) return new_piece def flatten(l): return [item for sublist ...
19.333333
54
0.686782
0
0
0
0
0
0
0
0
5
0.014368
848a70bcaf3c6665cc367d128e79aa6e018703cf
1,932
py
Python
src/datasets.py
dmilios/dirichletGPC
7e460ca07005a5aed97937d2bf2a8a47b6f8051e
[ "Apache-2.0" ]
12
2018-12-19T15:38:20.000Z
2022-02-14T14:58:40.000Z
src/datasets.py
dmilios/dirichletGPC
7e460ca07005a5aed97937d2bf2a8a47b6f8051e
[ "Apache-2.0" ]
null
null
null
src/datasets.py
dmilios/dirichletGPC
7e460ca07005a5aed97937d2bf2a8a47b6f8051e
[ "Apache-2.0" ]
1
2019-12-25T01:51:02.000Z
2019-12-25T01:51:02.000Z
# Copyright 2018 Dimitrios Milios, Raffaello Camoriano, # Pietro Michiardi,Lorenzo Rosasco, Maurizio Filippone # 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...
32.2
75
0.624741
0
0
0
0
0
0
0
0
990
0.512422
848b436aa24ac308d60e90b617dd1c05c1c87340
4,559
py
Python
cleanup_timescale.py
djhedges/exit_speed
86c8a36dd7c53d9f67157c359625b8d33715f917
[ "Apache-2.0" ]
10
2020-09-25T19:48:50.000Z
2021-10-13T13:42:56.000Z
cleanup_timescale.py
djhedges/exit_speed
86c8a36dd7c53d9f67157c359625b8d33715f917
[ "Apache-2.0" ]
null
null
null
cleanup_timescale.py
djhedges/exit_speed
86c8a36dd7c53d9f67157c359625b8d33715f917
[ "Apache-2.0" ]
1
2021-02-08T14:50:48.000Z
2021-02-08T14:50:48.000Z
#!/usr/bin/python3 # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
30.393333
77
0.704321
0
0
0
0
0
0
0
0
2,274
0.498794
848fe74589053694644bcad6b55e06f1a3933401
32,153
py
Python
DNATool2/Mutation.py
shambo001/peat
7a26e896aa9914b084a9064df09ed15df4047cf3
[ "MIT" ]
3
2016-11-11T06:11:03.000Z
2021-09-12T22:13:51.000Z
DNATool2/Mutation.py
shambo001/peat
7a26e896aa9914b084a9064df09ed15df4047cf3
[ "MIT" ]
null
null
null
DNATool2/Mutation.py
shambo001/peat
7a26e896aa9914b084a9064df09ed15df4047cf3
[ "MIT" ]
2
2016-02-15T16:10:36.000Z
2018-02-27T10:33:21.000Z
#!/usr/bin/env python # # Protein Engineering Analysis Tool DataBase (PEATDB) # Copyright (C) 2010 Damien Farrell & Jens Erik Nielsen # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either ver...
30.134021
225
0.557055
9,727
0.302522
0
0
0
0
0
0
10,286
0.319908
8490aeceeb675f3713fb1cedf7105b2e3140cf51
1,472
py
Python
tempZonal/overlay1.py
Mihir-DG/Tropospheric-Temperature-and-Zonal-Wind-Profiles
13e0c706faed446f10758341807c066670260e0b
[ "MIT" ]
null
null
null
tempZonal/overlay1.py
Mihir-DG/Tropospheric-Temperature-and-Zonal-Wind-Profiles
13e0c706faed446f10758341807c066670260e0b
[ "MIT" ]
null
null
null
tempZonal/overlay1.py
Mihir-DG/Tropospheric-Temperature-and-Zonal-Wind-Profiles
13e0c706faed446f10758341807c066670260e0b
[ "MIT" ]
null
null
null
from netCDF4 import Dataset as dst import numpy as np from matplotlib import pyplot as plt tempnc = dst("../air.mon.mean.nc", mode='r') zonalnc = dst("../uwnd.mon.mean.nc", mode='r') #Datasets downloaded 21 Aug 2020 #Time length- 871 ==> 871/12 --> 7/12 def slice_per(source, step): return [source[i::step] for i in ...
24.131148
60
0.665761
0
0
0
0
0
0
0
0
216
0.14664
849299b9fc910775a11fc0036ffa60ec51f4037c
4,609
py
Python
tests/buf_test.py
ClasherKasten/babi
e11d61da9387b3740fcf7c9ec631e51cfd4b194b
[ "MIT" ]
null
null
null
tests/buf_test.py
ClasherKasten/babi
e11d61da9387b3740fcf7c9ec631e51cfd4b194b
[ "MIT" ]
null
null
null
tests/buf_test.py
ClasherKasten/babi
e11d61da9387b3740fcf7c9ec631e51cfd4b194b
[ "MIT" ]
null
null
null
from __future__ import annotations from unittest import mock import pytest import babi.buf from babi.buf import Buf def test_buf_truthiness(): assert bool(Buf([])) is False assert bool(Buf(['a', 'b'])) is True def test_buf_repr(): ret = repr(Buf(['a', 'b', 'c'])) assert ret == "Buf(['a', 'b', 'c'...
18.659919
72
0.533521
0
0
149
0.032286
1,158
0.250921
0
0
638
0.138245
84939ced5befe433cb8498d6dccc5a7e55882a2e
236
py
Python
test_gcat.py
thecrux4020/black-widow
2bf1926ecf9431f2e88cc677554264f86c393a19
[ "MIT" ]
1
2019-01-30T14:09:09.000Z
2019-01-30T14:09:09.000Z
test_gcat.py
thecrux4020/black-widow
2bf1926ecf9431f2e88cc677554264f86c393a19
[ "MIT" ]
null
null
null
test_gcat.py
thecrux4020/black-widow
2bf1926ecf9431f2e88cc677554264f86c393a19
[ "MIT" ]
null
null
null
import gc2 gcat = gc2.Gcat() gcat.checkCommands() print gcat.pending_tasks for task in gcat.pending_tasks: gcat.sendEmail('daskjdajhdagdjhsagdsahdsgajdgashdfaghdasfdhas', task['task_id']) gcat.delete_pending_task(task['task_id'])
19.666667
81
0.79661
0
0
0
0
0
0
0
0
65
0.275424
8493fc3f305b6cd5d37b4ba35bfc0dfffc975a3f
18,557
py
Python
simulation.py
laloc2496/cdn_configuration_optimization
58cf2278456d0ef8796570f12f1d00fd68aec686
[ "MIT" ]
null
null
null
simulation.py
laloc2496/cdn_configuration_optimization
58cf2278456d0ef8796570f12f1d00fd68aec686
[ "MIT" ]
null
null
null
simulation.py
laloc2496/cdn_configuration_optimization
58cf2278456d0ef8796570f12f1d00fd68aec686
[ "MIT" ]
null
null
null
import networkx as nx import random, pickle, string from src.util.gen_files import * import threading import time from src.net.topology import NetTopology from src.algorithm import * import os, sys from random import randint, shuffle, sample from src.util.utils import * from src.algorithm.cache import * from src.util.s...
49.092593
197
0.620898
0
0
0
0
0
0
0
0
2,148
0.115751
8495d4f3d80007cf3963d73184d2d8cdc2010a50
4,475
py
Python
assignment3/code/lr_1d.py
cjy513203427/SML_Assignment
630e5b73d2ce222f4adb29f91d2ee3007f8972ff
[ "MIT" ]
null
null
null
assignment3/code/lr_1d.py
cjy513203427/SML_Assignment
630e5b73d2ce222f4adb29f91d2ee3007f8972ff
[ "MIT" ]
null
null
null
assignment3/code/lr_1d.py
cjy513203427/SML_Assignment
630e5b73d2ce222f4adb29f91d2ee3007f8972ff
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- ''' @File : lr_1d.py.py @Modify Time @Author @Desciption ------------ ------- ----------- 2021/7/5 22:51 Jonas None ''' import numpy as np import math import matplotlib.pyplot as plt from scipy.stats import norm train_data = np.loadtxt("lin_reg_tr...
28.322785
111
0.576313
0
0
0
0
0
0
0
0
486
0.108603
849602ab96643a0ca50a7973accb1f2950c12d70
1,252
py
Python
datasets/mvda_soil/demos.py
ryuzakyl/data-bloodhound
ae0413e748e55a0d2dbae35bbe96a672f313a64b
[ "Apache-2.0" ]
3
2019-03-18T03:22:06.000Z
2021-04-06T07:53:51.000Z
datasets/mvda_soil/demos.py
ryuzakyl/data-bloodhound
ae0413e748e55a0d2dbae35bbe96a672f313a64b
[ "Apache-2.0" ]
null
null
null
datasets/mvda_soil/demos.py
ryuzakyl/data-bloodhound
ae0413e748e55a0d2dbae35bbe96a672f313a64b
[ "Apache-2.0" ]
2
2020-10-05T08:22:25.000Z
2020-10-05T08:24:02.000Z
#!/usr/bin/env # -*- coding: utf-8 -*- # Copyright (C) Victor M. Mendiola Lau - All Rights Reserved # Unauthorized copying of this file, via any medium is strictly prohibited # Proprietary and confidential # Written by Victor M. Mendiola Lau <ryuzakyl@gmail.com>, March 2017 import pylab import numpy as np from dataset...
27.217391
79
0.632588
0
0
0
0
0
0
0
0
609
0.486422
8496886dbc56ebec7509a1f73cdab97ecc41c0e3
3,487
py
Python
gan_training/DCGAN.py
sanilpande/stars-align
cdf69f487d3e4d2cef1d455840f094e2df55415e
[ "MIT" ]
null
null
null
gan_training/DCGAN.py
sanilpande/stars-align
cdf69f487d3e4d2cef1d455840f094e2df55415e
[ "MIT" ]
null
null
null
gan_training/DCGAN.py
sanilpande/stars-align
cdf69f487d3e4d2cef1d455840f094e2df55415e
[ "MIT" ]
1
2020-11-04T15:08:38.000Z
2020-11-04T15:08:38.000Z
""" DCGAN Model to get Generator for DefenseGAN Baseline Implementation. References: https://www.coursera.org/learn/build-basic-generative-adversarial-networks-gans https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html """ import torch from torch import nn class Generator(nn.Module): """Genera...
39.179775
120
0.632062
3,204
0.918841
0
0
0
0
0
0
550
0.157729
8496d65386d0cc0e3eff34b5236093dc29e85684
3,713
py
Python
figures/scripts/metrics_roc.py
ljalil/MasterThesis
59f4ec6356f41647cc4ac9510bcdd0c8506919b8
[ "CC-BY-4.0" ]
6
2020-06-25T16:28:02.000Z
2022-02-12T19:53:37.000Z
figures/scripts/metrics_roc.py
ljalil/MasterThesis
59f4ec6356f41647cc4ac9510bcdd0c8506919b8
[ "CC-BY-4.0" ]
null
null
null
figures/scripts/metrics_roc.py
ljalil/MasterThesis
59f4ec6356f41647cc4ac9510bcdd0c8506919b8
[ "CC-BY-4.0" ]
1
2020-08-14T13:37:32.000Z
2020-08-14T13:37:32.000Z
# -*- coding: utf-8 -*- """ Created on Sat May 9 11:03:34 2020 @author: Abdeljalil """ import numpy as np np.random.seed(10) import matplotlib.pyplot as plt from sklearn.datasets import make_classification from sklearn.linear_model import LogisticRegression from sklearn.ensemble import (RandomTreesEmbedding, Rando...
33.45045
96
0.748721
0
0
0
0
0
0
0
0
931
0.250741
849755a42d03dcd27711cb278727ab380e899f5c
1,729
py
Python
annotate/ac_build.py
universalbenefitNLP/text_annotate_py
e60e29af410c4ec0c8a2b09de8ea772d0572e066
[ "Unlicense" ]
null
null
null
annotate/ac_build.py
universalbenefitNLP/text_annotate_py
e60e29af410c4ec0c8a2b09de8ea772d0572e066
[ "Unlicense" ]
null
null
null
annotate/ac_build.py
universalbenefitNLP/text_annotate_py
e60e29af410c4ec0c8a2b09de8ea772d0572e066
[ "Unlicense" ]
null
null
null
import sys import os import argparse import pickle import ahocorasick from utils.utils import check_file, ensure_dir sys.path.append(os.path.join(os.path.dirname(__file__), '..')) def _get_parser(): parser = argparse.ArgumentParser() parser.add_argument('--infile', type=str, default='../data/synonym', help...
28.816667
105
0.661076
0
0
0
0
0
0
0
0
237
0.137073
8497cd64ede98663c1b1f76b7510257ff7fd903c
1,792
py
Python
app/main/forms.py
igihozo-stella/60sec-Pitch
a4ae4ca2cf0a6d2488bd721f329e33b6f4e38fec
[ "MIT" ]
null
null
null
app/main/forms.py
igihozo-stella/60sec-Pitch
a4ae4ca2cf0a6d2488bd721f329e33b6f4e38fec
[ "MIT" ]
null
null
null
app/main/forms.py
igihozo-stella/60sec-Pitch
a4ae4ca2cf0a6d2488bd721f329e33b6f4e38fec
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, SelectField, TextAreaField, SubmitField,PasswordField,ValidationError from wtforms.validators import Required, Email, Length, EqualTo from wtforms.validators import Required class LoginForm(FlaskForm): username = StringField("Username:", validators=...
38.956522
128
0.714844
1,544
0.861607
0
0
0
0
0
0
283
0.157924
849802068a48f6b66e9845576227f8306065b792
3,368
py
Python
src/count/HashCount.py
abagaria/opiq
b7df5134d8b265972ad70f7ba92b385f1e3fe5f2
[ "MIT" ]
13
2020-02-13T16:09:16.000Z
2021-07-21T16:23:39.000Z
src/count/HashCount.py
abagaria/opiq
b7df5134d8b265972ad70f7ba92b385f1e3fe5f2
[ "MIT" ]
2
2020-08-04T01:46:37.000Z
2021-06-28T10:30:53.000Z
src/count/HashCount.py
abagaria/opiq
b7df5134d8b265972ad70f7ba92b385f1e3fe5f2
[ "MIT" ]
3
2020-08-01T07:33:02.000Z
2021-11-13T20:54:55.000Z
# Taken from https://github.com/openai/EPG/blob/master/epg/exploration.py import numpy as np import torch device = torch.device("cuda" if torch.cuda.is_available() else "cpu") class HashingBonusEvaluator(object): """Hash-based count bonus for exploration. Tang, H., Houthooft, R., Foote, D., Stooke, A., Chen...
42.632911
122
0.620546
3,189
0.946853
0
0
0
0
0
0
1,173
0.348278
8498d5ed9bad8601b8ff437aad645427031351bd
1,435
py
Python
app.py
salsal97/birthday-bingo-flask
e7f235d8284a2442f5e06637148f421ec7ac609c
[ "MIT" ]
null
null
null
app.py
salsal97/birthday-bingo-flask
e7f235d8284a2442f5e06637148f421ec7ac609c
[ "MIT" ]
null
null
null
app.py
salsal97/birthday-bingo-flask
e7f235d8284a2442f5e06637148f421ec7ac609c
[ "MIT" ]
null
null
null
import re import os import random import json from datetime import datetime from flask import Flask, render_template app = Flask(__name__) # using Flask's app.route decorator to map the URL route / to that function: @app.route("/") def home(): no_of_columns=4 image_path='static/index/' image_list=os.lis...
25.175439
76
0.61324
0
0
0
0
1,210
0.843206
0
0
362
0.252265
849afa26cbaa85520b913e54c9ff304fa6ad9cd6
259
py
Python
blink_cursor.py
macshaggy/curses-example
b6b9c03b508515cf35e0a5f24963a386568c8029
[ "Unlicense" ]
1
2022-02-15T08:24:28.000Z
2022-02-15T08:24:28.000Z
blink_cursor.py
macshaggy/curses-example
b6b9c03b508515cf35e0a5f24963a386568c8029
[ "Unlicense" ]
null
null
null
blink_cursor.py
macshaggy/curses-example
b6b9c03b508515cf35e0a5f24963a386568c8029
[ "Unlicense" ]
null
null
null
import curses screen = curses.initscr() curses.curs_set(0) screen.addstr(2, 2, "Hello, I disabled the cursor!") screen.refresh() screen.getch() curses.curs_set(1) screen.addstr(2, 2, "And now it's back on.") screen.refresh() screen.getch() curses.endwin()
17.266667
52
0.722008
0
0
0
0
0
0
0
0
54
0.208494
849b5137ce5d8ff5f15fdccb8056c6c7fb8d7923
3,028
py
Python
script/model.py
jayeolasegun/Term-Deposit-Classification
e1ce928814f26712813f600bc704183d5a9e603d
[ "CC0-1.0" ]
null
null
null
script/model.py
jayeolasegun/Term-Deposit-Classification
e1ce928814f26712813f600bc704183d5a9e603d
[ "CC0-1.0" ]
null
null
null
script/model.py
jayeolasegun/Term-Deposit-Classification
e1ce928814f26712813f600bc704183d5a9e603d
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: Jayeola Gbenga """ from sklearn.metrics import precision_score, recall_score, f1_score, roc_auc_score, accuracy_score, classification_report, confusion_matrix, average_precision_score from sklearn.model_selection import cross_val_score from sklearn.linear_model import LogisticRe...
30.897959
164
0.693857
0
0
0
0
0
0
0
0
368
0.121532
849b79c678c32714b70be8d959429c3a52dedbd6
1,096
py
Python
examples/vtrace/vtrace_main.py
cg31/cule
6cd8e06059c3c3a193a4b2e0821dc1b9daeb726c
[ "BSD-3-Clause" ]
208
2019-05-25T21:35:35.000Z
2022-03-28T17:33:13.000Z
examples/vtrace/vtrace_main.py
cg31/cule
6cd8e06059c3c3a193a4b2e0821dc1b9daeb726c
[ "BSD-3-Clause" ]
30
2019-07-27T08:23:54.000Z
2022-03-24T18:17:36.000Z
examples/vtrace/vtrace_main.py
cg31/cule
6cd8e06059c3c3a193a4b2e0821dc1b9daeb726c
[ "BSD-3-Clause" ]
27
2019-07-27T05:42:23.000Z
2022-03-05T03:08:52.000Z
import os import sys _path = os.path.abspath(os.path.pardir) if not _path in sys.path: sys.path = [_path] + sys.path from a2c.a2c_main import a2c_parser_options from utils.launcher import main def vtrace_parser_options(parser): parser = a2c_parser_options(parser) parser.add_argument('--c-hat', type=int,...
33.212121
138
0.710766
0
0
0
0
0
0
0
0
329
0.300182
849c298ed26bbbbaeb124ceca2c66f8a671e5b2d
370
py
Python
setup.py
abcdabcd987/torchprofile
80cb62ee2401f3118188e44f8796f0f98fd7eebf
[ "MIT" ]
216
2019-09-09T19:45:07.000Z
2020-06-15T20:17:55.000Z
setup.py
tanglang96/torchprofile
e918353e95e19a6bc9e02794d5c96510ed858741
[ "MIT" ]
10
2020-08-27T05:00:31.000Z
2022-03-18T11:10:09.000Z
setup.py
tanglang96/torchprofile
e918353e95e19a6bc9e02794d5c96510ed858741
[ "MIT" ]
16
2020-07-16T00:53:28.000Z
2022-03-09T03:09:24.000Z
from setuptools import find_packages, setup from torchprofile import __version__ setup( name='torchprofile', version=__version__, packages=find_packages(exclude=['examples']), install_requires=[ 'numpy>=1.14', 'torch>=1.4', 'torchvision>=0.4', ], url='https://github.com...
21.764706
55
0.645946
0
0
0
0
0
0
0
0
118
0.318919
849cae0812bd0c8ef041e12b52ebe1e5cee5e1af
199
py
Python
01_foundation/00_basic/31_lambda.py
bluehenry/python.best.practices
99fde3557b0c423d3050e988e82a641ccd75b644
[ "MIT" ]
null
null
null
01_foundation/00_basic/31_lambda.py
bluehenry/python.best.practices
99fde3557b0c423d3050e988e82a641ccd75b644
[ "MIT" ]
null
null
null
01_foundation/00_basic/31_lambda.py
bluehenry/python.best.practices
99fde3557b0c423d3050e988e82a641ccd75b644
[ "MIT" ]
null
null
null
# The power of lambda is better shown when you use them as an anonymous function inside another function double = lambda x: x * 2 print(double(10)) x = lambda a, b, c: a + b + c print(x(5, 6, 2))
22.111111
104
0.678392
0
0
0
0
0
0
0
0
104
0.522613
849f1663037c03aefdc00d959fd1e18344b99975
806
py
Python
mlflow/utils/mlflow_tags.py
kylemeyer1/mlflow
56d080707853fedcb0ddc5febf4d30ff3e47000e
[ "Apache-2.0" ]
2
2019-09-09T23:45:08.000Z
2021-11-02T04:35:49.000Z
mlflow/utils/mlflow_tags.py
kylemeyer1/mlflow
56d080707853fedcb0ddc5febf4d30ff3e47000e
[ "Apache-2.0" ]
null
null
null
mlflow/utils/mlflow_tags.py
kylemeyer1/mlflow
56d080707853fedcb0ddc5febf4d30ff3e47000e
[ "Apache-2.0" ]
null
null
null
""" File containing all of the run tags in the mlflow. namespace. """ MLFLOW_DATABRICKS_NOTEBOOK_ID = "mlflow.databricks.notebookID" MLFLOW_DATABRICKS_NOTEBOOK_PATH = "mlflow.databricks.notebookPath" MLFLOW_DATABRICKS_WEBAPP_URL = "mlflow.databricks.webappURL" MLFLOW_DATABRICKS_RUN_URL = "mlflow.databricks.runURL" MLFL...
42.421053
70
0.832506
0
0
0
0
0
0
0
0
411
0.509926
84a012f24f108575663854888f3fc180d2554f18
1,783
py
Python
tests/parse_string_jsc_test.py
xmzxmz/Python_jsonsimpleconfig
7e7d15bb91c22156a8a54323b57bb0d5424dd06a
[ "MIT" ]
null
null
null
tests/parse_string_jsc_test.py
xmzxmz/Python_jsonsimpleconfig
7e7d15bb91c22156a8a54323b57bb0d5424dd06a
[ "MIT" ]
null
null
null
tests/parse_string_jsc_test.py
xmzxmz/Python_jsonsimpleconfig
7e7d15bb91c22156a8a54323b57bb0d5424dd06a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # * ********************************************************************* * # * Copyright (C) 2020 by xmz * # * ********************************************************************* * """ JSON Simple Config Tests - Parsing """ __author__ = "Marcin Ze...
36.387755
113
0.35502
533
0.298934
0
0
0
0
0
0
1,235
0.692653
84a079370d636370f1b591d1c907976b21011209
740
py
Python
test/Fitting/Helper/covariance.py
Marcel-Rodekamp/qcdanalysistools
945c8201337ba0d52bc37267198d367bbe3e75e3
[ "MIT" ]
null
null
null
test/Fitting/Helper/covariance.py
Marcel-Rodekamp/qcdanalysistools
945c8201337ba0d52bc37267198d367bbe3e75e3
[ "MIT" ]
null
null
null
test/Fitting/Helper/covariance.py
Marcel-Rodekamp/qcdanalysistools
945c8201337ba0d52bc37267198d367bbe3e75e3
[ "MIT" ]
null
null
null
import numpy as np import qcdanalysistools as tools Nt = 6 data = np.random.randn(1000,Nt) # for different analysis style set Jackknife,Bootstrap or Blocking params = tools.analysis.BootstrapParams( t_data_size = data.shape[0], t_num_subdatasets = 1000, t_with_blocking = True, t_num_blocks = 50) #par...
22.424242
66
0.685135
0
0
0
0
0
0
0
0
407
0.55
84a0c42a501327d6e6e83f835c0bdd92be6060d5
13,096
py
Python
holominecraft.py
jankais3r/HoloMinecraft
2a78ead99a0a4287f0c6c8e616996a2c28affe95
[ "MIT" ]
4
2020-12-31T01:54:19.000Z
2021-09-27T15:10:45.000Z
holominecraft.py
jankais3r/HoloMinecraft
2a78ead99a0a4287f0c6c8e616996a2c28affe95
[ "MIT" ]
null
null
null
holominecraft.py
jankais3r/HoloMinecraft
2a78ead99a0a4287f0c6c8e616996a2c28affe95
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import math import time import ctypes import socket import urllib.request from threading import Event, Thread from socketserver import ThreadingMixIn from http.server import BaseHTTPRequestHandler, HTTPServer try: import mss except: print('Inst...
35.978022
391
0.60171
9,054
0.691356
0
0
0
0
0
0
8,755
0.668525
84a2c67d501b3191d0fcf4e3e728aec5720bd5db
351
py
Python
reverse.py
abishak-cit/Python_Abi
77008ac06d38a3838eb1b0e8408586584ad457a6
[ "Apache-2.0" ]
null
null
null
reverse.py
abishak-cit/Python_Abi
77008ac06d38a3838eb1b0e8408586584ad457a6
[ "Apache-2.0" ]
null
null
null
reverse.py
abishak-cit/Python_Abi
77008ac06d38a3838eb1b0e8408586584ad457a6
[ "Apache-2.0" ]
null
null
null
#input of num num = int(input()) #initial value of reverse reverse_num = 0 #conditon for entry using while loop while(num>0): #remainder of the given no remainder = num % 10 # formula of the reverse reverse_num = (reverse_num * 10) + remainder #floor division of the num num = num//10 #display th...
23.4
47
0.689459
0
0
0
0
0
0
0
0
177
0.504274
84a3e9346e45cdbf522211ee45267fc97ad43b01
2,079
py
Python
service/src/repositories/job.py
xuqiongkai/ALTER
a9ec98c0ed576a68f14711eeff6f1c7d2d34c6f7
[ "MIT" ]
8
2019-09-18T01:14:07.000Z
2022-02-05T03:43:24.000Z
service/src/repositories/job.py
xuqiongkai/ALTER
a9ec98c0ed576a68f14711eeff6f1c7d2d34c6f7
[ "MIT" ]
4
2019-11-15T03:09:52.000Z
2022-03-24T15:01:55.000Z
service/src/repositories/job.py
xuqiongkai/ALTER
a9ec98c0ed576a68f14711eeff6f1c7d2d34c6f7
[ "MIT" ]
4
2019-09-17T22:17:30.000Z
2022-02-05T03:43:28.000Z
from models import Job from models import History # class JobRepository: # @staticmethod # def get(user_id, task_id, doc_num): # """ Query a user by name """ # return Job.query.filter_by(user_id=user_id, task_id=task_id, doc_num=doc_num).one() # @staticmethod # def create(user_id, task...
30.130435
93
0.604137
963
0.463203
0
0
908
0.436748
0
0
1,033
0.496873
84a49193faa3400bd4fa365a90e6b414e14d0e54
544
py
Python
PyCharm/primer11.py
PervykhDarya/LR3
55a4c379c29e167eb3257b4cff4cf9b717906236
[ "MIT" ]
null
null
null
PyCharm/primer11.py
PervykhDarya/LR3
55a4c379c29e167eb3257b4cff4cf9b717906236
[ "MIT" ]
null
null
null
PyCharm/primer11.py
PervykhDarya/LR3
55a4c379c29e167eb3257b4cff4cf9b717906236
[ "MIT" ]
null
null
null
# !/usr/bin/env python3 # -*- cosing: utf-8 -*- if __name__ == "__main__": with open("test.txt", "w", encoding="utf-8") as fileptr: print( "UTF-8 is a variable-width character encoding used for electronic communication.", file=fileptr ) print( "UTF-8 is ...
30.222222
94
0.544118
0
0
0
0
0
0
0
0
291
0.534926
84a547509ec65dec6e191c361cddf25cb75a0e8e
1,153
py
Python
backend/urls.py
worm2fed/itsphere_hakaton
5a04741208497935396198bc5e6b93e133d90126
[ "Unlicense" ]
null
null
null
backend/urls.py
worm2fed/itsphere_hakaton
5a04741208497935396198bc5e6b93e133d90126
[ "Unlicense" ]
null
null
null
backend/urls.py
worm2fed/itsphere_hakaton
5a04741208497935396198bc5e6b93e133d90126
[ "Unlicense" ]
null
null
null
import django from django.conf import settings from django.contrib import admin from django.conf.urls import url, include from rest_framework.routers import DefaultRouter from backend.views import IndexView from rest_framework_jwt.views import obtain_jwt_token, verify_jwt_token from apps.auth_api import views router...
28.121951
72
0.724198
0
0
0
0
0
0
0
0
211
0.183001
84a5a559826a0b1cfc3399aa82d37b0bf832ff51
4,536
py
Python
ppgan/datasets/photopen_dataset.py
pcwuyu/PaddleGAN
b4ff90f0c92c4d8dcaa8e25267151b82fc7aa268
[ "Apache-2.0" ]
3
2022-02-20T11:40:50.000Z
2022-02-20T11:46:29.000Z
ppgan/datasets/photopen_dataset.py
pcwuyu/PaddleGAN
b4ff90f0c92c4d8dcaa8e25267151b82fc7aa268
[ "Apache-2.0" ]
38
2021-10-14T12:55:45.000Z
2021-12-24T06:09:10.000Z
ppgan/datasets/photopen_dataset.py
pcwuyu/PaddleGAN
b4ff90f0c92c4d8dcaa8e25267151b82fc7aa268
[ "Apache-2.0" ]
1
2021-09-22T09:29:19.000Z
2021-09-22T09:29:19.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # 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 applic...
38.440678
115
0.659392
2,918
0.643298
0
0
2,960
0.652557
0
0
774
0.170635
84a6b1e5ab5cd7f82f9bd61960155e59f8a3cb0c
464
py
Python
scrappers/plugins/aljazeera/__init__.py
nathanIL/openews
17f07de528342944f26855192db8019a0dbcc3a0
[ "Apache-2.0" ]
2
2016-01-10T08:45:29.000Z
2019-10-25T06:53:39.000Z
scrappers/plugins/aljazeera/__init__.py
nathanIL/openews
17f07de528342944f26855192db8019a0dbcc3a0
[ "Apache-2.0" ]
3
2016-01-07T15:43:40.000Z
2016-01-09T14:44:08.000Z
scrappers/plugins/aljazeera/__init__.py
nathanIL/openews
17f07de528342944f26855192db8019a0dbcc3a0
[ "Apache-2.0" ]
null
null
null
import scrappers import scrappers.mixins class ALJazeera(scrappers.mixins.RSSScrapper, scrappers.Scrapper): """AL Jazeera RSS feed scrapper. """ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def should_translate(self): return False def encoding(self): ...
23.2
92
0.644397
420
0.905172
0
0
0
0
0
0
114
0.24569
84a8ab03d12084e27de0595a388320ee876c313d
49,028
py
Python
dnanexus/chip_workflow.py
strattan/test-merge2
2bc5a7c94fb06cff163ab3674dbb319e45976d17
[ "MIT" ]
null
null
null
dnanexus/chip_workflow.py
strattan/test-merge2
2bc5a7c94fb06cff163ab3674dbb319e45976d17
[ "MIT" ]
null
null
null
dnanexus/chip_workflow.py
strattan/test-merge2
2bc5a7c94fb06cff163ab3674dbb319e45976d17
[ "MIT" ]
null
null
null
#!/usr/bin/env python '''Instantiate the ENCODE ChIP-seq workflow''' import sys import logging import re import dxpy import time import pprint EPILOG = '''Notes: Examples: # Build blank TF workflow from fastq to peaks %(prog)s --target tf --name "ENCODE TF ChIP-seq (no reference)" --outf "/ChIP-seq/" # ...
46.122295
182
0.571755
0
0
0
0
0
0
0
0
15,010
0.306152
84aa7a485b23bade222cd7a7bb91c2a1c86b90b1
5,893
py
Python
research/cv/centernet_det/infer/sdk/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/centernet_det/infer/sdk/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/centernet_det/infer/sdk/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# !/usr/bin/env python # Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applica...
35.077381
108
0.642797
0
0
0
0
0
0
0
0
1,509
0.256067
84ab6622c15775e0c314c7eb24ce994a183ded45
151
py
Python
config_example.py
retdop/chess_weaknesses
c954557777a213a07a3564fef27263d81a20e0a3
[ "MIT" ]
1
2020-03-25T14:02:25.000Z
2020-03-25T14:02:25.000Z
config_example.py
retdop/chess_weaknesses
c954557777a213a07a3564fef27263d81a20e0a3
[ "MIT" ]
1
2020-04-04T14:02:39.000Z
2020-04-04T14:02:39.000Z
config_example.py
retdop/chess_weaknesses
c954557777a213a07a3564fef27263d81a20e0a3
[ "MIT" ]
1
2020-04-02T09:44:58.000Z
2020-04-02T09:44:58.000Z
ENGINE_PATH = './stockfish-11-linux/src/stockfish' GAMES_FILENAME = 'lichess_username_2019-12-31.pgn' DEFAULT_GAMES_ANALYSES_FILENAME = 'scores.pkl'
25.166667
50
0.801325
0
0
0
0
0
0
0
0
81
0.536424
84abbac99b299b7a8c9758a8ae39816ceda356cf
1,734
py
Python
raiden/constants.py
anmolshl/raiden
f1cecb68cb43a2c00b2f719eadbe83137611a92a
[ "MIT" ]
null
null
null
raiden/constants.py
anmolshl/raiden
f1cecb68cb43a2c00b2f719eadbe83137611a92a
[ "MIT" ]
null
null
null
raiden/constants.py
anmolshl/raiden
f1cecb68cb43a2c00b2f719eadbe83137611a92a
[ "MIT" ]
null
null
null
UINT64_MAX = 2 ** 64 - 1 UINT64_MIN = 0 INT64_MAX = 2 ** 63 - 1 INT64_MIN = -(2 ** 63) UINT256_MAX = 2 ** 256 - 1 # Deployed to Ropsten revival on 2017-09-03 from commit f4f8dcbe791b7be8bc15475f79ad9cbbfe15435b ROPSTEN_REGISTRY_ADDRESS = '0x66eea3159A01d134DD64Bfe36fde4bE9ED9c1695' ROPSTEN_DISCOVERY_ADDRESS = '0x1E3...
26.272727
96
0.764706
0
0
0
0
0
0
0
0
870
0.50173
84ac7100c4712d1ce87ee51e11280bbc7f7e34ca
12,760
py
Python
oneclick-env.py
hmsjy2017/rpi.sh
93fce371afbda13981b46dfdda8fb3658dc69add
[ "MIT" ]
null
null
null
oneclick-env.py
hmsjy2017/rpi.sh
93fce371afbda13981b46dfdda8fb3658dc69add
[ "MIT" ]
null
null
null
oneclick-env.py
hmsjy2017/rpi.sh
93fce371afbda13981b46dfdda8fb3658dc69add
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os import base64 import argparse import platform bit = platform.architecture()[0] def logo(): print(""" ___ ____ _ _ _ _____ / _ \ _ __ ___ / ___| (_) ___| | __ | ____|_ ____ __ | | | | '_ \ / _ \ | | | |/...
40.125786
177
0.636755
0
0
0
0
0
0
0
0
9,570
0.692575
84ad50f2f03d0cad17c4fe4359296551cb23b81c
2,550
py
Python
microphone.py
nittika/music-transcription
5468b30055ef45b54517ea3cd62d380a344977cc
[ "MIT" ]
42
2015-02-07T19:19:39.000Z
2022-03-23T20:00:13.000Z
microphone.py
nittika/music-transcription
5468b30055ef45b54517ea3cd62d380a344977cc
[ "MIT" ]
1
2021-08-05T12:56:27.000Z
2021-08-05T12:56:27.000Z
microphone.py
nittika/music-transcription
5468b30055ef45b54517ea3cd62d380a344977cc
[ "MIT" ]
19
2015-06-10T19:38:32.000Z
2021-03-12T00:28:19.000Z
# CITE http://people.csail.mit.edu/hubert/pyaudio/ import pyaudio, time class Microphone(object): """Sets up an instance of a microphone recording stream using PyAudio.""" def __init__(self, format=None, channels=None, rate=None): self.format = format or pyaudio.paInt16 # records in WAV format; 16-bit integers s...
30.357143
82
0.690588
2,471
0.96902
0
0
0
0
0
0
1,001
0.392549
84b0bec30f453aa165d3b13115fa78f5cf8b59c7
2,842
py
Python
models/ssl_online.py
SaeidAbdolian/seasonal-contrast
5395c027922569f5c5b1785ad1ccddd839749c36
[ "Apache-2.0" ]
74
2021-04-25T13:56:50.000Z
2022-03-25T08:01:14.000Z
models/ssl_online.py
SaeidAbdolian/seasonal-contrast
5395c027922569f5c5b1785ad1ccddd839749c36
[ "Apache-2.0" ]
11
2021-05-28T00:24:51.000Z
2022-03-26T17:41:47.000Z
models/ssl_online.py
SaeidAbdolian/seasonal-contrast
5395c027922569f5c5b1785ad1ccddd839749c36
[ "Apache-2.0" ]
8
2021-07-04T18:04:53.000Z
2022-02-05T16:30:16.000Z
import torch from torch import nn from pytorch_lightning import Callback from pl_bolts.models.self_supervised.evaluator import SSLEvaluator from sklearn.metrics import average_precision_score from datasets.bigearthnet_datamodule import BigearthnetDataModule class SSLOnlineEvaluator(Callback): def __init__(self,...
35.525
115
0.64145
2,580
0.907811
0
0
0
0
0
0
23
0.008093
84b1824993fb34ce81a489b1f8e43254234f59ba
342
py
Python
kitchen/check_in/migrations/0002_auto_20171214_1506.py
ZhukovGreen/kitchen-check-in
ce5327353cd9db32389da1678a37ac3d647b7c32
[ "MIT" ]
null
null
null
kitchen/check_in/migrations/0002_auto_20171214_1506.py
ZhukovGreen/kitchen-check-in
ce5327353cd9db32389da1678a37ac3d647b7c32
[ "MIT" ]
null
null
null
kitchen/check_in/migrations/0002_auto_20171214_1506.py
ZhukovGreen/kitchen-check-in
ce5327353cd9db32389da1678a37ac3d647b7c32
[ "MIT" ]
null
null
null
# Generated by Django 2.0 on 2017-12-14 15:06 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('check_in', '0001_initial'), ] operations = [ migrations.AlterUniqueTogether( name='lunch', unique_together={('employee', 'date...
19
51
0.587719
259
0.75731
0
0
0
0
0
0
92
0.269006
84b19438f6b673af236947b014e7e41a4f339821
4,063
py
Python
message.py
Max00355/ByteMail-1
576f765da9fb88f23b4d5c46868e0ce16db83c7c
[ "MIT" ]
4
2016-02-18T15:11:58.000Z
2020-01-16T11:07:50.000Z
message.py
Max00355/ByteMail-1
576f765da9fb88f23b4d5c46868e0ce16db83c7c
[ "MIT" ]
1
2021-03-06T00:07:14.000Z
2021-03-06T00:15:26.000Z
message.py
Max00355/ByteMail-1
576f765da9fb88f23b4d5c46868e0ce16db83c7c
[ "MIT" ]
1
2017-11-08T04:33:38.000Z
2017-11-08T04:33:38.000Z
import db import ssl import json import uuid from rsa import * import base64 import antispam import aes import time def message(obj, ip, data): addr = db.data.find("data", "all")[0]['addr'] msg = data['message'] from_ = data['from'] title = data['title'] to = data['to'] id = data['id'] as_n...
39.067308
233
0.545656
0
0
0
0
0
0
0
0
1,102
0.271228
84b391a0cb7210f33bf6584b75034c4d8d4bdff6
15,852
py
Python
Python/impedance_heater.py
ultpnml/ult_instruments
3c9dd6b26e993bba3e20c7f91af6510152850cfd
[ "BSD-3-Clause" ]
null
null
null
Python/impedance_heater.py
ultpnml/ult_instruments
3c9dd6b26e993bba3e20c7f91af6510152850cfd
[ "BSD-3-Clause" ]
null
null
null
Python/impedance_heater.py
ultpnml/ult_instruments
3c9dd6b26e993bba3e20c7f91af6510152850cfd
[ "BSD-3-Clause" ]
null
null
null
#This program monitors the 1K pot, sorb, and needle valve #temperatures. If the temperatures are too high, the program #will shut down the Keithley that controls the fixed impedance #heater. #Python 2 only #TO DO: Python 3 compatibility import thread import time import datetime import traceback import socket import ...
46.081395
136
0.563588
11,901
0.750757
0
0
81
0.00511
0
0
2,444
0.154176
84b481634f7f37995b27de2c74c109a567cd3989
10,111
py
Python
deprecated/word_index_transform/word_index_transform.py
thhapke/di_textanalysis
1a2866e9d19df3f49931dc774d0223e5600895f4
[ "MIT" ]
2
2020-04-09T06:41:02.000Z
2020-05-07T10:56:03.000Z
deprecated/word_index_transform/word_index_transform.py
thhapke/di_textanalysis
1a2866e9d19df3f49931dc774d0223e5600895f4
[ "MIT" ]
null
null
null
deprecated/word_index_transform/word_index_transform.py
thhapke/di_textanalysis
1a2866e9d19df3f49931dc774d0223e5600895f4
[ "MIT" ]
2
2020-05-19T18:30:56.000Z
2021-11-18T09:03:50.000Z
import json import os import csv import re import pickle import collections import subprocess import spacy import sdi_utils.gensolution as gs import sdi_utils.set_logging as slog import sdi_utils.textfield_parser as tfp import sdi_utils.tprogress as tp supported_languages = ['DE', 'EN', 'ES', 'FR'] lexicon_language...
34.986159
152
0.584908
2,024
0.200178
0
0
0
0
0
0
3,124
0.30897
84b7c410edf7c271a3e1fd7e4b7628ff057b3c2c
21,371
py
Python
overrule/BCS/overlap_boolean_rule.py
Viktour19/overlap-code
f5c6e63146a00f65710c38b9181bb9d12de6454f
[ "MIT" ]
2
2020-07-09T03:15:58.000Z
2022-03-09T11:57:17.000Z
overrule/BCS/overlap_boolean_rule.py
Viktour19/overlap-code
f5c6e63146a00f65710c38b9181bb9d12de6454f
[ "MIT" ]
null
null
null
overrule/BCS/overlap_boolean_rule.py
Viktour19/overlap-code
f5c6e63146a00f65710c38b9181bb9d12de6454f
[ "MIT" ]
1
2021-05-18T11:55:04.000Z
2021-05-18T11:55:04.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ----------------------------------------------# # OverRule: Overlap Estimation using Rule Sets # # @Authors: Dennis Wei, Michael Oberst, # # Fredrik D. Johansson # # ----------------------------------------------# import logging import ...
39.212844
156
0.48271
20,314
0.95054
0
0
0
0
0
0
4,771
0.223246
84b9e9871acbe9ff363a0e59ef9598addf9b4e9d
16,463
py
Python
src/quo/i_o/termui.py
secretuminc/quo
c4f77d52f015c612d32ed0fc2fc79545af598f10
[ "MIT" ]
1
2021-02-15T03:56:00.000Z
2021-02-15T03:56:00.000Z
src/quo/i_o/termui.py
chouette254/quo
fec78ae3b4a6d70501e2119868336c28c590fa50
[ "MIT" ]
3
2021-02-22T11:49:23.000Z
2021-02-28T06:47:41.000Z
src/quo/i_o/termui.py
secretuminc/quo
c4f77d52f015c612d32ed0fc2fc79545af598f10
[ "MIT" ]
null
null
null
import inspect import io import itertools import os import struct import sys import math from typing import Any, Optional, IO from quo.accordance import ( DEFAULT_COLUMNS, get_winterm_size, bit_bytes, isatty, strip_ansi_colors, ) from quo.color import ansi_color_codes, _a...
32.860279
227
0.615137
0
0
0
0
0
0
0
0
9,440
0.573407
84b9eb0c102288c50bbed9bdfca4a239cee038fc
3,026
py
Python
Magnetic Field/biot_square.py
ValeriaTelles/Physics-Programs
9fdd1b60ad5dd9c6750855bf63c2aa89383a0b1a
[ "MIT" ]
null
null
null
Magnetic Field/biot_square.py
ValeriaTelles/Physics-Programs
9fdd1b60ad5dd9c6750855bf63c2aa89383a0b1a
[ "MIT" ]
null
null
null
Magnetic Field/biot_square.py
ValeriaTelles/Physics-Programs
9fdd1b60ad5dd9c6750855bf63c2aa89383a0b1a
[ "MIT" ]
null
null
null
# Name: Valeria Telles # Date: 2 March 2020 # Program: biot_square.py import numpy as np import matplotlib.pyplot as plt import time as time from matplotlib.patches import Circle def biot(Rvec, wire, I): mu_4pi = 10 dB = np.zeros((len(wire), 3)) R = Rvec - wire Rsqr = np.sum( R**2, axis = 1 ) ...
25.863248
89
0.616986
0
0
0
0
0
0
0
0
1,097
0.362525
84bb50006f22e7f74b51168de711fdca99d21854
1,612
py
Python
RCN_for_CAPTCHA_v1.0/src/get_test_data.py
ZhongqiuWang/RCN_for_CAPTCHA
ea231c63ea72437e1b47f8b0684f1dcbf1973fa3
[ "MIT" ]
2
2021-02-20T15:43:43.000Z
2021-02-20T15:43:51.000Z
RCN_for_CAPTCHA_v1.0/src/get_test_data.py
ZhongqiuWang/RCN_for_CAPTCHA
ea231c63ea72437e1b47f8b0684f1dcbf1973fa3
[ "MIT" ]
null
null
null
RCN_for_CAPTCHA_v1.0/src/get_test_data.py
ZhongqiuWang/RCN_for_CAPTCHA
ea231c63ea72437e1b47f8b0684f1dcbf1973fa3
[ "MIT" ]
null
null
null
import os import shutil import numpy as np from cv2 import imread def get_captcha_data_iters(data_dir, test_size, target_data_dir, seed=5): """ 获取测试图片 :param data_dir: 测试图片文件所在路径 :param test_size: 测试图片张数 :param target_data_dir: 将选出的测试图片放到该路径下 :param seed: 随机种子 :return: test_set ...
29.309091
85
0.616625
0
0
0
0
0
0
0
0
601
0.33022
84bbf74c66ef9175123833be8f994d71b7109552
262
py
Python
10 Days of Statistics/Day 6/Day 6 - The Central Limit Theorem II.py
BHAVJOT14/HackerRank-Solutions
8fe0280f5ce150a28598be71dc7ab6f06318e4d5
[ "MIT" ]
null
null
null
10 Days of Statistics/Day 6/Day 6 - The Central Limit Theorem II.py
BHAVJOT14/HackerRank-Solutions
8fe0280f5ce150a28598be71dc7ab6f06318e4d5
[ "MIT" ]
null
null
null
10 Days of Statistics/Day 6/Day 6 - The Central Limit Theorem II.py
BHAVJOT14/HackerRank-Solutions
8fe0280f5ce150a28598be71dc7ab6f06318e4d5
[ "MIT" ]
null
null
null
import math TICKETS = 250 STUDENTS = 100 MEAN = 2.4 SD = 2 MU = STUDENTS * MEAN S = math.sqrt(100)*SD def normal_distribution(x, mu, sd): return 1/2*(1+math.erf((x-mu)/(sd*math.sqrt(2)))) print(round(normal_distribution(x=TICKETS, mu=MU, sd=S), 4))
16.375
60
0.648855
0
0
0
0
0
0
0
0
0
0
84bc5d7d573cdb6bddc0ddf48f7da1392c0896e8
448
py
Python
src/MapMyNotesApplication/migrations/versions/a533873cebfc_.py
Ryan-Gouldsmith/MajorProject-MapMyNotes
2c350f68f992e454e88d3653e46e7607e224e3ae
[ "MIT" ]
null
null
null
src/MapMyNotesApplication/migrations/versions/a533873cebfc_.py
Ryan-Gouldsmith/MajorProject-MapMyNotes
2c350f68f992e454e88d3653e46e7607e224e3ae
[ "MIT" ]
null
null
null
src/MapMyNotesApplication/migrations/versions/a533873cebfc_.py
Ryan-Gouldsmith/MajorProject-MapMyNotes
2c350f68f992e454e88d3653e46e7607e224e3ae
[ "MIT" ]
null
null
null
"""empty message Revision ID: a533873cebfc Revises: 6a19b5a07897 Create Date: 2016-03-03 17:58:46.629869 """ # revision identifiers, used by Alembic. revision = 'a533873cebfc' down_revision = '6a19b5a07897' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('notes', sa.Column('module_...
19.478261
107
0.743304
0
0
0
0
0
0
0
0
247
0.551339
84bd5f607b82fa8a39bd0ca835a5cf720f40f089
27,550
py
Python
overrides.py
inuitwallet/plunge_android
0a23a78218a9852f0b9363b276c942ca2e517823
[ "MIT" ]
null
null
null
overrides.py
inuitwallet/plunge_android
0a23a78218a9852f0b9363b276c942ca2e517823
[ "MIT" ]
null
null
null
overrides.py
inuitwallet/plunge_android
0a23a78218a9852f0b9363b276c942ca2e517823
[ "MIT" ]
null
null
null
import json from kivy.app import App from kivy.config import ConfigParser from kivy.core.window import Window from kivy.uix.boxlayout import BoxLayout from kivy.uix.button import Button from kivy.uix.label import Label from kivy.uix.popup import Popup from kivy.uix.slider import Slider from kivy.metrics import dp from ...
40.754438
140
0.616189
26,803
0.972886
0
0
0
0
0
0
5,087
0.184646
84bfb20ccc017f5c1536067957e13d0482a7d66c
3,370
py
Python
scripts/read_msd2.py
pzarabadip/thermof
44c33e37aeadce31241a878135b1531757a2b1c4
[ "MIT" ]
null
null
null
scripts/read_msd2.py
pzarabadip/thermof
44c33e37aeadce31241a878135b1531757a2b1c4
[ "MIT" ]
11
2017-08-15T22:11:32.000Z
2017-08-22T23:32:17.000Z
scripts/read_msd2.py
pzarabadip/thermof
44c33e37aeadce31241a878135b1531757a2b1c4
[ "MIT" ]
1
2017-01-31T19:44:02.000Z
2017-01-31T19:44:02.000Z
""" Reads mean squared displacement for a list of trials and saves results to a yaml file """ import os import yaml from thermof.trajectory import Trajectory from thermof.read import read_run_info # -------------------------------------------------------------------------------------------------- main = '' box1_atoms =...
43.205128
123
0.563501
0
0
0
0
0
0
0
0
545
0.161721
84c0de3f23adbe842d0efaadf9c2467bc66d8a1e
4,230
py
Python
LineDetection/line_following_opencv.py
angrajales/SDC_Eafit
ecbde0235100655baa1cbd189ab02ac2c9f35e67
[ "Apache-2.0" ]
null
null
null
LineDetection/line_following_opencv.py
angrajales/SDC_Eafit
ecbde0235100655baa1cbd189ab02ac2c9f35e67
[ "Apache-2.0" ]
null
null
null
LineDetection/line_following_opencv.py
angrajales/SDC_Eafit
ecbde0235100655baa1cbd189ab02ac2c9f35e67
[ "Apache-2.0" ]
null
null
null
import cv2 import numpy as np class LineFollowing(object): def __init__(self): self.polyLeft1 = 450 self.polyRight1 = 320 self.polyLeft2 = 500 self.polyRight2 = 320 self.ignore_mask_color = 255 # White color def next_action(self, frame, slope=-1): p_next_action =...
45.483871
169
0.500709
3,657
0.864539
0
0
0
0
0
0
899
0.21253
84c3cea9dc12aa3420d6ff9210c1914628e6a05f
760
py
Python
application/__init__.py
pauperbattlebox/mvb-api
d4cacad1c4763d82757ef7a7ed6d56f325ddf6f0
[ "MIT" ]
null
null
null
application/__init__.py
pauperbattlebox/mvb-api
d4cacad1c4763d82757ef7a7ed6d56f325ddf6f0
[ "MIT" ]
5
2022-02-02T03:49:02.000Z
2022-03-29T01:15:17.000Z
application/__init__.py
pauperbattlebox/mvb-api
d4cacad1c4763d82757ef7a7ed6d56f325ddf6f0
[ "MIT" ]
null
null
null
from flask import Flask from werkzeug.middleware.proxy_fix import ProxyFix from .extensions import cache, db, limiter current_version = "/api/v1/" def create_app(): app = Flask(__name__) app.config.from_pyfile("config.py") db.init_app(app) cache.init_app(app) limiter.init_app(app) from ap...
21.714286
54
0.681579
0
0
0
0
0
0
0
0
21
0.027632
84c4318fb98bf099642661dc62436fb1ca14b9d3
748
py
Python
Company-Based/amazon/load_balancer.py
saisankargochhayat/algo_quest
a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc
[ "Apache-2.0" ]
3
2017-02-15T20:55:04.000Z
2018-09-26T18:48:24.000Z
Company-Based/amazon/load_balancer.py
saisankargochhayat/algo_quest
a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc
[ "Apache-2.0" ]
4
2017-10-07T18:59:20.000Z
2019-10-08T05:43:25.000Z
Company-Based/amazon/load_balancer.py
saisankargochhayat/algo_quest
a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc
[ "Apache-2.0" ]
1
2017-10-08T06:52:21.000Z
2017-10-08T06:52:21.000Z
def load_balance(arr): """ :type arr: List[int] :rtype: bool """ if len(arr) < 5: return False p_sum = [arr[0]] # Calc prefix sum for i in range(1, len(arr)): p_sum.append(p_sum[-1]+arr[i]) low = 1 high = len(arr)-1 while low < high: lower = p_sum[low-...
23.375
53
0.490642
0
0
0
0
0
0
0
0
132
0.176471
84c71a7531ae9fa2ac7181c6e7cdd2b229658408
1,058
py
Python
Data Structure/Recursion/Problems/FibonacciNumber.py
xiaomaomi7/DSA
e5cb88c9f1d39fd305c0f92db4ecae6e846cff01
[ "MIT" ]
null
null
null
Data Structure/Recursion/Problems/FibonacciNumber.py
xiaomaomi7/DSA
e5cb88c9f1d39fd305c0f92db4ecae6e846cff01
[ "MIT" ]
null
null
null
Data Structure/Recursion/Problems/FibonacciNumber.py
xiaomaomi7/DSA
e5cb88c9f1d39fd305c0f92db4ecae6e846cff01
[ "MIT" ]
null
null
null
''' Author: Hongxiang Qi Date: 22/06/2021 Description: Write a recursive function called fib which accepts a number and returns the nth number in the Fibonacci sequence. Recall that the Fibonacci sequence is the sequence of whole numbers 0,1,1,2,3,5,8,... which starts with 0 and 1, and where every number thereafter is ...
27.128205
109
0.643667
0
0
0
0
0
0
0
0
911
0.861059
84c95a79b4a208b7a4541951452956d90d7692cd
472
py
Python
tools/segtree/segtree_node.py
NekohimeMusou/advent-of-code
a1215336a24713e63f77018f379ff90675afdd0d
[ "MIT" ]
null
null
null
tools/segtree/segtree_node.py
NekohimeMusou/advent-of-code
a1215336a24713e63f77018f379ff90675afdd0d
[ "MIT" ]
null
null
null
tools/segtree/segtree_node.py
NekohimeMusou/advent-of-code
a1215336a24713e63f77018f379ff90675afdd0d
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod class SegmentTreeNode(ABC): @classmethod @abstractmethod def create_leaf(cls, start, end, value): pass @classmethod @abstractmethod def merge(cls, start, end, left, right): pass @property @abstractmethod def score(self): ...
18.88
49
0.663136
430
0.911017
0
0
332
0.70339
0
0
30
0.063559
84c9685f6724825c2da54b5eb9563b4f035887ea
46
py
Python
2021/CourseraPython/course2-data-structures/hey.py
Muramatsu2602/python-study
c81eb5d2c343817bc29b2763dcdcabed0f6a42c6
[ "MIT" ]
2
2021-01-11T16:13:40.000Z
2022-03-02T02:03:46.000Z
2021/CourseraPython/course2-data-structures/hey.py
Muramatsu2602/python-study
c81eb5d2c343817bc29b2763dcdcabed0f6a42c6
[ "MIT" ]
null
null
null
2021/CourseraPython/course2-data-structures/hey.py
Muramatsu2602/python-study
c81eb5d2c343817bc29b2763dcdcabed0f6a42c6
[ "MIT" ]
null
null
null
print("data structs baby!!") # asdadadadadadad
23
28
0.76087
0
0
0
0
0
0
0
0
38
0.826087
84cb010d5b5c6e2312275904e2f2082e3246dbef
1,216
py
Python
test/asyncpool.py
timgates42/stream.py
6a4945cbddaf74138eee5ba33eee3988cfceb84d
[ "MIT" ]
34
2015-02-04T15:00:52.000Z
2021-08-24T01:33:36.000Z
test/asyncpool.py
timgates42/stream.py
6a4945cbddaf74138eee5ba33eee3988cfceb84d
[ "MIT" ]
2
2016-02-16T22:02:02.000Z
2016-03-02T18:25:00.000Z
test/asyncpool.py
timgates42/stream.py
6a4945cbddaf74138eee5ba33eee3988cfceb84d
[ "MIT" ]
7
2015-10-14T19:58:53.000Z
2022-03-28T04:18:36.000Z
#!/usr/bin/env python2.6 import os import sys from pprint import pprint from random import randint sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) from stream import filter, map, ThreadPool, ProcessPool ## The test data dataset = [] def alternating(n): values = [] for i in range(1, n+1): v...
17.623188
65
0.683388
0
0
152
0.125
0
0
0
0
83
0.068257
84cb2cabfe9208f760a24e58bd6dd1d371426e23
502
py
Python
apps/catalog/migrations/0002_auto_20210811_0837.py
lucasjaroszewski/incremental-game
bae8823f986be0fd046bd50195d43fbc548fad90
[ "MIT" ]
null
null
null
apps/catalog/migrations/0002_auto_20210811_0837.py
lucasjaroszewski/incremental-game
bae8823f986be0fd046bd50195d43fbc548fad90
[ "MIT" ]
5
2021-06-09T17:54:51.000Z
2022-03-12T00:46:49.000Z
apps/catalog/migrations/0002_auto_20210811_0837.py
lucasjaroszewski/incremental-game
bae8823f986be0fd046bd50195d43fbc548fad90
[ "MIT" ]
1
2020-09-27T18:26:15.000Z
2020-09-27T18:26:15.000Z
# Generated by Django 3.2.6 on 2021-08-11 11:37 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('catalog', '0001_initial'), ] operations = [ migrations.RenameField( model_name='cat', old_name='liked_gifs', new...
20.916667
47
0.553785
417
0.830677
0
0
0
0
0
0
130
0.258964
84cb4b2d578ea0ddb93b0e6e664df51f2ba921d1
398
py
Python
mongodb_consistent_backup/Upload/__init__.py
cprato79/mongodb_consistent_backup
d780ad545b603d3a2f807e1813f1de407e81f1ba
[ "Apache-2.0" ]
1
2020-10-20T06:01:21.000Z
2020-10-20T06:01:21.000Z
mongodb_consistent_backup/Upload/__init__.py
cprato79/mongodb_consistent_backup
d780ad545b603d3a2f807e1813f1de407e81f1ba
[ "Apache-2.0" ]
null
null
null
mongodb_consistent_backup/Upload/__init__.py
cprato79/mongodb_consistent_backup
d780ad545b603d3a2f807e1813f1de407e81f1ba
[ "Apache-2.0" ]
1
2020-10-20T06:01:25.000Z
2020-10-20T06:01:25.000Z
from Upload import Upload def config(parser): parser.add_argument("--upload.method", dest="upload.method", help="Uploader method (default: none)", default='none', choices=['s3', 'none']) parser.add_argument("--upload.remove_uploaded", dest="upload.remove_uploaded",help="Remove source files after successful up...
49.75
186
0.738693
0
0
0
0
0
0
0
0
205
0.515075
84cca71da31c1ea4b30e9f06c0f56ba5e046faf3
10,977
py
Python
train.py
UB-A2IL-Lab/SemaFor-Fake-News
c61802d7683496c87970d3393787dd9c6dfcf230
[ "MIT" ]
null
null
null
train.py
UB-A2IL-Lab/SemaFor-Fake-News
c61802d7683496c87970d3393787dd9c6dfcf230
[ "MIT" ]
null
null
null
train.py
UB-A2IL-Lab/SemaFor-Fake-News
c61802d7683496c87970d3393787dd9c6dfcf230
[ "MIT" ]
null
null
null
from __future__ import division import sys import argparse import torch import os import torch.nn as nn import torch.optim as optim import numpy as np import json import pickle from sklearn.metrics import average_precision_score from torch.utils.data import Dataset, DataLoader from dataloader import Loader from model ...
45.17284
166
0.672224
0
0
0
0
0
0
0
0
2,408
0.219368
84cd56fca980259077c65ad0249f033a1888e7ce
1,404
py
Python
application/model/entity/video.py
UniversidadeDeVassouras/labproghiper-2020.1-MatheusTelles-p1
d0d81fc82d031f7add9e38add765aad0c404ee35
[ "Apache-2.0" ]
1
2020-07-15T14:23:30.000Z
2020-07-15T14:23:30.000Z
application/model/entity/video.py
UniversidadeDeVassouras/labproghiper-2020.1-MatheusTelles-p1
d0d81fc82d031f7add9e38add765aad0c404ee35
[ "Apache-2.0" ]
null
null
null
application/model/entity/video.py
UniversidadeDeVassouras/labproghiper-2020.1-MatheusTelles-p1
d0d81fc82d031f7add9e38add765aad0c404ee35
[ "Apache-2.0" ]
null
null
null
class Video: def __init__(self, id, title, description, thumb, url_video, category_id, date): self._id = id self._title = title self._description = description self._thumb = thumb self._url_video = url_video self._category_id = category_id self._likes = 0 ...
20.647059
84
0.611111
1,389
0.989316
0
0
0
0
0
0
0
0
84ceb7de86289497443ba36288d408d44c8ab72e
2,779
py
Python
sagas/ofbiz/entity_meta_indexer.py
samlet/stack
47db17fd4fdab264032f224dca31a4bb1d19b754
[ "Apache-2.0" ]
3
2020-01-11T13:55:38.000Z
2020-08-25T22:34:15.000Z
sagas/ofbiz/entity_meta_indexer.py
samlet/stack
47db17fd4fdab264032f224dca31a4bb1d19b754
[ "Apache-2.0" ]
null
null
null
sagas/ofbiz/entity_meta_indexer.py
samlet/stack
47db17fd4fdab264032f224dca31a4bb1d19b754
[ "Apache-2.0" ]
1
2021-01-01T05:21:44.000Z
2021-01-01T05:21:44.000Z
from sagas.ofbiz.entities import OfEntity as e, oc, MetaEntity, all_entities import resources_pb2 as res import protobuf_utils def build_field_index(ents): field_index={} for ent_name in ents: ent=MetaEntity(ent_name) if not oc.j.Utils.isViewEntity(ent.model): for fld in ent.model.g...
30.877778
79
0.593739
2,051
0.735389
0
0
0
0
0
0
516
0.185013
84cebcba7d82ad0421772f1cc2c1ed6a4c0f886b
261
py
Python
exercicios-com-funcoes/exercicio01.py
diegolinkk/exercicios-python-brasil
3bf7bdf0e98cdd06c115eedae4fa01e0c25fdba5
[ "MIT" ]
null
null
null
exercicios-com-funcoes/exercicio01.py
diegolinkk/exercicios-python-brasil
3bf7bdf0e98cdd06c115eedae4fa01e0c25fdba5
[ "MIT" ]
null
null
null
exercicios-com-funcoes/exercicio01.py
diegolinkk/exercicios-python-brasil
3bf7bdf0e98cdd06c115eedae4fa01e0c25fdba5
[ "MIT" ]
null
null
null
# Faça um programa para imprimir: # 1 # 2 2 # 3 3 3 # ..... # n n n n n n ... n def contador(n): for numero in range(1,n): string = str(numero) + " " string *= numero print(string) contador(15)
17.4
34
0.448276
0
0
0
0
0
0
0
0
115
0.438931
84d22ac92da6a7038aa58f693b963ea0ca124211
234
py
Python
quantifiers/CC.py
andregustavom/quantifiers4python
433b564599cdedffa711d64392381aebdccaad41
[ "MIT" ]
null
null
null
quantifiers/CC.py
andregustavom/quantifiers4python
433b564599cdedffa711d64392381aebdccaad41
[ "MIT" ]
null
null
null
quantifiers/CC.py
andregustavom/quantifiers4python
433b564599cdedffa711d64392381aebdccaad41
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np def CC(test_scores,thr=0.5): count = len([i for i in test_scores if i >= thr]) pos_prop = round(count/len(test_scores),2) num_predict = count return pos_prop
13.764706
53
0.628205
0
0
0
0
0
0
0
0
0
0
84d53ac24c7879eddf6eb1cc6dd18e51a194809c
4,592
py
Python
pythonlibs/mantis/sg/fisher/stbase/market.py
adoggie/Tibet.6
3c53060edafd80b9c4dafa10699a68d86a410c66
[ "MIT" ]
22
2019-10-28T07:28:12.000Z
2022-03-19T15:36:41.000Z
pythonlibs/mantis/sg/fisher/stbase/market.py
adoggie/Tibet.6
3c53060edafd80b9c4dafa10699a68d86a410c66
[ "MIT" ]
1
2019-11-07T04:54:14.000Z
2019-11-07T07:12:48.000Z
pythonlibs/mantis/sg/fisher/stbase/market.py
adoggie/Tibet.6
3c53060edafd80b9c4dafa10699a68d86a410c66
[ "MIT" ]
13
2019-10-28T07:29:07.000Z
2021-11-03T06:53:12.000Z
#coding:utf-8 import time,datetime import os,os.path import json import traceback from threading import Thread,Condition from Queue import Queue from collections import OrderedDict from mantis.fundamental.utils.timeutils import timestamp_current, timestamp_to_str,datetime_to_timestamp,\ current_datetim...
29.818182
107
0.574477
4,203
0.887833
0
0
0
0
0
0
543
0.114702
84d6b98590fb4046c65ce15b09a1a6c1ece9068c
14,409
py
Python
ai/experiment.py
lgoodridge/Asteroids-AI
bf6abd2b42db1b13667060c30de13a53aaa05110
[ "MIT" ]
4
2018-11-06T16:27:11.000Z
2021-11-12T12:23:54.000Z
ai/experiment.py
lgoodridge/Asteroids-AI
bf6abd2b42db1b13667060c30de13a53aaa05110
[ "MIT" ]
null
null
null
ai/experiment.py
lgoodridge/Asteroids-AI
bf6abd2b42db1b13667060c30de13a53aaa05110
[ "MIT" ]
1
2022-02-25T10:35:34.000Z
2022-02-25T10:35:34.000Z
""" Defines functions for running AI experiments. """ from __future__ import print_function from ai.ai_app import AI_App from ai.generation import Generation from ai.utils import algorithm_id_to_generation_class, \ BEST_BRAIN_FILENAME, LOG_FILENAME, META_FILENAME from collections import OrderedDict from dateti...
39.368852
83
0.630162
0
0
0
0
0
0
0
0
4,593
0.318759
84d726cdadffb9899d6b5d6a67cdc9191f4d113d
2,655
py
Python
tests/test_SpellingResolver.py
microsoft/cai-advanced-processing-service
91fce8048fe275aa870083bed22d452d330ef535
[ "MIT" ]
9
2021-11-17T11:50:47.000Z
2022-02-15T14:48:32.000Z
tests/test_SpellingResolver.py
microsoft/cai-advanced-processing-service
91fce8048fe275aa870083bed22d452d330ef535
[ "MIT" ]
7
2021-12-03T17:05:26.000Z
2022-03-02T04:59:50.000Z
tests/test_SpellingResolver.py
microsoft/cai-advanced-processing-service
91fce8048fe275aa870083bed22d452d330ef535
[ "MIT" ]
null
null
null
import unittest, json import azure.functions as func from ddt import ddt, data, unpack from SpellingResolver.main import main @ddt class TestSpellingResolver(unittest.TestCase): @data( ({"query":"anton marta 123", "convertnumbers": True, "convertsymbols": True, "addit...
32.777778
63
0.448588
2,517
0.948023
0
0
2,523
0.950282
0
0
1,058
0.398493
84db039c9f5c049f0b4ccd9906d76791791b4bff
603
py
Python
ex112/UtilidadesCeV/dados/__init__.py
LucasIdalino/Exerc-cios-do-Curso
4ca4610d1acfe4672c20114f891b6aabae816049
[ "MIT" ]
null
null
null
ex112/UtilidadesCeV/dados/__init__.py
LucasIdalino/Exerc-cios-do-Curso
4ca4610d1acfe4672c20114f891b6aabae816049
[ "MIT" ]
null
null
null
ex112/UtilidadesCeV/dados/__init__.py
LucasIdalino/Exerc-cios-do-Curso
4ca4610d1acfe4672c20114f891b6aabae816049
[ "MIT" ]
null
null
null
def leiadinheiro(msg): validade = False while not validade: entrada = str(input(msg)).replace(',', '.').strip() if entrada.isalpha() or entrada == "": print(f'Erro! {entrada} não é um preço válido') else: validade = True return float(entrada) def lei...
22.333333
59
0.500829
0
0
0
0
0
0
0
0
91
0.149671
84db537f5dfccd0dd8727dd1268abb3d016e064b
2,105
py
Python
examples/client-temp.py
keiichishima/echonetlite
b8f1cfcf57bae75b76262a7a13b9bb27f36fc1dc
[ "BSD-2-Clause" ]
5
2018-01-15T08:18:12.000Z
2021-05-27T02:53:28.000Z
examples/client-temp.py
keiichishima/echonetlite
b8f1cfcf57bae75b76262a7a13b9bb27f36fc1dc
[ "BSD-2-Clause" ]
1
2019-02-20T09:26:22.000Z
2019-04-02T01:00:21.000Z
examples/client-temp.py
keiichishima/echonetlite
b8f1cfcf57bae75b76262a7a13b9bb27f36fc1dc
[ "BSD-2-Clause" ]
2
2017-04-05T04:04:27.000Z
2018-01-22T14:22:22.000Z
import argparse import struct from echonetlite.interfaces import monitor from echonetlite import middleware from echonetlite.protocol import * class Temperature(middleware.RemoteDevice): def __init__(self, eoj, node_id): super(Temperature, self).__init__(eoj=eoj) self._node_id = node_id mo...
35.677966
77
0.619952
1,486
0.705938
0
0
0
0
0
0
206
0.097862
84dc9c31a5cc661992aad0e76ac68cd3af26038d
369
py
Python
tests/unit/test_filehandling.py
conradstorz/utilities
cf7c93c983d88d9fc6a8fcc5a6a5a97887e1f2d9
[ "MIT" ]
null
null
null
tests/unit/test_filehandling.py
conradstorz/utilities
cf7c93c983d88d9fc6a8fcc5a6a5a97887e1f2d9
[ "MIT" ]
null
null
null
tests/unit/test_filehandling.py
conradstorz/utilities
cf7c93c983d88d9fc6a8fcc5a6a5a97887e1f2d9
[ "MIT" ]
null
null
null
from pathlib import Path import cfsiv_utils.filehandling as fh def test_clean_filename_str(): data = ['qwerty~!@#$%^&*().ext', Path('qwerty~!@#$%^&().ext')] reslt = fh.clean_filename_str(data[0]) assert data[1] == reslt def test_new_name_if_exists(): testname = fh.new_name_if_exists(Path('README.m...
23.0625
66
0.663957
0
0
0
0
0
0
0
0
70
0.189702
84dd31cbf0da03f0ef4963eb4fc603ec03fcce39
169
py
Python
pycrostates/utils/__init__.py
mscheltienne/pycrostates
be87adf69c94b2b179064f337acd8a49d01c305d
[ "BSD-3-Clause" ]
1
2021-12-14T09:58:57.000Z
2021-12-14T09:58:57.000Z
pycrostates/utils/__init__.py
mscheltienne/pycrostates
be87adf69c94b2b179064f337acd8a49d01c305d
[ "BSD-3-Clause" ]
null
null
null
pycrostates/utils/__init__.py
mscheltienne/pycrostates
be87adf69c94b2b179064f337acd8a49d01c305d
[ "BSD-3-Clause" ]
null
null
null
"""Utils module for utilities.""" from ._config import get_config from .utils import _compare_infos, _copy_info, _corr_vectors # noqa: F401 __all__ = ("get_config",)
24.142857
74
0.751479
0
0
0
0
0
0
0
0
57
0.337278
84de102e5ee01fe8ec6a89f884d0e2ea1b8a60c6
943
py
Python
setdb2env.py
rmayherr/python
830aec82e3ab155b66d01032eac71bbe6f961fce
[ "MIT" ]
null
null
null
setdb2env.py
rmayherr/python
830aec82e3ab155b66d01032eac71bbe6f961fce
[ "MIT" ]
null
null
null
setdb2env.py
rmayherr/python
830aec82e3ab155b66d01032eac71bbe6f961fce
[ "MIT" ]
null
null
null
NodeName=AdminControl.getNode() def SetDB2Variables(): WFound=0 WVariables={"DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH" : "/??????????ult/etc/DB2JDBC", "MQ_INSTALL_ROOT" : "/?????????", "DB2UNIVERSAL_JDBC_DRIVER_PATH" : "/?????????lt/etc/DB2JDBC/classes"} Node=AdminConfig.getid("/Node:"+Node...
42.863636
104
0.650053
0
0
0
0
0
0
0
0
341
0.361612
84df22e953bad2bfd61c9c777a6347a614ce9c26
6,167
py
Python
bot.py
LFRusso/QCircuit-Bot
b392036b061342beddcb4338fc64e4b8aba0fb8e
[ "MIT" ]
3
2020-09-29T14:13:54.000Z
2020-10-23T04:55:35.000Z
bot.py
LFRusso/QCircuit-Bot
b392036b061342beddcb4338fc64e4b8aba0fb8e
[ "MIT" ]
1
2020-10-01T16:30:50.000Z
2020-10-01T16:30:50.000Z
bot.py
LFRusso/QCircuit-Bot
b392036b061342beddcb4338fc64e4b8aba0fb8e
[ "MIT" ]
1
2020-10-22T01:55:29.000Z
2020-10-22T01:55:29.000Z
from telegram.ext import Updater, CommandHandler from telegram import InlineKeyboardButton, InlineKeyboardMarkup import logging from interpreter import * import os import numpy as np def parse_result(count): message=[] for state in count.keys(): message.append(f"P(|{state}〉)={round(count[state]/100,2)...
33.335135
374
0.630128
0
0
0
0
0
0
0
0
2,567
0.415843
84e061e707eaf0e1adb8a679861ce9147fc31a9f
285
py
Python
tensorflow_serving_client/proto_util.py
wadefelix/tensorflow-serving-client
8d6455268a1b7f99c1a55916661f299218d0e8eb
[ "MIT" ]
8
2017-12-08T06:37:30.000Z
2021-03-28T22:16:59.000Z
tensorflow_serving_client/proto_util.py
wadefelix/tensorflow-serving-client
8d6455268a1b7f99c1a55916661f299218d0e8eb
[ "MIT" ]
3
2017-08-07T05:13:42.000Z
2019-11-21T18:50:06.000Z
tensorflow_serving_client/proto_util.py
wadefelix/tensorflow-serving-client
8d6455268a1b7f99c1a55916661f299218d0e8eb
[ "MIT" ]
12
2017-11-27T19:55:49.000Z
2021-03-28T22:16:38.000Z
def copy_message(src, dst): """ Copy the contents of a src proto message to a destination proto message via string serialization :param src: Source proto :param dst: Destination proto :return: """ dst.ParseFromString(src.SerializeToString()) return dst
28.5
100
0.694737
0
0
0
0
0
0
0
0
188
0.659649
84e17acc54a7c04765942b57041fe49ffee8eae2
180
py
Python
Common/Loger.py
aoii103/EarthquakeSpy
437228128dbe40bd7976013d4187c062109360bc
[ "MIT" ]
3
2018-09-19T10:57:27.000Z
2019-05-08T02:10:41.000Z
Common/Loger.py
aoii103/EarthquakeSpy
437228128dbe40bd7976013d4187c062109360bc
[ "MIT" ]
null
null
null
Common/Loger.py
aoii103/EarthquakeSpy
437228128dbe40bd7976013d4187c062109360bc
[ "MIT" ]
1
2020-08-31T11:33:54.000Z
2020-08-31T11:33:54.000Z
import logging logging.basicConfig( format="[%(asctime)s] >>> %(levelname)s %(name)s: %(message)s", level=logging.INFO) def GetLoger(Name): return logging.getLogger(Name)
30
88
0.694444
0
0
0
0
0
0
0
0
56
0.311111
84e25762f2a9ce14a1245e3ca792cf375bb93498
859
py
Python
utils.py
longyuanli/VSMHN
13d5ad64474c3fcc4b1dab8ac27d4c97b0b43ca8
[ "MIT" ]
6
2021-02-08T10:35:33.000Z
2021-09-16T02:02:38.000Z
utils.py
longyuanli/VSMHN
13d5ad64474c3fcc4b1dab8ac27d4c97b0b43ca8
[ "MIT" ]
null
null
null
utils.py
longyuanli/VSMHN
13d5ad64474c3fcc4b1dab8ac27d4c97b0b43ca8
[ "MIT" ]
3
2021-02-20T01:55:59.000Z
2022-03-05T12:13:48.000Z
def convert_wind_to_events(event_series, top_C, start_C): flag = False event_start = [] for i in range(len(event_series)): if not flag: if event_series[i] > top_C: event_start.append(i) flag = True else: if event_series[i] < top_C: ...
40.904762
151
0.600698
0
0
0
0
0
0
0
0
0
0
84e265f70fc5288f1bd0bfec111a051b8a3777eb
149
py
Python
tests/cpydiff/core_fstring_raw.py
rxchen/micropython
037b2c72a1d5b54a5508a58ab2044628a7a39fa4
[ "MIT" ]
13,648
2015-01-01T01:34:51.000Z
2022-03-31T16:19:53.000Z
tests/cpydiff/core_fstring_raw.py
rxchen/micropython
037b2c72a1d5b54a5508a58ab2044628a7a39fa4
[ "MIT" ]
7,092
2015-01-01T07:59:11.000Z
2022-03-31T23:52:18.000Z
tests/cpydiff/core_fstring_raw.py
rxchen/micropython
037b2c72a1d5b54a5508a58ab2044628a7a39fa4
[ "MIT" ]
4,942
2015-01-02T11:48:50.000Z
2022-03-31T19:57:10.000Z
""" categories: Core description: Raw f-strings are not supported cause: MicroPython is optimised for code space. workaround: Unknown """ rf"hello"
16.555556
47
0.765101
0
0
0
0
0
0
0
0
146
0.979866
84e32a3f56750d951d976dd05b43bd476893aedc
1,487
py
Python
src/torso.py
kneave/MacFeeglePrime-ROS
d73081190155bb20119f4b9a7216d730c0a1e8b2
[ "MIT" ]
null
null
null
src/torso.py
kneave/MacFeeglePrime-ROS
d73081190155bb20119f4b9a7216d730c0a1e8b2
[ "MIT" ]
null
null
null
src/torso.py
kneave/MacFeeglePrime-ROS
d73081190155bb20119f4b9a7216d730c0a1e8b2
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy import time import sys sys.path.append('/home/ubuntu/RedBoard') import redboard from std_msgs.msg import Int16MultiArray # Servo values, 0 is centre pan_value = 0 tilt_value = 0 def callback(data): rospy.loginfo(rospy.get_caller_id() + 'RCVD: %s', data.data) setservos...
26.087719
72
0.694015
0
0
0
0
0
0
0
0
562
0.377942
84e3985260d9d57b8161b7b1a75f1fd40cce4250
10,943
py
Python
S4/S4 Library/simulation/broadcasters/environment_score/environment_score_mixin.py
NeonOcean/Environment
ca658cf66e8fd6866c22a4a0136d415705b36d26
[ "CC-BY-4.0" ]
1
2021-05-20T19:33:37.000Z
2021-05-20T19:33:37.000Z
S4/S4 Library/simulation/broadcasters/environment_score/environment_score_mixin.py
NeonOcean/Environment
ca658cf66e8fd6866c22a4a0136d415705b36d26
[ "CC-BY-4.0" ]
null
null
null
S4/S4 Library/simulation/broadcasters/environment_score/environment_score_mixin.py
NeonOcean/Environment
ca658cf66e8fd6866c22a4a0136d415705b36d26
[ "CC-BY-4.0" ]
null
null
null
from collections import Counter import operator import weakref from broadcasters.environment_score.environment_score_tuning import EnvironmentScoreTuning import alarms import clock import gsi_handlers import services import sims4.log import sims4.reload logger = sims4.log.Logger('Environment Score') with sims4.reload.p...
55.831633
359
0.72704
9,874
0.902312
454
0.041488
0
0
0
0
179
0.016357