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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
548be68a4be4ce8e389208606dd772dad630cd84 | 4,947 | py | Python | kanka-manager/test.py | davidbradlycurtis/kanka-manager | f44f814c6d9433a40cb1edc558baac12f26b31ad | [
"MIT"
] | null | null | null | kanka-manager/test.py | davidbradlycurtis/kanka-manager | f44f814c6d9433a40cb1edc558baac12f26b31ad | [
"MIT"
] | null | null | null | kanka-manager/test.py | davidbradlycurtis/kanka-manager | f44f814c6d9433a40cb1edc558baac12f26b31ad | [
"MIT"
] | null | null | null | import requests
import yaml
import json
import os
import sys
import logging
from kankaclient.client import KankaClient
logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s')
LOGGER = logging.getLogger('KankaManagement')
class SpaceDumper(yaml.SafeDumper):
# HACK: insert blank lines between top-level... | 46.233645 | 1,002 | 0.686275 | 410 | 0.082879 | 0 | 0 | 0 | 0 | 0 | 0 | 3,410 | 0.689307 |
548e7df7f685de5e09edd46875612218fa28a72f | 1,788 | py | Python | setup.py | m-aciek/python-sdk | ab447b58ae5f45ce2d5beb4bfc4d7063e42b4311 | [
"MIT"
] | null | null | null | setup.py | m-aciek/python-sdk | ab447b58ae5f45ce2d5beb4bfc4d7063e42b4311 | [
"MIT"
] | null | null | null | setup.py | m-aciek/python-sdk | ab447b58ae5f45ce2d5beb4bfc4d7063e42b4311 | [
"MIT"
] | 2 | 2018-03-30T10:10:56.000Z | 2018-05-25T09:27:36.000Z | #!/usr/bin/env python
import os
import re
import codecs
from setuptools import setup, find_packages
ground = os.path.abspath(os.path.dirname(__file__))
def read(filename):
with codecs.open(os.path.join(ground, filename), 'rb', 'utf-8') as file:
return file.read()
metadata = read(os.path.join(ground, '... | 33.735849 | 114 | 0.636465 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 666 | 0.372483 |
548fac7398ada6cb536131133e9e9aa0af68eb01 | 7,850 | py | Python | big-picture-spectra/big-picture-spectra.py | aibhleog/plotting-playground | 84c19698e659de97c263362c7440faa3f873476e | [
"MIT"
] | null | null | null | big-picture-spectra/big-picture-spectra.py | aibhleog/plotting-playground | 84c19698e659de97c263362c7440faa3f873476e | [
"MIT"
] | null | null | null | big-picture-spectra/big-picture-spectra.py | aibhleog/plotting-playground | 84c19698e659de97c263362c7440faa3f873476e | [
"MIT"
] | null | null | null | '''
This script makes an image very similar to Figure 2 of Hutchison et al. 2019 (https://arxiv.org/pdf/1905.08812.pdf). Undoubtedly, there are likely simpler ways to make this figure -- this is how I chose to code it up.
Because the figure in the paper uses some proprietary data, the code below will generate fake dat... | 39.25 | 217 | 0.707771 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,276 | 0.417325 |
54902b07fce1f2bf2bcf246ab039ab703861aaf3 | 8,517 | py | Python | pesummary/core/plots/corner.py | pesummary/pesummary | 99e3c450ecbcaf5a23564d329bdf6e0080f6f2a8 | [
"MIT"
] | 1 | 2021-08-03T05:58:20.000Z | 2021-08-03T05:58:20.000Z | pesummary/core/plots/corner.py | pesummary/pesummary | 99e3c450ecbcaf5a23564d329bdf6e0080f6f2a8 | [
"MIT"
] | 1 | 2020-06-13T13:29:35.000Z | 2020-06-15T12:45:04.000Z | pesummary/core/plots/corner.py | pesummary/pesummary | 99e3c450ecbcaf5a23564d329bdf6e0080f6f2a8 | [
"MIT"
] | 3 | 2021-07-08T08:31:28.000Z | 2022-03-31T14:08:58.000Z | # Licensed under an MIT style license -- see LICENSE.md
import numpy as np
from scipy.stats import gaussian_kde
from matplotlib.colors import LinearSegmentedColormap, colorConverter
import corner
__author__ = ["Charlie Hoy <[email protected]>"]
def _set_xlim(new_fig, ax, new_xlim):
if new_fig:
return... | 36.242553 | 80 | 0.589996 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,791 | 0.327698 |
549070123669b37704f083b9611ce10258a9d787 | 2,240 | py | Python | tests/test_tokenizer.py | mkartawijaya/dango | 9cc9d498c4eac851d6baa96ced528c1d91a87216 | [
"BSD-3-Clause"
] | null | null | null | tests/test_tokenizer.py | mkartawijaya/dango | 9cc9d498c4eac851d6baa96ced528c1d91a87216 | [
"BSD-3-Clause"
] | null | null | null | tests/test_tokenizer.py | mkartawijaya/dango | 9cc9d498c4eac851d6baa96ced528c1d91a87216 | [
"BSD-3-Clause"
] | null | null | null | from typing import List
import pytest
import dango
def test_empty_phrase():
assert dango.tokenize('') == [], 'an empty phrase contains no tokens'
@pytest.mark.parametrize('expected', [
# inflected verbs should be kept as one word
['昨日', '映画', 'を', '見ました'],
['私', 'は', '本', 'を', '読む'],
['私', 'は'... | 36.129032 | 82 | 0.525446 | 0 | 0 | 0 | 0 | 2,500 | 0.83724 | 0 | 0 | 1,969 | 0.659411 |
5490a142b6dfe4a57805f7133f0d2ea9a4a1539c | 2,829 | py | Python | neutron_lib/db/sqlalchemytypes.py | rolaya/neutron-lib | 41a2226dfb93a0e6138de260f5126fa7c954178c | [
"Apache-2.0"
] | null | null | null | neutron_lib/db/sqlalchemytypes.py | rolaya/neutron-lib | 41a2226dfb93a0e6138de260f5126fa7c954178c | [
"Apache-2.0"
] | null | null | null | neutron_lib/db/sqlalchemytypes.py | rolaya/neutron-lib | 41a2226dfb93a0e6138de260f5126fa7c954178c | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 33.678571 | 78 | 0.607282 | 2,135 | 0.754684 | 0 | 0 | 0 | 0 | 0 | 0 | 1,083 | 0.382821 |
5491d3f5c105c58d0e54d67614d6a8faed7a1e75 | 256 | py | Python | Algorithm/Array/217. Contains Duplicate.py | smsubham/Data-Structure-Algorithms-Questions | 45da68231907068ef4e4a0444ffdac69b337fa7c | [
"Apache-2.0"
] | null | null | null | Algorithm/Array/217. Contains Duplicate.py | smsubham/Data-Structure-Algorithms-Questions | 45da68231907068ef4e4a0444ffdac69b337fa7c | [
"Apache-2.0"
] | null | null | null | Algorithm/Array/217. Contains Duplicate.py | smsubham/Data-Structure-Algorithms-Questions | 45da68231907068ef4e4a0444ffdac69b337fa7c | [
"Apache-2.0"
] | null | null | null | # https://leetcode.com/problems/contains-duplicate/
# We are forming whole set always which isn't optimal though time complexity is O(n).
class Solution:
def containsDuplicate(self, nums: List[int]) -> bool:
return len(nums) != len(set(nums)) | 36.571429 | 85 | 0.710938 | 116 | 0.453125 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.53125 |
54940d248d43c1725fcc0fa869fadb3c0a38e2a1 | 1,488 | py | Python | script/check_conf_whitelist.py | Kaiyuan-Zhang/Gravel-public | ff3f7dc7d5ac63d91e26f03ae4e49a7451c6cb22 | [
"MIT"
] | 4 | 2020-04-11T19:11:25.000Z | 2021-02-06T10:46:39.000Z | script/check_conf_whitelist.py | Kaiyuan-Zhang/Gravel-public | ff3f7dc7d5ac63d91e26f03ae4e49a7451c6cb22 | [
"MIT"
] | 1 | 2021-11-01T20:19:23.000Z | 2021-11-01T20:19:43.000Z | script/check_conf_whitelist.py | Kaiyuan-Zhang/Gravel-public | ff3f7dc7d5ac63d91e26f03ae4e49a7451c6cb22 | [
"MIT"
] | 1 | 2020-04-18T03:36:03.000Z | 2020-04-18T03:36:03.000Z | import sys
import os
if __name__ == '__main__':
if len(sys.argv) < 3:
print("Usage: {} <conf-list> <conf-dir> [white-list-files]".format(sys.argv[0]))
sys.exit(-1)
conf_list_file = sys.argv[1]
conf_dir = sys.argv[2]
conf_list = {}
white_list_files = sys.argv[3:]
ele_white_list ... | 31.659574 | 93 | 0.536962 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.067876 |
54944c0a9b4c84df76cbc3d9fc9c516394ab50a2 | 4,383 | py | Python | models/joint_inference_model.py | pnsuau/neurips18_hierchical_image_manipulation | 712ff8008f8d4c38626bd556fc44adfbcde8fa28 | [
"MIT"
] | null | null | null | models/joint_inference_model.py | pnsuau/neurips18_hierchical_image_manipulation | 712ff8008f8d4c38626bd556fc44adfbcde8fa28 | [
"MIT"
] | null | null | null | models/joint_inference_model.py | pnsuau/neurips18_hierchical_image_manipulation | 712ff8008f8d4c38626bd556fc44adfbcde8fa28 | [
"MIT"
] | null | null | null | import torch
from torch.autograd import Variable
from util.util import *
from util.data_util import *
import numpy as np
from PIL import Image
from data.base_dataset import get_transform_params, get_raw_transform_fn, \
get_transform_fn, get_soft_bbox, get_masked_image
from util.data_util i... | 42.553398 | 94 | 0.620123 | 4,029 | 0.919233 | 0 | 0 | 0 | 0 | 0 | 0 | 689 | 0.157198 |
549626fa07a7cc95e2aa2428a235bbc1adf539d5 | 2,102 | py | Python | solutions/051_n_queens.py | abawchen/leetcode | 41d3b172a7694a46a860fbcb0565a3acccd000f2 | [
"MIT"
] | null | null | null | solutions/051_n_queens.py | abawchen/leetcode | 41d3b172a7694a46a860fbcb0565a3acccd000f2 | [
"MIT"
] | null | null | null | solutions/051_n_queens.py | abawchen/leetcode | 41d3b172a7694a46a860fbcb0565a3acccd000f2 | [
"MIT"
] | null | null | null | class Solution:
# @return a list of lists of string
def solveNQueens(self, n):
board = [[1 for i in xrange(n)] for i in xrange(n)]
rs = range(n)
self.queens = []
self.directions = [[(-i, i), (i, i)] for i in xrange(1, n)]
self.recursive(board, n, 0, rs)
return sel... | 28.794521 | 108 | 0.471456 | 1,479 | 0.703616 | 0 | 0 | 0 | 0 | 0 | 0 | 220 | 0.104662 |
5497a6164438dad00ba23076949d1e3d84fd4868 | 3,812 | py | Python | tests/v2/parties/test_parties.py | jama5262/Politico | 7292f604723cf115004851b9767688cf1a956bb1 | [
"MIT"
] | null | null | null | tests/v2/parties/test_parties.py | jama5262/Politico | 7292f604723cf115004851b9767688cf1a956bb1 | [
"MIT"
] | 2 | 2019-02-19T12:43:32.000Z | 2019-03-04T16:15:38.000Z | tests/v2/parties/test_parties.py | jama5262/Politico | 7292f604723cf115004851b9767688cf1a956bb1 | [
"MIT"
] | null | null | null | import unittest
import json
from app import createApp
from app.api.database.migrations.migrations import migrate
class TestParties(unittest.TestCase):
def setUp(self):
self.app = createApp("testing")
self.client = self.app.test_client()
self.endpoint = "/api/v2/parties"
self.partyI... | 36.304762 | 128 | 0.635887 | 3,696 | 0.96957 | 0 | 0 | 0 | 0 | 0 | 0 | 591 | 0.155037 |
5497dc6a086f32d3001f4b0c68ed070534942148 | 179 | py | Python | tests/_compat.py | lanius/hunk | bba04d9fb7f37c378ea41bc934c3a02401e34fe6 | [
"MIT"
] | 1 | 2015-04-03T08:35:41.000Z | 2015-04-03T08:35:41.000Z | tests/_compat.py | lanius/hunk | bba04d9fb7f37c378ea41bc934c3a02401e34fe6 | [
"MIT"
] | null | null | null | tests/_compat.py | lanius/hunk | bba04d9fb7f37c378ea41bc934c3a02401e34fe6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
PY2 = sys.version_info[0] == 2
if not PY2:
json_text = lambda rv: rv.data.decode(rv.charset)
else:
json_text = lambda rv: rv.data
| 12.785714 | 53 | 0.625698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.128492 |
549905ffeca6d09d599080cd848b9e365ea51dd3 | 763 | py | Python | oriskami/test/resources/test_router_data.py | oriskami/oriskami-python | 2b0d81f713a9149977907183c67eec136d49ee8c | [
"MIT"
] | 4 | 2017-05-28T19:37:31.000Z | 2017-06-13T11:34:26.000Z | oriskami/test/resources/test_router_data.py | ubivar/ubivar-python | 2b0d81f713a9149977907183c67eec136d49ee8c | [
"MIT"
] | null | null | null | oriskami/test/resources/test_router_data.py | ubivar/ubivar-python | 2b0d81f713a9149977907183c67eec136d49ee8c | [
"MIT"
] | null | null | null | import os
import oriskami
import warnings
from oriskami.test.helper import (OriskamiTestCase)
class OriskamiAPIResourcesTests(OriskamiTestCase):
def test_router_data_update(self):
response = oriskami.RouterData.update("0", is_active="true")
self.assertTrue(hasattr(response.data, "__iter__"))
... | 38.15 | 69 | 0.714286 | 667 | 0.874181 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.082569 |
54990a8312bff53b0e8f90e7a2361334c451c834 | 1,625 | py | Python | osbot_aws/helpers/IAM_Policy.py | artem7902/OSBot-AWS | 4b676b8323f18d3d9809d41263f3a71745ec2828 | [
"Apache-2.0"
] | null | null | null | osbot_aws/helpers/IAM_Policy.py | artem7902/OSBot-AWS | 4b676b8323f18d3d9809d41263f3a71745ec2828 | [
"Apache-2.0"
] | null | null | null | osbot_aws/helpers/IAM_Policy.py | artem7902/OSBot-AWS | 4b676b8323f18d3d9809d41263f3a71745ec2828 | [
"Apache-2.0"
] | null | null | null | from osbot_aws.apis.IAM import IAM
class IAM_Policy:
def __init__(self, policy_name=None, policy_path=None):
self.iam = IAM()
self.policy_name = policy_name
self.version = "2012-10-17"
self.statements = []
self.policy_path = policy_path
self.account_id ... | 36.111111 | 123 | 0.649846 | 1,586 | 0.976 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.104 |
5499335d4a53f32fd4ee6cd0b97b91f92adeec0e | 3,959 | py | Python | data_visualization.py | vashineyu/Common_tools | b933660e007ae104910c975d074523012bb7b58e | [
"Apache-2.0"
] | 1 | 2018-10-26T09:33:26.000Z | 2018-10-26T09:33:26.000Z | data_visualization.py | vashineyu/Common_tools | b933660e007ae104910c975d074523012bb7b58e | [
"Apache-2.0"
] | null | null | null | data_visualization.py | vashineyu/Common_tools | b933660e007ae104910c975d074523012bb7b58e | [
"Apache-2.0"
] | null | null | null | # Visualization function
import numpy as np
import matplotlib.pyplot as plt
from math import ceil
from PIL import Image
from scipy.ndimage.filters import gaussian_filter
def img_combine(img, ncols=5, size=1, path=False):
"""
Draw the images with array
img: image array to plot - size = n x im_w x im_h x 3
... | 34.12931 | 113 | 0.602172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,170 | 0.295529 |
5499a0762a3bf6035430062da7d86593750133d8 | 2,037 | py | Python | src/CIA_History.py | Larz60p/WorldFactBook | c2edb4c8b0b9edab4a41b7384aade6d1d8ce6128 | [
"MIT"
] | 1 | 2019-03-29T03:33:43.000Z | 2019-03-29T03:33:43.000Z | src/CIA_History.py | Larz60p/WorldFactBook | c2edb4c8b0b9edab4a41b7384aade6d1d8ce6128 | [
"MIT"
] | null | null | null | src/CIA_History.py | Larz60p/WorldFactBook | c2edb4c8b0b9edab4a41b7384aade6d1d8ce6128 | [
"MIT"
] | null | null | null | # copyright (c) 2018 Larz60+
from lxml import html
import ScraperPaths
import CIA_ScanTools
import GetPage
import os
import json
import sys
from bs4 import BeautifulSoup
class CIA_History:
def __init__(self):
self.spath = ScraperPaths.ScraperPaths()
self.gp = GetPage.GetPage()
self.getpag... | 31.828125 | 103 | 0.522337 | 1,817 | 0.891998 | 0 | 0 | 0 | 0 | 0 | 0 | 225 | 0.110457 |
549b59fe62af96d3a0abf31ed9194bf5c91e167c | 301 | py | Python | tests/thumbnail_tests/urls.py | roojoom/sorl-thumbnail | f10fd48f8b33efe4f468ece056fd545be796bf72 | [
"BSD-3-Clause"
] | 2 | 2019-04-09T16:07:23.000Z | 2019-04-09T16:07:26.000Z | tests/thumbnail_tests/urls.py | roojoom/sorl-thumbnail | f10fd48f8b33efe4f468ece056fd545be796bf72 | [
"BSD-3-Clause"
] | null | null | null | tests/thumbnail_tests/urls.py | roojoom/sorl-thumbnail | f10fd48f8b33efe4f468ece056fd545be796bf72 | [
"BSD-3-Clause"
] | 1 | 2020-02-18T13:00:55.000Z | 2020-02-18T13:00:55.000Z | from django.conf.urls import patterns
from django.conf import settings
urlpatterns = patterns(
'',
(r'^media/(?P<path>.+)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
(r'^(.*\.html)$', 'thumbnail_tests.views.direct_to_template'),
)
| 27.363636 | 67 | 0.671096 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.458472 |
549b88a77a4a74ecdad5b7ba7eb748aea0547a53 | 822 | py | Python | data/mapper.py | GhostBadger/Kurien_G_DataViz_Fall2020 | 817f1a352027d4d81db0260393912e78a2a5e596 | [
"MIT"
] | null | null | null | data/mapper.py | GhostBadger/Kurien_G_DataViz_Fall2020 | 817f1a352027d4d81db0260393912e78a2a5e596 | [
"MIT"
] | 1 | 2020-12-13T03:46:44.000Z | 2020-12-13T03:46:44.000Z | data/mapper.py | GhostBadger/Kurien_G_DataViz_Fall2020 | 817f1a352027d4d81db0260393912e78a2a5e596 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
hfont = {'fontname':'Lato'}
#draw a simple line chart showing population grown over the last 115 years
years = [1900, 1950, 1955, 1960, 1965, 1970, 1975, 1980, 1985, 1990, 1995, 2000, 2005, 2010, 2015]
pops = [1.6, 2.5, 2.6, 3.0, 3.3, 3.6, 4.2, 4.4, 4.8, 5.3, 5.7, 6.1, 6.5, 6.9, 7.3]... | 31.615385 | 98 | 0.69708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 446 | 0.542579 |
549b92a869131a02e61a4b0496d5ecab3305509e | 28,057 | py | Python | classification/train_classifier_tf.py | dnarqq/WildHack | 4fb9e4545cb47a4283ebc1dec955c0817b1664c0 | [
"MIT"
] | 402 | 2019-05-08T17:28:25.000Z | 2022-03-27T19:30:07.000Z | classification/train_classifier_tf.py | dnarqq/WildHack | 4fb9e4545cb47a4283ebc1dec955c0817b1664c0 | [
"MIT"
] | 72 | 2019-05-07T18:33:32.000Z | 2022-03-10T07:48:39.000Z | classification/train_classifier_tf.py | dnarqq/WildHack | 4fb9e4545cb47a4283ebc1dec955c0817b1664c0 | [
"MIT"
] | 162 | 2019-05-18T15:45:27.000Z | 2022-03-25T20:17:45.000Z | r"""Train an EfficientNet classifier.
Currently implementation of multi-label multi-class classification is
non-functional.
During training, start tensorboard from within the classification/ directory:
tensorboard --logdir run --bind_all --samples_per_plugin scalars=0,images=0
Example usage:
python train_cla... | 40.13877 | 116 | 0.641729 | 0 | 0 | 0 | 0 | 858 | 0.030581 | 0 | 0 | 9,187 | 0.327441 |
549bb5431eeb75a8dbdf100c69a7b7af3cb1061c | 4,704 | py | Python | pyreach/impl/constraints_impl_test.py | google-research/pyreach | f91753ce7a26e77e122eb02a9fdd5a1ce3ce0159 | [
"Apache-2.0"
] | 13 | 2021-09-01T01:10:22.000Z | 2022-03-05T10:01:52.000Z | pyreach/impl/constraints_impl_test.py | google-research/pyreach | f91753ce7a26e77e122eb02a9fdd5a1ce3ce0159 | [
"Apache-2.0"
] | null | null | null | pyreach/impl/constraints_impl_test.py | google-research/pyreach | f91753ce7a26e77e122eb02a9fdd5a1ce3ce0159 | [
"Apache-2.0"
] | 6 | 2021-09-20T21:17:53.000Z | 2022-03-14T18:42:48.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 39.864407 | 74 | 0.688776 | 3,846 | 0.817602 | 0 | 0 | 0 | 0 | 0 | 0 | 774 | 0.164541 |
549d785cbbd7f0e2ec80896ebc16b20cd8e0ba82 | 3,400 | py | Python | qplan/parse.py | mackstann/qplaniso | 97c4fbeeb529dfef0778cedc3e79087f6a87f5c4 | [
"CC0-1.0"
] | null | null | null | qplan/parse.py | mackstann/qplaniso | 97c4fbeeb529dfef0778cedc3e79087f6a87f5c4 | [
"CC0-1.0"
] | null | null | null | qplan/parse.py | mackstann/qplaniso | 97c4fbeeb529dfef0778cedc3e79087f6a87f5c4 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
import itertools
class Node:
def __init__(self, node_type, width, rows, times):
self.node_type = node_type
self.width = width
self.rows = rows
self.times = times
self.inputs = []
self.parent = None
def as_dict(self):
return {
... | 26.5625 | 98 | 0.523529 | 476 | 0.14 | 0 | 0 | 0 | 0 | 0 | 0 | 258 | 0.075882 |
549e3c5ec51f517db74f9b45d00df6b1a26198eb | 2,397 | py | Python | 10054 - The Necklace/main.py | Shree-Gillorkar/uva-onlinejudge-solutions | df64f5c3a136827b5ca7871df1cf8aafadcf5c9b | [
"MIT"
] | 24 | 2017-10-15T04:04:55.000Z | 2022-01-31T17:14:29.000Z | 10054 - The Necklace/main.py | ashishrana080699/uva-onlinejudge-solutions | d2d0a58e53e3d9acf6d20e56a40900423ae705c4 | [
"MIT"
] | 1 | 2019-07-11T04:22:55.000Z | 2019-07-14T19:34:41.000Z | 10054 - The Necklace/main.py | ashishrana080699/uva-onlinejudge-solutions | d2d0a58e53e3d9acf6d20e56a40900423ae705c4 | [
"MIT"
] | 27 | 2017-01-06T17:33:57.000Z | 2021-11-25T00:07:54.000Z | from sys import stdin
from collections import defaultdict, deque
MAX_COLORS = 51
def load_num():
return int(stdin.readline())
def load_pair():
return tuple(map(int, stdin.readline().split()))
def load_case():
nbeads = load_num()
return [load_pair() for b in range(nbeads)]
def build_necklace(beads... | 27.238636 | 79 | 0.553191 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 496 | 0.206925 |
549ee02e71d944702ec6c3b3ab3e03cf388c6552 | 458 | py | Python | tests/test_eeg.py | y1ngyang/NeuroKit.py | 867655f84bf210626649bca72258af6a2b5a2791 | [
"MIT"
] | null | null | null | tests/test_eeg.py | y1ngyang/NeuroKit.py | 867655f84bf210626649bca72258af6a2b5a2791 | [
"MIT"
] | null | null | null | tests/test_eeg.py | y1ngyang/NeuroKit.py | 867655f84bf210626649bca72258af6a2b5a2791 | [
"MIT"
] | null | null | null | import pytest
import doctest
import os
import numpy as np
import pandas as pd
import neurokit as nk
run_tests_in_local = False
#==============================================================================
# data
#==============================================================================
#def test_read_acqknow... | 16.962963 | 79 | 0.458515 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 258 | 0.563319 |
549fb62cea23b9b1c82de165b05b9e48e6855b9f | 231,371 | py | Python | tests/semantics/models.py | dnikolay-ebc/FiLiP | 9a84979da8dff4523cb91e40869070bd02aa91fe | [
"BSD-3-Clause"
] | 6 | 2021-11-21T21:57:38.000Z | 2022-02-22T08:20:30.000Z | tests/semantics/models.py | RWTH-EBC/FiLiP | e294c5ef94b2b6ad9611316e50b5c550bcd77c1b | [
"BSD-3-Clause"
] | 83 | 2021-04-08T18:34:20.000Z | 2022-03-30T12:18:32.000Z | tests/semantics/models.py | dnikolay-ebc/FiLiP | 9a84979da8dff4523cb91e40869070bd02aa91fe | [
"BSD-3-Clause"
] | 5 | 2021-10-04T08:39:21.000Z | 2022-03-30T07:30:57.000Z | """
Autogenerated Models for the vocabulary described by the ontologies:
http://www.semanticweb.org/redin/ontologies/2020/11/untitled-ontology-25 (ParsingTesterOntology)
https://w3id.org/saref (saref.ttl)
"""
from enum import Enum
from typing import Dict, Union, List
from filip.semantics.semantics_models import\
Se... | 29.788979 | 165 | 0.73243 | 222,942 | 0.963569 | 0 | 0 | 0 | 0 | 0 | 0 | 88,913 | 0.384288 |
549fd848dd75d3c337cc6b1655249d58340ef912 | 2,744 | py | Python | plotting/trackTurnOn.py | will-fawcett/trackerSW | fc097b97539d0b40a15e1d6e112f4048cb4122b4 | [
"MIT"
] | null | null | null | plotting/trackTurnOn.py | will-fawcett/trackerSW | fc097b97539d0b40a15e1d6e112f4048cb4122b4 | [
"MIT"
] | null | null | null | plotting/trackTurnOn.py | will-fawcett/trackerSW | fc097b97539d0b40a15e1d6e112f4048cb4122b4 | [
"MIT"
] | null | null | null |
from utils import prepareLegend
from colours import colours
from ROOT import *
gROOT.SetBatch(1)
gStyle.SetPadLeftMargin(0.15) # increase space for left margin
gStyle.SetPadBottomMargin(0.15) # increase space for left margin
gStyle.SetGridStyle(3)
gStyle.SetGridColor(kGray)
gStyle.SetPadTickX(1) # add tics on top ... | 27.717172 | 94 | 0.623178 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 889 | 0.32398 |
54a054f1ed42ee815b1ac8ae21d88b15ea91f8bb | 154 | py | Python | pybo/inits/__init__.py | hfukada/pybo | 3be57adad901fcd8d45b8ee2af7c6032ab47611d | [
"BSD-2-Clause"
] | 115 | 2015-01-21T21:31:22.000Z | 2021-08-08T17:10:16.000Z | pybo/inits/__init__.py | hfukada/pybo | 3be57adad901fcd8d45b8ee2af7c6032ab47611d | [
"BSD-2-Clause"
] | 5 | 2016-02-24T16:00:01.000Z | 2020-12-21T00:28:30.000Z | pybo/inits/__init__.py | hfukada/pybo | 3be57adad901fcd8d45b8ee2af7c6032ab47611d | [
"BSD-2-Clause"
] | 35 | 2015-02-27T15:27:36.000Z | 2020-08-19T07:43:53.000Z | """
Initialization methods.
"""
# pylint: disable=wildcard-import
from .methods import *
from . import methods
__all__ = []
__all__ += methods.__all__
| 12.833333 | 33 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.415584 |
54a07034e31ea393994499d210b41085f8ae28cb | 2,362 | py | Python | src/Process/Process.py | mauriciocarvalho01/pln_api | 06743f1ae9e084ad15f1c91b32eb3719344f4a4b | [
"MIT"
] | 1 | 2021-12-14T19:10:44.000Z | 2021-12-14T19:10:44.000Z | src/Process/Process.py | mauriciocarvalho01/pln_api | 06743f1ae9e084ad15f1c91b32eb3719344f4a4b | [
"MIT"
] | null | null | null | src/Process/Process.py | mauriciocarvalho01/pln_api | 06743f1ae9e084ad15f1c91b32eb3719344f4a4b | [
"MIT"
] | null | null | null | import spacy
from nltk.tokenize import word_tokenize
from nltk.tokenize import sent_tokenize
from nltk.corpus import stopwords
from nltk.probability import FreqDist
from string import punctuation
from tqdm import tqdm
from rank_bm25 import BM25Okapi
import time
from collections import defaultdict
from heapq import nlar... | 34.735294 | 148 | 0.600762 | 1,735 | 0.732686 | 0 | 0 | 0 | 0 | 0 | 0 | 622 | 0.262669 |
54a10b062decccd624d8a14f46543d84c61a99d9 | 176 | py | Python | project_e/jobs/apps.py | ElectricFleming/project-e | cf05d2a835a09555e3dba5813d635d329684a71c | [
"bzip2-1.0.6"
] | null | null | null | project_e/jobs/apps.py | ElectricFleming/project-e | cf05d2a835a09555e3dba5813d635d329684a71c | [
"bzip2-1.0.6"
] | 3 | 2020-01-30T03:47:26.000Z | 2021-05-11T00:58:08.000Z | project_e/jobs/apps.py | effortless-electric/project-e | ae4e8415204319999ee2ecac248e2504ec1fff63 | [
"bzip2-1.0.6"
] | 1 | 2019-12-27T22:45:45.000Z | 2019-12-27T22:45:45.000Z | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class JobsConfig(AppConfig):
name = 'project_e.jobs'
verbose_name = _("Jobs")
| 25.142857 | 54 | 0.761364 | 85 | 0.482955 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.125 |
54a29568d20a9d3cd8819302aa5a4f6675a50ec6 | 3,080 | py | Python | Final_plot/request_type(pie).py | ashutoshbhadke/weblog-visualizer | 7fd10535fe0909291da194776b053eca1640b1e9 | [
"MIT"
] | null | null | null | Final_plot/request_type(pie).py | ashutoshbhadke/weblog-visualizer | 7fd10535fe0909291da194776b053eca1640b1e9 | [
"MIT"
] | null | null | null | Final_plot/request_type(pie).py | ashutoshbhadke/weblog-visualizer | 7fd10535fe0909291da194776b053eca1640b1e9 | [
"MIT"
] | null | null | null | import csv
from pylab import *
import matplotlib.pyplot as plt
count1=[]
req_data=[]
def get_request (str):
f=open('weblog.txt','r')
pdata=[]
req_data1=[]
data=csv.reader(f,delimiter=' ')
for row in data:
row[3]=row[3][1:]
row[3]=... | 26.101695 | 91 | 0.500974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,516 | 0.492208 |
54a40265eb0edbb4261d2c562a057abf3c76c839 | 5,979 | py | Python | pandas/lib/excelRW.py | philip-shen/note_python | db0ad84af25464a22ac52e348960107c81e74a56 | [
"MIT"
] | null | null | null | pandas/lib/excelRW.py | philip-shen/note_python | db0ad84af25464a22ac52e348960107c81e74a56 | [
"MIT"
] | 11 | 2021-02-08T20:45:23.000Z | 2022-03-12T01:00:11.000Z | pandas/lib/excelRW.py | philip-shen/note_python | db0ad84af25464a22ac52e348960107c81e74a56 | [
"MIT"
] | null | null | null | ## 2018/08/17 Initial
## 2018/08/18 Add CSV format
## 2018/08/23 Add def get_stockidxname_SeymourExcel(),def get_stockidx_SeymourExcel()
## def get_all_stockidx_SeymourExcel() from test_crawl.py
## 2018/09/06 Add value of column 'PBR' in def readExcel()
## 2018/10/27 Add exception handling in def readEx... | 40.398649 | 118 | 0.630373 | 5,714 | 0.901688 | 0 | 0 | 0 | 0 | 0 | 0 | 2,215 | 0.349534 |
54a4ba9c11d3248dceffbbc60702b2f7f2e73b4a | 3,950 | py | Python | launchpad2github.py | mleinart/launchpad2github | faade979a1f209dc1d25aa82a32f6342dbfe35b3 | [
"MIT"
] | 2 | 2016-10-07T08:55:40.000Z | 2017-08-30T16:43:57.000Z | launchpad2github.py | mleinart/launchpad2github | faade979a1f209dc1d25aa82a32f6342dbfe35b3 | [
"MIT"
] | null | null | null | launchpad2github.py | mleinart/launchpad2github | faade979a1f209dc1d25aa82a32f6342dbfe35b3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import time
from getpass import getpass
from optparse import OptionParser
from termcolor import colored
from launchpadlib.launchpad import Launchpad
from github3 import login as github_login
from github3 import GitHubError
ACTIVE_STATUSES = [
"New",
"Confirmed",
"Tria... | 27.816901 | 100 | 0.679241 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,018 | 0.257722 |
54a4f81f72eecfec1f015beea32efd5b9edfa7de | 168 | py | Python | Curso-em-video-Python3-mundo1/ex024.py | bernardombraga/Solucoes-exercicios-cursos-gratuitos | 0347a8325443fce84e0a753c96f523a22858537b | [
"MIT"
] | null | null | null | Curso-em-video-Python3-mundo1/ex024.py | bernardombraga/Solucoes-exercicios-cursos-gratuitos | 0347a8325443fce84e0a753c96f523a22858537b | [
"MIT"
] | null | null | null | Curso-em-video-Python3-mundo1/ex024.py | bernardombraga/Solucoes-exercicios-cursos-gratuitos | 0347a8325443fce84e0a753c96f523a22858537b | [
"MIT"
] | null | null | null | entrada = str(input('Em que cidade você nasceu? '))
cidade = entrada.strip().lower()
partido = cidade.split()
pnome = partido[0]
santo = (pnome == 'santo')
print(santo) | 28 | 51 | 0.684524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.218935 |
54a68c80a2f5f81aaa165bc135be5a9f31aa99a1 | 8,754 | py | Python | tests/unit/test_parameters/test_lead_acid_parameters.py | jatin837/PyBaMM | 837421bd5b251647a257c23540ceb2908a225bdb | [
"BSD-3-Clause"
] | 1 | 2021-04-25T09:53:40.000Z | 2021-04-25T09:53:40.000Z | tests/unit/test_parameters/test_lead_acid_parameters.py | jatin837/PyBaMM | 837421bd5b251647a257c23540ceb2908a225bdb | [
"BSD-3-Clause"
] | null | null | null | tests/unit/test_parameters/test_lead_acid_parameters.py | jatin837/PyBaMM | 837421bd5b251647a257c23540ceb2908a225bdb | [
"BSD-3-Clause"
] | null | null | null | #
# Test for the standard lead acid parameters
#
import pybamm
from tests import get_discretisation_for_testing
import unittest
class TestStandardParametersLeadAcid(unittest.TestCase):
def test_scipy_constants(self):
param = pybamm.LeadAcidParameters()
self.assertAlmostEqual(param.R.evaluate(), 8... | 43.77 | 85 | 0.664154 | 8,431 | 0.963103 | 0 | 0 | 0 | 0 | 0 | 0 | 1,759 | 0.200937 |
54a9266c033c65ceff0e6381eb549dcffd4ece05 | 890 | py | Python | firmware/temphumid/timeset.py | schizobovine/unicorder | 3165922c2662b1bd2c5ab1691c89e2af5ee185e7 | [
"CC-BY-4.0"
] | null | null | null | firmware/temphumid/timeset.py | schizobovine/unicorder | 3165922c2662b1bd2c5ab1691c89e2af5ee185e7 | [
"CC-BY-4.0"
] | null | null | null | firmware/temphumid/timeset.py | schizobovine/unicorder | 3165922c2662b1bd2c5ab1691c89e2af5ee185e7 | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python
from datetime import datetime
import serial
import sys
import time
SERIAL_BAUD = 9600
SERIAL_PORT = '/dev/ttyUSB0'
TIME_FORMAT = "T%s"
# Reset device to activate time setting routine
DO_RST = True
# Open serial dong
print 'opening serial port %s...' % SERIAL_PORT
uart = serial.Serial(
port... | 18.93617 | 47 | 0.683146 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 259 | 0.291011 |
54a991a385bd9da3a9f26780efab2ed38b49007b | 3,789 | py | Python | setup.py | giampaolo/pysendfile | 2ffdd452b03dd4b639cda985bd67b8d4c0c34a5f | [
"MIT"
] | 119 | 2015-01-06T10:26:35.000Z | 2021-12-03T06:22:47.000Z | setup.py | giampaolo/pysendfile | 2ffdd452b03dd4b639cda985bd67b8d4c0c34a5f | [
"MIT"
] | 11 | 2015-02-06T18:01:26.000Z | 2022-03-14T09:51:28.000Z | setup.py | giampaolo/pysendfile | 2ffdd452b03dd4b639cda985bd67b8d4c0c34a5f | [
"MIT"
] | 24 | 2015-01-13T20:08:46.000Z | 2021-07-30T13:45:15.000Z | #!/usr/bin/env python
# ======================================================================
# This software is distributed under the MIT license reproduced below:
#
# Copyright (C) 2009-2014 Giampaolo Rodola' <[email protected]>
#
# Permission to use, copy, modify, and distribute this software and
# its docum... | 40.308511 | 73 | 0.5801 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,590 | 0.683558 |
54a9d8c8660ee37792168966ac376aefeed7599f | 3,248 | py | Python | V1_backup/macro_ssh.py | YuanYuLin/iopcrestapi_client | 5c1683d1b5b44bd8bb641933d9526cee97075d31 | [
"MIT"
] | null | null | null | V1_backup/macro_ssh.py | YuanYuLin/iopcrestapi_client | 5c1683d1b5b44bd8bb641933d9526cee97075d31 | [
"MIT"
] | null | null | null | V1_backup/macro_ssh.py | YuanYuLin/iopcrestapi_client | 5c1683d1b5b44bd8bb641933d9526cee97075d31 | [
"MIT"
] | null | null | null | #!/usr/bin/python2.7
import sys
import time
import pprint
import libiopc_rest as rst
def gen_ssh_key(hostname, out_format):
payload = '{'
payload += '"ops":"gen_ssh_key"'
payload += '}'
return rst.http_post_ops_by_pyaload(hostname, payload)
def get_status_until_key_generated(hostname, out_format):
... | 29.798165 | 139 | 0.638855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 764 | 0.235222 |
54aae49452e8676142b61393e18f197e00851192 | 4,746 | py | Python | PatternConverter.py | Suitceyes-Project-Code/Tactile-Brush-Python | 12da563d0988aa3b41c547ee9e1618f30c8b805c | [
"MIT"
] | null | null | null | PatternConverter.py | Suitceyes-Project-Code/Tactile-Brush-Python | 12da563d0988aa3b41c547ee9e1618f30c8b805c | [
"MIT"
] | null | null | null | PatternConverter.py | Suitceyes-Project-Code/Tactile-Brush-Python | 12da563d0988aa3b41c547ee9e1618f30c8b805c | [
"MIT"
] | 1 | 2021-10-04T14:27:25.000Z | 2021-10-04T14:27:25.000Z | from Stroke import Stroke
from TactileBrush import TactileBrush
import json
from sortedcontainers import SortedList
EPSILON = 0.001
class Point:
def __init__(self, x : int, y : int):
self.x = int(x)
self.y = int(y)
def __repr__(self):
return "(" + str(self.x) + ", " + str(self.y) ... | 29.849057 | 90 | 0.588074 | 2,442 | 0.514539 | 0 | 0 | 0 | 0 | 0 | 0 | 657 | 0.138432 |
54ab3bd5170524abc405764a761515f4dbe3bb71 | 14,921 | py | Python | ConnectedClipboard.py | yamanogluberk/ConnectedClipboard | 93aa04a2075b6ed2b6d50fce39a7c26dd80e8564 | [
"MIT"
] | null | null | null | ConnectedClipboard.py | yamanogluberk/ConnectedClipboard | 93aa04a2075b6ed2b6d50fce39a7c26dd80e8564 | [
"MIT"
] | null | null | null | ConnectedClipboard.py | yamanogluberk/ConnectedClipboard | 93aa04a2075b6ed2b6d50fce39a7c26dd80e8564 | [
"MIT"
] | null | null | null | import select
import socket
import json
import threading
import time
import clipboard
import math
from datetime import datetime
ip = ""
localpart = ""
name = ""
tcp = 5555
udp = 5556
buffer_size = 1024
broadcast_try_count = 3
ping_try_count = 3
members = [] # item - (str) ipaddress
current_room_ip = ""
my_room_name =... | 27.079855 | 96 | 0.602171 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,296 | 0.153877 |
54ae8f3aab6c6047677661a66e0ddd7fd0d3d3e9 | 9,728 | py | Python | paddleslim/prune/auto_pruner.py | liuqiaoping7/PaddleSlim | 083003661af893e92cd7bb9017e7d4a3761c7b20 | [
"Apache-2.0"
] | null | null | null | paddleslim/prune/auto_pruner.py | liuqiaoping7/PaddleSlim | 083003661af893e92cd7bb9017e7d4a3761c7b20 | [
"Apache-2.0"
] | null | null | null | paddleslim/prune/auto_pruner.py | liuqiaoping7/PaddleSlim | 083003661af893e92cd7bb9017e7d4a3761c7b20 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 39.384615 | 106 | 0.628701 | 8,706 | 0.894942 | 0 | 0 | 0 | 0 | 0 | 0 | 3,583 | 0.368318 |
54afe8421a6919e6ea315d052ac2b1d84c0d0ecd | 387 | py | Python | model-creator.py | LouisRoss/spiking-model-packager | de75a923e7332b73cb7252300af91d4620b6e801 | [
"MIT"
] | null | null | null | model-creator.py | LouisRoss/spiking-model-packager | de75a923e7332b73cb7252300af91d4620b6e801 | [
"MIT"
] | null | null | null | model-creator.py | LouisRoss/spiking-model-packager | de75a923e7332b73cb7252300af91d4620b6e801 | [
"MIT"
] | null | null | null | import sys
import json
from h5model import h5model
if len(sys.argv) < 2:
print('Usage: ' + sys.argv[0] + ' ' + '<model name>')
exit(1)
modelName = sys.argv[1]
model = h5model(modelName)
model.createModel()
if model.responseStatus >= 400:
print("Unable to create model '" + modelName + "': " + model.errorMessage... | 22.764706 | 95 | 0.687339 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.147287 |
54b1f3e83d93705cfe337ba5f02b4044fdd2e4b8 | 70 | py | Python | decimal to binary.py | Kshitijkrishnadas/haribol | ca45e633baaabaad3bb923f5633340ccf88d996c | [
"bzip2-1.0.6"
] | null | null | null | decimal to binary.py | Kshitijkrishnadas/haribol | ca45e633baaabaad3bb923f5633340ccf88d996c | [
"bzip2-1.0.6"
] | null | null | null | decimal to binary.py | Kshitijkrishnadas/haribol | ca45e633baaabaad3bb923f5633340ccf88d996c | [
"bzip2-1.0.6"
] | null | null | null | a=''
n=int(input())
while n != 0:
a=str(n%2)+a
n//=2
print(a)
| 10 | 16 | 0.457143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0.028571 |
54b2b1435e7c0cbedc57669a7f3b6443192e3d9f | 4,887 | py | Python | settings/base.py | anthill-gaming/media | cc3292be8bd83aba6054e420124adabcfa4e3a8b | [
"MIT"
] | 1 | 2018-11-30T21:56:14.000Z | 2018-11-30T21:56:14.000Z | settings/base.py | anthill-gaming/media | cc3292be8bd83aba6054e420124adabcfa4e3a8b | [
"MIT"
] | null | null | null | settings/base.py | anthill-gaming/media | cc3292be8bd83aba6054e420124adabcfa4e3a8b | [
"MIT"
] | null | null | null | from anthill.framework.utils.translation import translate_lazy as _
from anthill.platform.conf.settings import *
import os
# Build paths inside the application like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# SECURITY WARNING: keep the secret key used in ... | 27 | 108 | 0.529568 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,618 | 0.535707 |
54b51b30bb070d1462b530e3aafb5daba4e65245 | 2,787 | py | Python | odmltables/gui/wizutils.py | fabianschlebusch/python-odmltables | 90a7833516afe8864b40947f4a1757830a0dc44c | [
"BSD-3-Clause"
] | 6 | 2017-10-27T16:59:53.000Z | 2021-03-02T06:08:48.000Z | odmltables/gui/wizutils.py | fabianschlebusch/python-odmltables | 90a7833516afe8864b40947f4a1757830a0dc44c | [
"BSD-3-Clause"
] | 68 | 2016-01-26T10:48:16.000Z | 2021-11-16T10:09:49.000Z | odmltables/gui/wizutils.py | fabianschlebusch/python-odmltables | 90a7833516afe8864b40947f4a1757830a0dc44c | [
"BSD-3-Clause"
] | 7 | 2015-11-24T12:40:18.000Z | 2021-04-14T08:02:53.000Z | # -*- coding: utf-8 -*-
import os, sys
from PyQt5.QtWidgets import (QWizard, QMessageBox)
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import pyqtSlot, Qt
try:
import odmltables
have_odmltables = True
except:
have_odmltables = False
from .settings import Settings
class OdmltablesWizard(QWizard):
... | 32.406977 | 86 | 0.588805 | 2,272 | 0.815213 | 0 | 0 | 851 | 0.305346 | 0 | 0 | 728 | 0.261213 |
54b6c94b65480166ee80c689e0b477e97f134499 | 25,440 | py | Python | trainLib.py | dorukb/ceng445-trainSim | 01af1c556dbce4e3f1c07fc16a21cd94cdeb7884 | [
"MIT"
] | null | null | null | trainLib.py | dorukb/ceng445-trainSim | 01af1c556dbce4e3f1c07fc16a21cd94cdeb7884 | [
"MIT"
] | null | null | null | trainLib.py | dorukb/ceng445-trainSim | 01af1c556dbce4e3f1c07fc16a21cd94cdeb7884 | [
"MIT"
] | null | null | null | import math
#constants and globals
background = '0'
NORTH = 0
EAST = 1
SOUTH = 2
WEST = 3
dirs = {0 : "NORTH", 1 : "EAST", 2 : "SOUTH", 3 : "WEST"}
class CellElement(): #CellELement Interface for the subclasses
#Subclasses: RegularRoad, Switch, LevelCrossing, Bridge, Station
def setPosition(self, x, y):
... | 39.564541 | 190 | 0.596502 | 25,256 | 0.992767 | 0 | 0 | 0 | 0 | 0 | 0 | 8,329 | 0.327398 |
54b7f3a8b8887e8d822b83c326d0049cfae95c7f | 25,083 | py | Python | nar_module/nar/preprocessing/nar_preprocess_cafebiz_2.py | 13520505/bigdataproj | 09202c7e13366726415b1111cc93d3083d102cb3 | [
"MIT"
] | null | null | null | nar_module/nar/preprocessing/nar_preprocess_cafebiz_2.py | 13520505/bigdataproj | 09202c7e13366726415b1111cc93d3083d102cb3 | [
"MIT"
] | 9 | 2020-01-28T23:07:43.000Z | 2022-02-10T00:36:23.000Z | nar_module/nar/preprocessing/nar_preprocess_cafebiz_2.py | 13520505/bigdataproj | 09202c7e13366726415b1111cc93d3083d102cb3 | [
"MIT"
] | null | null | null | import argparse
import glob
import json
import os
import os.path
import re
import sys
from collections import Counter, defaultdict
from datetime import datetime
from os import path
import numpy as np
import pandas as pd
import tensorflow as tf
from acr_module.acr.acr_module_service import get_all_file, load_json_conf... | 42.950342 | 176 | 0.670653 | 0 | 0 | 783 | 0.031216 | 0 | 0 | 0 | 0 | 9,385 | 0.374158 |
54b976c7100ab785c654b0c7ca7597f8b6235530 | 2,979 | py | Python | tests/integration/test_labels.py | spmistry/crux-python | 15a6b705d1eec7e789f6f62819429f93e02349c1 | [
"MIT"
] | null | null | null | tests/integration/test_labels.py | spmistry/crux-python | 15a6b705d1eec7e789f6f62819429f93e02349c1 | [
"MIT"
] | null | null | null | tests/integration/test_labels.py | spmistry/crux-python | 15a6b705d1eec7e789f6f62819429f93e02349c1 | [
"MIT"
] | null | null | null | import pytest
@pytest.mark.usefixtures("dataset", "helpers")
def test_add_get_label(dataset, helpers):
file_1 = dataset.create_file(
path="/test_file_" + helpers.generate_random_string(16) + ".csv"
)
label_result = file_1.add_label("label1", "value1")
assert label_result is True
assert fil... | 35.891566 | 94 | 0.700906 | 0 | 0 | 0 | 0 | 2,763 | 0.927492 | 0 | 0 | 671 | 0.225243 |
54b9924021536e75d5d98199ebdf2f58b7c84e9c | 15,384 | py | Python | bindings/python/cntk/utils/__init__.py | MSXC/CNTK | d223d48b411bc994acd465ed333c9f6bed64dd7f | [
"RSA-MD"
] | null | null | null | bindings/python/cntk/utils/__init__.py | MSXC/CNTK | d223d48b411bc994acd465ed333c9f6bed64dd7f | [
"RSA-MD"
] | null | null | null | bindings/python/cntk/utils/__init__.py | MSXC/CNTK | d223d48b411bc994acd465ed333c9f6bed64dd7f | [
"RSA-MD"
] | null | null | null | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
import sys
import numbers
import collections
import copy
import numpy as np
from nu... | 35.528868 | 189 | 0.651586 | 1,307 | 0.084947 | 0 | 0 | 0 | 0 | 0 | 0 | 8,569 | 0.556935 |
54b9d0d77aa935ba65cfcd82b3fdde8db5a12f2f | 1,457 | py | Python | data/data_utils.py | ivankreso/LDN | 76740ef77fcec851f8abc2380251a9491dc0cdc3 | [
"MIT"
] | 8 | 2020-03-28T15:42:39.000Z | 2021-07-26T17:40:59.000Z | data/data_utils.py | ivankreso/LDN | 76740ef77fcec851f8abc2380251a9491dc0cdc3 | [
"MIT"
] | 1 | 2021-08-19T08:52:19.000Z | 2021-08-19T08:52:19.000Z | data/data_utils.py | ivankreso/LDN | 76740ef77fcec851f8abc2380251a9491dc0cdc3 | [
"MIT"
] | 1 | 2021-12-06T08:05:59.000Z | 2021-12-06T08:05:59.000Z | import math
def oversample(all_paths, per_class_split, oversample_ids, class_names):
union = set()
all_sum = 0
print('Oversample stats:')
print('Total images before =', len(all_paths[0]))
for i in oversample_ids:
duplicates = 1
print(f'id = {i} -> {class_names[i]} : num of oversampled =', len(per_cla... | 30.354167 | 90 | 0.680165 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.105697 |
54bbf057df21a564d7a670875ca4d351e87df738 | 1,181 | py | Python | src/leetcode_932_beautiful_array.py | sungho-joo/leetcode2github | ce7730ef40f6051df23681dd3c0e1e657abba620 | [
"MIT"
] | null | null | null | src/leetcode_932_beautiful_array.py | sungho-joo/leetcode2github | ce7730ef40f6051df23681dd3c0e1e657abba620 | [
"MIT"
] | null | null | null | src/leetcode_932_beautiful_array.py | sungho-joo/leetcode2github | ce7730ef40f6051df23681dd3c0e1e657abba620 | [
"MIT"
] | null | null | null | # @l2g 932 python3
# [932] Beautiful Array
# Difficulty: Medium
# https://leetcode.com/problems/beautiful-array
#
# An array nums of length n is beautiful if:
#
# nums is a permutation of the integers in the range [1, n].
# For every 0 <= i < j < n, there is no index k with i < k < j where 2 * nums[k] == nums[i] + nums... | 21.87037 | 102 | 0.556308 | 439 | 0.371719 | 0 | 0 | 0 | 0 | 0 | 0 | 599 | 0.507197 |
54bc320185cf4b126b5fbdb33a31e831a7364c2c | 1,209 | py | Python | objectModel/Python/tests/cdm/cdm_collection/cdm_collection_helper_functions.py | aaron-emde/CDM | 9472e9c7694821ac4a9bbe608557d2e65aabc73e | [
"CC-BY-4.0",
"MIT"
] | null | null | null | objectModel/Python/tests/cdm/cdm_collection/cdm_collection_helper_functions.py | aaron-emde/CDM | 9472e9c7694821ac4a9bbe608557d2e65aabc73e | [
"CC-BY-4.0",
"MIT"
] | 3 | 2021-05-11T23:57:12.000Z | 2021-08-04T05:03:05.000Z | objectModel/Python/tests/cdm/cdm_collection/cdm_collection_helper_functions.py | aaron-emde/CDM | 9472e9c7694821ac4a9bbe608557d2e65aabc73e | [
"CC-BY-4.0",
"MIT"
] | null | null | null | from cdm.objectmodel import CdmCorpusDefinition, CdmManifestDefinition
from cdm.storage import LocalAdapter
from cdm.enums import CdmObjectType
def generate_manifest(local_root_path: str) -> 'CdmManifestDefinition':
"""
Creates a manifest used for the tests.
"""
cdmCorpus = CdmCorpusDefinition()
... | 35.558824 | 127 | 0.746071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 287 | 0.237386 |
54bc883a34e91f4283ceaf8207e99c37307465c6 | 894 | py | Python | asynchronous/py27/asynchronous/producer_consumer/async_eventlet.py | fs714/concurrency-example | fbff041804b9c46fb7f21ebbae22acff745c7b0c | [
"Apache-2.0"
] | null | null | null | asynchronous/py27/asynchronous/producer_consumer/async_eventlet.py | fs714/concurrency-example | fbff041804b9c46fb7f21ebbae22acff745c7b0c | [
"Apache-2.0"
] | null | null | null | asynchronous/py27/asynchronous/producer_consumer/async_eventlet.py | fs714/concurrency-example | fbff041804b9c46fb7f21ebbae22acff745c7b0c | [
"Apache-2.0"
] | 1 | 2020-03-10T15:47:05.000Z | 2020-03-10T15:47:05.000Z | import eventlet
from eventlet.green import urllib2
import logging
logging.basicConfig()
logger = logging.getLogger(__file__)
logger.setLevel(logging.DEBUG)
def consumer(task_queue):
while True:
next_task = task_queue.get()
next_task()
task_queue.task_done()
class Task(object):
def _... | 21.285714 | 55 | 0.644295 | 209 | 0.233781 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.082774 |
54bcc1399279abf79ea8c42b52f38e4ad74979ae | 1,155 | py | Python | models.py | zhangjingqiang/qiang-tools | 73fcb896bfec14f1ed668a1ef81526d80c80082f | [
"MIT"
] | null | null | null | models.py | zhangjingqiang/qiang-tools | 73fcb896bfec14f1ed668a1ef81526d80c80082f | [
"MIT"
] | null | null | null | models.py | zhangjingqiang/qiang-tools | 73fcb896bfec14f1ed668a1ef81526d80c80082f | [
"MIT"
] | null | null | null | from flask.ext.login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from app import db
class User(UserMixin, db.Model):
"""
User who can use this application.
"""
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
username = db.... | 26.25 | 73 | 0.665801 | 1,019 | 0.882251 | 0 | 0 | 202 | 0.174892 | 0 | 0 | 150 | 0.12987 |
54bd473259faa4301d10d34795bb5bf05e6048e5 | 32,426 | py | Python | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/controller_fs.py | etaivan/stx-config | 281e1f110973f96e077645fb01f67b646fc253cc | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/controller_fs.py | etaivan/stx-config | 281e1f110973f96e077645fb01f67b646fc253cc | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/controller_fs.py | etaivan/stx-config | 281e1f110973f96e077645fb01f67b646fc253cc | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 UnitedStack Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licen... | 40.481898 | 104 | 0.587923 | 14,463 | 0.446031 | 0 | 0 | 10,425 | 0.321501 | 0 | 0 | 7,804 | 0.240671 |
54bd765684733907c0e0f4fdff1bc9c5e51272ef | 1,298 | py | Python | tests/test_label_smoothing_ce.py | waking95/easy-bert | 576678343c251a134748941d1aa5e3368786337e | [
"MIT"
] | 12 | 2021-12-15T06:08:28.000Z | 2022-03-25T06:27:38.000Z | tests/test_label_smoothing_ce.py | waking95/easy-bert | 576678343c251a134748941d1aa5e3368786337e | [
"MIT"
] | null | null | null | tests/test_label_smoothing_ce.py | waking95/easy-bert | 576678343c251a134748941d1aa5e3368786337e | [
"MIT"
] | 1 | 2022-02-10T02:59:51.000Z | 2022-02-10T02:59:51.000Z | import unittest
import torch
from easy_bert.losses.label_smoothing_loss import LabelSmoothingCrossEntropy
class MyTestCase(unittest.TestCase):
def test(self):
print('test~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
lsce = LabelSmoothingCrossEntropy()
... | 36.055556 | 101 | 0.523112 | 1,184 | 0.880952 | 0 | 0 | 0 | 0 | 0 | 0 | 447 | 0.332589 |
54be3891db6fb2756f21aef061add0f576fa4d9b | 747 | py | Python | Algorithms/Sort/Merge Sort/src.py | NikhilCodes/DSA-Warehouse | f68c3c7c092dc624381e956b065f849d738b5359 | [
"MIT"
] | null | null | null | Algorithms/Sort/Merge Sort/src.py | NikhilCodes/DSA-Warehouse | f68c3c7c092dc624381e956b065f849d738b5359 | [
"MIT"
] | null | null | null | Algorithms/Sort/Merge Sort/src.py | NikhilCodes/DSA-Warehouse | f68c3c7c092dc624381e956b065f849d738b5359 | [
"MIT"
] | null | null | null | """
ALGORITHM : Merge Sort
WORST CASE => {
PERFORMANCE: O(n log(n))
SPACE: O(n)
}
"""
def merge_sort(arr):
size = len(arr)
if size == 1:
return arr
elif size == 2:
if arr[1] > arr[0]:
return [arr[0], arr[1]]
mid = len(arr) // 2
lef... | 20.189189 | 48 | 0.497992 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.156627 |
54bf36b4e97ce13f93c4eda7288e2207a9d1c577 | 2,295 | py | Python | locations/spiders/dollarama.py | cmecklenborg/alltheplaces | e62b59fb0071b6e289c4622d368fdb203a28347e | [
"MIT"
] | null | null | null | locations/spiders/dollarama.py | cmecklenborg/alltheplaces | e62b59fb0071b6e289c4622d368fdb203a28347e | [
"MIT"
] | null | null | null | locations/spiders/dollarama.py | cmecklenborg/alltheplaces | e62b59fb0071b6e289c4622d368fdb203a28347e | [
"MIT"
] | null | null | null | import scrapy
from locations.items import GeojsonPointItem
from urllib.parse import urlencode
from scrapy.selector import Selector
from locations.hours import OpeningHours
Days = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
class DollaramaSpider(scrapy.Spider):
name = "dollarama"
item_attributes = {"brand": "D... | 33.26087 | 83 | 0.547277 | 2,069 | 0.901525 | 1,414 | 0.616122 | 0 | 0 | 0 | 0 | 612 | 0.266667 |
54c063aa9c40b1e765ddd298550866419dd317e0 | 4,614 | py | Python | faces/recognize_faces_video.py | rummens1337/vision-assignment | 8735e95224be702f1bb33066eef80f098b347b1f | [
"MIT"
] | null | null | null | faces/recognize_faces_video.py | rummens1337/vision-assignment | 8735e95224be702f1bb33066eef80f098b347b1f | [
"MIT"
] | null | null | null | faces/recognize_faces_video.py | rummens1337/vision-assignment | 8735e95224be702f1bb33066eef80f098b347b1f | [
"MIT"
] | 1 | 2020-01-06T09:55:35.000Z | 2020-01-06T09:55:35.000Z | # import the necessary packages
from imutils.video import VideoStream
import face_recognition
import imutils
import pickle
import time
import cv2
import os
# https://www.pyimagesearch.com/2018/06/18/face-recognition-with-opencv-python-and-deep-learning/
# https://www.pyimagesearch.com/2018/06/11/how-to-build-a-custom-f... | 36.912 | 97 | 0.6114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,393 | 0.518639 |
54c067d1a064f439200439939a3af3a79e1fca5f | 3,298 | py | Python | pytint/machine_io.py | semicolonTransistor/PyTint | 0f70fe756c285cda38b3a91318af02382a505263 | [
"MIT"
] | 1 | 2020-08-14T19:41:45.000Z | 2020-08-14T19:41:45.000Z | pytint/machine_io.py | semicolonTransistor/PyTint | 0f70fe756c285cda38b3a91318af02382a505263 | [
"MIT"
] | null | null | null | pytint/machine_io.py | semicolonTransistor/PyTint | 0f70fe756c285cda38b3a91318af02382a505263 | [
"MIT"
] | null | null | null | from pytint.interpreters import FiniteAutomaton
from typing import List, Union, Dict, Iterable
import collections
import yaml
class IncompleteMachine(Exception):
def __init__(self, missing: str, machine_type: str):
self.missing = missing
self.machine_type = machine_type
def __str__(self):
... | 36.644444 | 109 | 0.608854 | 333 | 0.100909 | 0 | 0 | 0 | 0 | 0 | 0 | 408 | 0.123636 |
54c1abcc8ecb4f60275606b22bbb22422b5b3be6 | 1,021 | py | Python | dashboard/frontend/callbacks.py | AndreWohnsland/CocktailBerry | 60b2dfc3a4a6f3ef9ab2d946a97d14829e575a9d | [
"MIT"
] | 1 | 2022-03-06T23:50:34.000Z | 2022-03-06T23:50:34.000Z | dashboard/frontend/callbacks.py | AndreWohnsland/CocktailBerry | 60b2dfc3a4a6f3ef9ab2d946a97d14829e575a9d | [
"MIT"
] | 4 | 2022-03-03T11:16:17.000Z | 2022-03-20T15:53:37.000Z | dashboard/frontend/callbacks.py | AndreWohnsland/CocktailBerry | 60b2dfc3a4a6f3ef9ab2d946a97d14829e575a9d | [
"MIT"
] | null | null | null | import dash
from dash.dependencies import Input, Output # type: ignore
import datetime
from treemap import generate_treemap, get_plot_data
from app import app
from store import store
@app.callback(Output('treemap', 'figure'),
Output('timeclock', "children"),
Input('interval-component', '... | 31.90625 | 70 | 0.663075 | 0 | 0 | 0 | 0 | 833 | 0.815867 | 0 | 0 | 188 | 0.184133 |
54c3ac280575bb0ee6051627754ebf1784317751 | 4,095 | py | Python | tms/useraccount/views.py | csagar131/TicketManagementSystem | d2c6b340dcb1d7607257d88dc5b931a0624a774b | [
"Apache-2.0"
] | null | null | null | tms/useraccount/views.py | csagar131/TicketManagementSystem | d2c6b340dcb1d7607257d88dc5b931a0624a774b | [
"Apache-2.0"
] | 4 | 2021-06-04T23:51:17.000Z | 2022-02-10T10:41:21.000Z | tms/useraccount/views.py | csagar131/TicketManagementSystem | d2c6b340dcb1d7607257d88dc5b931a0624a774b | [
"Apache-2.0"
] | 1 | 2020-06-04T11:44:42.000Z | 2020-06-04T11:44:42.000Z | from django.shortcuts import render
from rest_framework.viewsets import ModelViewSet
from useraccount.serializer import UserSerializer,AgentUserSerializer
from rest_framework.views import APIView
from useraccount.models import User
from django.http.response import JsonResponse
from django.template.loader import render_... | 36.238938 | 114 | 0.60464 | 1,955 | 0.477411 | 0 | 0 | 0 | 0 | 0 | 0 | 636 | 0.155311 |
54c4b203b6a2600da692213b5eb8857816d71318 | 2,203 | py | Python | ppocr/utils/special_character.py | ZacksTsang/PaddleOCR | c716553f6f369d191b91690a81936a19173a7c33 | [
"Apache-2.0"
] | 1 | 2021-08-12T17:16:02.000Z | 2021-08-12T17:16:02.000Z | ppocr/utils/special_character.py | ZacksTsang/PaddleOCR | c716553f6f369d191b91690a81936a19173a7c33 | [
"Apache-2.0"
] | null | null | null | ppocr/utils/special_character.py | ZacksTsang/PaddleOCR | c716553f6f369d191b91690a81936a19173a7c33 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | 43.196078 | 213 | 0.576033 | 1,472 | 0.645897 | 0 | 0 | 0 | 0 | 0 | 0 | 1,211 | 0.531373 |
54c4dc3efeaaf5e89758e47b3cc255b10a88682a | 1,160 | py | Python | setup.py | ionata/django-unique-uploadto | da66ed30d6abd86566d9b141e3c48b10340740a2 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ionata/django-unique-uploadto | da66ed30d6abd86566d9b141e3c48b10340740a2 | [
"BSD-3-Clause"
] | 1 | 2017-11-21T22:11:24.000Z | 2017-11-22T00:38:17.000Z | setup.py | ionata/django-unique-uploadto | da66ed30d6abd86566d9b141e3c48b10340740a2 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from __future__ import absolute_import, print_function, unicode_literals
from setuptools import setup, find_packages
from unique_uploadto import __version__
with open('README.rst', 'r') as f:
readme = f.read()
setup(
name='django-unique-uploadto',
version=__version__,
descript... | 27.619048 | 72 | 0.64569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 558 | 0.481034 |
54c84616a029f134346dc45645dd043f6f816a04 | 793 | py | Python | scripts/python/helper/decoration.py | sulthonzh/zaruba | ec9262f43da17d86330da2c593b7da451aabd60f | [
"Apache-2.0"
] | null | null | null | scripts/python/helper/decoration.py | sulthonzh/zaruba | ec9262f43da17d86330da2c593b7da451aabd60f | [
"Apache-2.0"
] | null | null | null | scripts/python/helper/decoration.py | sulthonzh/zaruba | ec9262f43da17d86330da2c593b7da451aabd60f | [
"Apache-2.0"
] | null | null | null | import random
normal="\033[0m"
bold="\033[1m"
faint="\033[2m"
italic="\033[3m"
underline="\033[4m"
blinkSlow="\033[5m"
blinkRapid="\033[6m"
inverse="\033[7m"
conceal="\033[8m"
crossedOut="\033[9m"
black="\033[30m"
red="\033[31m"
green="\033[32m"
yellow="\033[33m"
blue="\033[34m"
magenta="\033[35m"
cyan="\033[36m"
whit... | 20.333333 | 121 | 0.583859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 415 | 0.484813 |
49a498a0dfc278640dff975e47a36448f00bf3bc | 2,918 | py | Python | data_structures/tree/avl_tree.py | hongta/practice-python | 52d5278ea5402ea77054bfa5c4bfdbdf81c9c963 | [
"MIT"
] | null | null | null | data_structures/tree/avl_tree.py | hongta/practice-python | 52d5278ea5402ea77054bfa5c4bfdbdf81c9c963 | [
"MIT"
] | null | null | null | data_structures/tree/avl_tree.py | hongta/practice-python | 52d5278ea5402ea77054bfa5c4bfdbdf81c9c963 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from tree_node import AVLTreeNode
from binary_search_tree import BinarySearchTree
class AVLTree(BinarySearchTree):
def __init__(self):
super(AVLTree, self).__init__()
def insert(self, k, payload=None):
# tree is empty construct the tree
if... | 26.770642 | 78 | 0.59013 | 2,446 | 0.838245 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.058944 |
49a4e7b419d4d64776cdbda3fd3b82f70e450c6d | 96 | py | Python | ardget_app/apps.py | shumdeveloper/ardget | 585a93ce24e747014f2cbde8daae600e26fbd835 | [
"MIT"
] | null | null | null | ardget_app/apps.py | shumdeveloper/ardget | 585a93ce24e747014f2cbde8daae600e26fbd835 | [
"MIT"
] | null | null | null | ardget_app/apps.py | shumdeveloper/ardget | 585a93ce24e747014f2cbde8daae600e26fbd835 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class TempArduinoConfig(AppConfig):
name = 'ardget_app'
| 16 | 35 | 0.770833 | 59 | 0.614583 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.125 |
49a74574e4d388966ade396ad88447197a6c63e8 | 1,944 | py | Python | dynamic_rest/datastructures.py | reinert/dynamic-rest | aaf3973f69b53ed317b9c8468942523715814fa8 | [
"MIT"
] | 690 | 2016-02-05T22:46:03.000Z | 2022-03-28T18:59:49.000Z | dynamic_rest/datastructures.py | reinert/dynamic-rest | aaf3973f69b53ed317b9c8468942523715814fa8 | [
"MIT"
] | 190 | 2015-03-06T16:57:21.000Z | 2022-02-02T21:56:07.000Z | dynamic_rest/datastructures.py | reinert/dynamic-rest | aaf3973f69b53ed317b9c8468942523715814fa8 | [
"MIT"
] | 117 | 2016-05-05T13:51:07.000Z | 2022-02-28T18:25:56.000Z | """This module contains custom data-structures."""
import six
class TreeMap(dict):
"""Tree structure implemented with nested dictionaries."""
def get_paths(self):
"""Get all paths from the root to the leaves.
For example, given a chain like `{'a':{'b':{'c':None}}}`,
this method would... | 29.907692 | 77 | 0.513374 | 1,879 | 0.966564 | 0 | 0 | 0 | 0 | 0 | 0 | 973 | 0.500514 |
49a7ee42b8f9f516686c7f73c30cfb6480597ce8 | 2,605 | py | Python | functions.py | heEXDe/password_generator | c546c09be927abc2a02971cab5f2d19817208cda | [
"MIT"
] | null | null | null | functions.py | heEXDe/password_generator | c546c09be927abc2a02971cab5f2d19817208cda | [
"MIT"
] | null | null | null | functions.py | heEXDe/password_generator | c546c09be927abc2a02971cab5f2d19817208cda | [
"MIT"
] | null | null | null | # functions for actions
import random
import string
import GUI
def generate_password():
password = ''
GUI.lblError.config(text='')
passLength = GUI.var.get()
if (GUI.varDigi.get() == 1) & (GUI.varChLower.get() == 1) & (GUI.varChUpper.get() == 1):
strin = string.ascii_letters
for i in r... | 42.016129 | 103 | 0.571209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.046833 |
49a800c2275f46ea1981d8aa809ee37691f78025 | 1,330 | py | Python | lottery/branch/retrain.py | chenw23/open_lth | 2ce732fe48abd5a80c10a153c45d397b048e980c | [
"MIT"
] | 509 | 2020-05-07T16:45:46.000Z | 2022-03-28T13:41:36.000Z | lottery/branch/retrain.py | chenw23/open_lth | 2ce732fe48abd5a80c10a153c45d397b048e980c | [
"MIT"
] | 12 | 2020-06-10T10:07:09.000Z | 2022-02-03T01:57:32.000Z | lottery/branch/retrain.py | chenw23/open_lth | 2ce732fe48abd5a80c10a153c45d397b048e980c | [
"MIT"
] | 103 | 2020-05-07T21:40:06.000Z | 2022-03-11T19:07:55.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import datasets.registry
from foundations import hparams
from foundations.step import Step
from lottery.branch import base
import models.regist... | 35.945946 | 118 | 0.72406 | 902 | 0.678195 | 0 | 0 | 157 | 0.118045 | 0 | 0 | 257 | 0.193233 |
49a855768d0faa6b5929b201dd9c0e69c1e8d0cf | 1,860 | py | Python | Sumo_programs/probablyGoodCode/Lyall's_Test_File.py | senornosketchy/ENGG1000-R2R | 5c6880e81560079d22c8dbbadd9c7fdd1e585aa4 | [
"MIT"
] | null | null | null | Sumo_programs/probablyGoodCode/Lyall's_Test_File.py | senornosketchy/ENGG1000-R2R | 5c6880e81560079d22c8dbbadd9c7fdd1e585aa4 | [
"MIT"
] | null | null | null | Sumo_programs/probablyGoodCode/Lyall's_Test_File.py | senornosketchy/ENGG1000-R2R | 5c6880e81560079d22c8dbbadd9c7fdd1e585aa4 | [
"MIT"
] | null | null | null | """
Created on Thu Mar 22 15:07:43 2018
@author: Tanvee
First attempt at an program for the EV3 bot.
The main aim of this is to develop an algorithm to search clockwise for and identify
close objects, before rushing to meet them.
"""
print(0)
from time import sleep
import sys, os
# Import the ev3dev specific library
f... | 21.882353 | 98 | 0.716667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 999 | 0.537097 |
49a87d079120bfbcccec5530adc7e03acb1cb9a1 | 13,984 | py | Python | tests/test_modelgen.py | PipGrylls/sqlalchemy-modelgen | 988e7b39fa4f8b2ddac35792c21e147e8260df17 | [
"MIT"
] | 18 | 2021-04-01T20:32:42.000Z | 2021-06-01T05:24:27.000Z | tests/test_modelgen.py | PipGrylls/sqlalchemy-modelgen | 988e7b39fa4f8b2ddac35792c21e147e8260df17 | [
"MIT"
] | null | null | null | tests/test_modelgen.py | PipGrylls/sqlalchemy-modelgen | 988e7b39fa4f8b2ddac35792c21e147e8260df17 | [
"MIT"
] | 1 | 2021-11-23T01:17:18.000Z | 2021-11-23T01:17:18.000Z | from unittest import TestCase, mock
from modelgen import ModelGenerator, Base
from os import getcwd, path
class TestModelgen(TestCase):
@classmethod
def setUpClass(self):
self.yaml = {'tables': {'userinfo':{'columns':
[{'name': 'firstname', 'type': 'varchar'},
... | 44.820513 | 101 | 0.661971 | 13,877 | 0.992348 | 0 | 0 | 13,722 | 0.981264 | 0 | 0 | 5,066 | 0.362271 |
49a8f69931a09da4e91b5822491e86963189f463 | 223 | py | Python | papermerge/apps/e_invoice/apps.py | francescocarzaniga/e_invoice_papermerge | e7a4a3fdab4263c02983b638f873db8d11e89041 | [
"Apache-2.0"
] | 1 | 2021-02-15T06:38:32.000Z | 2021-02-15T06:38:32.000Z | papermerge/apps/e_invoice/apps.py | francescocarzaniga/e_invoice_papermerge | e7a4a3fdab4263c02983b638f873db8d11e89041 | [
"Apache-2.0"
] | null | null | null | papermerge/apps/e_invoice/apps.py | francescocarzaniga/e_invoice_papermerge | e7a4a3fdab4263c02983b638f873db8d11e89041 | [
"Apache-2.0"
] | 1 | 2021-02-15T06:38:35.000Z | 2021-02-15T06:38:35.000Z | from django.apps import AppConfig
class EInvoiceConfig(AppConfig):
name = 'papermerge.apps.e_invoice'
label = 'e_invoice'
# def ready(self):
# from papermerge.apps.data_retention import signals # noqa
| 22.3 | 67 | 0.713004 | 95 | 0.426009 | 0 | 0 | 0 | 0 | 0 | 0 | 126 | 0.565022 |
49a92b917ad9d386c28bdce310accefac0f211c6 | 2,075 | py | Python | handler_loud/chat.py | ross/simone | cfee8eaa04a7ddd235f735fa6c07adac28b4c6a4 | [
"MIT"
] | null | null | null | handler_loud/chat.py | ross/simone | cfee8eaa04a7ddd235f735fa6c07adac28b4c6a4 | [
"MIT"
] | 1 | 2021-11-04T13:47:28.000Z | 2021-11-04T13:47:28.000Z | handler_loud/chat.py | ross/simone | cfee8eaa04a7ddd235f735fa6c07adac28b4c6a4 | [
"MIT"
] | 1 | 2021-10-20T14:44:19.000Z | 2021-10-20T14:44:19.000Z | from logging import getLogger
from random import randrange
import re
from simone.handlers import Registry, exclude_private
from .models import Shout
# Based loosely on https://github.com/desert-planet/hayt/blob/master/scripts/loud.coffee
class Loud(object):
'''
Learns and repeats LOUD MESSAGES!
To add n... | 33.467742 | 88 | 0.578313 | 1,797 | 0.866024 | 0 | 0 | 901 | 0.434217 | 0 | 0 | 822 | 0.396145 |
49a9a3178fb4042aad889e7fe746a420d38ecae5 | 1,013 | py | Python | Algo and DSA/LeetCode-Solutions-master/Python/web-crawler.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 3,269 | 2018-10-12T01:29:40.000Z | 2022-03-31T17:58:41.000Z | Algo and DSA/LeetCode-Solutions-master/Python/web-crawler.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 53 | 2018-12-16T22:54:20.000Z | 2022-02-25T08:31:20.000Z | Algo and DSA/LeetCode-Solutions-master/Python/web-crawler.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 1,236 | 2018-10-12T02:51:40.000Z | 2022-03-30T13:30:37.000Z | # Time: O(|V| + |E|)
# Space: O(|V|)
# """
# This is HtmlParser's API interface.
# You should not implement it, or speculate about its implementation
# """
class HtmlParser(object):
def getUrls(self, url):
"""
:type url: str
:rtype List[str]
"""
pass
class Solution(object):
... | 25.325 | 69 | 0.515301 | 851 | 0.840079 | 0 | 0 | 0 | 0 | 0 | 0 | 329 | 0.324778 |
49aa6dbb7d625a529dc7cc00fc711016b4a758db | 3,614 | py | Python | scripts/collect.py | oveis/DeepVideoFaceSwap | e507f94d4f5d74c36e41c386c6fb14bb745a4885 | [
"MIT"
] | 5 | 2019-05-17T11:54:04.000Z | 2020-10-06T18:45:17.000Z | scripts/collect.py | oveis/DeepVideoFaceSwap | e507f94d4f5d74c36e41c386c6fb14bb745a4885 | [
"MIT"
] | null | null | null | scripts/collect.py | oveis/DeepVideoFaceSwap | e507f94d4f5d74c36e41c386c6fb14bb745a4885 | [
"MIT"
] | 5 | 2019-06-05T00:20:24.000Z | 2019-09-15T15:40:23.000Z | #!/usr/bin python3
""" The script to collect training data """
import logging
import os
import cv2 as cv
import numpy as np
from google_images_download import google_images_download as gid
from lib.utils import get_folder
from os.path import exists, isfile, join
logger = logging.getLogger(__name__) # pylint: disable... | 36.505051 | 104 | 0.649972 | 2,973 | 0.822634 | 0 | 0 | 0 | 0 | 0 | 0 | 715 | 0.197842 |
49aacdd586494ba24976083e9c7c711f99d594ea | 1,132 | py | Python | data_split.py | TalSchuster/FewRel | af68f52b13977ca29808c38a54995363f76cdcad | [
"MIT"
] | null | null | null | data_split.py | TalSchuster/FewRel | af68f52b13977ca29808c38a54995363f76cdcad | [
"MIT"
] | null | null | null | data_split.py | TalSchuster/FewRel | af68f52b13977ca29808c38a54995363f76cdcad | [
"MIT"
] | null | null | null | import os
import random
from shutil import copyfile
import json
random.seed(123)
ROOT_PATH = './data/'
k = 5
target_path = './data/wiki_5_splits/'
'''
Splits the training set to 5 folds.
In each split, the held out set is used for test.
'''
path = os.path.join(ROOT_PATH, 'train_wiki' + '.json')
data = json.load(op... | 25.155556 | 88 | 0.655477 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 252 | 0.222615 |
49aaf3536a9b3013f2535a7951571b5299a8099f | 604 | py | Python | heisen/core/__init__.py | HeisenCore/heisen | 0cd4d27822960553a8e83a72c7dfeefa76e65c06 | [
"MIT"
] | 5 | 2016-08-30T07:51:08.000Z | 2021-09-13T11:30:05.000Z | heisen/core/__init__.py | HeisenCore/heisen | 0cd4d27822960553a8e83a72c7dfeefa76e65c06 | [
"MIT"
] | 15 | 2016-09-15T19:21:24.000Z | 2016-10-22T16:22:15.000Z | heisen/core/__init__.py | HeisenCore/heisen | 0cd4d27822960553a8e83a72c7dfeefa76e65c06 | [
"MIT"
] | null | null | null | from heisen.config import settings
from jsonrpclib.request import ConnectionPool
def get_rpc_connection():
if settings.CREDENTIALS:
username, passowrd = settings.CREDENTIALS[0]
else:
username = passowrd = None
servers = {'self': []}
for instance_number in range(settings.INSTANCE_COUNT... | 27.454545 | 80 | 0.692053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.072848 |
49abd960ef01b21e1a602cfce947ec5f7f32f14e | 3,182 | py | Python | pychron/processing/analysis_graph.py | aelamspychron/pychron | ad87c22b0817c739c7823a24585053041ee339d5 | [
"Apache-2.0"
] | null | null | null | pychron/processing/analysis_graph.py | aelamspychron/pychron | ad87c22b0817c739c7823a24585053041ee339d5 | [
"Apache-2.0"
] | 20 | 2020-09-09T20:58:39.000Z | 2021-10-05T17:48:37.000Z | pychron/processing/analysis_graph.py | aelamspychron/pychron | ad87c22b0817c739c7823a24585053041ee339d5 | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# Copyright 2013 Jake Ross
#
# 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/licens... | 33.851064 | 100 | 0.653363 | 1,928 | 0.605908 | 0 | 0 | 0 | 0 | 0 | 0 | 1,400 | 0.439975 |
49ac5028ee971f3e584f2c491889fc4e4b16901b | 3,023 | py | Python | stub/nginx-status-stub.py | geld-tech/nginx-monitor-dashboard | 3fcd3bd184a0348095c4f4ec91a46ab98ee0ca80 | [
"Apache-2.0"
] | 1 | 2018-07-30T14:01:36.000Z | 2018-07-30T14:01:36.000Z | stub/nginx-status-stub.py | geld-tech/nginx-monitor-dashboard | 3fcd3bd184a0348095c4f4ec91a46ab98ee0ca80 | [
"Apache-2.0"
] | null | null | null | stub/nginx-status-stub.py | geld-tech/nginx-monitor-dashboard | 3fcd3bd184a0348095c4f4ec91a46ab98ee0ca80 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
NGINX Status Stub
Returns sample resources usage
"""
import logging
import logging.handlers
import random
from optparse import OptionParser
from flask import Flask
app = Flask(__name__)
app.debug = True
# Initialisation
logging.basicConfig(format='[%(asctime)-15s] [%(threadName)s] %(... | 50.383333 | 1,124 | 0.700629 | 0 | 0 | 0 | 0 | 2,068 | 0.684089 | 0 | 0 | 1,805 | 0.597089 |
49ad0529acc7b30e818083fbddf61cedb7ec9149 | 1,616 | py | Python | test_question4.py | fmakawa/Practice | 7f6eaa1dde4e46088ca5dcee76de1bb56a363238 | [
"MIT"
] | null | null | null | test_question4.py | fmakawa/Practice | 7f6eaa1dde4e46088ca5dcee76de1bb56a363238 | [
"MIT"
] | null | null | null | test_question4.py | fmakawa/Practice | 7f6eaa1dde4e46088ca5dcee76de1bb56a363238 | [
"MIT"
] | null | null | null | """
Question 4
Level 1
Question:
Write a program which accepts a sequence of comma-separated numbers from console and generate a list and a tuple which contains every number.
Suppose the following input is supplied to the program:
34,67,55,33,12,98
Then, the output should be:
['34', '67', '55', '33', '12', '98']
('34'... | 36.727273 | 141 | 0.61448 | 897 | 0.555074 | 0 | 0 | 842 | 0.52104 | 0 | 0 | 927 | 0.573639 |
49ad08a13c544d4263d6239603d117433df3bf65 | 53 | py | Python | src/poliastro/_math/integrate.py | DhruvJ22/poliastro | ac5fafc6d054b2c545e111e5a6aa32259998074a | [
"MIT"
] | 8 | 2015-05-09T17:21:57.000Z | 2020-01-28T06:59:18.000Z | src/poliastro/_math/integrate.py | DhruvJ22/poliastro | ac5fafc6d054b2c545e111e5a6aa32259998074a | [
"MIT"
] | 4 | 2015-12-29T13:08:01.000Z | 2019-12-27T12:58:04.000Z | src/poliastro/_math/integrate.py | DhruvJ22/poliastro | ac5fafc6d054b2c545e111e5a6aa32259998074a | [
"MIT"
] | 1 | 2016-10-05T08:34:44.000Z | 2016-10-05T08:34:44.000Z | from scipy.integrate import quad
__all__ = ["quad"]
| 13.25 | 32 | 0.735849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.113208 |
49ad2866726183e18afb70540beb33954b2be143 | 543 | py | Python | app/tasks/uwu/uwu.py | tahosa/discord-util-bot | 2f261c5ae06da8a62e72502b53341720437860f5 | [
"MIT"
] | null | null | null | app/tasks/uwu/uwu.py | tahosa/discord-util-bot | 2f261c5ae06da8a62e72502b53341720437860f5 | [
"MIT"
] | null | null | null | app/tasks/uwu/uwu.py | tahosa/discord-util-bot | 2f261c5ae06da8a62e72502b53341720437860f5 | [
"MIT"
] | 1 | 2022-02-09T04:16:54.000Z | 2022-02-09T04:16:54.000Z | import logging
import discord
import discord.ext.commands as commands
_LOG = logging.getLogger('discord-util').getChild("uwu")
class Uwu(commands.Cog):
@commands.Cog.listener()
async def on_message(self, message: discord.Message):
if message.content.lower().startswith('hello bot') or message.content.... | 31.941176 | 110 | 0.685083 | 412 | 0.758748 | 0 | 0 | 383 | 0.705341 | 354 | 0.651934 | 80 | 0.14733 |
49add70868769fd8f813dafc8912a925207ca004 | 4,011 | py | Python | rocket.py | FrCln/SpaceGarbage | 0e121143888b108eac2b86b1dd9fcbf20dcef36e | [
"MIT"
] | null | null | null | rocket.py | FrCln/SpaceGarbage | 0e121143888b108eac2b86b1dd9fcbf20dcef36e | [
"MIT"
] | null | null | null | rocket.py | FrCln/SpaceGarbage | 0e121143888b108eac2b86b1dd9fcbf20dcef36e | [
"MIT"
] | null | null | null | import math
import os
from curses_tools import draw_frame, get_frame_size
def _limit(value, min_value, max_value):
"""Limit value by min_value and max_value."""
if value < min_value:
return min_value
if value > max_value:
return max_value
return value
def _apply_acceleration(speed,... | 31.335938 | 115 | 0.607828 | 3,106 | 0.738996 | 0 | 0 | 0 | 0 | 0 | 0 | 1,250 | 0.297407 |
49ae3d28975be04fc1299eea9d4febbbbbb376de | 7,963 | py | Python | src/roll.py | SimonPerche/PersonalitiesWars | 495803a5be5e9fde572c3f39086d8a3510c75f58 | [
"MIT"
] | null | null | null | src/roll.py | SimonPerche/PersonalitiesWars | 495803a5be5e9fde572c3f39086d8a3510c75f58 | [
"MIT"
] | null | null | null | src/roll.py | SimonPerche/PersonalitiesWars | 495803a5be5e9fde572c3f39086d8a3510c75f58 | [
"MIT"
] | 1 | 2022-03-08T22:07:50.000Z | 2022-03-08T22:07:50.000Z | import secrets
import asyncio
from datetime import datetime, timedelta
import discord
from discord.ext import commands
from database import DatabasePersonality, DatabaseDeck
class Roll(commands.Cog):
def __init__(self, bot):
"""Initial the cog with the bot."""
self.bot = bot
#### Commands #... | 41.259067 | 154 | 0.615346 | 6,320 | 0.793372 | 0 | 0 | 6,169 | 0.774416 | 6,076 | 0.762742 | 1,489 | 0.186919 |
49ae4cab0439ba556dfe9b168c615e0466cf0551 | 2,195 | py | Python | test.py | mltnhm/sr-turtle | d839eeb50e4ba70cfc2a4070c9f6fda2f0b19ca2 | [
"MIT"
] | 1 | 2020-04-16T18:06:13.000Z | 2020-04-16T18:06:13.000Z | test.py | mltnhm/sr-turtle | d839eeb50e4ba70cfc2a4070c9f6fda2f0b19ca2 | [
"MIT"
] | 3 | 2019-05-11T20:39:31.000Z | 2019-11-13T10:51:59.000Z | test.py | mltnhm/sr-turtle | d839eeb50e4ba70cfc2a4070c9f6fda2f0b19ca2 | [
"MIT"
] | 1 | 2019-11-12T08:02:52.000Z | 2019-11-12T08:02:52.000Z | from __future__ import print_function
import time
from sr.robot import *
SEARCHING = "SEARCHING"
DRIVING = "DRIVING"
R = Robot()
def drive(speed, seconds):
R.motors[0].m0.power = speed
R.motors[0].m1.power = speed
time.sleep(seconds)
R.motors[0].m0.power = 0
R.motors[0].m1.power = 0
def turn(s... | 25.229885 | 75 | 0.491116 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 326 | 0.148519 |
49aebc3c829e124d35af1e1fc14ed2a19ad3ba06 | 9,218 | py | Python | ATIVIDAS UF/exemplos.py | alverad-katsuro/Python | 6ba3cc604fd9cde3ee012fcf17bbf6cd944e8c38 | [
"MIT"
] | null | null | null | ATIVIDAS UF/exemplos.py | alverad-katsuro/Python | 6ba3cc604fd9cde3ee012fcf17bbf6cd944e8c38 | [
"MIT"
] | null | null | null | ATIVIDAS UF/exemplos.py | alverad-katsuro/Python | 6ba3cc604fd9cde3ee012fcf17bbf6cd944e8c38 | [
"MIT"
] | null | null | null | from math import log
def ef_cache():
acerto = eval(input("Digite a quantidade de acertos: "))
acessos = eval(input("Digite a quantidade de acessos: "))
e = acerto / acessos
return e
def bit_dados():
cap = eval(input("Digite a capacidade da cache: "))
byte = eval(input("Digite a quantidade de... | 43.895238 | 129 | 0.653179 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,329 | 0.466588 |
49af0bc491e51d1946b18c865a7ad51bc62f12c7 | 15,786 | py | Python | supvisors/tests/test_mainloop.py | julien6387/supvisors | 4e32bce566dec2cf9e9a213a3698178030eb869b | [
"Apache-2.0"
] | 66 | 2017-01-05T11:28:34.000Z | 2022-03-04T08:42:01.000Z | supvisors/tests/test_mainloop.py | julien6387/supvisors | 4e32bce566dec2cf9e9a213a3698178030eb869b | [
"Apache-2.0"
] | 36 | 2016-12-30T10:46:58.000Z | 2022-01-09T22:56:10.000Z | supvisors/tests/test_mainloop.py | julien6387/supvisors | 4e32bce566dec2cf9e9a213a3698178030eb869b | [
"Apache-2.0"
] | 12 | 2017-03-04T04:53:51.000Z | 2022-01-28T13:03:22.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ======================================================================
# Copyright 2017 Julien LE CLEACH
#
# 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 Lice... | 43.607735 | 110 | 0.705752 | 0 | 0 | 200 | 0.012669 | 297 | 0.018814 | 0 | 0 | 4,885 | 0.309451 |
49afc71691a68c9b40e3421c08e29b8368b54b60 | 2,815 | py | Python | wolf_control/scripts/mission.py | ncsurobotics/SW8S-ROS | 9f7f5811fe1a1a8d5d0de0b791ce757fcaeb5759 | [
"MIT"
] | null | null | null | wolf_control/scripts/mission.py | ncsurobotics/SW8S-ROS | 9f7f5811fe1a1a8d5d0de0b791ce757fcaeb5759 | [
"MIT"
] | null | null | null | wolf_control/scripts/mission.py | ncsurobotics/SW8S-ROS | 9f7f5811fe1a1a8d5d0de0b791ce757fcaeb5759 | [
"MIT"
] | 1 | 2022-03-30T19:12:52.000Z | 2022-03-30T19:12:52.000Z | #!/usr/bin/env python
import rospy
from geometry_msgs.msg import Twist, TransformStamped
from std_msgs.msg import String
from enum import Enum
import tf2_ros
import math
class mission_states(Enum):
STOP = -1
SUBMERGE = 0
MOVE_TO_GATE = 1
MOVE_THROUGH_GATE = 2
def checkTolerance(current, wanted):
t... | 38.040541 | 105 | 0.596448 | 105 | 0.0373 | 0 | 0 | 0 | 0 | 0 | 0 | 168 | 0.05968 |
49b0052d2675e4f9dc69452f3b5d084691e4a664 | 19,202 | py | Python | tests/tests/test_api_management.py | MaciejTe/useradm | 4962000db94bc7d9e80b81c4389f6f769d0d062a | [
"Apache-2.0"
] | 8 | 2017-02-27T08:58:08.000Z | 2020-05-25T14:37:24.000Z | tests/tests/test_api_management.py | MaciejTe/useradm | 4962000db94bc7d9e80b81c4389f6f769d0d062a | [
"Apache-2.0"
] | 263 | 2016-11-17T15:02:26.000Z | 2022-03-31T10:04:09.000Z | tests/tests/test_api_management.py | MaciejTe/useradm | 4962000db94bc7d9e80b81c4389f6f769d0d062a | [
"Apache-2.0"
] | 25 | 2016-11-16T15:45:38.000Z | 2020-12-19T09:56:16.000Z | #!/usr/bin/python
# Copyright 2021 Northern.tech AS
#
# 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 ap... | 38.327345 | 86 | 0.672638 | 18,321 | 0.954119 | 0 | 0 | 5,559 | 0.289501 | 0 | 0 | 2,653 | 0.138163 |
49b03158777693b6348d205c910ad771b55e53ea | 1,167 | py | Python | scripts/convert_to_bed.py | Lila14/multimds | e54642e0ae47592321352f931f534881ca57d888 | [
"MIT"
] | 1 | 2019-10-29T12:33:57.000Z | 2019-10-29T12:33:57.000Z | scripts/convert_to_bed.py | Lila14/multimds | e54642e0ae47592321352f931f534881ca57d888 | [
"MIT"
] | null | null | null | scripts/convert_to_bed.py | Lila14/multimds | e54642e0ae47592321352f931f534881ca57d888 | [
"MIT"
] | null | null | null | import os
chrom_bins = {}
with open("GSE88952_Sc_Su.32000.bed") as in_file:
for line in in_file:
line = line.strip().split()
chrom_bins[line[3]] = "{}\t{}\t{}".format(line[0], line[1], line[2])
in_file.close()
if not os.path.isfile("ctrl_32kb.bed"):
with open("ctrl_32kb.bed", "w") as out_file:
with open("ct... | 29.175 | 71 | 0.652956 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 179 | 0.153385 |
49b1fd488e00bd5cbf7211a994c7ac528083422a | 21,956 | py | Python | xinshuo_visualization/prob_stat_vis.py | xinshuoweng/Xinshuo_PyToolbox | ce4cf0398f24c5a611af9d94dc0bf2a9104a3716 | [
"MIT"
] | 31 | 2020-03-05T12:27:21.000Z | 2022-03-07T04:00:18.000Z | xinshuo_visualization/prob_stat_vis.py | xinshuoweng/Xinshuo_PyToolbox | ce4cf0398f24c5a611af9d94dc0bf2a9104a3716 | [
"MIT"
] | null | null | null | xinshuo_visualization/prob_stat_vis.py | xinshuoweng/Xinshuo_PyToolbox | ce4cf0398f24c5a611af9d94dc0bf2a9104a3716 | [
"MIT"
] | 12 | 2020-07-06T05:06:58.000Z | 2021-11-18T14:43:20.000Z | # Author: Xinshuo Weng
# email: [email protected]
import matplotlib.pyplot as plt, numpy as np
# import seaborn as sns
# from pandas import DataFrame
# from sklearn.neighbors import NearestNeighbors
from terminaltables import AsciiTable
from collections import Counter
from .private import save_vis_close_helper, ... | 49.674208 | 269 | 0.660867 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,134 | 0.279377 |
49b2849f5a27a9f4b798aac2f6c1149060ada338 | 96 | py | Python | first_project/pizza_store/apps.py | itamaro/django-zero-to-cloud | 0b0a4f75bf6a27855b00a88aebf93471a38e0c3c | [
"Apache-2.0"
] | null | null | null | first_project/pizza_store/apps.py | itamaro/django-zero-to-cloud | 0b0a4f75bf6a27855b00a88aebf93471a38e0c3c | [
"Apache-2.0"
] | null | null | null | first_project/pizza_store/apps.py | itamaro/django-zero-to-cloud | 0b0a4f75bf6a27855b00a88aebf93471a38e0c3c | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class PizzaStoreConfig(AppConfig):
name = 'pizza_store'
| 16 | 34 | 0.770833 | 59 | 0.614583 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.135417 |
49b384eb266010cb19d2dcb98f62539f08a56ecd | 2,530 | py | Python | bin/sweep_rhoref.py | lukaselflein/sarah_folderstructure | a725271db3d8b5b28b24918b3daf0942fa04dcd8 | [
"MIT"
] | null | null | null | bin/sweep_rhoref.py | lukaselflein/sarah_folderstructure | a725271db3d8b5b28b24918b3daf0942fa04dcd8 | [
"MIT"
] | 28 | 2019-03-29T13:34:57.000Z | 2019-07-04T09:27:07.000Z | bin/sweep_rhoref.py | lukaselflein/sarah_folderstructure | a725271db3d8b5b28b24918b3daf0942fa04dcd8 | [
"MIT"
] | null | null | null | """Vary the rhoref parameter to find a sane value.
Copyright 2019 Simulation Lab
University of Freiburg
Author: Lukas Elflein <[email protected]>
"""
from __future__ import print_function
import os
import shutil
#import multiprocessing
#import sys
import random
from loop_cost_functions import calc_cost_fun... | 28.75 | 84 | 0.617787 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 886 | 0.350198 |
49b5f0ea075bbb7b79a2d40b2e4b0bdffec0743f | 12,388 | py | Python | weasyl/test/web/test_site_updates.py | sl1-1/weasyl | d4f6bf3e33b85a2289a451d95d5b90ff24f5d539 | [
"Apache-2.0"
] | 1 | 2019-02-15T04:21:48.000Z | 2019-02-15T04:21:48.000Z | weasyl/test/web/test_site_updates.py | sl1-1/weasyl | d4f6bf3e33b85a2289a451d95d5b90ff24f5d539 | [
"Apache-2.0"
] | 254 | 2017-12-23T19:36:43.000Z | 2020-04-14T21:46:13.000Z | weasyl/test/web/test_site_updates.py | sl1-1/weasyl | d4f6bf3e33b85a2289a451d95d5b90ff24f5d539 | [
"Apache-2.0"
] | 1 | 2017-12-23T18:42:16.000Z | 2017-12-23T18:42:16.000Z | from __future__ import absolute_import, unicode_literals
import pytest
from libweasyl import staff
from libweasyl.legacy import UNIXTIME_OFFSET
from weasyl import errorcode
from weasyl import siteupdate
from weasyl.define import sessionmaker
from weasyl.test import db_utils
_FORM = {
u'title': u'Title',
u'c... | 39.705128 | 144 | 0.690265 | 0 | 0 | 0 | 0 | 11,985 | 0.967469 | 0 | 0 | 2,628 | 0.212141 |
49b63c647e63040901947f17755b744a1b67eb27 | 298 | py | Python | 17_Greedy/Step05/gamjapark.py | StudyForCoding/BEAKJOON | 84e1c5e463255e919ccf6b6a782978c205420dbf | [
"MIT"
] | null | null | null | 17_Greedy/Step05/gamjapark.py | StudyForCoding/BEAKJOON | 84e1c5e463255e919ccf6b6a782978c205420dbf | [
"MIT"
] | 3 | 2020-11-04T05:38:53.000Z | 2021-03-02T02:15:19.000Z | 17_Greedy/Step05/gamjapark.py | StudyForCoding/BEAKJOON | 84e1c5e463255e919ccf6b6a782978c205420dbf | [
"MIT"
] | null | null | null | import sys
N = int(sys.stdin.readline())
dis = list(map(int, sys.stdin.readline().split()))
coin = list(map(int, sys.stdin.readline().split()))
use_coin = coin[0]
tot = dis[0] * use_coin
for i in range(1, N - 1):
if coin[i] < use_coin:
use_coin = coin[i]
tot += dis[i] * use_coin
print(tot) | 19.866667 | 51 | 0.64094 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
49b84672d25848b03244c392641967f515178752 | 1,395 | py | Python | examples/tx_rpc_client_ssl.py | jakm/txmsgpackrpc | 9ff15fd7a7cd412d246d4e4937a5c56365f0d6be | [
"MIT"
] | 18 | 2015-01-19T15:27:02.000Z | 2018-12-29T17:30:36.000Z | examples/tx_rpc_client_ssl.py | jakm/txmsgpackrpc | 9ff15fd7a7cd412d246d4e4937a5c56365f0d6be | [
"MIT"
] | 6 | 2015-05-27T11:28:18.000Z | 2016-12-19T06:35:55.000Z | examples/tx_rpc_client_ssl.py | jakm/txmsgpackrpc | 9ff15fd7a7cd412d246d4e4937a5c56365f0d6be | [
"MIT"
] | 4 | 2015-03-24T22:18:27.000Z | 2018-02-05T18:12:45.000Z | from twisted.internet import defer, reactor
@defer.inlineCallbacks
def main():
try:
from txmsgpackrpc.client import connect
c = yield connect('localhost', 8000, ssl=True, connectTimeout=5, waitTimeout=5)
data = {
'firstName': 'John',
'lastName': 'S... | 27.352941 | 87 | 0.387097 | 0 | 0 | 1,246 | 0.89319 | 1,269 | 0.909677 | 0 | 0 | 278 | 0.199283 |
49ba5224fd8503eb5f417c4656d1970b4252f78d | 714 | py | Python | currency_converter.py | patricianicolentan/currency-converters | e398796c99a0bb2a16fba9888baed0e289884237 | [
"MIT"
] | null | null | null | currency_converter.py | patricianicolentan/currency-converters | e398796c99a0bb2a16fba9888baed0e289884237 | [
"MIT"
] | null | null | null | currency_converter.py | patricianicolentan/currency-converters | e398796c99a0bb2a16fba9888baed0e289884237 | [
"MIT"
] | null | null | null | # Converts user-defined currencies using Google
import webbrowser, os, selenium
from selenium import webdriver
driver = webdriver.Firefox()
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
currencyX = input("O... | 39.666667 | 149 | 0.710084 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 322 | 0.45098 |
49bc8549c7944e60a8f4b2d3ccdc16b4d5329c4f | 890 | py | Python | SwitchTracer/universal/exceptions/__init__.py | IzayoiRin/VirtualVeyonST | d0c4035dba81d02135ad54f4c5a5d463e95f7925 | [
"MIT"
] | null | null | null | SwitchTracer/universal/exceptions/__init__.py | IzayoiRin/VirtualVeyonST | d0c4035dba81d02135ad54f4c5a5d463e95f7925 | [
"MIT"
] | null | null | null | SwitchTracer/universal/exceptions/__init__.py | IzayoiRin/VirtualVeyonST | d0c4035dba81d02135ad54f4c5a5d463e95f7925 | [
"MIT"
] | null | null | null | class UniErrors(Exception):
pass
class SetupErrors(UniErrors):
pass
class SettingErrors(UniErrors):
pass
class ConfigureSyntaxErrors(UniErrors):
pass
class NoLocationErrors(UniErrors):
pass
class ImportedErrors(UniErrors):
pass
class KernelWaresSettingsErrors(UniErrors):
pass
c... | 11.866667 | 44 | 0.746067 | 835 | 0.938202 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
49bc98db6539f3a16066fd5753ae5ccc2e439eb8 | 1,107 | py | Python | tests/test_dht.py | fakegit/stilio | cf198b8ccadc7dcadc462ce83b801af00ef4e2f2 | [
"Apache-2.0"
] | 71 | 2019-10-09T17:18:12.000Z | 2022-02-26T12:15:53.000Z | tests/test_dht.py | zinsking/stilio | eade3c1993e185bef53fa25b4e12fe8be330251c | [
"Apache-2.0"
] | 3 | 2019-10-16T17:52:48.000Z | 2021-12-01T16:50:18.000Z | tests/test_dht.py | zinsking/stilio | eade3c1993e185bef53fa25b4e12fe8be330251c | [
"Apache-2.0"
] | 11 | 2020-01-21T09:09:14.000Z | 2022-03-27T12:05:36.000Z | from stilio.crawler.dht.node import Node
class TestNode:
def setup_method(self):
self.node = Node.create_random("192.168.1.1", 8000)
def test_create_random(self) -> None:
assert self.node.address == "192.168.1.1"
assert self.node.port == 8000
def test_generate_random_id(self) -> ... | 31.628571 | 60 | 0.581752 | 1,063 | 0.960253 | 0 | 0 | 0 | 0 | 0 | 0 | 130 | 0.117435 |
49bd3fd869f70ef4d24196d954aa248d999405b6 | 714 | py | Python | 04_threading_yield.py | BiAPoL/online_image_processing_napari | 680d9ceeef5ae188541a96c7125f0fca07f28af5 | [
"Unlicense"
] | 2 | 2021-05-10T13:44:15.000Z | 2022-03-16T20:20:39.000Z | 04_threading_yield.py | BiAPoL/online_image_processing_napari | 680d9ceeef5ae188541a96c7125f0fca07f28af5 | [
"Unlicense"
] | 1 | 2021-05-17T16:11:54.000Z | 2021-05-19T19:38:50.000Z | 04_threading_yield.py | BiAPoL/online_image_processing_napari | 680d9ceeef5ae188541a96c7125f0fca07f28af5 | [
"Unlicense"
] | 2 | 2021-05-17T16:36:12.000Z | 2022-03-18T15:07:14.000Z | import napari
import time
from napari._qt.qthreading import thread_worker
import numpy as np
# create a viewer window
viewer = napari.Viewer()
# https://napari.org/guides/stable/threading.html
@thread_worker
def loop_run():
while True: # endless loop
print("Hello world", time.time())
time.sleep(0.... | 20.4 | 49 | 0.676471 | 0 | 0 | 151 | 0.211485 | 166 | 0.232493 | 0 | 0 | 225 | 0.315126 |
49bec7c54696e35577e6576d879d884656bd76e8 | 1,937 | py | Python | wordonhd/ApiException.py | Mechazawa/WordOn-HD-Bot | d5a9dedd3d548ad1a9b33f49646e532bf511dd3e | [
"BSD-2-Clause"
] | null | null | null | wordonhd/ApiException.py | Mechazawa/WordOn-HD-Bot | d5a9dedd3d548ad1a9b33f49646e532bf511dd3e | [
"BSD-2-Clause"
] | null | null | null | wordonhd/ApiException.py | Mechazawa/WordOn-HD-Bot | d5a9dedd3d548ad1a9b33f49646e532bf511dd3e | [
"BSD-2-Clause"
] | null | null | null | from enum import Enum
from requests import Response
from urllib.parse import unquote
import json
class ApiErrorCode(Enum):
PHP_INVALID = 0
PHP_MISSING_PARAMS = 1
PHP_AUTH_FAILED = 2
PHP_NAME_INVALID = 4
PHP_USERNAME_INVALID = 5
PHP_USER_ALREADY_EXISTS = 6
PHP_PASSWORD_INVALID = 7
PHP_U... | 28.485294 | 87 | 0.661848 | 1,835 | 0.947341 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.025813 |