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
a906359018ecf72d4a4f117b4a1b82b665b383a6
3,912
py
Python
examples/j1j2_2d_exact_4.py
vigsterkr/FlowKet
0d8f301b5f51a1bab83021f10f65cfb5f2751079
[ "MIT" ]
21
2019-11-19T13:59:13.000Z
2021-12-03T10:26:30.000Z
examples/j1j2_2d_exact_4.py
HUJI-Deep/PyKet
61238afd3fe1488d35c57d280675f544c559bd01
[ "MIT" ]
10
2019-11-15T12:07:28.000Z
2020-11-07T18:12:18.000Z
examples/j1j2_2d_exact_4.py
HUJI-Deep/PyKet
61238afd3fe1488d35c57d280675f544c559bd01
[ "MIT" ]
11
2019-12-09T22:51:17.000Z
2021-11-29T22:05:41.000Z
from collections import OrderedDict import itertools import sys from tensorflow.keras.layers import Input from tensorflow.keras.models import Model from tensorflow.keras.optimizers import Adam from flowket.callbacks import TensorBoard from flowket.callbacks.exact import default_wave_function_callbacks_factory, ExactO...
40.329897
120
0.748466
0
0
0
0
0
0
0
0
345
0.08819
a907a743744664923c1dc0146b6eda52d8a91360
3,833
py
Python
build/package_version/archive_info.py
MicrohexHQ/nacl_contracts
3efab5eecb3cf7ba43f2d61000e65918aa4ba77a
[ "BSD-3-Clause" ]
6
2015-02-06T23:41:01.000Z
2015-10-21T03:08:51.000Z
build/package_version/archive_info.py
MicrohexHQ/nacl_contracts
3efab5eecb3cf7ba43f2d61000e65918aa4ba77a
[ "BSD-3-Clause" ]
null
null
null
build/package_version/archive_info.py
MicrohexHQ/nacl_contracts
3efab5eecb3cf7ba43f2d61000e65918aa4ba77a
[ "BSD-3-Clause" ]
1
2019-10-02T08:41:50.000Z
2019-10-02T08:41:50.000Z
#!/usr/bin/python # Copyright (c) 2014 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A archive_info is a json file describing a single package archive.""" import collections import hashlib import json import os ...
33.920354
76
0.687712
2,938
0.766501
0
0
0
0
0
0
1,702
0.444039
8bef32020f0494687a4f159a327cd70c156e52e5
3,546
py
Python
tests/test_lsstdoc.py
lsst-sqre/dochub-adapter
3c155bc7ffe46f41e8de5108c936aed7587c8cdb
[ "MIT" ]
null
null
null
tests/test_lsstdoc.py
lsst-sqre/dochub-adapter
3c155bc7ffe46f41e8de5108c936aed7587c8cdb
[ "MIT" ]
null
null
null
tests/test_lsstdoc.py
lsst-sqre/dochub-adapter
3c155bc7ffe46f41e8de5108c936aed7587c8cdb
[ "MIT" ]
null
null
null
"""Ad hoc tests of the LsstLatexDoc class. Other test modules rigorously verify LsstLatexDoc against sample documents. """ from pybtex.database import BibliographyData import pytest from lsstprojectmeta.tex.lsstdoc import LsstLatexDoc def test_no_short_title(): """title without a short title.""" sample = r"...
32.833333
79
0.645798
0
0
0
0
332
0.093521
0
0
1,692
0.47662
8bf15c081cf1ec7e2805d8cdda039957d68c5367
454
py
Python
Exercicios/script030.py
jacksonmoreira/Curso-em-video-mundo1-
84b09bd3b61417fab483acf9f1a38e0cf6b95a80
[ "MIT" ]
null
null
null
Exercicios/script030.py
jacksonmoreira/Curso-em-video-mundo1-
84b09bd3b61417fab483acf9f1a38e0cf6b95a80
[ "MIT" ]
null
null
null
Exercicios/script030.py
jacksonmoreira/Curso-em-video-mundo1-
84b09bd3b61417fab483acf9f1a38e0cf6b95a80
[ "MIT" ]
null
null
null
frase = str(input('Digite o seu nome completo para a análise ser feita:')).strip() print('-' * 50) print('Analisando nome...') print('O seu nome em maiúsculas é {}.'.format(frase.upper())) print('O seu nome em minúsculas é {}.'.format(frase.lower())) print('O seu nome tem ao todo {} letras.'.format(len(frase) - frase.c...
41.272727
82
0.665198
0
0
0
0
0
0
0
0
255
0.555556
8bf171a05404452569f820648c7f427a69c301b2
8,012
py
Python
bluesky_kafka/tests/test_kafka.py
gwbischof/bluesky-kafka
fb5ab9c2caa023b91722e1dfc1aac00b6e0d7ec4
[ "BSD-3-Clause" ]
null
null
null
bluesky_kafka/tests/test_kafka.py
gwbischof/bluesky-kafka
fb5ab9c2caa023b91722e1dfc1aac00b6e0d7ec4
[ "BSD-3-Clause" ]
null
null
null
bluesky_kafka/tests/test_kafka.py
gwbischof/bluesky-kafka
fb5ab9c2caa023b91722e1dfc1aac00b6e0d7ec4
[ "BSD-3-Clause" ]
null
null
null
from functools import partial import logging import msgpack import msgpack_numpy as mpn from confluent_kafka.cimpl import KafkaException import numpy as np import pickle import pytest from bluesky_kafka import Publisher, BlueskyConsumer from bluesky_kafka.tests.conftest import get_all_documents_from_queue from blues...
33.383333
92
0.668622
0
0
0
0
5,015
0.625936
0
0
2,940
0.36695
8bf35fc329c7f95687b72ea8d092fd4c3193b925
407
py
Python
Chapter01/datastructures_06.py
vabyte/Modern-Python-Standard-Library-Cookbook
4f53e3ab7b61aca1cca9343e7421e170280cd5b5
[ "MIT" ]
84
2018-08-09T09:30:03.000Z
2022-01-04T23:20:38.000Z
Chapter01/datastructures_06.py
jiro74/Modern-Python-Standard-Library-Cookbook
4f53e3ab7b61aca1cca9343e7421e170280cd5b5
[ "MIT" ]
1
2019-11-04T18:57:40.000Z
2020-09-07T08:52:25.000Z
Chapter01/datastructures_06.py
jiro74/Modern-Python-Standard-Library-Cookbook
4f53e3ab7b61aca1cca9343e7421e170280cd5b5
[ "MIT" ]
33
2018-09-26T11:05:55.000Z
2022-03-15T10:31:10.000Z
import time import heapq class PriorityQueue(object): def __init__(self): self._q = [] def add(self, value, priority=0): heapq.heappush(self._q, (priority, time.time(), value)) def pop(self): return heapq.heappop(self._q)[-1] def f1(): print('hello') def f2(): print('world') pq...
17.695652
63
0.619165
238
0.584767
0
0
0
0
0
0
14
0.034398
8bf4cdf0dd3a18f2cee9855d7af028188308986c
1,080
py
Python
webshots/popular-websites.py
acamero/evo-web
5229ff89e2ac2d3f6a3a7f80d3f514fd3ed728c9
[ "MIT" ]
null
null
null
webshots/popular-websites.py
acamero/evo-web
5229ff89e2ac2d3f6a3a7f80d3f514fd3ed728c9
[ "MIT" ]
null
null
null
webshots/popular-websites.py
acamero/evo-web
5229ff89e2ac2d3f6a3a7f80d3f514fd3ed728c9
[ "MIT" ]
null
null
null
import requests import sys from lxml import html #csv_file_name = sys.argv[1] # output file csv_file_name = "../webshot_data/popular-web-sites.csv" csv_file = open(csv_file_name, "w") categories = ["Arts", "Business", "Computers", "Games", "Health", "Home", "Kids_and_Teens", "News", "Recreation", "Reference", "Regio...
34.83871
202
0.605556
0
0
0
0
0
0
0
0
540
0.5
8bf5aa849ab9919f36bd06cb32baf1102cd57b0f
13,653
py
Python
sunpy/coordinates/frames.py
s0nskar/sunpy
60ca4792ded4c3938a78da7055cf2c20e0e8ccfd
[ "MIT" ]
null
null
null
sunpy/coordinates/frames.py
s0nskar/sunpy
60ca4792ded4c3938a78da7055cf2c20e0e8ccfd
[ "MIT" ]
null
null
null
sunpy/coordinates/frames.py
s0nskar/sunpy
60ca4792ded4c3938a78da7055cf2c20e0e8ccfd
[ "MIT" ]
null
null
null
""" Common solar physics coordinate systems. This submodule implements various solar physics coordinate frames for use with the `astropy.coordinates` module. """ from __future__ import absolute_import, division import numpy as np from astropy import units as u from astropy.coordinates.representation import (Cartesia...
41.49848
90
0.620669
12,517
0.916795
0
0
0
0
0
0
7,841
0.574306
8bf7588b6e982ef5c34279f0381a39c74ff2495d
4,640
py
Python
python/ray/serve/tests/test_pipeline_dag.py
quarkzou/ray
49de29969df0c55a5969b8ffbfc7d62459e5024b
[ "Apache-2.0" ]
null
null
null
python/ray/serve/tests/test_pipeline_dag.py
quarkzou/ray
49de29969df0c55a5969b8ffbfc7d62459e5024b
[ "Apache-2.0" ]
null
null
null
python/ray/serve/tests/test_pipeline_dag.py
quarkzou/ray
49de29969df0c55a5969b8ffbfc7d62459e5024b
[ "Apache-2.0" ]
null
null
null
import pytest import os import sys import numpy as np import ray from ray import serve from ray.serve.api import _get_deployments_from_node from ray.serve.handle import PipelineHandle from ray.serve.pipeline.pipeline_input_node import PipelineInputNode @serve.deployment class Adder: def __init__(self, increment...
25.217391
84
0.650647
1,634
0.352155
0
0
2,209
0.476078
77
0.016595
335
0.072198
8bf7c2002c8b113a9de4b7623d703ed3f154d1fb
118
py
Python
code/super_minitaur/script/lpmslib/lputils.py
buenos-dan/quadrupedal_robot
605054c027e20b83e347f2aa175c03c965e72983
[ "MIT" ]
5
2019-03-22T06:39:42.000Z
2021-07-27T13:56:45.000Z
code/super_minitaur/script/lpmslib/lputils.py
buenos-dan/quadrupedal_robot
605054c027e20b83e347f2aa175c03c965e72983
[ "MIT" ]
null
null
null
code/super_minitaur/script/lpmslib/lputils.py
buenos-dan/quadrupedal_robot
605054c027e20b83e347f2aa175c03c965e72983
[ "MIT" ]
2
2021-02-16T09:52:04.000Z
2021-11-30T12:12:55.000Z
#helpers def logd(tag, msg): print "[Debug-"+tag+"]", msg def loge(tag, msg): print "[Error-"+tag+"]", msg
13.111111
32
0.550847
0
0
0
0
0
0
0
0
32
0.271186
8bf7e9d1ed3871fd0972273d253da43b826c3e35
598
py
Python
test/data_producer_kafka.py
netgroup/srv6-pm-dockerized
770976e9e2da56780ae9bb4048360235d2568627
[ "Apache-2.0" ]
null
null
null
test/data_producer_kafka.py
netgroup/srv6-pm-dockerized
770976e9e2da56780ae9bb4048360235d2568627
[ "Apache-2.0" ]
null
null
null
test/data_producer_kafka.py
netgroup/srv6-pm-dockerized
770976e9e2da56780ae9bb4048360235d2568627
[ "Apache-2.0" ]
2
2020-07-28T18:12:09.000Z
2021-02-22T06:31:19.000Z
from kafka import KafkaProducer from kafka.errors import KafkaError import json # produce json messages producer = KafkaProducer(bootstrap_servers='kafka:9092', security_protocol='PLAINTEXT', value_serializer=lambda m: json.dumps(m).encode('ascii')) result = producer.send('ktig', {'measure_i...
37.375
88
0.602007
0
0
0
0
0
0
0
0
188
0.314381
8bf80a6b7a2e719d044ca3071a20a59ca3623e14
248
py
Python
uasyncio.core/test_cb_args.py
Carglglz/micropython-lib
07102c56aa1087b97ee313cedc1d89fd20452e11
[ "PSF-2.0" ]
126
2019-07-19T14:42:41.000Z
2022-03-21T22:22:19.000Z
uasyncio.core/test_cb_args.py
Carglglz/micropython-lib
07102c56aa1087b97ee313cedc1d89fd20452e11
[ "PSF-2.0" ]
38
2019-08-28T01:46:31.000Z
2022-03-17T05:46:51.000Z
uasyncio.core/test_cb_args.py
Carglglz/micropython-lib
07102c56aa1087b97ee313cedc1d89fd20452e11
[ "PSF-2.0" ]
55
2019-08-02T09:32:33.000Z
2021-12-22T11:25:51.000Z
try: import uasyncio.core as asyncio except: import asyncio def cb(a, b): assert a == "test" assert b == "test2" loop.stop() loop = asyncio.get_event_loop() loop.call_soon(cb, "test", "test2") loop.run_forever() print("OK")
14.588235
35
0.637097
0
0
0
0
0
0
0
0
30
0.120968
8bf8770f23fe5d9c46d48d1b60253229783948a7
1,491
py
Python
labdevices/_mock/ando.py
jkrauth/labdevices
4b00579117216b6431079d79c1c978b73a6c0b96
[ "MIT" ]
null
null
null
labdevices/_mock/ando.py
jkrauth/labdevices
4b00579117216b6431079d79c1c978b73a6c0b96
[ "MIT" ]
null
null
null
labdevices/_mock/ando.py
jkrauth/labdevices
4b00579117216b6431079d79c1c978b73a6c0b96
[ "MIT" ]
1
2021-04-28T15:17:31.000Z
2021-04-28T15:17:31.000Z
""" Provides a mock for the plx_gpib_ethernet package used in the Ando devices. """ from unittest.mock import Mock # The commands that are used in the methods of the # ANDO devices and typical responses. QUERY_COMMANDS = { # Spectrum Analyzer commands "*IDN?": "ANDO dummy\r\n", "SWEEP?": "0\r\...
33.886364
91
0.541247
951
0.637827
0
0
817
0.547954
0
0
965
0.647217
8bf9802eb12db8bd7835a073469cfa2b0ae5ce2e
2,898
py
Python
hearthstone/simulator/core/card_graveyard.py
JDBumgardner/stone_ground_hearth_battles
9fe095651fab60e8ddbf563f0b9b7f3e723d5f4f
[ "Apache-2.0" ]
20
2020-08-01T03:14:57.000Z
2021-12-19T11:47:50.000Z
hearthstone/simulator/core/card_graveyard.py
JDBumgardner/stone_ground_hearth_battles
9fe095651fab60e8ddbf563f0b9b7f3e723d5f4f
[ "Apache-2.0" ]
48
2020-08-01T03:06:43.000Z
2022-02-27T10:03:47.000Z
hearthstone/simulator/core/card_graveyard.py
JDBumgardner/stone_ground_hearth_battles
9fe095651fab60e8ddbf563f0b9b7f3e723d5f4f
[ "Apache-2.0" ]
3
2020-06-28T01:23:37.000Z
2021-11-11T23:09:36.000Z
import sys from inspect import getmembers, isclass from typing import Union from hearthstone.simulator.core.cards import MonsterCard from hearthstone.simulator.core.events import CardEvent, EVENTS, BuyPhaseContext, CombatPhaseContext from hearthstone.simulator.core.monster_types import MONSTER_TYPES class FloatingWa...
36.683544
149
0.640787
2,248
0.775707
0
0
0
0
0
0
96
0.033126
8bfa439c74e0b340dc223e43b06761bdee5d063d
1,026
py
Python
cookiecutter_mbam/scan/views.py
tiburona/cookiecutter_mbam
13788774a4c1426c133b3f689f98d8f0c54de9c6
[ "BSD-3-Clause" ]
null
null
null
cookiecutter_mbam/scan/views.py
tiburona/cookiecutter_mbam
13788774a4c1426c133b3f689f98d8f0c54de9c6
[ "BSD-3-Clause" ]
null
null
null
cookiecutter_mbam/scan/views.py
tiburona/cookiecutter_mbam
13788774a4c1426c133b3f689f98d8f0c54de9c6
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Scan views.""" from flask import Blueprint, render_template, flash, redirect, url_for, session from flask_login import current_user from .forms import ScanForm from .service import ScanService from cookiecutter_mbam.utils import flash_errors blueprint = Blueprint('scan', __name__, url_prefix...
34.2
87
0.693957
0
0
0
0
533
0.519493
0
0
252
0.245614
8bfa8f2b88f8aca9aab6973afb6831c3aa0a0478
3,460
py
Python
python-route-endpoint/test_dbstore.py
blues/note-samples
a50c27ea0b8728668f2c44139b088d5fdf0c7d57
[ "Apache-2.0" ]
1
2021-10-04T14:42:43.000Z
2021-10-04T14:42:43.000Z
python-route-endpoint/test_dbstore.py
blues/note-samples
a50c27ea0b8728668f2c44139b088d5fdf0c7d57
[ "Apache-2.0" ]
3
2021-09-07T17:54:58.000Z
2021-11-16T21:40:52.000Z
python-route-endpoint/test_dbstore.py
blues/note-samples
a50c27ea0b8728668f2c44139b088d5fdf0c7d57
[ "Apache-2.0" ]
null
null
null
import pytest import dbstore inMemFile = ":memory:" measurementTable = "measurements" alertTable = "alerts" def test_db_store_constructor(): s = dbstore.dbstore(file=inMemFile) assert(s != None) def test_dbStore_connect(): s = dbstore.dbstore(file=inMemFile) s.connect() assert s._connection i...
23.69863
102
0.67052
0
0
0
0
0
0
0
0
464
0.134104
8bfbe25b3704f8131128b16676dbbc1e54dcc6b4
446
py
Python
bin/Notifier/NotificationLoader.py
juergenhoetzel/craft
9d3fe6dc07f2307e8f8212c8981b980a9d2d28fd
[ "BSD-2-Clause" ]
55
2016-11-20T17:08:19.000Z
2022-03-11T22:19:43.000Z
bin/Notifier/NotificationLoader.py
juergenhoetzel/craft
9d3fe6dc07f2307e8f8212c8981b980a9d2d28fd
[ "BSD-2-Clause" ]
17
2017-09-20T07:52:17.000Z
2021-12-03T10:03:00.000Z
bin/Notifier/NotificationLoader.py
juergenhoetzel/craft
9d3fe6dc07f2307e8f8212c8981b980a9d2d28fd
[ "BSD-2-Clause" ]
29
2016-12-10T15:00:11.000Z
2021-12-02T12:54:05.000Z
import importlib _NOTIFICATION_BACKENDS = None def load(modules): global _NOTIFICATION_BACKENDS; if _NOTIFICATION_BACKENDS == None: _NOTIFICATION_BACKENDS = dict() for backend in modules: backend = backend.strip() backend = getattr(importlib.import_module("Notifier.Bac...
29.733333
99
0.695067
0
0
0
0
0
0
0
0
22
0.049327
8bfc984d3b1bbcef2b5af5e9508ff3a2a9c35186
604
py
Python
basics/linear.py
zhijiahu/dltk
bf0484e22d3d0116b1ac60ae78f688a36c5a0636
[ "MIT" ]
null
null
null
basics/linear.py
zhijiahu/dltk
bf0484e22d3d0116b1ac60ae78f688a36c5a0636
[ "MIT" ]
null
null
null
basics/linear.py
zhijiahu/dltk
bf0484e22d3d0116b1ac60ae78f688a36c5a0636
[ "MIT" ]
null
null
null
import numpy as np import cv2 labels = ['dog', 'cat', 'panda'] np.random.seed(1) # Simulate model already trained W = np.random.randn(3, 3072) b = np.random.randn(3) orig = cv2.imread('beagle.png') image = cv2.resize(orig, (32, 32)).flatten() scores = W.dot(image) + b for (label, score) in zip(labels, scores): ...
20.133333
58
0.574503
0
0
0
0
0
0
0
0
96
0.15894
8bfd515b8c9ab45a349fc3b66ded01bb3b315143
2,759
py
Python
sevivi/synchronizer/synchronizer.py
edgarriba/sevivi
52c8bef206e531c797221a08037306c0c5b0ca59
[ "MIT" ]
null
null
null
sevivi/synchronizer/synchronizer.py
edgarriba/sevivi
52c8bef206e531c797221a08037306c0c5b0ca59
[ "MIT" ]
9
2021-09-09T07:40:21.000Z
2022-01-13T07:03:59.000Z
sevivi/synchronizer/synchronizer.py
edgarriba/sevivi
52c8bef206e531c797221a08037306c0c5b0ca59
[ "MIT" ]
1
2022-01-26T09:51:29.000Z
2022-01-26T09:51:29.000Z
import pandas as pd import numpy as np import matplotlib.pyplot as plt from .signal_processing import ( resample_data, normalize_signal, calculate_magnitude, calculate_offset_in_seconds_using_cross_correlation, calculate_sampling_frequency_from_timestamps, ) def get_synchronization_offset( vi...
33.240964
120
0.696629
0
0
0
0
0
0
0
0
707
0.256252
8bfd607f605b753ac1980b586075777909511585
244
py
Python
bob.py
williamstern/Intro-to-CS-MIT-Course
0f6129fa6bd47767cb57507279d49b27501a160f
[ "MIT" ]
null
null
null
bob.py
williamstern/Intro-to-CS-MIT-Course
0f6129fa6bd47767cb57507279d49b27501a160f
[ "MIT" ]
null
null
null
bob.py
williamstern/Intro-to-CS-MIT-Course
0f6129fa6bd47767cb57507279d49b27501a160f
[ "MIT" ]
null
null
null
s = 'vpoboooboboobooboboo' y = 0 counter = 0 times_run = 0 start = 0 end = 3 for letter in s: sc = s[start:end] start += 1 end += 1 if sc == str('bob'): counter += 1 print('Number of times bob occurs is: ', counter)
10.166667
49
0.565574
0
0
0
0
0
0
0
0
60
0.245902
8bfd9f299f8a3e49d68acee30f35331e05c04631
5,469
py
Python
tests/main.py
bastienleonard/pysfml-cython
c71194988ba90678cbc4c9e6fd3e03f53ac4c2e4
[ "Zlib", "BSD-2-Clause" ]
14
2015-09-14T18:04:27.000Z
2021-02-19T16:51:57.000Z
tests/main.py
bastienleonard/pysfml-cython
c71194988ba90678cbc4c9e6fd3e03f53ac4c2e4
[ "Zlib", "BSD-2-Clause" ]
3
2015-12-14T17:07:45.000Z
2021-10-02T05:55:11.000Z
tests/main.py
bastienleonard/pysfml-cython
c71194988ba90678cbc4c9e6fd3e03f53ac4c2e4
[ "Zlib", "BSD-2-Clause" ]
3
2015-04-12T16:57:02.000Z
2021-02-20T17:15:51.000Z
#! /usr/bin/env python2 # -*- coding: utf-8 -*- import random import unittest import sfml as sf class TestColor(unittest.TestCase): def random_color(self): return sf.Color(random.randint(0, 255), random.randint(0, 255), random.randint(0, 255), ...
30.724719
78
0.513257
5,307
0.970378
0
0
0
0
0
0
56
0.01024
8bfef33258b56cdbd64d66536a38eaa752a6a523
12,840
py
Python
textgen/augment/word_level_augment.py
shibing624/textgen
0a9d55f1f61d5217b8e06f1f23904e49afa84370
[ "Apache-2.0" ]
31
2021-06-29T14:31:35.000Z
2022-03-25T00:36:44.000Z
textgen/augment/word_level_augment.py
shibing624/text-generation
0a9d55f1f61d5217b8e06f1f23904e49afa84370
[ "Apache-2.0" ]
1
2021-11-09T21:30:16.000Z
2022-03-02T10:21:04.000Z
textgen/augment/word_level_augment.py
shibing624/text-generation
0a9d55f1f61d5217b8e06f1f23904e49afa84370
[ "Apache-2.0" ]
5
2021-06-21T03:13:39.000Z
2022-02-07T06:53:22.000Z
# -*- coding: utf-8 -*- """ @author:XuMing(xuming624@qq.com) @description: Word level augmentations including Replace words with uniform random words or TF-IDF based word replacement. """ import collections import copy import math import numpy as np from textgen.utils.log import logger min_token_num = 3 class Eff...
35.469613
95
0.576947
11,676
0.909346
0
0
0
0
0
0
2,378
0.185202
e300c54c781958b660c0d153f40329e21fe52fd9
6,539
py
Python
three_d_resnet_builder/builder.py
thauptmann/3D-ResNet-for-Keras
ac1b8b3d0032c9af832cc945bc57a63106366e54
[ "MIT" ]
4
2021-05-23T09:30:40.000Z
2021-12-29T16:14:46.000Z
three_d_resnet_builder/builder.py
thauptmann/3D-ResNet-for-Keras
ac1b8b3d0032c9af832cc945bc57a63106366e54
[ "MIT" ]
3
2021-06-24T09:26:58.000Z
2022-01-06T11:01:59.000Z
three_d_resnet_builder/builder.py
thauptmann/3D-ResNet-for-Keras
ac1b8b3d0032c9af832cc945bc57a63106366e54
[ "MIT" ]
3
2021-06-07T18:11:34.000Z
2021-12-22T01:57:03.000Z
from . import three_D_resnet from .kernel import get_kernel_to_name def build_three_d_resnet(input_shape, output_shape, repetitions, output_activation, regularizer=None, squeeze_and_excitation=False, use_bottleneck=False, kernel_size=3, kernel_name='3D'): """Return a full customizable res...
57.867257
115
0.692002
0
0
0
0
0
0
0
0
3,496
0.534638
e301076532db001f5790d94584e7f5e4d2165387
1,198
py
Python
ubuntu20/projects/libRadtran-2.0.4/examples/GUI/spectrum_GOME/spectrum_GOME_plot.py
AmberCrafter/docker-compose_libRadtran
0182f991db6a13e0cacb3bf9f43809e6850593e4
[ "MIT" ]
null
null
null
ubuntu20/projects/libRadtran-2.0.4/examples/GUI/spectrum_GOME/spectrum_GOME_plot.py
AmberCrafter/docker-compose_libRadtran
0182f991db6a13e0cacb3bf9f43809e6850593e4
[ "MIT" ]
null
null
null
ubuntu20/projects/libRadtran-2.0.4/examples/GUI/spectrum_GOME/spectrum_GOME_plot.py
AmberCrafter/docker-compose_libRadtran
0182f991db6a13e0cacb3bf9f43809e6850593e4
[ "MIT" ]
null
null
null
from matplotlib import use use('WXAgg') import pylab as plt import numpy as np plt.figure(figsize=(8,5)) ax = plt.subplot(111) fil = './spectrum_GOME.out' data = np.loadtxt(fil) y = data[:,1] x = data[:,0] pl_list = [] pl, = ax.plot(x,y,'r') pl_list.append(pl) y = 10*data[:,3] pl, = ax.plot(x,y,'...
26.622222
83
0.656093
0
0
0
0
0
0
0
0
559
0.466611
e3018352709a236201cb1c03963553b833bc04b2
569
py
Python
pepdb/tasks/migrations/0026_auto_20171031_0153.py
dchaplinsky/pep.org.ua
8633a65fb657d7f04dbdb12eb8ae705fa6be67e3
[ "MIT" ]
7
2015-12-21T03:52:46.000Z
2020-07-24T19:17:23.000Z
pepdb/tasks/migrations/0026_auto_20171031_0153.py
dchaplinsky/pep.org.ua
8633a65fb657d7f04dbdb12eb8ae705fa6be67e3
[ "MIT" ]
12
2016-03-05T18:11:05.000Z
2021-06-17T20:20:03.000Z
pepdb/tasks/migrations/0026_auto_20171031_0153.py
dchaplinsky/pep.org.ua
8633a65fb657d7f04dbdb12eb8ae705fa6be67e3
[ "MIT" ]
4
2016-07-17T20:19:38.000Z
2021-03-23T12:47:20.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-30 23:53 from __future__ import unicode_literals from django.db import migrations from tasks.models import BeneficiariesMatching def save_json_fields_again(apps, schema_editor): # Ugly but works for bf in BeneficiariesMatching.objects.all(): ...
22.76
52
0.70123
191
0.335677
0
0
0
0
0
0
119
0.209139
e302119a1e26db2aa7e3d9148ce46b0ec243f446
24,156
py
Python
condensation-forum/application.py
BitFracture/condensation
a68a9bbae7a7d35e1542242a4f1588ce3abf9d3f
[ "BSD-2-Clause" ]
null
null
null
condensation-forum/application.py
BitFracture/condensation
a68a9bbae7a7d35e1542242a4f1588ce3abf9d3f
[ "BSD-2-Clause" ]
59
2018-03-02T03:08:22.000Z
2018-03-11T01:43:02.000Z
condensation-forum/application.py
BitFracture/condensation
a68a9bbae7a7d35e1542242a4f1588ce3abf9d3f
[ "BSD-2-Clause" ]
null
null
null
""" An AWS Python3+Flask web app. """ from flask import Flask, redirect, url_for, request, session, flash, get_flashed_messages, render_template, escape from flask_oauthlib.client import OAuth import boto3,botocore import jinja2 from boto3.dynamodb.conditions import Key, Attr import urllib.request import json import c...
36.711246
123
0.638475
0
0
0
0
20,479
0.847781
0
0
7,210
0.298477
e30514bdd0f30538d4ed999ec163ad0e47c028b6
186
py
Python
CA3/news_test.py
aadyajha12/Covid19-SmartAlarm
911fe819cff6ef792f14b7dd48cbbb2c73f2405d
[ "MIT" ]
1
2021-03-11T11:57:19.000Z
2021-03-11T11:57:19.000Z
CA3/news_test.py
aadyajha12/Covid19-SmartAlarm
911fe819cff6ef792f14b7dd48cbbb2c73f2405d
[ "MIT" ]
null
null
null
CA3/news_test.py
aadyajha12/Covid19-SmartAlarm
911fe819cff6ef792f14b7dd48cbbb2c73f2405d
[ "MIT" ]
null
null
null
import json from newsapi import covid_news def news_test_one(): news_json = json.load(open('gb-news.json')) news:str = covid_news(news_json) assert news[0]['title'] != None
26.571429
47
0.698925
0
0
0
0
0
0
0
0
21
0.112903
e30656fdcf081203a75edc6af8dad04320307e06
390
py
Python
2015/02/fc_2015_02_10.py
mfwarren/FreeCoding
58ac87f35ad2004a3514782556762ee0ed72c39a
[ "MIT" ]
null
null
null
2015/02/fc_2015_02_10.py
mfwarren/FreeCoding
58ac87f35ad2004a3514782556762ee0ed72c39a
[ "MIT" ]
1
2015-04-27T01:43:45.000Z
2015-04-27T01:43:45.000Z
2015/02/fc_2015_02_10.py
mfwarren/FreeCoding
58ac87f35ad2004a3514782556762ee0ed72c39a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # imports go here import atexit # # Free Coding session for 2015-02-10 # Written by Matt Warren # def clean_up(): print("CLEANING UP") @atexit.register def done(): print("DONE") if __name__ == '__main__': atexit.register(clean_up) try: import time while True:...
14.444444
36
0.623077
0
0
0
0
46
0.117949
0
0
130
0.333333
e3073fdd2f59dca010998232729affa0626a74d8
3,133
py
Python
core/scheduler/at.py
vsilent/smarty-bot
963cba05433be14494ba339343c9903ccab3c37d
[ "MIT" ]
1
2016-10-08T09:01:05.000Z
2016-10-08T09:01:05.000Z
core/scheduler/at.py
vsilent/smarty-bot
963cba05433be14494ba339343c9903ccab3c37d
[ "MIT" ]
1
2019-09-24T09:56:52.000Z
2019-09-24T09:56:52.000Z
core/scheduler/at.py
vsilent/smarty-bot
963cba05433be14494ba339343c9903ccab3c37d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ apscheduler. """ import subprocess from apscheduler.scheduler import Scheduler from apscheduler.jobstores.shelve_store import ShelveJobStore from datetime import date, datetime, timedelta import os import shelve import zmq from core.config.settings import logger de...
25.892562
73
0.531759
2,689
0.858283
0
0
0
0
0
0
656
0.209384
e307995e7666610653ffb5c496c1cf1dfe8feab6
897
py
Python
machin/frame/algorithms/__init__.py
ikamensh/machin
af7b423c47bc1412530cf6c96c11bd3af9b3e239
[ "MIT" ]
1
2021-04-01T21:21:23.000Z
2021-04-01T21:21:23.000Z
machin/frame/algorithms/__init__.py
ikamensh/machin
af7b423c47bc1412530cf6c96c11bd3af9b3e239
[ "MIT" ]
null
null
null
machin/frame/algorithms/__init__.py
ikamensh/machin
af7b423c47bc1412530cf6c96c11bd3af9b3e239
[ "MIT" ]
null
null
null
import warnings from .base import TorchFramework from .dqn import DQN from .dqn_per import DQNPer from .rainbow import RAINBOW from .ddpg import DDPG from .hddpg import HDDPG from .td3 import TD3 from .ddpg_per import DDPGPer from .a2c import A2C from .a3c import A3C from .ppo import PPO from .sac import SAC from ....
16.924528
88
0.637681
0
0
0
0
0
0
0
0
204
0.227425
e3079c30e7e32fd20e5ad106e7daf8c8a6a94f80
575
py
Python
apps/paper/migrations/0008_alter_paper_course.py
godetaph/uresearch
fb23cb0fe07f8b434b9c46f80b5b43030a3d5323
[ "MIT" ]
null
null
null
apps/paper/migrations/0008_alter_paper_course.py
godetaph/uresearch
fb23cb0fe07f8b434b9c46f80b5b43030a3d5323
[ "MIT" ]
null
null
null
apps/paper/migrations/0008_alter_paper_course.py
godetaph/uresearch
fb23cb0fe07f8b434b9c46f80b5b43030a3d5323
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2021-09-24 02:31 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('preferences', '0002_auto_20210923_2348'), ('paper', '0007_auto_20210923_2353'), ] operations = [ mi...
27.380952
157
0.653913
449
0.78087
0
0
0
0
0
0
165
0.286957
e308a4fb297dc8f9348bbe1730683c0c197aa336
2,925
py
Python
plaso/cli/helpers/hashers.py
cugu-stars/plaso
a205f8e52dfe4c239aeae5558d572806b7b00e81
[ "Apache-2.0" ]
1,253
2015-01-02T13:58:02.000Z
2022-03-31T08:43:39.000Z
plaso/cli/helpers/hashers.py
cugu-stars/plaso
a205f8e52dfe4c239aeae5558d572806b7b00e81
[ "Apache-2.0" ]
3,388
2015-01-02T11:17:58.000Z
2022-03-30T10:21:45.000Z
plaso/cli/helpers/hashers.py
cugu-stars/plaso
a205f8e52dfe4c239aeae5558d572806b7b00e81
[ "Apache-2.0" ]
376
2015-01-20T07:04:54.000Z
2022-03-04T23:53:00.000Z
# -*- coding: utf-8 -*- """The hashers CLI arguments helper.""" from plaso.cli import tools from plaso.cli.helpers import interface from plaso.cli.helpers import manager from plaso.lib import errors class HashersArgumentsHelper(interface.ArgumentsHelper): """Hashers CLI arguments helper.""" NAME = 'hashers' D...
36.111111
80
0.699487
2,651
0.906325
0
0
2,442
0.834872
0
0
1,600
0.547009
e308f94d9774663e111da5671ce07f0ce2dd542e
20,297
py
Python
tutorials/create_sakila/migrations/0001_initial.py
MeGustas-5427/SQL_Tutorials
627372c2d5d8656d72645830c9a1fae1df278fc7
[ "Apache-2.0" ]
13
2020-11-05T04:22:51.000Z
2022-02-27T08:44:50.000Z
tutorials/create_sakila/migrations/0001_initial.py
MeGustas-5427/SQL_Tutorials
627372c2d5d8656d72645830c9a1fae1df278fc7
[ "Apache-2.0" ]
null
null
null
tutorials/create_sakila/migrations/0001_initial.py
MeGustas-5427/SQL_Tutorials
627372c2d5d8656d72645830c9a1fae1df278fc7
[ "Apache-2.0" ]
2
2020-11-10T10:01:20.000Z
2021-04-07T02:33:29.000Z
# Generated by Django 3.1.5 on 2021-01-11 08:07 from django.db import migrations, models import django.db.models.deletion import django_mysql.models import utils.models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( ...
58.157593
3,672
0.564862
20,462
0.991616
0
0
0
0
0
0
3,809
0.184589
e30dad35391d44bf3295ac9fde3a87c8c67a561f
2,098
py
Python
ncrf_to_bed.py
makovalab-psu/NoiseCancellingRepeatFinder
b24732ae73a4cef431277664ad4193a0638758c1
[ "MIT" ]
16
2019-03-30T05:15:53.000Z
2022-01-28T15:20:06.000Z
ncrf_to_bed.py
makovalab-psu/NoiseCancellingRepeatFinder
b24732ae73a4cef431277664ad4193a0638758c1
[ "MIT" ]
8
2019-04-04T19:46:08.000Z
2020-11-18T15:11:53.000Z
ncrf_to_bed.py
makovalab-psu/NoiseCancellingRepeatFinder
b24732ae73a4cef431277664ad4193a0638758c1
[ "MIT" ]
6
2019-10-05T05:16:00.000Z
2021-01-28T10:07:49.000Z
#!/usr/bin/env python """ Convert the output of Noise Cancelling Repeat Finder to bed format. """ from sys import argv,stdin,stdout,stderr,exit from os import path as os_path from ncrf_parse import alignments,parse_noise_rate def usage(s=None): message = """ usage: ncrf_cat <output_from_NCRF> | ncrf_...
29.549296
76
0.605815
0
0
0
0
0
0
0
0
1,012
0.482364
e30fa4b4018e2cb629164838090fb39449877a74
2,551
py
Python
advertorch/tests/test_utilities.py
sleepstagingrest/rest
cf0de7ae82b6b74fe23e9d057214970cd3c9672d
[ "MIT" ]
18
2020-02-03T07:14:40.000Z
2021-12-20T18:45:43.000Z
advertorch/tests/test_utilities.py
sleepstagingrest/rest
cf0de7ae82b6b74fe23e9d057214970cd3c9672d
[ "MIT" ]
11
2020-01-28T23:16:25.000Z
2022-02-10T01:04:56.000Z
advertorch/tests/test_utilities.py
sleepstagingrest/REST
cf0de7ae82b6b74fe23e9d057214970cd3c9672d
[ "MIT" ]
2
2020-08-20T08:15:09.000Z
2021-02-23T07:30:40.000Z
# Copyright (c) 2018-present, Royal Bank of Canada. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # import warnings import numpy as np import torch import torchvision.transforms.functional as F from advertorch.utils im...
30.73494
74
0.717758
0
0
0
0
0
0
0
0
217
0.085065
e30ff60533abef30a592ebe83ada7b1e9f61003f
5,595
py
Python
RV/portfolio/portfolio/hindex.py
rmomizo/portfolio_bot
b7854c4b5c9f32e9631389bb2238b5bb30d54c8e
[ "MIT" ]
null
null
null
RV/portfolio/portfolio/hindex.py
rmomizo/portfolio_bot
b7854c4b5c9f32e9631389bb2238b5bb30d54c8e
[ "MIT" ]
null
null
null
RV/portfolio/portfolio/hindex.py
rmomizo/portfolio_bot
b7854c4b5c9f32e9631389bb2238b5bb30d54c8e
[ "MIT" ]
null
null
null
from __future__ import division import itertools import matplotlib.pyplot as plt from matplotlib.pyplot import savefig import random from random import shuffle from collections import Counter def flatten_list(somelist): if any(isinstance(el, list) for el in somelist) == False: return somelist ...
32.719298
94
0.557283
0
0
0
0
0
0
0
0
1,101
0.196783
e3106531f1b9e6f9266ac05f2587a787cfc4e699
1,316
py
Python
operators/device_output.py
a1exwang/fm-synth
fb14aa1dec3798b15a607ac03442decf322bebee
[ "MIT" ]
3
2018-01-18T12:25:38.000Z
2020-03-19T13:19:31.000Z
operators/device_output.py
a1exwang/fm-synth
fb14aa1dec3798b15a607ac03442decf322bebee
[ "MIT" ]
4
2017-04-24T16:36:59.000Z
2017-05-11T11:23:44.000Z
operators/device_output.py
a1exwang/fm-synth
fb14aa1dec3798b15a607ac03442decf322bebee
[ "MIT" ]
null
null
null
from PyQt5.QtCore import pyqtSlot from channels.channel import Channel from operators.base import OutputOperator import numpy as np class DeviceOutput(OutputOperator): def __init__(self, input_ops, volume=1.0, name=None): super().__init__(input_ops, name) self.total_count = 0 self.stream =...
34.631579
105
0.575988
1,181
0.897416
0
0
182
0.138298
0
0
98
0.074468
e31093c826bcdc408129c3db911766a20c8f8973
524
py
Python
code/0217-containsDuplicate.py
RRRoger/LeetCodeExercise
0019a048fcfac9ac9e6f37651b17d01407c92c7d
[ "MIT" ]
null
null
null
code/0217-containsDuplicate.py
RRRoger/LeetCodeExercise
0019a048fcfac9ac9e6f37651b17d01407c92c7d
[ "MIT" ]
null
null
null
code/0217-containsDuplicate.py
RRRoger/LeetCodeExercise
0019a048fcfac9ac9e6f37651b17d01407c92c7d
[ "MIT" ]
null
null
null
class Solution(object): def isPowerOfTwo(self, n): """ :type n: int :rtype: bool """ # 左移 if n == 1: return True power = 0 flag = True while flag: val = 2 << power if val == n: return True ...
15.878788
34
0.412214
400
0.757576
0
0
0
0
0
0
75
0.142045
e310a6a628079388cd4034e0733f019c20a04124
308
py
Python
yak/rest_social_auth/utils.py
johnchuks/YAK-server
910af81a7b23e88585479131886c627e33163de1
[ "MIT" ]
15
2015-10-10T07:56:23.000Z
2021-07-26T14:39:17.000Z
yak/rest_social_auth/utils.py
johnchuks/YAK-server
910af81a7b23e88585479131886c627e33163de1
[ "MIT" ]
26
2015-01-06T00:43:50.000Z
2018-10-29T03:12:09.000Z
yak/rest_social_auth/utils.py
johnchuks/YAK-server
910af81a7b23e88585479131886c627e33163de1
[ "MIT" ]
8
2015-09-28T14:47:52.000Z
2018-02-09T18:53:53.000Z
from celery.task import task from django.conf import settings from social_core.backends.utils import get_backend @task def post_social_media(user_social_auth, social_obj): backend = get_backend(settings.AUTHENTICATION_BACKENDS, user_social_auth.provider) backend.post(user_social_auth, social_obj)
30.8
86
0.834416
0
0
0
0
192
0.623377
0
0
0
0
e312667320932a26f8caa618268190a0a7f675cc
7,753
py
Python
filepath/NuclearCMC_raw_data_file_list.py
hbar/alsTomographyTools
ec1edd1477367a57ee94e806134aee92e57db977
[ "MIT" ]
null
null
null
filepath/NuclearCMC_raw_data_file_list.py
hbar/alsTomographyTools
ec1edd1477367a57ee94e806134aee92e57db977
[ "MIT" ]
null
null
null
filepath/NuclearCMC_raw_data_file_list.py
hbar/alsTomographyTools
ec1edd1477367a57ee94e806134aee92e57db977
[ "MIT" ]
null
null
null
#pathList = [ #"/global/project/projectdirs/als/spade/warehouse/als/bl832/phosemann/20160512_092220_tensile7_T700_240mic/raw/20160512_092220_tensile7_T700_240mic.h5", #"/global/project/projectdirs/als/spade/warehouse/als/bl832/phosemann/20160512_085327_tensile7_T700_200mic/raw/20160512_085327_tensile7_T700_200mic.h...
40.591623
159
0.864569
0
0
0
0
0
0
0
0
7,151
0.922353
e312d0f86ad81db6700f196a91af6d00bac33137
3,870
py
Python
app/discal/cogs/handler.py
Shirataki2/DisCalendar
cfb5ecad6c65911fbb041cbc585d86588de125f5
[ "MIT" ]
6
2020-11-29T08:04:07.000Z
2021-05-07T11:05:10.000Z
app/discal/cogs/handler.py
Shirataki2/DisCalendar
cfb5ecad6c65911fbb041cbc585d86588de125f5
[ "MIT" ]
139
2020-11-24T23:37:03.000Z
2022-03-30T00:18:09.000Z
app/discal/cogs/handler.py
Shirataki2/DisCalendar
cfb5ecad6c65911fbb041cbc585d86588de125f5
[ "MIT" ]
1
2021-02-01T15:07:17.000Z
2021-02-01T15:07:17.000Z
import asyncio import json import discord from discord.ext import commands, tasks from discal.bot import Bot from datetime import datetime, timedelta from discal.logger import get_module_logger logger = get_module_logger(__name__) class Handler(commands.Cog): def __init__(self, bot): self.bot: Bot = bot...
36.168224
100
0.496382
3,662
0.928028
0
0
501
0.126964
3,418
0.866194
727
0.184237
e312d4733d2d6ab5dadd53371794d5b4269ec969
2,738
py
Python
nids/enipcip/enip_cpf.py
Cyphysecurity/ICS-SDN-1
c04d9e7bb7ad945166e969e071a2f82fb5bd18bf
[ "MIT" ]
4
2019-12-17T08:59:57.000Z
2022-01-09T19:52:27.000Z
nids/enipcip/enip_cpf.py
Cyphysecurity/ICS-SDN-1
c04d9e7bb7ad945166e969e071a2f82fb5bd18bf
[ "MIT" ]
3
2020-08-13T16:05:46.000Z
2021-10-17T07:49:33.000Z
nids/enipcip/enip_cpf.py
Cyphysecurity/ICS-SDN-1
c04d9e7bb7ad945166e969e071a2f82fb5bd18bf
[ "MIT" ]
4
2017-06-14T23:41:50.000Z
2021-03-01T18:54:03.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright (c) 2015 David I. Urbina, david.urbina@utdallas.edu # # 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...
36.506667
106
0.685172
1,347
0.491965
0
0
0
0
0
0
1,475
0.538714
e314ca5cb9348b5a95152247da6288de4e244796
1,103
py
Python
programming_hw_4s/tasks_with_eolymp_tags/t_7_6_(eolimp_5089).py
andriidem308/python_practice
85a0ebd6ecbecf63eaba170c8279f0a88600237a
[ "MIT" ]
2
2020-01-27T11:58:54.000Z
2020-03-30T10:54:08.000Z
programming_hw_4s/tasks_with_eolymp_tags/t_7_6_(eolimp_5089).py
andriidem308/python_practice
85a0ebd6ecbecf63eaba170c8279f0a88600237a
[ "MIT" ]
null
null
null
programming_hw_4s/tasks_with_eolymp_tags/t_7_6_(eolimp_5089).py
andriidem308/python_practice
85a0ebd6ecbecf63eaba170c8279f0a88600237a
[ "MIT" ]
null
null
null
def merge_sort(arr): if len(arr) > 1: middle = len(arr) // 2 lefthalf = arr[:middle] righthalf = arr[middle:] merge_sort(lefthalf) merge_sort(righthalf) i = j = k = 0 while i < len(lefthalf) and j < len(righthalf): if lefthalf[i] < righthalf[j]:...
19.350877
55
0.44243
0
0
0
0
0
0
0
0
21
0.019039
e31548410089b175367898405bf5be3d08d7b387
418
py
Python
electionleaflets/apps/content/models.py
electionleaflets/electionleaflets
4110e96a3035c32d0b6ff3c9f832c5e003728170
[ "MIT" ]
null
null
null
electionleaflets/apps/content/models.py
electionleaflets/electionleaflets
4110e96a3035c32d0b6ff3c9f832c5e003728170
[ "MIT" ]
23
2015-02-19T14:02:23.000Z
2015-04-30T11:14:01.000Z
electionleaflets/apps/content/models.py
electionleaflets/electionleaflets
4110e96a3035c32d0b6ff3c9f832c5e003728170
[ "MIT" ]
2
2015-02-02T19:39:54.000Z
2017-02-08T09:19:53.000Z
from django.db import models class ContentBlock(models.Model): """ A simple block of HTML content that can be used by various sections of the site based on the provided name, which acts as a key. """ name = models.CharField(max_length=64) content = models.TextField(blank=True) def __...
24.588235
79
0.662679
386
0.923445
0
0
0
0
0
0
164
0.392344
e316c0dee9255d1c94a21d0fb077092ad8593724
162
py
Python
Python/1017.py
lucasferreiraa/uri-judge-respostas
f5fc659d53c6b512a3624764041675e62d3fa053
[ "MIT" ]
null
null
null
Python/1017.py
lucasferreiraa/uri-judge-respostas
f5fc659d53c6b512a3624764041675e62d3fa053
[ "MIT" ]
null
null
null
Python/1017.py
lucasferreiraa/uri-judge-respostas
f5fc659d53c6b512a3624764041675e62d3fa053
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # URI Judge - Problema 1017 tempo = int(input()) velocidade = int(input()) litros = (velocidade / 12.0) * tempo print("%.3f" % litros)
16.2
36
0.604938
0
0
0
0
0
0
0
0
56
0.345679
e316f4ba8d78958af8ea71861f55f56a0c25786e
765
py
Python
Algorithms and Data Structures/sort/qks.py
ioyy900205/PyTorch_mess-around
90d255e17158699fd7902f7746b35fa18975112e
[ "MIT" ]
null
null
null
Algorithms and Data Structures/sort/qks.py
ioyy900205/PyTorch_mess-around
90d255e17158699fd7902f7746b35fa18975112e
[ "MIT" ]
null
null
null
Algorithms and Data Structures/sort/qks.py
ioyy900205/PyTorch_mess-around
90d255e17158699fd7902f7746b35fa18975112e
[ "MIT" ]
null
null
null
''' Date: 2021-08-10 17:17:35 LastEditors: Liuliang LastEditTime: 2021-08-10 18:27:56 Description: ''' import random import sys sys.path.append("..") from bacic_module.random_int_list import random_int_list def partition(nums, left, right): tmp = nums[left] while left < right: while left<right a...
21.25
56
0.605229
0
0
0
0
0
0
0
0
107
0.139869
e318e94372f3438841131a8e520812b4b488dc1f
2,144
py
Python
Core/config/CYCEnv/run_json_CYC_envs.py
geoffroygivry/CyclopsVFX-Unity
6ab9ab122b6c3e6200e90d49a0c2bf774e53d985
[ "MIT" ]
17
2017-06-27T04:14:42.000Z
2022-03-07T03:37:44.000Z
Core/config/CYCEnv/run_json_CYC_envs.py
geoffroygivry/Cyclops-VFX
6ab9ab122b6c3e6200e90d49a0c2bf774e53d985
[ "MIT" ]
2
2017-06-14T04:17:51.000Z
2018-08-23T20:12:44.000Z
Core/config/CYCEnv/run_json_CYC_envs.py
geoffroygivry/CyclopsVFX-Unity
6ab9ab122b6c3e6200e90d49a0c2bf774e53d985
[ "MIT" ]
2
2019-03-18T06:18:33.000Z
2019-08-14T21:07:53.000Z
import os import json def create_json_CYC_envs(root_dir): DI_ROOT = root_dir CYC_ROOT = "%s/CyclopsVFX" % DI_ROOT DATA_FILENAME = os.path.join(CYC_ROOT, "CYC_envs.json") CYC_HYDRA_PATH = "%s/Hydra" % (CYC_ROOT) CYC_HYDRA_CACHE = "%s/Hydra/cache" % (CYC_ROOT) CYC_CORE_PATH = "%s/Core/...
39.703704
65
0.58722
0
0
0
0
0
0
0
0
607
0.283116
e31a51d9bad6493d50583997c938e58165b7c257
956
py
Python
tests/some_test.py
ShashkovS/drawzero
3722b2fccb655779b6b62e97b1584683413d7fc0
[ "MIT" ]
2
2020-08-06T09:51:43.000Z
2020-08-06T10:03:58.000Z
tests/some_test.py
ShashkovS/drawzero
3722b2fccb655779b6b62e97b1584683413d7fc0
[ "MIT" ]
null
null
null
tests/some_test.py
ShashkovS/drawzero
3722b2fccb655779b6b62e97b1584683413d7fc0
[ "MIT" ]
null
null
null
import unittest import drawzero class ColorTest(unittest.TestCase): def test_wrong_color(self): self.assertRaises(TypeError, drawzero._make_color, '#abcd') self.assertRaises(TypeError, drawzero._make_color, 'dummy') self.assertRaises(TypeError, drawzero._make_color, '#aabbZZ') self...
38.24
80
0.614017
790
0.82636
0
0
0
0
0
0
151
0.15795
e31af962393b8a7c27bf698791ef898144c732f5
4,143
py
Python
test/unit/api/test_api_safety.py
technocreep/FEDOT
c11f19d1d231bd9c1d96d6e39d14697a028f6272
[ "BSD-3-Clause" ]
null
null
null
test/unit/api/test_api_safety.py
technocreep/FEDOT
c11f19d1d231bd9c1d96d6e39d14697a028f6272
[ "BSD-3-Clause" ]
null
null
null
test/unit/api/test_api_safety.py
technocreep/FEDOT
c11f19d1d231bd9c1d96d6e39d14697a028f6272
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from fedot.api.api_utils.api_data import ApiDataProcessor from fedot.api.api_utils.api_data_analyser import DataAnalyser from fedot.api.main import Fedot from fedot.core.data.data import InputData from fedot.core.repository.dataset_types import DataTypesEnum from fedot.core.repository.tasks import T...
42.71134
118
0.69901
0
0
0
0
0
0
0
0
906
0.218682
e31bbe934af2c97028c0e66dc59a02ae268f0c31
7,765
py
Python
parallelpy/parallelpy.py
krober/parallelpy
356fa0b75d3de2fa695b2fd64f0a53555f6bf55f
[ "MIT" ]
null
null
null
parallelpy/parallelpy.py
krober/parallelpy
356fa0b75d3de2fa695b2fd64f0a53555f6bf55f
[ "MIT" ]
1
2018-08-26T03:01:18.000Z
2018-08-26T03:01:18.000Z
parallelpy/parallelpy.py
krober/parallelpy
356fa0b75d3de2fa695b2fd64f0a53555f6bf55f
[ "MIT" ]
null
null
null
from multiprocessing import cpu_count, Manager, Process from time import sleep class Parallelizer: def __init__( self, *, target: 'function', args: list, enable_results: bool, auto_proc_count: bool, max_proc_count: int): ...
34.665179
79
0.582228
7,683
0.98944
0
0
0
0
0
0
3,618
0.465937
e31cd77f7061ef13a9e31f26ee8ba9f374dfc272
9,781
py
Python
sfa/util/api.py
planetlab/sfa
d0f743e245e0bb24d7ed1016bcc6e61d1e558a95
[ "MIT" ]
1
2015-11-19T13:34:45.000Z
2015-11-19T13:34:45.000Z
sfa/util/api.py
planetlab/sfa
d0f743e245e0bb24d7ed1016bcc6e61d1e558a95
[ "MIT" ]
null
null
null
sfa/util/api.py
planetlab/sfa
d0f743e245e0bb24d7ed1016bcc6e61d1e558a95
[ "MIT" ]
null
null
null
# # SFA XML-RPC and SOAP interfaces # import sys import os import traceback import string import xmlrpclib import sfa.util.xmlrpcprotocol as xmlrpcprotocol from sfa.util.sfalogging import logger from sfa.trust.auth import Auth from sfa.util.config import * from sfa.util.faults import * from sfa.util.cache import Cache...
34.807829
112
0.618546
7,146
0.7306
0
0
0
0
0
0
2,873
0.293733
e31d9fd874884c64a5cfd7e556213a44724536fb
9,507
py
Python
deanslist/deanslist.py
upeducationnetwork/deanslist-python
226eda2580055427119397bc28e7976f019d7301
[ "MIT" ]
null
null
null
deanslist/deanslist.py
upeducationnetwork/deanslist-python
226eda2580055427119397bc28e7976f019d7301
[ "MIT" ]
2
2016-05-16T19:54:26.000Z
2016-05-20T12:02:20.000Z
deanslist/deanslist.py
upeducationnetwork/deanslist-python
226eda2580055427119397bc28e7976f019d7301
[ "MIT" ]
null
null
null
__author__ = 'rknight' import os import csv import logging import datetime from requests_futures.sessions import FuturesSession def dl(reports, dlkeys): # Primary call # Send requests allreports = dlrequest(reports=reports, dlkeys=dlkeys) # Write results for outreport in allreports.keys(): ...
31.376238
141
0.577154
0
0
0
0
0
0
0
0
2,714
0.285474
e31da554e9612910aa7b87468de6e4101ac08273
7,210
py
Python
anchore_engine/services/policy_engine/api/models/image.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
anchore_engine/services/policy_engine/api/models/image.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
anchore_engine/services/policy_engine/api/models/image.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from anchore_engine.services.policy_engine.api.models.base_model_ import Model from anchore_engine.services.policy_engine.api import util class Image(Model): """N...
27.414449
156
0.59251
6,917
0.959362
0
0
4,795
0.665049
0
0
4,422
0.613315
e31e1e564d0eb470b1f222fdeb2e2e5813305ea2
28,531
py
Python
src/pte_decode/decoding/decoder_factory.py
richardkoehler/pte-decode
d1a466c166e5c3dd5e2c0caf1b12492f0e93bc57
[ "MIT" ]
null
null
null
src/pte_decode/decoding/decoder_factory.py
richardkoehler/pte-decode
d1a466c166e5c3dd5e2c0caf1b12492f0e93bc57
[ "MIT" ]
null
null
null
src/pte_decode/decoding/decoder_factory.py
richardkoehler/pte-decode
d1a466c166e5c3dd5e2c0caf1b12492f0e93bc57
[ "MIT" ]
null
null
null
"""Module for machine learning models.""" from dataclasses import dataclass from typing import Any, Optional, Union import numpy as np import pandas as pd from bayes_opt import BayesianOptimization from catboost import CatBoostClassifier from sklearn.discriminant_analysis import ( LinearDiscriminantAnalysis, ...
33.68477
78
0.537836
25,699
0.90074
0
0
24,335
0.852932
0
0
12,766
0.447443
e3203c55f3123f00f21c9072e3c16a2c74fb421f
7,603
py
Python
pikoToHM.py
lucasHSA/piko
a0bca6bfbdf1ecf95fd8dcca563350c676d2edf7
[ "MIT" ]
null
null
null
pikoToHM.py
lucasHSA/piko
a0bca6bfbdf1ecf95fd8dcca563350c676d2edf7
[ "MIT" ]
1
2016-07-18T08:24:50.000Z
2016-12-17T09:19:07.000Z
pikoToHM.py
lucasHSA/piko
a0bca6bfbdf1ecf95fd8dcca563350c676d2edf7
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2015 Lucas Koegel # # 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 ri...
42.47486
145
0.663422
0
0
0
0
0
0
0
0
3,464
0.45549
e321f4353a25d31bcaa64e339213294f5626c9c9
480
py
Python
src/default/ellipse/index.py
mikeludemann/python-data-visualization
e5317505d41ae79389f6eec61cefeca1690935b0
[ "MIT" ]
null
null
null
src/default/ellipse/index.py
mikeludemann/python-data-visualization
e5317505d41ae79389f6eec61cefeca1690935b0
[ "MIT" ]
null
null
null
src/default/ellipse/index.py
mikeludemann/python-data-visualization
e5317505d41ae79389f6eec61cefeca1690935b0
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np from matplotlib.patches import Ellipse NUM = 250 ells = [Ellipse(xy=np.random.rand(2) * 10, width=np.random.rand(), height=np.random.rand(), angle=np.random.rand() * 360) for i in range(NUM)] fig, ax = plt.subplots(subplot_kw={'aspect': 'equal'}) for e in ells: ...
20.869565
54
0.708333
0
0
0
0
0
0
0
0
15
0.03125
e32283e627f56eef0ab47dab2fb3694cb482ef8d
231
py
Python
hdc-utility/model/Formation.py
YSRKEN/HDC_React2
cba48a0563caef629169644254742f688a0e1ec7
[ "MIT" ]
null
null
null
hdc-utility/model/Formation.py
YSRKEN/HDC_React2
cba48a0563caef629169644254742f688a0e1ec7
[ "MIT" ]
13
2020-09-04T23:25:20.000Z
2022-02-18T01:52:33.000Z
hdc-utility/model/Formation.py
YSRKEN/HDC_React2
cba48a0563caef629169644254742f688a0e1ec7
[ "MIT" ]
null
null
null
from enum import Enum class Formation(Enum): LINE_AHEAD = 0 # 単縦陣 DOUBLE_LINE = 1 # 複縦陣 DIAMOND = 2 # 輪形陣 ECHELON = 3 # 梯形陣 LINE_ABREAST = 4 # 単横陣 FORMATION_3 = 5 # 第3陣形(第三警戒航行序列(輪形陣))
21
43
0.562771
264
0.913495
0
0
0
0
0
0
104
0.359862
e323376f728d32ac2cbf19f89a6bf1e46c450382
638
py
Python
_/chapter5-OpenStack/IdentityService/createproject.py
paullewallencom/hybrid-cloud-978-1-7888-3087-4
d101553fd342f420b581b87c58c7219f2b04a7c6
[ "Apache-2.0" ]
3
2018-03-27T14:34:48.000Z
2021-10-04T16:28:19.000Z
_/chapter5-OpenStack/IdentityService/createproject.py
paullewallencom/hybrid-cloud-978-1-7888-3087-4
d101553fd342f420b581b87c58c7219f2b04a7c6
[ "Apache-2.0" ]
null
null
null
_/chapter5-OpenStack/IdentityService/createproject.py
paullewallencom/hybrid-cloud-978-1-7888-3087-4
d101553fd342f420b581b87c58c7219f2b04a7c6
[ "Apache-2.0" ]
1
2021-08-27T23:51:28.000Z
2021-08-27T23:51:28.000Z
#import OpenStack connection class from the SDK from openstack import connection # Create a connection object by calling the constructor and pass the security information conn = connection.Connection(auth_url="http://192.168.0.106/identity", project_name="demo", username="admin", password="manoj", user_domain_id="defa...
30.380952
89
0.714734
0
0
0
0
0
0
0
0
291
0.456113
e323be496777a0e952195a0a60b4f2ae474d9dd5
849
py
Python
bisection.py
Raijeku/Optimizacion
b06c302c3edbdb3a2a2b378b0c53baaf9fe69c2b
[ "Apache-2.0" ]
null
null
null
bisection.py
Raijeku/Optimizacion
b06c302c3edbdb3a2a2b378b0c53baaf9fe69c2b
[ "Apache-2.0" ]
null
null
null
bisection.py
Raijeku/Optimizacion
b06c302c3edbdb3a2a2b378b0c53baaf9fe69c2b
[ "Apache-2.0" ]
null
null
null
from sympy import * import pandas as pd def bisection(xl, xu, tolerance, function): x = Symbol('x') f = parse_expr(function) iteration = 0 data = pd.DataFrame(columns=['iteration','xl','xu','xr','f(xl)','f(xu)','f(xr)','f(xl)f(xr)','error']) while abs(xu-xl)>=tolerance: xr = (xl + xu)/2 ...
30.321429
212
0.522968
0
0
0
0
0
0
0
0
162
0.190813
e323ed5e92eb5da83c0443afabf48a5b468396f3
176
py
Python
gd/utils/crypto/__init__.py
scottwedge/gd.py
328c9833abc949b1c9ac0eabe276bd66fead4c2c
[ "MIT" ]
null
null
null
gd/utils/crypto/__init__.py
scottwedge/gd.py
328c9833abc949b1c9ac0eabe276bd66fead4c2c
[ "MIT" ]
null
null
null
gd/utils/crypto/__init__.py
scottwedge/gd.py
328c9833abc949b1c9ac0eabe276bd66fead4c2c
[ "MIT" ]
null
null
null
"""Main module for operating on crypted/encoded strings in Geometry Dash""" from gd.utils.crypto.coders import Coder from gd.utils.crypto.xor_cipher import XORCipher as xor
44
76
0.795455
0
0
0
0
0
0
0
0
75
0.426136
e324c2b47225b873ec4b37a7708b700104f77b26
3,684
py
Python
subt/ros/base/src/motor_controller.py
m3d/osgar_archive_2020
556b534e59f8aa9b6c8055e2785c8ae75a1a0a0e
[ "MIT" ]
12
2017-02-16T10:22:59.000Z
2022-03-20T05:48:06.000Z
subt/ros/base/src/motor_controller.py
m3d/osgar_archive_2020
556b534e59f8aa9b6c8055e2785c8ae75a1a0a0e
[ "MIT" ]
618
2016-08-30T04:46:12.000Z
2022-03-25T16:03:10.000Z
subt/ros/base/src/motor_controller.py
robotika/osgar
6f4f584d5553ab62c08a1c7bb493fefdc9033173
[ "MIT" ]
11
2016-08-27T20:02:55.000Z
2022-03-07T08:53:53.000Z
from pid import PID import pdb #for anonymous objects Object = lambda **kwargs: type("Object", (), kwargs) class MotorController: def __init__(self, wheelBase,numberOfMotors): self.pidControllerFrontLeft = PID() self.pidControllerFrontRight = PID() self.pidControllerRearLeft = PID() ...
47.844156
140
0.659609
3,547
0.962812
0
0
0
0
0
0
936
0.254072
e325abcd58eea788430716963a4dc7047047719c
4,931
py
Python
shiftscheduler/gui/barebone.py
c-rainbow/nurse-scheduling
8537c875e46772700499a89dec3a30a796434fe0
[ "MIT" ]
2
2020-04-16T17:03:56.000Z
2021-04-08T17:23:21.000Z
shiftscheduler/gui/barebone.py
c-rainbow/nurse-scheduling
8537c875e46772700499a89dec3a30a796434fe0
[ "MIT" ]
null
null
null
shiftscheduler/gui/barebone.py
c-rainbow/nurse-scheduling
8537c875e46772700499a89dec3a30a796434fe0
[ "MIT" ]
1
2020-05-04T18:03:59.000Z
2020-05-04T18:03:59.000Z
import tkinter as tk from tkinter import filedialog from tkinter import messagebox from tkinter import scrolledtext from tkinter import ttk import tkcalendar as tkc from shiftscheduler.data_types import data_types from shiftscheduler.excel import output as excel_output from shiftscheduler.gui import constants from ...
35.47482
110
0.636585
4,617
0.892174
0
0
0
0
0
0
1,127
0.217778
e3274579faa2032556dd5e38f0e928addfcdc145
1,093
py
Python
orders/migrations/0001_initial.py
MahmudulHassan5809/Ecommerce-WebSite-With-Django2
a9c76e6e925e236ba064be194a03d9d6635edac2
[ "MIT" ]
1
2021-09-24T04:32:35.000Z
2021-09-24T04:32:35.000Z
orders/migrations/0001_initial.py
MahmudulHassan5809/Ecommerce-WebSite-With-Django2
a9c76e6e925e236ba064be194a03d9d6635edac2
[ "MIT" ]
null
null
null
orders/migrations/0001_initial.py
MahmudulHassan5809/Ecommerce-WebSite-With-Django2
a9c76e6e925e236ba064be194a03d9d6635edac2
[ "MIT" ]
null
null
null
# Generated by Django 2.1.5 on 2019-01-26 19:42 import datetime from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Order', fields=[ ('id', mod...
34.15625
123
0.563586
984
0.900274
0
0
0
0
0
0
142
0.129918
e3278fc449a9b7f42367d6c094639616a86c1514
353
py
Python
setup.py
markus61/selfstoredict
c770fd0dd4976e66299f51f71a71ad9c1875d699
[ "MIT" ]
1
2017-01-18T11:19:24.000Z
2017-01-18T11:19:24.000Z
setup.py
markus61/selfstoredict
c770fd0dd4976e66299f51f71a71ad9c1875d699
[ "MIT" ]
null
null
null
setup.py
markus61/selfstoredict
c770fd0dd4976e66299f51f71a71ad9c1875d699
[ "MIT" ]
1
2018-02-23T06:23:43.000Z
2018-02-23T06:23:43.000Z
from setuptools import setup, find_packages setup( name='selfstoredict', version='0.6', packages=find_packages(), url='https://github.com/markus61/selfstoredict', license='MIT', author='markus', author_email='ms@dom.de', description='a python class delivering a dict that stores itself in...
29.416667
101
0.696884
0
0
0
0
0
0
0
0
171
0.484419
e328edcf699e6d13889b75058d9c53daede11262
428
py
Python
play.py
Samitha156/100-days-of-coding
b47aff0f6d432945a20a5f95e2252cddb6cc5522
[ "MIT" ]
null
null
null
play.py
Samitha156/100-days-of-coding
b47aff0f6d432945a20a5f95e2252cddb6cc5522
[ "MIT" ]
null
null
null
play.py
Samitha156/100-days-of-coding
b47aff0f6d432945a20a5f95e2252cddb6cc5522
[ "MIT" ]
null
null
null
def add(*args): c = 0 for n in args: c += n return c sum = add(2,5,6,5) print(sum) def calculate(**kwargs): print(kwargs) calculate(add=3, mul=5) class Car: def __init__(self, **kw): # self.make = kw["make"] # self.model = kw["model"] self.ma...
17.12
36
0.514019
186
0.434579
0
0
0
0
0
0
73
0.170561
e3294c6b906349f5541063a2b6f7ca5cb0e7e90b
21,406
py
Python
lib/simpleauth/handler.py
Bekt/tweetement
5cdb2e7db30a1600fbf522754c4917f8c9e377a6
[ "MIT" ]
2
2015-02-18T17:31:58.000Z
2019-04-01T13:44:45.000Z
lib/simpleauth/handler.py
Bekt/tweetement
5cdb2e7db30a1600fbf522754c4917f8c9e377a6
[ "MIT" ]
1
2015-01-26T03:58:19.000Z
2015-01-26T03:58:19.000Z
lib/simpleauth/handler.py
Bekt/tweetement
5cdb2e7db30a1600fbf522754c4917f8c9e377a6
[ "MIT" ]
1
2021-05-04T21:15:53.000Z
2021-05-04T21:15:53.000Z
# -*- coding: utf-8 -*- import os import sys import logging import json from urllib import urlencode import urlparse # for CSRF state tokens import time import base64 # Get available json parser try: # should be the fastest on App Engine py27. import json except ImportError: try: import simplejson as json ...
34.525806
80
0.679996
20,386
0.952305
0
0
0
0
0
0
9,713
0.45373
e32db38efba021a5263a02a0f603ee6533341d64
766
py
Python
test.py
litex-hub/pythondata-cpu-ibex
9775779f0770fc635a17dfc467cb8d5afdf01d1d
[ "Apache-2.0" ]
2
2021-02-18T00:27:38.000Z
2021-05-12T21:57:41.000Z
test.py
litex-hub/pythondata-cpu-ibex
9775779f0770fc635a17dfc467cb8d5afdf01d1d
[ "Apache-2.0" ]
null
null
null
test.py
litex-hub/pythondata-cpu-ibex
9775779f0770fc635a17dfc467cb8d5afdf01d1d
[ "Apache-2.0" ]
1
2021-04-28T02:42:51.000Z
2021-04-28T02:42:51.000Z
#!/usr/bin/env python3 from __future__ import print_function import os import pythondata_cpu_ibex print("Found ibex @ version", pythondata_cpu_ibex.version_str, "(with data", pythondata_cpu_ibex.data_version_str, ")") print() print("Data is in", pythondata_cpu_ibex.data_location) assert os.path.exists(pythondata_cp...
31.916667
119
0.765013
0
0
0
0
0
0
0
0
112
0.146214
e331235f5a65953d372c517da81e56d9c43aa850
2,652
py
Python
scenegraph/pddlgym_planners/lapkt.py
taskography/3dscenegraph-dev
2c261241230fbea1f1c687ff793478248f25c02c
[ "MIT" ]
1
2022-01-30T22:06:57.000Z
2022-01-30T22:06:57.000Z
scenegraph/pddlgym_planners/lapkt.py
taskography/3dscenegraph-dev
2c261241230fbea1f1c687ff793478248f25c02c
[ "MIT" ]
null
null
null
scenegraph/pddlgym_planners/lapkt.py
taskography/3dscenegraph-dev
2c261241230fbea1f1c687ff793478248f25c02c
[ "MIT" ]
null
null
null
"""LAPKT-BFWS https://github.com/nirlipo/BFWS-public """ import re import os import sys import subprocess import tempfile from pddlgym_planners.pddl_planner import PDDLPlanner from pddlgym_planners.planner import PlanningFailure import numpy as np from utils import FilesInCommonTempDirectory DOCKER_IMAGE = 'khodeir/b...
42.774194
232
0.667044
2,319
0.874434
0
0
0
0
0
0
671
0.253017
e33575c4ac98eb7bd72db9483692a67e2a8b1c0f
1,914
py
Python
Create Network Zones.py
Tosatsu/okta-python-scripts
bca5ff89b8fc2381ccab08de971f65505ed0cda5
[ "MIT" ]
1
2021-04-09T09:46:31.000Z
2021-04-09T09:46:31.000Z
Create Network Zones.py
Tosatsu/okta-python-scripts
bca5ff89b8fc2381ccab08de971f65505ed0cda5
[ "MIT" ]
null
null
null
Create Network Zones.py
Tosatsu/okta-python-scripts
bca5ff89b8fc2381ccab08de971f65505ed0cda5
[ "MIT" ]
1
2021-04-12T11:27:13.000Z
2021-04-12T11:27:13.000Z
import csv import re import sys import requests import json import Data # data container, replace with your own orgName = Data.orgName # replace with your own apiKey = Data.apiKey # provide your own API token api_token = "SSWS " + apiKey headers = {'Accept': 'application/json', 'Content-Type': 'application...
29.90625
71
0.405434
0
0
0
0
0
0
0
0
462
0.241379
e33639a848594d63e324d70460cacf9ae086d33c
959
py
Python
simulador_de_dado.py
lucianoferreirasa/PythonProjects
c26a16bcbd61bd0563bc4f7d4dc0dd3593bd95e5
[ "MIT" ]
null
null
null
simulador_de_dado.py
lucianoferreirasa/PythonProjects
c26a16bcbd61bd0563bc4f7d4dc0dd3593bd95e5
[ "MIT" ]
null
null
null
simulador_de_dado.py
lucianoferreirasa/PythonProjects
c26a16bcbd61bd0563bc4f7d4dc0dd3593bd95e5
[ "MIT" ]
null
null
null
import random import PySimpleGUI as sg class SimuladorDeDado: def __init__(self): self.valor_minimo = 1 self.valor_maximo = 6 self.layout = [ [sg.Text("Jogar o dado?")], [sg.Button("Sim"),sg.Button("Não")] ] def Iniciar(self): self.janela = sg.W...
29.96875
71
0.577685
871
0.903527
0
0
0
0
0
0
175
0.181535
e3370f6e006d93026ba5320fad4727621e81fc92
1,712
py
Python
src/geometry/linear_algebra.py
seahrh/coding-interview
517d19e7e88c02acec4aa6336bc20206ce3f1897
[ "MIT" ]
null
null
null
src/geometry/linear_algebra.py
seahrh/coding-interview
517d19e7e88c02acec4aa6336bc20206ce3f1897
[ "MIT" ]
null
null
null
src/geometry/linear_algebra.py
seahrh/coding-interview
517d19e7e88c02acec4aa6336bc20206ce3f1897
[ "MIT" ]
null
null
null
import math from typing import List, Iterable, Union Numeric = Union[int, float] def magnitude(p: Iterable[Numeric]) -> float: res: float = 0 for component in p: res += component ** 2 res = math.sqrt(res) return res def vdot(p: List[Numeric], q: List[Numeric]) -> float: "...
31.703704
86
0.567757
0
0
0
0
0
0
0
0
286
0.167056
e337c8816166ee2eea4a6327ac76523c1a2e9c32
1,231
py
Python
plot/eigenvalue_statistics.py
dh4gan/tache
51ed037769ecc4fdadc591e3b3619416c79e65b7
[ "MIT" ]
5
2018-02-27T04:07:15.000Z
2020-12-29T20:49:36.000Z
plot/eigenvalue_statistics.py
dh4gan/tache
51ed037769ecc4fdadc591e3b3619416c79e65b7
[ "MIT" ]
null
null
null
plot/eigenvalue_statistics.py
dh4gan/tache
51ed037769ecc4fdadc591e3b3619416c79e65b7
[ "MIT" ]
null
null
null
# Written 9/10/14 by dh4gan # Code reads in output eigenvalue file from tache # Computes statistics import numpy as np import matplotlib.pyplot as plt import io_tache as io # Read in inputs from command line filename = ff.find_local_input_files('eigenvalues*') threshold = input("What is the threshold for classificat...
21.224138
69
0.723802
0
0
0
0
0
0
0
0
358
0.29082
e337db10027ece0f941b1295bc94ad1a0ed34904
4,179
py
Python
arrow/forwarder/views.py
AkhilGKrishnan/arrow
bbd35faa5011c642cdcf218b180b48dd7ef39ef6
[ "MIT" ]
null
null
null
arrow/forwarder/views.py
AkhilGKrishnan/arrow
bbd35faa5011c642cdcf218b180b48dd7ef39ef6
[ "MIT" ]
null
null
null
arrow/forwarder/views.py
AkhilGKrishnan/arrow
bbd35faa5011c642cdcf218b180b48dd7ef39ef6
[ "MIT" ]
3
2019-01-07T17:07:16.000Z
2021-01-09T13:01:40.000Z
from django.views.generic.edit import CreateView, FormMixin from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django import forms from django.urls import reverse from reportlab.pdfgen import canvas from django.http import HttpResponse from forwarder.models import A...
36.025862
93
0.675042
2,502
0.598708
0
0
0
0
0
0
1,061
0.253888
e3390f43d3793bc787b6b52cd5f2cc575976a36e
4,793
py
Python
caption_feats_generation_scripts/full_vid_data_loader.py
Alterith/Dense_Video_Captioning_Feature_Extraction_Model_Choice
65d0f2d26698cc8f7a5ffb564936113e2bbec201
[ "MIT" ]
1
2021-04-21T12:39:07.000Z
2021-04-21T12:39:07.000Z
caption_feats_generation_scripts/full_vid_data_loader.py
Alterith/masters_code
65d0f2d26698cc8f7a5ffb564936113e2bbec201
[ "MIT" ]
null
null
null
caption_feats_generation_scripts/full_vid_data_loader.py
Alterith/masters_code
65d0f2d26698cc8f7a5ffb564936113e2bbec201
[ "MIT" ]
null
null
null
import h5py # torch imports import torch from torch.utils.data import Dataset # generic imports import os import sys import numpy as np import random import pandas as pd import cv2 from decord import VideoReader from decord import cpu, gpu from matplotlib import pyplot as plt import gc # create data loader class ...
30.335443
130
0.580638
4,478
0.934279
0
0
0
0
0
0
772
0.161068
e339d61b7c0a81fbe079a184470ec5bdef08b9e1
1,583
py
Python
sklearn_baseline.py
Shinkai125/KerasForTextClassfication
ed3d04c5c58d1dfb3f79b83ba704dd486616f0e4
[ "MIT" ]
null
null
null
sklearn_baseline.py
Shinkai125/KerasForTextClassfication
ed3d04c5c58d1dfb3f79b83ba704dd486616f0e4
[ "MIT" ]
null
null
null
sklearn_baseline.py
Shinkai125/KerasForTextClassfication
ed3d04c5c58d1dfb3f79b83ba704dd486616f0e4
[ "MIT" ]
null
null
null
""" @file: sklearn_method.py @time: 2020-12-09 17:38:38 """ import pandas as pd import seaborn as sns from tqdm import tqdm from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model import LogisticRegression from sklearn.ensemble import RandomForestClassifier from sklearn.naive_bayes import...
31.66
78
0.753001
0
0
0
0
0
0
0
0
208
0.130735
e33bc5cbc72c8153bc963c853fb7e883e19b21c8
2,087
py
Python
handypackages/gallery/tests.py
roundium/handypackages
b8a0e4952644144b31168f9a4ac8e743933d87c7
[ "MIT" ]
1
2019-07-31T11:40:06.000Z
2019-07-31T11:40:06.000Z
handypackages/gallery/tests.py
roundium/handypackages
b8a0e4952644144b31168f9a4ac8e743933d87c7
[ "MIT" ]
10
2020-02-12T01:16:25.000Z
2021-06-10T18:42:24.000Z
handypackages/gallery/tests.py
roundium/handypackages
b8a0e4952644144b31168f9a4ac8e743933d87c7
[ "MIT" ]
1
2019-07-31T11:40:18.000Z
2019-07-31T11:40:18.000Z
import tempfile from django.conf import settings from django.contrib.auth.models import User from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase from filer.models import Image from handypackages.tag.models import Tag from .models import Gallery class TestGalleryModels(Tes...
29.394366
77
0.577384
1,793
0.859128
0
0
0
0
0
0
487
0.233349
e33d45a696398845a0fe18a3dbb14693d8655739
1,926
py
Python
src/jk_mediawiki/impl/WikiCronProcessFilter.py
jkpubsrc/python-module-jk-mediawiki
5d76a060f0ed46c072d44e8084f6fa40d16e6069
[ "Apache-1.1" ]
null
null
null
src/jk_mediawiki/impl/WikiCronProcessFilter.py
jkpubsrc/python-module-jk-mediawiki
5d76a060f0ed46c072d44e8084f6fa40d16e6069
[ "Apache-1.1" ]
null
null
null
src/jk_mediawiki/impl/WikiCronProcessFilter.py
jkpubsrc/python-module-jk-mediawiki
5d76a060f0ed46c072d44e8084f6fa40d16e6069
[ "Apache-1.1" ]
null
null
null
import os import typing import jk_typing from .ProcessFilter import ProcessFilter class WikiCronProcessFilter(ProcessFilter): ################################################################################################################################ ## Constructor ###############################...
27.514286
129
0.297508
1,820
0.944964
0
0
622
0.322949
0
0
1,408
0.731049
e33da7e662f4c2fc76532c7c89e8edb38e2cccee
96
py
Python
venv/lib/python3.8/site-packages/filelock/_error.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/filelock/_error.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/filelock/_error.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/ab/0b/2c/7ae80e56fd2208fbee5ef317ac009972f468b5601f62f8f799f9d9279a
96
96
0.895833
0
0
0
0
0
0
0
0
0
0
e33e7075c79b3b47f743f64502284119cdb5e862
2,094
py
Python
konbata/Formats/xml_format.py
jzeuner/konbata
41c5ec9ce4c84e82e09daaa106ceed9de38c437b
[ "MIT" ]
2
2019-12-01T16:12:24.000Z
2021-05-18T22:10:12.000Z
konbata/Formats/xml_format.py
jzeuner/konbata
41c5ec9ce4c84e82e09daaa106ceed9de38c437b
[ "MIT" ]
10
2019-09-19T17:08:46.000Z
2021-02-17T21:42:10.000Z
konbata/Formats/xml_format.py
jzeuner/konbata
41c5ec9ce4c84e82e09daaa106ceed9de38c437b
[ "MIT" ]
3
2019-11-27T18:39:12.000Z
2021-02-10T15:11:58.000Z
""" Loader and Parser for the xml format. Version: 0.01-alpha """ from xml.dom import minidom from konbata.Data.Data import DataNode, DataTree from konbata.Formats.Format import Format def xml_toTree(file, delimiter, options=None): """ Function transforms a xml file into a DataTree. Parameters ...
22.516129
75
0.637536
0
0
0
0
0
0
0
0
944
0.450812
e33ec5c64b5732e244db6498e5c0817ede88b3d0
1,650
py
Python
make_high_indel.py
wckdouglas/ngs_qc_plot
b279905f9e30d1cf547cda5f51cc77e8a134ce99
[ "MIT" ]
null
null
null
make_high_indel.py
wckdouglas/ngs_qc_plot
b279905f9e30d1cf547cda5f51cc77e8a134ce99
[ "MIT" ]
null
null
null
make_high_indel.py
wckdouglas/ngs_qc_plot
b279905f9e30d1cf547cda5f51cc77e8a134ce99
[ "MIT" ]
null
null
null
#!/usr/env python import pandas as pd import os import sys import numpy as np if len(sys.argv) != 3: sys.exit('[usage] python %s <repeat_index table> <indel cutoff>') ref_table = sys.argv[1] indel_cut_off = int(sys.argv[2]) for gdf in pd.read_csv(ref_table, sep='\t', chunksize = 10000): for contig, contig...
36.666667
115
0.512121
0
0
0
0
0
0
0
0
302
0.18303
e340a47d3057e0a84cad2effe274acb95c936bc5
662
py
Python
LeetCodeSolutions/python/474_Ones_and_Zeroes.py
ChuanleiGuo/AlgorithmsPlayground
90b6287b742c8bfd3797540c408d679be2821a40
[ "MIT" ]
1
2017-03-27T13:38:37.000Z
2017-03-27T13:38:37.000Z
LeetCodeSolutions/python/474_Ones_and_Zeroes.py
ChuanleiGuo/AlgorithmsPlayground
90b6287b742c8bfd3797540c408d679be2821a40
[ "MIT" ]
null
null
null
LeetCodeSolutions/python/474_Ones_and_Zeroes.py
ChuanleiGuo/AlgorithmsPlayground
90b6287b742c8bfd3797540c408d679be2821a40
[ "MIT" ]
null
null
null
class Solution(object): def findMaxForm(self, strs, m, n): """ :type strs: List[str] :type m: int :type n: int :rtype: int """ dp = [[0] * (n + 1) for _ in range(m + 1)] def counts(s): return sum(1 for c in s if c == '0'), \ ...
30.090909
83
0.413897
661
0.998489
0
0
0
0
0
0
113
0.170695
e3431c6a3c1b12221c308a1da4d98113e28475f3
474
py
Python
xicsrt/optics/_InteractNone.py
PrincetonUniversity/xicsrt
15dfe5e3cd8ac6a326e8f0e502c8b739bd09d3fd
[ "MIT" ]
1
2021-07-21T17:07:31.000Z
2021-07-21T17:07:31.000Z
xicsrt/optics/_InteractNone.py
PrincetonUniversity/xicsrt
15dfe5e3cd8ac6a326e8f0e502c8b739bd09d3fd
[ "MIT" ]
null
null
null
xicsrt/optics/_InteractNone.py
PrincetonUniversity/xicsrt
15dfe5e3cd8ac6a326e8f0e502c8b739bd09d3fd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ .. Authors: Novimir Pablant <npablant@pppl.gov> Define the :class:`InteractNone` class. """ import numpy as np from copy import deepcopy from xicsrt.tools.xicsrt_doc import dochelper from xicsrt.optics._InteractObject import InteractObject @dochelper class InteractNone(InteractObject...
21.545455
66
0.723629
187
0.394515
0
0
198
0.417722
0
0
255
0.537975
e34633ea0534cf1b5136a4ecb84b248d7c202e57
416
py
Python
#103 - Ficha do Jogador.py
Lucas-HMSC/curso-python3
b6506d508107c9a43993a7b5795ee39fc3b7c79d
[ "MIT" ]
null
null
null
#103 - Ficha do Jogador.py
Lucas-HMSC/curso-python3
b6506d508107c9a43993a7b5795ee39fc3b7c79d
[ "MIT" ]
null
null
null
#103 - Ficha do Jogador.py
Lucas-HMSC/curso-python3
b6506d508107c9a43993a7b5795ee39fc3b7c79d
[ "MIT" ]
null
null
null
def ficha(nome, gols): if gols.isnumeric(): gols = int(gols) else: gols = 0 if nome.strip() != '': print(f'O jogador {nome} fez {gols} gol(s) no campeonato.') else: nome = '<desconhecido>' print(f'O jogador {nome} fez {gols} gol(s) no campeonato.') print('='*30)...
24.470588
67
0.560096
0
0
0
0
0
0
0
0
163
0.390887
e347285e41902227dea4612bf91fb04df4a24692
3,598
py
Python
sub_1602_display.py
leonardlinde/timeandtemp
93e9ad16b2027fd9c261052c22a5977b86326550
[ "Artistic-2.0" ]
null
null
null
sub_1602_display.py
leonardlinde/timeandtemp
93e9ad16b2027fd9c261052c22a5977b86326550
[ "Artistic-2.0" ]
null
null
null
sub_1602_display.py
leonardlinde/timeandtemp
93e9ad16b2027fd9c261052c22a5977b86326550
[ "Artistic-2.0" ]
null
null
null
#!/usr/bin/env python """ ZMQ Subscriber for 1602 display Queue: INF and CMD """ import wiringpi2 as wiringpi import datetime import time import json import Adafruit_DHT import traceback import zmq import sys import pprint infoSocket = "tcp://localhost:5550" cmdSocket = "tcp://localhost:5560" wiringpi.wiringPiSetu...
26.651852
79
0.658143
0
0
0
0
0
0
0
0
1,017
0.282657
e347e8efaaade3a7b28a992e4961e185b12004e3
2,079
py
Python
app/business_layers/presentation.py
martireg/bmat
b5ccd6dcd1edd1e90fa07cb0ef4006b909018a4c
[ "MIT" ]
null
null
null
app/business_layers/presentation.py
martireg/bmat
b5ccd6dcd1edd1e90fa07cb0ef4006b909018a4c
[ "MIT" ]
null
null
null
app/business_layers/presentation.py
martireg/bmat
b5ccd6dcd1edd1e90fa07cb0ef4006b909018a4c
[ "MIT" ]
null
null
null
from typing import List, Dict from fastapi import APIRouter, UploadFile, File, Depends, HTTPException from pydantic import create_model from starlette.responses import StreamingResponse from app.business_layers.domain import Work from app.business_layers.repository import WorkRepository from app.business_layers.use_c...
34.65
101
0.746032
0
0
0
0
1,232
0.592593
1,072
0.515633
267
0.128427
e348be446d860ef514d588759be2dbd6de2b4764
651
py
Python
essentials_kit_management/interactors/get_pay_through_details_interactor.py
RajeshKumar1490/iB_hubs_mini_project
f7126092400fb9a62fb4bff643dae7cda3a8d9d2
[ "MIT" ]
null
null
null
essentials_kit_management/interactors/get_pay_through_details_interactor.py
RajeshKumar1490/iB_hubs_mini_project
f7126092400fb9a62fb4bff643dae7cda3a8d9d2
[ "MIT" ]
2
2021-09-07T07:06:00.000Z
2021-09-07T07:24:26.000Z
essentials_kit_management/interactors/get_pay_through_details_interactor.py
RajeshKumar1490/iB_hubs_mini_project
f7126092400fb9a62fb4bff643dae7cda3a8d9d2
[ "MIT" ]
null
null
null
from essentials_kit_management.interactors.storages.storage_interface \ import StorageInterface from essentials_kit_management.interactors.presenters.presenter_interface \ import PresenterInterface class GetPayThroughDetailsInteractor: def __init__( self, storage: StorageInterface, presenter: ...
34.263158
76
0.761905
442
0.678955
0
0
0
0
0
0
0
0
e3496bdad8c230d6caf15ce743cc65f029480031
5,287
py
Python
RecoEgamma/Configuration/python/RecoEgamma_cff.py
sebwieland/cmssw
431e2fdfedec052e73c16e9f06de98ade41ebc56
[ "Apache-2.0" ]
null
null
null
RecoEgamma/Configuration/python/RecoEgamma_cff.py
sebwieland/cmssw
431e2fdfedec052e73c16e9f06de98ade41ebc56
[ "Apache-2.0" ]
null
null
null
RecoEgamma/Configuration/python/RecoEgamma_cff.py
sebwieland/cmssw
431e2fdfedec052e73c16e9f06de98ade41ebc56
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms from RecoEgamma.EgammaElectronProducers.gsfElectronSequence_cff import * from RecoEgamma.EgammaElectronProducers.uncleanedOnlyElectronSequence_cff import * from RecoEgamma.EgammaPhotonProducers.photonSequence_cff import * from RecoEgamma.EgammaPhotonProducers.conversionSequence...
66.924051
169
0.897863
0
0
0
0
0
0
0
0
639
0.120862
e349722dbbb7eaf1a0dc75722c25f01806dbcca5
3,632
py
Python
language/serene/boolq_tfds.py
Xtuden-com/language
70c0328968d5ffa1201c6fdecde45bbc4fec19fc
[ "Apache-2.0" ]
1,199
2018-10-16T01:30:18.000Z
2022-03-31T21:05:24.000Z
language/serene/boolq_tfds.py
Xtuden-com/language
70c0328968d5ffa1201c6fdecde45bbc4fec19fc
[ "Apache-2.0" ]
116
2018-10-18T03:31:46.000Z
2022-03-24T13:40:50.000Z
language/serene/boolq_tfds.py
Xtuden-com/language
70c0328968d5ffa1201c6fdecde45bbc4fec19fc
[ "Apache-2.0" ]
303
2018-10-22T12:35:12.000Z
2022-03-27T17:38:17.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
32.141593
75
0.593337
2,774
0.763767
773
0.21283
0
0
0
0
1,296
0.356828
e34a90751c66f311b5912bb8c6a8d1a8ad0deae9
449
py
Python
23/03/0.py
pylangstudy/201709
53d868786d7327a83bfa7f4149549c6f9855a6c6
[ "CC0-1.0" ]
null
null
null
23/03/0.py
pylangstudy/201709
53d868786d7327a83bfa7f4149549c6f9855a6c6
[ "CC0-1.0" ]
32
2017-09-01T00:52:17.000Z
2017-10-01T00:30:02.000Z
23/03/0.py
pylangstudy/201709
53d868786d7327a83bfa7f4149549c6f9855a6c6
[ "CC0-1.0" ]
null
null
null
import json import pprint from urllib.request import urlopen with urlopen('http://pypi.python.org/pypi/Twisted/json') as url: http_info = url.info() raw_data = url.read().decode(http_info.get_content_charset()) project_info = json.loads(raw_data) pprint.pprint(project_info) print('-----------------------------...
29.933333
65
0.657016
0
0
0
0
0
0
0
0
106
0.23608
e34b1404822d471e120b2d87a3f5be2a57d14434
1,323
py
Python
molotov_ext/__init__.py
2gis-test-labs/molotov-ext
2cf2cc5b74f6676ed1680511030d4dddb8be8380
[ "Apache-2.0" ]
null
null
null
molotov_ext/__init__.py
2gis-test-labs/molotov-ext
2cf2cc5b74f6676ed1680511030d4dddb8be8380
[ "Apache-2.0" ]
null
null
null
molotov_ext/__init__.py
2gis-test-labs/molotov-ext
2cf2cc5b74f6676ed1680511030d4dddb8be8380
[ "Apache-2.0" ]
null
null
null
from argparse import Namespace from functools import partial from typing import Any import molotov from .formatters import DefaultFormatter from .record_table import RecordTable from .recorder import Recorder from .reporter import Reporter from .scenario import Scenario __all__ = ("Reporter", "register_reporter", "s...
32.268293
99
0.73167
0
0
0
0
651
0.472424
633
0.459361
365
0.264877
e34cc6ddd23022672aee1685f571b987ab87c815
936
py
Python
services/viewcounts/utils.py
RyanFleck/AuxilliaryWebsiteServices
bcaa6689e567fdf9f20f7f4ea84043aa2b6f1378
[ "MIT" ]
1
2020-11-11T20:20:42.000Z
2020-11-11T20:20:42.000Z
services/viewcounts/utils.py
RyanFleck/AuxilliaryWebsiteServices
bcaa6689e567fdf9f20f7f4ea84043aa2b6f1378
[ "MIT" ]
17
2020-11-09T19:04:04.000Z
2022-03-01T18:08:42.000Z
services/viewcounts/utils.py
RyanFleck/AuxilliaryWebsiteServices
bcaa6689e567fdf9f20f7f4ea84043aa2b6f1378
[ "MIT" ]
null
null
null
from slugify import slugify from services.viewcounts.models import PageViewsModel def get_page_views(url: str): """Returns the number of views for a given page object.""" # Pre-processing checks: Client should not pass full or partial URL. if not url.startswith("/"): raise Exception("Partial URL...
28.363636
73
0.672009
0
0
0
0
0
0
0
0
399
0.426282
e34da2a39a4311b17cd41e029318a815155da9e9
9,875
py
Python
bin/gaussian_process_samples.py
ltiao/videos
ba371078d107da5a4c726a957b31a29bb157664d
[ "MIT" ]
null
null
null
bin/gaussian_process_samples.py
ltiao/videos
ba371078d107da5a4c726a957b31a29bb157664d
[ "MIT" ]
null
null
null
bin/gaussian_process_samples.py
ltiao/videos
ba371078d107da5a4c726a957b31a29bb157664d
[ "MIT" ]
null
null
null
import tensorflow as tf import tensorflow_probability as tfp from scipy.stats import expon from videos.linalg import safe_cholesky from manim import * # shortcuts tfd = tfp.distributions kernels = tfp.math.psd_kernels def default_float(): return "float64" class State: def __init__(self, kernel, x_grid, x...
35.142349
127
0.582278
9,602
0.972354
0
0
0
0
0
0
1,071
0.108456
e34e43e9e1aa6f169f4e3ce01d35a03a886c9108
932
py
Python
app/api/v2/models/base_models.py
erick-maina/Questioner_API
0ffad203fd525e22b52e861ce574803a844cc3b3
[ "MIT" ]
null
null
null
app/api/v2/models/base_models.py
erick-maina/Questioner_API
0ffad203fd525e22b52e861ce574803a844cc3b3
[ "MIT" ]
7
2019-01-15T12:23:59.000Z
2019-01-20T17:32:45.000Z
app/api/v2/models/base_models.py
erick-maina/Questioner_API
0ffad203fd525e22b52e861ce574803a844cc3b3
[ "MIT" ]
null
null
null
""" This module defines the base model and associated functions """ from flask import Flask, jsonify from psycopg2.extras import RealDictCursor from ....database import db_con class BaseModels(object): """ This class encapsulates the functions of the base model that will be shared across all other models...
30.064516
69
0.648069
752
0.806867
0
0
0
0
0
0
400
0.429185
e34fb05ebe987705aa9522c54e606db43ebf8086
9,288
py
Python
cvr/core/task.py
john-james-ai/cvr
37e12dff4d46acac64b09ad8ddb8d238d43a5513
[ "BSD-3-Clause" ]
null
null
null
cvr/core/task.py
john-james-ai/cvr
37e12dff4d46acac64b09ad8ddb8d238d43a5513
[ "BSD-3-Clause" ]
null
null
null
cvr/core/task.py
john-james-ai/cvr
37e12dff4d46acac64b09ad8ddb8d238d43a5513
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # ================================================================================================ # # Project : Deep Learning for Conversion Rate Prediction (CVR) # # Version : 0.1.0 ...
33.053381
100
0.463932
5,984
0.644272
0
0
3,531
0.380168
0
0
4,252
0.457795
e34fb4cf8e7da5cda9892155346f681567a85054
304
py
Python
matroids/matroid.py
Aasfga/matroids-library
468f6fdc4b0c0e93346dba7365fae0fc6993f9cf
[ "MIT" ]
null
null
null
matroids/matroid.py
Aasfga/matroids-library
468f6fdc4b0c0e93346dba7365fae0fc6993f9cf
[ "MIT" ]
null
null
null
matroids/matroid.py
Aasfga/matroids-library
468f6fdc4b0c0e93346dba7365fae0fc6993f9cf
[ "MIT" ]
null
null
null
from typing import Set from numpy import ndarray class Matroid: def is_independent(self, s: Set) -> bool: raise NotImplementedError @property def rank(self) -> int: raise NotImplementedError @property def matrix(self) -> ndarray: raise NotImplementedError
19
45
0.671053
252
0.828947
0
0
146
0.480263
0
0
0
0
e350ce9086d7c563b5e1154ba5f38a8024e85d87
779
py
Python
inconnu/traits/traitcommon.py
tiltowait/inconnu
6cca5fed520899d159537701b695c94222d8dc45
[ "MIT" ]
4
2021-09-06T20:18:13.000Z
2022-02-05T17:08:44.000Z
inconnu/traits/traitcommon.py
tiltowait/inconnu
6cca5fed520899d159537701b695c94222d8dc45
[ "MIT" ]
7
2021-09-13T00:46:57.000Z
2022-01-11T06:38:50.000Z
inconnu/traits/traitcommon.py
tiltowait/inconnu
6cca5fed520899d159537701b695c94222d8dc45
[ "MIT" ]
2
2021-11-27T22:24:53.000Z
2022-03-16T21:05:00.000Z
"""traits/traitcommon.py - Common functionality across trait operations.""" import re from ..constants import UNIVERSAL_TRAITS VALID_TRAIT_PATTERN = re.compile(r"^[A-z_]+$") def validate_trait_names(*traits): """ Raises a ValueError if a trait doesn't exist and a SyntaxError if the syntax is bad. ""...
33.869565
100
0.671374
0
0
0
0
0
0
0
0
384
0.49294
e3528306b7bd15d5fdcba5e58d4d0fd69b1294a4
349
py
Python
sps/api/v1/socket/message.py
tantexian/sps-2014-12-4
0cdab186cb3bf148656c4c214a18215643b4969c
[ "Apache-2.0" ]
1
2018-07-27T15:16:14.000Z
2018-07-27T15:16:14.000Z
sps/api/v1/socket/message.py
tantexian/sps-2014-12-4
0cdab186cb3bf148656c4c214a18215643b4969c
[ "Apache-2.0" ]
null
null
null
sps/api/v1/socket/message.py
tantexian/sps-2014-12-4
0cdab186cb3bf148656c4c214a18215643b4969c
[ "Apache-2.0" ]
null
null
null
class MessageType(object): REG = 1 class Message(object): def __init__(self): self.type = None self.body = None def get_type(self): return self.type def get_body(self): return self.body def set_type(self, type): self.type = type def set_body(self, bod...
17.45
29
0.581662
346
0.991404
0
0
0
0
0
0
0
0
e355aa3c3d4c58a325cb59719ca07b7c1a10df4b
2,293
py
Python
docker_ml_templates/simple_batch_model/container/src/tests/test_model.py
MadMedian/ubik
d8dabf0a26db1e35c653b23facb5045f2ae7bf0d
[ "Apache-2.0" ]
null
null
null
docker_ml_templates/simple_batch_model/container/src/tests/test_model.py
MadMedian/ubik
d8dabf0a26db1e35c653b23facb5045f2ae7bf0d
[ "Apache-2.0" ]
null
null
null
docker_ml_templates/simple_batch_model/container/src/tests/test_model.py
MadMedian/ubik
d8dabf0a26db1e35c653b23facb5045f2ae7bf0d
[ "Apache-2.0" ]
null
null
null
import unittest from ..model import RandomForestWithFeatureSelection from sklearn.model_selection import train_test_split import os import numpy as np def create_dataset(n_rows=1000, n_feats=10, pos_loc=2.0, neg_loc=0.0, pos_scale=3.0, neg_scale=3.0, random_state=1): np.random.seed(random_state...
39.534483
113
0.69167
1,663
0.725251
0
0
0
0
0
0
92
0.040122
e357ec80e01c5cb1d929b33f8d9bbb4379d90eae
43,051
py
Python
DataAnalysis.py
ben-dent/Contract-Cheating-Analysis
28999b5ac73dbb6f4a65ef3d8f8dd4db677c42df
[ "MIT" ]
null
null
null
DataAnalysis.py
ben-dent/Contract-Cheating-Analysis
28999b5ac73dbb6f4a65ef3d8f8dd4db677c42df
[ "MIT" ]
null
null
null
DataAnalysis.py
ben-dent/Contract-Cheating-Analysis
28999b5ac73dbb6f4a65ef3d8f8dd4db677c42df
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt; plt.rcdefaults() import csv import sqlite3 as lite from calendar import monthrange from datetime import datetime, date, timedelta from datetimerange import DateTimeRange import numpy as np import pycountry_convert as pc from dateutil.relativedelta import relativedelta from forex_pytho...
31.016571
184
0.551207
0
0
126
0.002927
0
0
0
0
8,281
0.192353
e359de552a30d24e6371b5e1ad922405353576ab
1,733
py
Python
deploy_flask_plotly/app.py
mohamedsaadmoustafa/Arabic_Dialect_Classification
a13e92ddaa8fda5afcc40d1ce97946174f9a4674
[ "BSD-3-Clause" ]
null
null
null
deploy_flask_plotly/app.py
mohamedsaadmoustafa/Arabic_Dialect_Classification
a13e92ddaa8fda5afcc40d1ce97946174f9a4674
[ "BSD-3-Clause" ]
null
null
null
deploy_flask_plotly/app.py
mohamedsaadmoustafa/Arabic_Dialect_Classification
a13e92ddaa8fda5afcc40d1ce97946174f9a4674
[ "BSD-3-Clause" ]
1
2022-03-14T19:41:57.000Z
2022-03-14T19:41:57.000Z
from flask import Flask, render_template, request, jsonify import numpy as np import pickle import sys import json import re app = Flask(__name__) app.config['JSON_AS_ASCII'] = False target_names = [ 'AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'OM','PL', 'QA', ...
27.507937
112
0.562031
0
0
0
0
555
0.289666
0
0
731
0.381524