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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bb0e76409aeef486ffdd393f481e6ae875e7c355 | 7,338 | py | Python | test/pytest/test_model_archiver.py | vvekic/serve | f02a56bf1f0de1705fd9f399c1115d36e343c90c | [
"Apache-2.0"
] | 2 | 2022-03-26T05:17:45.000Z | 2022-03-26T05:44:53.000Z | test/pytest/test_model_archiver.py | vvekic/serve | f02a56bf1f0de1705fd9f399c1115d36e343c90c | [
"Apache-2.0"
] | null | null | null | test/pytest/test_model_archiver.py | vvekic/serve | f02a56bf1f0de1705fd9f399c1115d36e343c90c | [
"Apache-2.0"
] | 1 | 2020-09-14T08:31:34.000Z | 2020-09-14T08:31:34.000Z | import subprocess
import time
import os
import glob
import requests
import json
import test_utils
MODEL_SFILE_NAME = 'resnet18-f37072fd.pth'
def setup_module(module):
test_utils.torchserve_cleanup()
response = requests.get('https://download.pytorch.org/models/' + MODEL_SFILE_NAME, allow_redirects=True)
o... | 34.613208 | 150 | 0.661897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,363 | 0.322022 |
bb0fd7461ac334e4ca39e6b98dfce5e7a36f1733 | 2,176 | py | Python | scripts/isuag/zero_daily_precip.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | 1 | 2019-10-07T17:01:24.000Z | 2019-10-07T17:01:24.000Z | scripts/isuag/zero_daily_precip.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | scripts/isuag/zero_daily_precip.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | """Sometimes we need to completely zero out precip for a day
Likely due to water being dumped into the tipping bucket to clean it :/
"""
from __future__ import print_function
import sys
import datetime
import pytz
from pyiem.util import get_dbconn
def zero_hourly(station, sts, ets):
"""Zero out the hourly data"... | 29.405405 | 78 | 0.619485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 996 | 0.457721 |
bb11c19b934ae7836905268d9b3aaa294ea05171 | 602 | py | Python | tests/test_upload_client.py | hepoo6/gdc-client | 4453c6412aca55bcc458d710de148a4cabf95cd6 | [
"Apache-2.0"
] | null | null | null | tests/test_upload_client.py | hepoo6/gdc-client | 4453c6412aca55bcc458d710de148a4cabf95cd6 | [
"Apache-2.0"
] | null | null | null | tests/test_upload_client.py | hepoo6/gdc-client | 4453c6412aca55bcc458d710de148a4cabf95cd6 | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase
from gdc_client.upload.client import create_resume_path
class UploadClientTest(TestCase):
def setup(self):
pass
def test_create_resume_path(self):
# don't need to test if there's no file given
# that is checked in multipart_upload()
tests = ["/pa... | 28.666667 | 69 | 0.611296 | 512 | 0.850498 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.330565 |
bb123dfd4bea8d7fa36ad8f1991ad5d0085d8387 | 15,843 | py | Python | Fibonnacci GUI VERSION.py | Nuklear-s-Team/fibonacciThing | 2b32f10a87faf87b6702e7caa20c69d8df6873e3 | [
"CC0-1.0"
] | null | null | null | Fibonnacci GUI VERSION.py | Nuklear-s-Team/fibonacciThing | 2b32f10a87faf87b6702e7caa20c69d8df6873e3 | [
"CC0-1.0"
] | null | null | null | Fibonnacci GUI VERSION.py | Nuklear-s-Team/fibonacciThing | 2b32f10a87faf87b6702e7caa20c69d8df6873e3 | [
"CC0-1.0"
] | 1 | 2020-04-08T18:32:54.000Z | 2020-04-08T18:32:54.000Z | # Copyright 2020 Khang Nguyen and Tim Merrill
# Improved by Luzgog
# Made with the same translate function as the original.
import tkinter as tkinter
from tkinter import messagebox
from tkinter import scrolledtext
from Fibonacci_Encoder import encode, decode, encodeReversed, decodeReversed, randomGen, encodeR... | 57.194946 | 279 | 0.640977 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,405 | 0.404279 |
bb1296c730e04aac4e482709b1a4e2821eed085b | 177 | py | Python | My Tools/Number Reverse/numberReverse.py | AbhyasKanaujia/Project-Euler | 9359474e87ac86c89872692fb162119ca0841251 | [
"MIT"
] | 2 | 2020-11-18T15:10:03.000Z | 2020-11-22T08:28:15.000Z | My Tools/Number Reverse/numberReverse.py | AbhyasKanaujia/Project-Euler | 9359474e87ac86c89872692fb162119ca0841251 | [
"MIT"
] | null | null | null | My Tools/Number Reverse/numberReverse.py | AbhyasKanaujia/Project-Euler | 9359474e87ac86c89872692fb162119ca0841251 | [
"MIT"
] | null | null | null | num = int(input("Enter a number: "))
temp = num
reverse = 0
while(temp):
reverse = (reverse * 10) + (temp % 10)
temp = int(temp / 10)
print("Reversed: " + str(reverse)) | 22.125 | 42 | 0.59322 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.169492 |
bb13062c6af81b0c777ea745fa403b4616b78912 | 1,267 | py | Python | Botnet-Generator/HTTPSocket.py | m4ta1l/KratosKnife | ff80631c2d1d865806e2da1e810239aa401891e8 | [
"BSD-3-Clause"
] | 155 | 2020-09-04T12:26:10.000Z | 2022-03-09T02:20:27.000Z | Botnet-Generator/HTTPSocket.py | m4ta1l/KratosKnife | ff80631c2d1d865806e2da1e810239aa401891e8 | [
"BSD-3-Clause"
] | 14 | 2020-12-27T06:25:20.000Z | 2022-03-01T04:27:01.000Z | Botnet-Generator/HTTPSocket.py | m4ta1l/KratosKnife | ff80631c2d1d865806e2da1e810239aa401891e8 | [
"BSD-3-Clause"
] | 57 | 2020-10-11T15:21:35.000Z | 2022-03-23T19:46:30.000Z | import requests, base64
class HTTPSocket:
def __init__(self, host, victim_id):
self.host = host
self.victim_id = victim_id
def _GET(self, filename, request):
requests.get(url=self.host + filename, params=request)
def _POST(self, filename, request):
requests.post... | 35.194444 | 123 | 0.595107 | 1,217 | 0.960537 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.090766 |
bb1432cc0316cac36dc4f14023445d368e2c8a51 | 790 | py | Python | Binary Search/081. Search in Rotated Sorted Array II.py | beckswu/Leetcode | 480e8dc276b1f65961166d66efa5497d7ff0bdfd | [
"MIT"
] | 138 | 2020-02-08T05:25:26.000Z | 2021-11-04T11:59:28.000Z | Binary Search/081. Search in Rotated Sorted Array II.py | beckswu/Leetcode | 480e8dc276b1f65961166d66efa5497d7ff0bdfd | [
"MIT"
] | null | null | null | Binary Search/081. Search in Rotated Sorted Array II.py | beckswu/Leetcode | 480e8dc276b1f65961166d66efa5497d7ff0bdfd | [
"MIT"
] | 24 | 2021-01-02T07:18:43.000Z | 2022-03-20T08:17:54.000Z | """
81. Search in Rotated Sorted Array II
"""
class Solution:
def search(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: bool
"""
l, r, n = 0, len(nums)-1, len(nums)
while l<=r:
while r>l and nums[l+1]==nums[l]:... | 29.259259 | 68 | 0.405063 | 739 | 0.935443 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.181013 |
bb153760d668539261a0d33707c85c1e1d93f62e | 191 | py | Python | PEPit/tools/__init__.py | bgoujaud/PEPit | 7352607069f5e90fb1919fc689ec5e9d745c3bac | [
"MIT"
] | 44 | 2021-11-18T16:41:20.000Z | 2022-02-14T09:59:13.000Z | PEPit/tools/__init__.py | bgoujaud/PEPit | 7352607069f5e90fb1919fc689ec5e9d745c3bac | [
"MIT"
] | 2 | 2021-10-05T09:20:25.000Z | 2022-02-19T13:58:01.000Z | PEPit/tools/__init__.py | PerformanceEstimation/PEPit | 7005bc9a9da11dea448966437365c897734ec341 | [
"MIT"
] | 1 | 2022-02-08T12:03:29.000Z | 2022-02-08T12:03:29.000Z | from .dict_operations import merge_dict, prune_dict, multiply_dicts
__all__ = ['dict_operations',
'merge_dict',
'prune_dict',
'multiply_dicts',
]
| 23.875 | 67 | 0.602094 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.298429 |
bb16c061583288ca3f3f83e5792419424b095ace | 2,777 | py | Python | methods/ham.py | vickyyu90/maxnet | 38c49c39dbe77b2984d8cdb2f4087310b2220593 | [
"Apache-2.0"
] | null | null | null | methods/ham.py | vickyyu90/maxnet | 38c49c39dbe77b2984d8cdb2f4087310b2220593 | [
"Apache-2.0"
] | null | null | null | methods/ham.py | vickyyu90/maxnet | 38c49c39dbe77b2984d8cdb2f4087310b2220593 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import torch
from torch.autograd import Variable
import torch.nn.functional as F
class FeatureExtractor():
def __init__(self, model, intermediate_layers):
self.model = model
self.intermediate_layers = intermediate_layers[::-1]
self.weights = []
self.num = len(self... | 43.390625 | 137 | 0.658985 | 2,673 | 0.96255 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.015484 |
bb177b31aa9101d899611eb71a8b7cb4ca24eeba | 1,173 | py | Python | wicket/commands/__init__.py | GeekMasher/wicket-discord-docker-bot | 5f7bfa466718018fba3babe1357115ac19a8ec18 | [
"MIT"
] | null | null | null | wicket/commands/__init__.py | GeekMasher/wicket-discord-docker-bot | 5f7bfa466718018fba3babe1357115ac19a8ec18 | [
"MIT"
] | null | null | null | wicket/commands/__init__.py | GeekMasher/wicket-discord-docker-bot | 5f7bfa466718018fba3babe1357115ac19a8ec18 | [
"MIT"
] | null | null | null | import discord
from wicket.commands.list import botListServices
from wicket.commands.docker_commands import *
async def botHelp(cxt, message: discord.Message, **kargvs):
TEXT = "Help Options:\n"
for name, command in COMMANDS.items():
TEXT += f" - `{cxt.__PREFIX__} {name}` - {command.get('descriptio... | 24.4375 | 85 | 0.553282 | 0 | 0 | 0 | 0 | 0 | 0 | 342 | 0.29156 | 418 | 0.356351 |
bb17d26fa2cfe52fac2399248342acf911c767f1 | 125 | py | Python | rl_helper/__init__.py | yiwc/rl_helper | 3cb0c088b40dabd3fa17af6e53f7c9563c7ef8b8 | [
"MIT"
] | null | null | null | rl_helper/__init__.py | yiwc/rl_helper | 3cb0c088b40dabd3fa17af6e53f7c9563c7ef8b8 | [
"MIT"
] | null | null | null | rl_helper/__init__.py | yiwc/rl_helper | 3cb0c088b40dabd3fa17af6e53f7c9563c7ef8b8 | [
"MIT"
] | null | null | null | from rl_helper.envhelper import envhelper,VDisplay
from rl_helper.fps import fps
from rl_helper.exps import ExperimentManager | 41.666667 | 50 | 0.88 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bb1819c9bd2f8222a4a5fb0e41cee2222fe0b742 | 12,923 | py | Python | abstract_matrix.py | sredroboto/math-matrix | 71b8d53fb2b3bd7f8a27dde6a5ee2a4847b135ad | [
"BSD-3-Clause"
] | 2 | 2019-11-21T14:28:50.000Z | 2019-11-21T20:58:46.000Z | abstract_matrix.py | sredroboto/SistemaSolar | 4fa946adab7e5308639954feb00a2b3bc7153f91 | [
"BSD-3-Clause"
] | null | null | null | abstract_matrix.py | sredroboto/SistemaSolar | 4fa946adab7e5308639954feb00a2b3bc7153f91 | [
"BSD-3-Clause"
] | null | null | null | from abc import ABC, abstractmethod
class AbstractMatrix(ABC):
"""
Classe utilizada para representar uma matriz
"""
def __init__(self, rows, cols, data = []):
"""
Args:
rows: Quantidade de linhas da matriz
cols: Quantidade de colunas da matriz
d... | 30.550827 | 102 | 0.514973 | 12,987 | 0.997159 | 0 | 0 | 12,008 | 0.92199 | 0 | 0 | 11,310 | 0.868397 |
bb186d9ac7e63873279e945b49b97d3ba19eab1c | 534 | py | Python | P0003.py | sebastianaldi17/ProjectEuler | 19562fba3456ec904bcc264fb786a92610e42622 | [
"MIT"
] | null | null | null | P0003.py | sebastianaldi17/ProjectEuler | 19562fba3456ec904bcc264fb786a92610e42622 | [
"MIT"
] | null | null | null | P0003.py | sebastianaldi17/ProjectEuler | 19562fba3456ec904bcc264fb786a92610e42622 | [
"MIT"
] | null | null | null | # Largest prime factor
# https://projecteuler.net/problem=3
# Sieve of erasthotenes apporach
# But still slow due to iteration to sqrt(n)
from math import sqrt
question = 600851475143
def solve(n):
ans = 1
limit = int(sqrt(n))
prime = [True for i in range(limit+1)]
p = 2
while p <= limit:
i... | 25.428571 | 44 | 0.586142 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.250936 |
bb1a364dd066752f967226672bd3ed108b79d4bc | 239 | py | Python | data_structures/binary_heap_operations.py | johnnydevriese/python_fun | 01fc5fcc82c7c27e25eabff85a2e88f3554129fe | [
"MIT"
] | null | null | null | data_structures/binary_heap_operations.py | johnnydevriese/python_fun | 01fc5fcc82c7c27e25eabff85a2e88f3554129fe | [
"MIT"
] | null | null | null | data_structures/binary_heap_operations.py | johnnydevriese/python_fun | 01fc5fcc82c7c27e25eabff85a2e88f3554129fe | [
"MIT"
] | null | null | null | from pythonds.trees.binheap import BinHeap
# pythonds so we need to use python2.7 to run
bh = BinHeap()
bh.insert(5)
bh.insert(7)
bh.insert(3)
bh.insert(11)
print(bh.delMin())
print(bh.delMin())
print(bh.delMin())
print(bh.delMin())
| 13.277778 | 45 | 0.707113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.188285 |
bb1bdf6c26b937672babc629910c4f289f158546 | 3,893 | py | Python | test/unit/extractor/test_sticky_relations.py | willangenent/abridger | 6daa80f7360339376b38544ce60694c5addaa30f | [
"MIT"
] | 8 | 2016-10-19T14:15:34.000Z | 2020-06-23T09:37:02.000Z | test/unit/extractor/test_sticky_relations.py | freewilll/abridger | 6daa80f7360339376b38544ce60694c5addaa30f | [
"MIT"
] | null | null | null | test/unit/extractor/test_sticky_relations.py | freewilll/abridger | 6daa80f7360339376b38544ce60694c5addaa30f | [
"MIT"
] | null | null | null | import pytest
from abridger.extraction_model import Relation
from abridger.schema import SqliteSchema
from test.unit.extractor.base import TestExtractorBase
class TestExtractorStickyRelations(TestExtractorBase):
@pytest.fixture()
def schema_out(self):
'''
test1 -> sticky -> test3 ... | 33.273504 | 74 | 0.512972 | 3,732 | 0.958644 | 0 | 0 | 2,217 | 0.569484 | 0 | 0 | 1,564 | 0.401747 |
bb1d0fc3b94fe211964f09e6d84f5d3d39abde23 | 6,375 | py | Python | edl/gtdb.py | jmeppley/py-metagenomics | 0dbab073cb7e52c4826054e40eb802c9e0298e9a | [
"MIT"
] | 7 | 2015-05-14T09:36:36.000Z | 2022-03-30T14:32:21.000Z | edl/gtdb.py | jmeppley/py-metagenomics | 0dbab073cb7e52c4826054e40eb802c9e0298e9a | [
"MIT"
] | 1 | 2015-07-14T11:47:25.000Z | 2015-07-17T01:45:26.000Z | edl/gtdb.py | jmeppley/py-metagenomics | 0dbab073cb7e52c4826054e40eb802c9e0298e9a | [
"MIT"
] | 7 | 2015-07-25T22:29:29.000Z | 2022-03-01T21:26:14.000Z | """
Tools for parsing GTDB headers into a taxonomy model
"""
import os
import re
import sys
import logging
from edl.taxon import TaxNode, Taxonomy
from edl.silva import writeDumpFiles
from edl.util import treeGenerator
logger = logging.getLogger(__name__)
GTDB = 'gtdb'
GTDBTAB = 'gtdb_table'
PHYLODB = 'phylodb'
de... | 30.797101 | 78 | 0.604863 | 0 | 0 | 1,162 | 0.182275 | 0 | 0 | 0 | 0 | 1,688 | 0.264784 |
bb1e4016be4331d352fd22fa658ec03e7e142dff | 161 | py | Python | Coursera/CICCP1/dezenas.py | marcelomiky/python_code | 4b843c78e16c37e981e4adfe47ae974ee0f2ad81 | [
"MIT"
] | 2 | 2020-10-19T13:53:59.000Z | 2021-08-05T19:48:07.000Z | Coursera/CICCP1/dezenas.py | marcelomiky/PythonCodes | 07f0db8019805b3b9567b7b57ddb49b4333a3aa2 | [
"MIT"
] | null | null | null | Coursera/CICCP1/dezenas.py | marcelomiky/PythonCodes | 07f0db8019805b3b9567b7b57ddb49b4333a3aa2 | [
"MIT"
] | null | null | null | numero_inteiro = int(input("Digite um número inteiro: "))
temp = numero_inteiro // 10
digito_dezena = temp % 10
print("O dígito das dezenas é", digito_dezena)
| 23 | 57 | 0.732919 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.335366 |
bb1ea86265c925701352fac69e22fd621159f5e6 | 42 | py | Python | tests/scope.py | ZYAZP/python2 | 7dc3b62eff51e1decb4a408122e77630fdc1687d | [
"MIT"
] | 1,062 | 2015-11-18T01:04:33.000Z | 2022-03-29T07:13:30.000Z | tests/scope.py | ArrowSides/onelinerizer | 7dc3b62eff51e1decb4a408122e77630fdc1687d | [
"MIT"
] | 26 | 2015-11-17T06:58:07.000Z | 2022-01-15T18:11:16.000Z | tests/scope.py | ArrowSides/onelinerizer | 7dc3b62eff51e1decb4a408122e77630fdc1687d | [
"MIT"
] | 100 | 2015-11-17T09:01:22.000Z | 2021-09-12T13:58:28.000Z | x = 2
def foo():
x = 1
foo()
print x
| 6 | 10 | 0.452381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bb1fdf7adb2c4dc824a85213461cdd3a0e0c6c0f | 443 | py | Python | Kalpurnia/items.py | JasonAnx/Kalpurnia | 05760d4d475c6cee9c2158a34bb5fc2c20adb0bf | [
"MIT"
] | 4 | 2017-07-12T06:21:24.000Z | 2018-12-21T15:05:48.000Z | Kalpurnia/items.py | JasonAnx/Kalpurnia | 05760d4d475c6cee9c2158a34bb5fc2c20adb0bf | [
"MIT"
] | null | null | null | Kalpurnia/items.py | JasonAnx/Kalpurnia | 05760d4d475c6cee9c2158a34bb5fc2c20adb0bf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class Url(scrapy.Item):
# define the fields for your item here like:
key = scrapy.Field()
url = scrapy.Field()
pass
class Posting(scrap... | 21.095238 | 51 | 0.668172 | 273 | 0.616253 | 0 | 0 | 0 | 0 | 0 | 0 | 233 | 0.525959 |
bb1fea629f2a9e4489bdbe2cada201c3a470df90 | 38 | py | Python | pyqt_helper/__init__.py | morefigs/pyqt-ui-helper | 0f80f8483f57fc58a1c58fb2832094c7931b9fa6 | [
"MIT"
] | 2 | 2019-07-08T22:57:00.000Z | 2022-01-07T10:36:53.000Z | pyqt_helper/__init__.py | morefigs/pyqt-ui-helper | 0f80f8483f57fc58a1c58fb2832094c7931b9fa6 | [
"MIT"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | pyqt_helper/__init__.py | morefigs/pyqt-ui-helper | 0f80f8483f57fc58a1c58fb2832094c7931b9fa6 | [
"MIT"
] | null | null | null | from .pyqt_helper import process_file
| 19 | 37 | 0.868421 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bb20d40fa7052cc2042b31919fc23245949ffc78 | 1,107 | py | Python | MeetmeApp/urls.py | Susan-Kathoni/Meet-Me | 530d14e98a1cb8d14af77397515fe32e31018041 | [
"MIT"
] | null | null | null | MeetmeApp/urls.py | Susan-Kathoni/Meet-Me | 530d14e98a1cb8d14af77397515fe32e31018041 | [
"MIT"
] | null | null | null | MeetmeApp/urls.py | Susan-Kathoni/Meet-Me | 530d14e98a1cb8d14af77397515fe32e31018041 | [
"MIT"
] | null | null | null | from django.urls import path
from django.conf.urls import url, include
from . import views
from django.conf import settings
from django.conf.urls.static import static
from .views import *
urlpatterns=[
path('', views.home, name="home-page"),
path("home/", views.datePage, name="date-page"),
#User... | 39.535714 | 90 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 354 | 0.319783 |
bb218330c462c5abdbf828eb5bc82a026234a3e6 | 14,872 | py | Python | gui/popups.py | Kameone/katrain | 6d2f210a1997bf2f8108ca1c0678df6788867022 | [
"MIT"
] | null | null | null | gui/popups.py | Kameone/katrain | 6d2f210a1997bf2f8108ca1c0678df6788867022 | [
"MIT"
] | null | null | null | gui/popups.py | Kameone/katrain | 6d2f210a1997bf2f8108ca1c0678df6788867022 | [
"MIT"
] | null | null | null | from collections import defaultdict
from typing import Dict, List, DefaultDict, Tuple
from kivy.clock import Clock
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.label import Label
from kivy.uix.popup import Popup
from core.common import OUTPUT_DEBUG, OUTPUT_ERROR
fr... | 46.043344 | 172 | 0.623924 | 14,188 | 0.954008 | 0 | 0 | 402 | 0.027031 | 0 | 0 | 1,644 | 0.110543 |
bb235d579c9e8335bb32b2de2493cd8f2ac94ba2 | 606 | py | Python | Chessboard.py | choyai/basic-chess | 34cf581544f63b07dba4a87d7f1a3bb19a0d102e | [
"MIT"
] | null | null | null | Chessboard.py | choyai/basic-chess | 34cf581544f63b07dba4a87d7f1a3bb19a0d102e | [
"MIT"
] | null | null | null | Chessboard.py | choyai/basic-chess | 34cf581544f63b07dba4a87d7f1a3bb19a0d102e | [
"MIT"
] | null | null | null | import numpy as np
from enum import Enum
class Square:
def __init__( self, value, x, y ):
self.value = value
self.color = (x + y) % 2
self.x = x
self.y = y
def __repr__( self ):
return str(self.value) + ' ' + str((x, y))
class Chessboard:
def __init_... | 22.444444 | 50 | 0.4967 | 554 | 0.914191 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.00495 |
bb238153dbf091113a90e51973cf9de922375fa2 | 1,832 | py | Python | server/main_app/views.py | impatrq/safe | e7ffd6a052304aceb4dd582df44032a29564f555 | [
"MIT"
] | 1 | 2021-07-13T23:01:56.000Z | 2021-07-13T23:01:56.000Z | server/main_app/views.py | impatrq/safe | e7ffd6a052304aceb4dd582df44032a29564f555 | [
"MIT"
] | null | null | null | server/main_app/views.py | impatrq/safe | e7ffd6a052304aceb4dd582df44032a29564f555 | [
"MIT"
] | null | null | null | import os
import json
import requests
from django.http.response import HttpResponse, JsonResponse
from django.conf import settings
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import login as auth_login, logout as auth_logout
from api_t... | 33.925926 | 107 | 0.694869 | 0 | 0 | 0 | 0 | 616 | 0.336245 | 0 | 0 | 346 | 0.188865 |
bb23d6cb8be15545236f6f64ea4106fde445f291 | 1,767 | py | Python | threedi_settings/models.py | nens/threedi-settings | 578e30edd4e71b38ebc61363b3777e7036906dbc | [
"MIT"
] | null | null | null | threedi_settings/models.py | nens/threedi-settings | 578e30edd4e71b38ebc61363b3777e7036906dbc | [
"MIT"
] | null | null | null | threedi_settings/models.py | nens/threedi-settings | 578e30edd4e71b38ebc61363b3777e7036906dbc | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from enum import Enum
from typing import List, Optional
@dataclass
class BaseConfig:
""""""
uid: str # Unique id of setting
sim_uid: str
@dataclass
class PhysicalSimulationConfig(BaseConfig):
use_advection_1d: int
use_advection_2d: int
@dataclass
clas... | 23.25 | 66 | 0.764573 | 1,583 | 0.895869 | 0 | 0 | 1,583 | 0.895869 | 0 | 0 | 30 | 0.016978 |
bb25f70ffa6ee8081a8ce9f87977d0f789c35355 | 881 | py | Python | devicegroups/tests.py | svelle/Lagerregal | d0340d2fa5bbb8dfc090c23a772f46f769064ea1 | [
"BSD-3-Clause"
] | null | null | null | devicegroups/tests.py | svelle/Lagerregal | d0340d2fa5bbb8dfc090c23a772f46f769064ea1 | [
"BSD-3-Clause"
] | null | null | null | devicegroups/tests.py | svelle/Lagerregal | d0340d2fa5bbb8dfc090c23a772f46f769064ea1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from django.test.client import Client
from django.test import TestCase
from django.urls import reverse
import six
from model_mommy import mommy
from devicegroups.models import Devicegroup
from users.models import Lageruser
class DevicegroupTests(TestCase):
def setUp(self... | 35.24 | 118 | 0.746879 | 612 | 0.694665 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.096481 |
bb26120df60c58054886a7da4810cc127da3d62a | 3,494 | py | Python | uai/operation/pack/base_pack_op.py | FinchZHU/uai-sdk | 78e06bebba2d18233ce6dcb5be619e940f7a7ef3 | [
"Apache-2.0"
] | 38 | 2017-04-26T04:00:09.000Z | 2022-02-10T02:51:05.000Z | uai/operation/pack/base_pack_op.py | FinchZHU/uai-sdk | 78e06bebba2d18233ce6dcb5be619e940f7a7ef3 | [
"Apache-2.0"
] | 17 | 2017-11-20T20:47:09.000Z | 2022-02-09T23:48:46.000Z | uai/operation/pack/base_pack_op.py | FinchZHU/uai-sdk | 78e06bebba2d18233ce6dcb5be619e940f7a7ef3 | [
"Apache-2.0"
] | 28 | 2017-07-08T05:23:13.000Z | 2020-08-18T03:12:27.000Z | # Copyright 2017 The UAI-SDK 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 applicable... | 38.822222 | 90 | 0.647682 | 2,515 | 0.719805 | 0 | 0 | 0 | 0 | 0 | 0 | 1,176 | 0.336577 |
bb27a05966e2cdc151b7cb1b1d26243619e72b33 | 778 | py | Python | reader/migrations/0005_managers.py | FroshOU/manga | 60ec24a007a7e9ebe0c152cf1f2a2aa0362f17f2 | [
"MIT"
] | 58 | 2019-03-04T09:22:42.000Z | 2022-02-18T09:11:57.000Z | reader/migrations/0005_managers.py | FroshOU/manga | 60ec24a007a7e9ebe0c152cf1f2a2aa0362f17f2 | [
"MIT"
] | 21 | 2019-03-07T19:34:53.000Z | 2021-12-19T12:46:40.000Z | reader/migrations/0005_managers.py | FroshOU/manga | 60ec24a007a7e9ebe0c152cf1f2a2aa0362f17f2 | [
"MIT"
] | 14 | 2019-06-06T09:53:13.000Z | 2021-12-17T14:34:13.000Z | from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('reader', '0004_aliases'),
]
operations = [
migrations.AddField(
model_name='se... | 29.923077 | 71 | 0.552699 | 701 | 0.901028 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.152956 |
bb2c5307cd59ead7a7f4bf7a140973af81e47bad | 2,099 | py | Python | mapss/static/packages/arches/arches/setup.py | MPI-MAPSS/MAPSS | 3a5c0109758801717aaa8de1125ca5e98f83d3b4 | [
"CC0-1.0"
] | null | null | null | mapss/static/packages/arches/arches/setup.py | MPI-MAPSS/MAPSS | 3a5c0109758801717aaa8de1125ca5e98f83d3b4 | [
"CC0-1.0"
] | null | null | null | mapss/static/packages/arches/arches/setup.py | MPI-MAPSS/MAPSS | 3a5c0109758801717aaa8de1125ca5e98f83d3b4 | [
"CC0-1.0"
] | null | null | null | import sys
import os
import subprocess
import shutil
import urllib.request, urllib.error, urllib.parse
import zipfile
import datetime
import platform
import tarfile
from arches import settings
here = os.path.dirname(os.path.abspath(__file__))
root_dir = os.path.dirname(here)
def install():
# CHEC... | 25.91358 | 80 | 0.623154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 616 | 0.293473 |
bb2ca45bc470c22818c168cb989383dbf565e235 | 3,360 | py | Python | modules/dataproviders/mldataprovider.py | imdatsolak/bender | e20a5c7553d0db60440573b4fc3e907d6a8d5fad | [
"BSD-3-Clause"
] | null | null | null | modules/dataproviders/mldataprovider.py | imdatsolak/bender | e20a5c7553d0db60440573b4fc3e907d6a8d5fad | [
"BSD-3-Clause"
] | null | null | null | modules/dataproviders/mldataprovider.py | imdatsolak/bender | e20a5c7553d0db60440573b4fc3e907d6a8d5fad | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
import logging
import os
from modules.mlbendermodule import MLBenderModule
"""
Class MLDataProvider as described at:
https://wiki.ml.de/pages/viewpage.action?pageId=7144585
Copyright (c) 2019 Imdat Solak
All Rights Res... | 37.333333 | 112 | 0.600893 | 3,028 | 0.90119 | 0 | 0 | 0 | 0 | 0 | 0 | 591 | 0.175893 |
bb2e7d5f7c0ebcba291fff0eb900b78cfa2b84c9 | 24,753 | py | Python | tests/integration/test_krkgw_page.py | konrad-kocik/nicelka | a174fce9b8c6d4414312120e89e10bb1e10629df | [
"MIT"
] | null | null | null | tests/integration/test_krkgw_page.py | konrad-kocik/nicelka | a174fce9b8c6d4414312120e89e10bb1e10629df | [
"MIT"
] | null | null | null | tests/integration/test_krkgw_page.py | konrad-kocik/nicelka | a174fce9b8c6d4414312120e89e10bb1e10629df | [
"MIT"
] | null | null | null | from pytest import fixture
from tests.integration.utilities.utilities import get_io_dir_paths, create_dir, remove_dir, run_krkgw_searcher, assert_report_file_content_equals
test_suite = 'krkgw_page'
test_cases = ['no_result',
'no_result_twice',
'single_result',
'single_resul... | 48.251462 | 145 | 0.531653 | 0 | 0 | 0 | 0 | 452 | 0.018042 | 0 | 0 | 12,986 | 0.518341 |
bb2f35d72860c941a4140869fd28c700aa0e181d | 19,950 | py | Python | parser/vo_item.py | gemoku/bolinas | dbdc2417d8ae82394f3f8e5e0758bad86b9cfd5a | [
"MIT"
] | 13 | 2015-12-05T16:30:48.000Z | 2021-04-15T14:38:24.000Z | parser/vo_item.py | karlmoritz/bolinas | 7a1a78bca0a6ba1cb9d80b13d2a87ce37993507f | [
"MIT"
] | 1 | 2015-10-18T03:50:53.000Z | 2015-10-18T03:58:28.000Z | parser/vo_item.py | karlmoritz/bolinas | 7a1a78bca0a6ba1cb9d80b13d2a87ce37993507f | [
"MIT"
] | 5 | 2015-10-18T03:10:07.000Z | 2018-06-29T17:40:43.000Z | from common.hgraph.hgraph import NonterminalLabel
from common import log
import itertools
# Some general advice for reading this file:
#
# Every rule specifies some fragment of the object (graph, string or both) that
# is being parsed, as well as a visit order on the individual elements of that
# fragment (tokens or e... | 33.473154 | 125 | 0.646516 | 19,096 | 0.957193 | 0 | 0 | 0 | 0 | 0 | 0 | 5,138 | 0.257544 |
bb2f5ca3954e0ac0cd30c52e249acffaf9cb26a5 | 7,120 | py | Python | inc_cg_reporter/excel_writer.py | edwinsteele/inc-cg-reporter | 7bf63a9a0492b474526f6da54ea39b31a1a8d4fd | [
"MIT"
] | null | null | null | inc_cg_reporter/excel_writer.py | edwinsteele/inc-cg-reporter | 7bf63a9a0492b474526f6da54ea39b31a1a8d4fd | [
"MIT"
] | null | null | null | inc_cg_reporter/excel_writer.py | edwinsteele/inc-cg-reporter | 7bf63a9a0492b474526f6da54ea39b31a1a8d4fd | [
"MIT"
] | null | null | null | import datetime
import pathlib
from tempfile import NamedTemporaryFile
from typing import List, Dict
from backports.zoneinfo import ZoneInfo
from more_itertools import first
from openpyxl import Workbook
from openpyxl.styles import Alignment, Border, Side
from openpyxl.utils import get_column_letter
from openpyxl.work... | 39.776536 | 88 | 0.658287 | 6,529 | 0.916994 | 0 | 0 | 0 | 0 | 0 | 0 | 1,675 | 0.235253 |
bb30048a187fc956b10e024a3231a64c928e715b | 1,969 | py | Python | position.py | wenwen0319/HIT_test | feba0c7dac4074ca3e602e499d3d946a6abce995 | [
"MIT"
] | null | null | null | position.py | wenwen0319/HIT_test | feba0c7dac4074ca3e602e499d3d946a6abce995 | [
"MIT"
] | null | null | null | position.py | wenwen0319/HIT_test | feba0c7dac4074ca3e602e499d3d946a6abce995 | [
"MIT"
] | null | null | null | # from numba import jit
import numpy as np
import logging
numba_logger = logging.getLogger('numba')
numba_logger.setLevel(logging.WARNING)
# @jit(nopython=True)
def nodets2key(batch: int, node: int, ts: float):
key = '-'.join([str(batch), str(node), float2str(ts)])
return key
# @jit(nopython=True)
def float... | 31.253968 | 156 | 0.638395 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 365 | 0.185373 |
bb3190ae66c1e67dd51acbaf941efef659b043cd | 3,495 | py | Python | train/compute/python/examples/pytorch/run_op_split_table_batched_embeddings.py | caogao/param | 9de2602c894df264a004c352ee16abc14f93da76 | [
"MIT"
] | 34 | 2020-10-07T23:55:19.000Z | 2022-03-15T03:18:23.000Z | train/compute/python/examples/pytorch/run_op_split_table_batched_embeddings.py | caogao/param | 9de2602c894df264a004c352ee16abc14f93da76 | [
"MIT"
] | 33 | 2020-10-09T23:57:45.000Z | 2022-03-24T08:15:35.000Z | train/compute/python/examples/pytorch/run_op_split_table_batched_embeddings.py | caogao/param | 9de2602c894df264a004c352ee16abc14f93da76 | [
"MIT"
] | 16 | 2020-10-08T12:43:08.000Z | 2022-03-04T17:09:15.000Z | import torch
from fbgemm_gpu.split_table_batched_embeddings_ops import PoolingMode
from ...lib import pytorch as lib_pytorch
from ...lib.config import make_op_config
from ...lib.init_helper import load_modules
from ...lib.pytorch.config_util import (
ExecutionPass,
create_op_args,
create_op_info,
get_b... | 32.971698 | 88 | 0.67382 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,430 | 0.409156 |
bb31ec1a332dbdfa82d99d7fc7a29ce3ab110102 | 982 | py | Python | src/login.py | kushalnaidu/showdown-battle-bot | 00c2d4f0172fd7a545a1bcbc1c2b21283314151b | [
"MIT"
] | 22 | 2018-01-31T12:30:29.000Z | 2021-12-22T01:12:15.000Z | src/login.py | kushalnaidu/showdown-battle-bot | 00c2d4f0172fd7a545a1bcbc1c2b21283314151b | [
"MIT"
] | 4 | 2018-09-04T14:48:46.000Z | 2022-03-09T20:09:28.000Z | src/login.py | kushalnaidu/showdown-battle-bot | 00c2d4f0172fd7a545a1bcbc1c2b21283314151b | [
"MIT"
] | 16 | 2018-08-23T19:30:53.000Z | 2021-12-08T06:18:16.000Z | import sys
import json
import requests
from src.senders import sender
async def log_in(websocket, challid, chall):
"""
Login in function. Send post request to showdown server.
:param websocket: Websocket stream
:param challid: first part of login challstr sent by server
:param chall: second part o... | 37.769231 | 100 | 0.552953 | 0 | 0 | 0 | 0 | 0 | 0 | 909 | 0.925662 | 376 | 0.382892 |
bb33404ce71f2b88413dcd54b52425bf86472df8 | 561 | py | Python | launch/sick_ldmrs.launch.py | Kaju-Bubanja/sick_scan2 | 9a518b8e88d8515e25168b1860e7bee3af79f1da | [
"Apache-2.0"
] | null | null | null | launch/sick_ldmrs.launch.py | Kaju-Bubanja/sick_scan2 | 9a518b8e88d8515e25168b1860e7bee3af79f1da | [
"Apache-2.0"
] | null | null | null | launch/sick_ldmrs.launch.py | Kaju-Bubanja/sick_scan2 | 9a518b8e88d8515e25168b1860e7bee3af79f1da | [
"Apache-2.0"
] | null | null | null | import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node
def generate_launch_description():
ld = LaunchDescription()
config = os.path.join(
get_package_share_directory('sick_scan2'),
'config',
'... | 25.5 | 67 | 0.672014 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.160428 |
bb34d4e88ec1cd6671f5adf6f293a9c837cc85a0 | 9,244 | py | Python | omdrivers/lifecycle/iDRAC/iDRACLicense.py | DanielFroehlich/omsdk | 475d925e4033104957fdc64480fe8f9af0ab6b8a | [
"Apache-2.0"
] | 61 | 2018-02-21T00:02:20.000Z | 2022-01-26T03:47:19.000Z | omdrivers/lifecycle/iDRAC/iDRACLicense.py | DanielFroehlich/omsdk | 475d925e4033104957fdc64480fe8f9af0ab6b8a | [
"Apache-2.0"
] | 31 | 2018-03-24T05:43:39.000Z | 2022-03-16T07:10:37.000Z | omdrivers/lifecycle/iDRAC/iDRACLicense.py | DanielFroehlich/omsdk | 475d925e4033104957fdc64480fe8f9af0ab6b8a | [
"Apache-2.0"
] | 25 | 2018-03-13T10:06:12.000Z | 2022-01-26T03:47:21.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
#
# Copyright © 2018 Dell Inc. or its subsidiaries. All rights reserved.
# Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries.
# Other trademarks may be trademarks of their respective owners.
#
# Licensed under the Apache License, Ver... | 42.599078 | 120 | 0.623107 | 7,675 | 0.830178 | 0 | 0 | 376 | 0.040671 | 0 | 0 | 1,617 | 0.174905 |
bb365dc3b0f658d8f759aeb22816bea5884e02ae | 223 | py | Python | inference/preprocessors/dummy.py | narumiruna/inference-template | 4946f4de632c49a8b65b484a4eb77979da8d8208 | [
"MIT"
] | null | null | null | inference/preprocessors/dummy.py | narumiruna/inference-template | 4946f4de632c49a8b65b484a4eb77979da8d8208 | [
"MIT"
] | null | null | null | inference/preprocessors/dummy.py | narumiruna/inference-template | 4946f4de632c49a8b65b484a4eb77979da8d8208 | [
"MIT"
] | null | null | null | from ..utils import get_logger
from .preprocessors import Preprocessor
LOGGER = get_logger(__name__)
class DummyPreprocessor(Preprocessor):
def __call__(self, frame):
LOGGER.info('Call dummy pre-processor')
| 20.272727 | 47 | 0.757848 | 118 | 0.529148 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.116592 |
bb36ec70c07ffa6bf2c091910c913a445feb66eb | 266 | py | Python | main.py | MustafaTheCoder/Basic-Discord-Bot | 7dcbd3f9746a1e1bbef45c34903cff0e23899411 | [
"MIT"
] | null | null | null | main.py | MustafaTheCoder/Basic-Discord-Bot | 7dcbd3f9746a1e1bbef45c34903cff0e23899411 | [
"MIT"
] | null | null | null | main.py | MustafaTheCoder/Basic-Discord-Bot | 7dcbd3f9746a1e1bbef45c34903cff0e23899411 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
client = commands.Bot(command_prefix="-")
@client.event
async def on_ready():
print("Bot is ready!")
@client.command
async def Hello(ctx):
await ctx.send("Hi")
client.run("BOT TOKEN")
| 14 | 42 | 0.654135 | 0 | 0 | 0 | 0 | 128 | 0.481203 | 96 | 0.360902 | 33 | 0.12406 |
bb39289b3f68ac6a3b7e2e131415a89dd368fbbf | 1,121 | py | Python | qoffeeapi/setup.py | foehlija/Qoffee-Maker | efad3af54b466c3ff9867e9105eceb2b3b08f592 | [
"Apache-2.0"
] | null | null | null | qoffeeapi/setup.py | foehlija/Qoffee-Maker | efad3af54b466c3ff9867e9105eceb2b3b08f592 | [
"Apache-2.0"
] | 3 | 2021-11-07T19:14:32.000Z | 2022-03-23T09:40:46.000Z | qoffeeapi/setup.py | foehlija/Qoffee-Maker | efad3af54b466c3ff9867e9105eceb2b3b08f592 | [
"Apache-2.0"
] | 2 | 2021-11-07T17:19:17.000Z | 2021-11-16T14:56:16.000Z | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
from glob import glob
import os
from os.path import join as pjoin
from setuptools import setup, find_packages
HERE = os.path.dirname(os.path... | 21.557692 | 58 | 0.592328 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 342 | 0.305085 |
bb393599c47f4953a5b9b24677e38c55c3bc05b5 | 2,325 | py | Python | db_etl/processors/match_area_names.py | publichealthengland/coronavirus-dashboard-pipeline-etl | efcf5c77091afe8a0f7edce2e5934fe8c1f6dc1c | [
"MIT"
] | 7 | 2021-02-14T12:42:56.000Z | 2022-03-02T09:14:22.000Z | db_etl/processors/match_area_names.py | publichealthengland/coronavirus-dashboard-pipeline-etl | efcf5c77091afe8a0f7edce2e5934fe8c1f6dc1c | [
"MIT"
] | 19 | 2021-11-03T09:21:00.000Z | 2022-03-07T09:26:47.000Z | db_etl/processors/match_area_names.py | publichealthengland/coronavirus-dashboard-pipeline-etl | efcf5c77091afe8a0f7edce2e5934fe8c1f6dc1c | [
"MIT"
] | 2 | 2021-03-03T16:52:51.000Z | 2022-02-28T16:22:33.000Z | #!/usr/bin python3
"""
<Description of the programme>
Author: Pouria Hadjibagheri <pouria.hadjibagheri@phe.gov.uk>
Created: 16 Dec 2020
License: MIT
Contributors: Pouria Hadjibagheri
"""
# Imports
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Python:... | 28.353659 | 115 | 0.60172 | 0 | 0 | 0 | 0 | 700 | 0.301075 | 0 | 0 | 1,121 | 0.482151 |
bb39acda6eb9959537beae46dae372efee98d23a | 478 | py | Python | Source/RemovePunctuation.py | jj-style/Cryptobreaker | c99b9cc35114e55c87b073ee2467c06bd95835a5 | [
"MIT"
] | null | null | null | Source/RemovePunctuation.py | jj-style/Cryptobreaker | c99b9cc35114e55c87b073ee2467c06bd95835a5 | [
"MIT"
] | null | null | null | Source/RemovePunctuation.py | jj-style/Cryptobreaker | c99b9cc35114e55c87b073ee2467c06bd95835a5 | [
"MIT"
] | null | null | null | import string
punctuation = string.punctuation + "’" + '“' + "‘" + "—"
def RemovePunctuation(text,remove_spaces=True,to_lower=True):
text = list(text)
while "\n" in text:
text.remove("\n")
text = "".join(text)
if remove_spaces:
text = text.replace(" ","")
if to_lower:
text=... | 25.157895 | 61 | 0.573222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.084362 |
bb39bd1cb1f7b1f9160cbb2212804ba07a9c2e7f | 868 | py | Python | src/BeanPorter/bpcml/Decls.py | WeZZard/BeanPorter | 51a501c17aa7c14763bfe2bb361819f81119dfd1 | [
"MIT"
] | null | null | null | src/BeanPorter/bpcml/Decls.py | WeZZard/BeanPorter | 51a501c17aa7c14763bfe2bb361819f81119dfd1 | [
"MIT"
] | null | null | null | src/BeanPorter/bpcml/Decls.py | WeZZard/BeanPorter | 51a501c17aa7c14763bfe2bb361819f81119dfd1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from abc import abstractmethod
from typing import Dict, Optional
from BeanPorter.bpcml.Exprs import Expr
class Decl(object):
def __init__(self):
pass
@abstractmethod
def evaluate(self, variables: Dict[str, str]) -> str:
pass
class RuleDecl(Decl):
def __init__(self, expr... | 19.727273 | 55 | 0.658986 | 734 | 0.845622 | 0 | 0 | 414 | 0.476959 | 0 | 0 | 44 | 0.050691 |
bb3a099bb9a7dda933d3ae72762ca266279413d3 | 877 | py | Python | tests/test_region.py | TorbenFricke/cmtoolkit | f1bf1ec191fd9b20e6edcd3385c8b9fee1d638ca | [
"BSD-3-Clause"
] | 12 | 2015-07-07T03:36:43.000Z | 2022-03-14T20:21:24.000Z | tests/test_region.py | TorbenFricke/cmtoolkit | f1bf1ec191fd9b20e6edcd3385c8b9fee1d638ca | [
"BSD-3-Clause"
] | 11 | 2015-05-11T08:02:42.000Z | 2020-05-21T16:13:45.000Z | tests/test_region.py | TorbenFricke/cmtoolkit | f1bf1ec191fd9b20e6edcd3385c8b9fee1d638ca | [
"BSD-3-Clause"
] | 1 | 2017-11-07T15:14:10.000Z | 2017-11-07T15:14:10.000Z | import unittest
from conformalmapping import *
class TestRegion(unittest.TestCase):
def setUp(self):
self.regions = [
Disk(Circle(0.0, 1.0))
]
self.p = Circle(0.0, 1.0)
def test_str_present(self):
for r in self.regions:
str(r)
def test_repr_present... | 23.078947 | 44 | 0.600912 | 828 | 0.944128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bb3a778fd080a8f387a45d5d5f462f403e83a6b3 | 399 | py | Python | month06/Machine_learning/day08/demo/02_img_read_save.py | chaofan-zheng/python_learning_code | 5d05848911d55aa49eaee4afd7ffd80536fad7aa | [
"Apache-2.0"
] | null | null | null | month06/Machine_learning/day08/demo/02_img_read_save.py | chaofan-zheng/python_learning_code | 5d05848911d55aa49eaee4afd7ffd80536fad7aa | [
"Apache-2.0"
] | null | null | null | month06/Machine_learning/day08/demo/02_img_read_save.py | chaofan-zheng/python_learning_code | 5d05848911d55aa49eaee4afd7ffd80536fad7aa | [
"Apache-2.0"
] | null | null | null | # 01_img_read_save.py
# 图像读取, 显示, 保存
import cv2
im = cv2.imread("../test_img/Linus.png", # 图像路径
1) # 1-彩色图像 0-灰度图像
print(type(im)) # 打印类型: ndarray
print(im.shape) # 打印图像形状
# 显示
cv2.imshow("im", # 窗体名称(如果重复,后面会覆盖前面)
im) # 图像数据, imread的返回值
# 保存
cv2.imwrite("Linus_new.png", # 保存的图片路径
... | 23.470588 | 47 | 0.62406 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 387 | 0.670711 |
bb3bccac3c361186a4bcf66d697926d46ae834d7 | 20,129 | py | Python | vim/plugins/vim-orgmode/tests/test_plugin_navigator.py | Raymond-yn/dotfiles | b1745ff62f4285785877a2c04d93ce8fa2775964 | [
"MIT"
] | 11 | 2018-11-16T02:30:33.000Z | 2018-11-27T14:57:55.000Z | vim/plugins/vim-orgmode/tests/test_plugin_navigator.py | Raymond-yn/dotfiles | b1745ff62f4285785877a2c04d93ce8fa2775964 | [
"MIT"
] | null | null | null | vim/plugins/vim-orgmode/tests/test_plugin_navigator.py | Raymond-yn/dotfiles | b1745ff62f4285785877a2c04d93ce8fa2775964 | [
"MIT"
] | 1 | 2019-01-22T06:51:51.000Z | 2019-01-22T06:51:51.000Z | # -*- coding: utf-8 -*-
import unittest
import sys
sys.path.append(u'../ftplugin')
import vim
from orgmode._vim import ORGMODE
from orgmode.py3compat.encode_compatibility import *
START = True
END = False
def set_visual_selection(visualmode, line_start, line_end, col_start=1,
col_end=1, cursor_pos=START):... | 31.749211 | 93 | 0.696657 | 19,211 | 0.953873 | 0 | 0 | 0 | 0 | 0 | 0 | 5,072 | 0.251837 |
bb3c72279c5fcf27f702b631f5d1c82f5eec0b49 | 728 | py | Python | ch9_1_dogs.py | codeplinth/python_crash_course | 865f326936dcfab12e77747be73bfcc632d4bde3 | [
"MIT"
] | null | null | null | ch9_1_dogs.py | codeplinth/python_crash_course | 865f326936dcfab12e77747be73bfcc632d4bde3 | [
"MIT"
] | null | null | null | ch9_1_dogs.py | codeplinth/python_crash_course | 865f326936dcfab12e77747be73bfcc632d4bde3 | [
"MIT"
] | null | null | null | class Dog:
"""Simple attempt to model a dog"""
def __init__(self,name,age):
"""Initialize name and age attributes"""
self.name = name
self.age = age
def sit(self):
"""Simulate a dog sitting in response to a command"""
print(f"{self.name} is now sitting !")
... | 24.266667 | 61 | 0.616758 | 445 | 0.611264 | 0 | 0 | 0 | 0 | 0 | 0 | 401 | 0.550824 |
bb3e451968927b5f8712e4cdfc255420064f37b9 | 786 | py | Python | src/flute/version.py | antonsynd/flute | 4da0b3e0ff9e3fabdcf8aed1d2395dcf62d48211 | [
"MIT"
] | 1 | 2020-11-26T03:06:58.000Z | 2020-11-26T03:06:58.000Z | src/flute/version.py | antonsynd/flute | 4da0b3e0ff9e3fabdcf8aed1d2395dcf62d48211 | [
"MIT"
] | null | null | null | src/flute/version.py | antonsynd/flute | 4da0b3e0ff9e3fabdcf8aed1d2395dcf62d48211 | [
"MIT"
] | null | null | null | """
Decorator to gate some of the tools here on what is available in the FL Studio
MIDI Scripting API version.
"""
import general
_fl_midi_scripting_api_version_number = general.getVersion()
def require_version(version):
def require_version_decorator(f):
def require_version_wrapper(*args, **kwargs):
... | 30.230769 | 78 | 0.647583 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 200 | 0.254453 |
bb403acdcf0fd7c25a1e41c78341852ffd2414a4 | 3,461 | py | Python | folding/minimizer.py | bigict/ProFOLD | 8fac3e18d25348fc9d1fbb17552a3ce3ae1cb953 | [
"MIT"
] | 1 | 2021-08-02T07:36:03.000Z | 2021-08-02T07:36:03.000Z | folding/minimizer.py | bigict/ProFOLD | 8fac3e18d25348fc9d1fbb17552a3ce3ae1cb953 | [
"MIT"
] | null | null | null | folding/minimizer.py | bigict/ProFOLD | 8fac3e18d25348fc9d1fbb17552a3ce3ae1cb953 | [
"MIT"
] | null | null | null | import os
import threading
import queue
import numpy as np
from pyrosetta import (
pose_from_sequence,
MoveMap,
rosetta,
create_score_function,
SwitchResidueTypeSetMover,
)
from pyrosetta.rosetta.protocols.minimization_packing import MinMover
from score import score_it
def _random_dihedral():
... | 27.91129 | 83 | 0.613118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.031494 |
bb4056293343dbab19d3e2d5e53479051955458c | 883 | py | Python | sendfile.py | ponpoko094/Colorful-MHX3gx | a795266f6872eee9eb2ea3dac2bc567cbb35dcfb | [
"MIT"
] | 4 | 2021-12-12T02:20:11.000Z | 2021-12-12T02:20:16.000Z | sendfile.py | ponpoko094/Colorful-MHX3gx | a795266f6872eee9eb2ea3dac2bc567cbb35dcfb | [
"MIT"
] | 2 | 2021-12-04T04:02:41.000Z | 2021-12-07T04:40:57.000Z | sendfile.py | ponpoko094/MHX3gx | 9abd1f9758013c81622334c88c799482cf79e4b2 | [
"MIT"
] | 2 | 2021-11-12T00:21:32.000Z | 2021-11-12T07:08:51.000Z | # -*- coding: utf-8 -*-
""" What is sendfile.py
This module is send 3gx to 3ds via FTP.
このモジュールはFTPで3gxを3dsに送信します。
"""
import ftplib
from ftplib import FTP
print("--------------------------")
print("Trying to Send the Plugin over FTP...")
get_ftp = FTP()
HOST_ADDRESS = "192.168.0.50"
PORT = 5000
TIME_OUT = 30.0
tr... | 24.527778 | 69 | 0.628539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 412 | 0.449291 |
bb41685c8c33dcbafe597ec7414699791810848e | 2,888 | py | Python | src/models/node.py | Informatik-HS-KL/BEGGEL-SP-Map-Matcher-WS19 | c3532a86640631dcafa4e88d6efb32360f0faf0f | [
"Apache-2.0"
] | 1 | 2021-07-21T13:51:18.000Z | 2021-07-21T13:51:18.000Z | src/models/node.py | Informatik-HS-KL/BEGGEL-SP-Map-Matcher-WS19 | c3532a86640631dcafa4e88d6efb32360f0faf0f | [
"Apache-2.0"
] | null | null | null | src/models/node.py | Informatik-HS-KL/BEGGEL-SP-Map-Matcher-WS19 | c3532a86640631dcafa4e88d6efb32360f0faf0f | [
"Apache-2.0"
] | null | null | null | """
Description: A Node is basically representing an osm-node. But the class Node also contains useful observer functions,
for example to convert the geometry of a Node-Object into several geo-formats, and mutator functions.
@date: 10/25/2019
@author: Lukas Felzmann, Sebastian Leilich, Kai Plautz
"""
from .node_id imp... | 22.215385 | 119 | 0.496191 | 2,519 | 0.87223 | 0 | 0 | 0 | 0 | 0 | 0 | 1,184 | 0.409972 |
bb41c4d99b6843964899cf16c40a4d079031229f | 5,972 | py | Python | UnstructuredMesh/DataLoaderUnstructuredMesh.py | MaximeRedstone/UnstructuredCAE-DA | b54bd53540c11aa1b70e5160751905141f463217 | [
"MIT"
] | null | null | null | UnstructuredMesh/DataLoaderUnstructuredMesh.py | MaximeRedstone/UnstructuredCAE-DA | b54bd53540c11aa1b70e5160751905141f463217 | [
"MIT"
] | null | null | null | UnstructuredMesh/DataLoaderUnstructuredMesh.py | MaximeRedstone/UnstructuredCAE-DA | b54bd53540c11aa1b70e5160751905141f463217 | [
"MIT"
] | null | null | null |
""" Data Loader for CAEs on Unstructured Meshes """
import sys, os, pickle, argparse
import numpy as np
from tabulate import tabulate
from datetime import datetime
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from sklearn.cluster import DBSCAN
from scipy.spatial import distance_matrix
from ... | 39.03268 | 125 | 0.627595 | 5,243 | 0.87793 | 0 | 0 | 3,025 | 0.50653 | 0 | 0 | 1,505 | 0.252009 |
bb41f1bb72ae99e6bb69d3bb195a661a2dbb73cb | 18,832 | py | Python | projects/text_classification/dataset/utils_glue.py | khloe-zhang/libai | 1787a6d920b09d3aed8b04cecb84535612f388b8 | [
"Apache-2.0"
] | 55 | 2021-12-10T08:47:06.000Z | 2022-03-28T09:02:15.000Z | projects/text_classification/dataset/utils_glue.py | khloe-zhang/libai | 1787a6d920b09d3aed8b04cecb84535612f388b8 | [
"Apache-2.0"
] | 106 | 2021-11-03T05:16:45.000Z | 2022-03-31T06:16:23.000Z | projects/text_classification/dataset/utils_glue.py | khloe-zhang/libai | 1787a6d920b09d3aed8b04cecb84535612f388b8 | [
"Apache-2.0"
] | 13 | 2021-12-29T08:12:08.000Z | 2022-03-28T06:59:45.000Z | # coding=utf-8
# Copyright 2021 The OneFlow 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 require... | 35.802281 | 100 | 0.616769 | 13,260 | 0.704121 | 0 | 0 | 0 | 0 | 0 | 0 | 5,507 | 0.292428 |
bb43fdde5b3581f834a97b398a6070ff285448c9 | 1,204 | py | Python | spiralOrder.py | xiaochuan-cd/leetcode | 8da7fb9c1a8344f5f258936c8a7d6cd25d3b3393 | [
"MIT"
] | null | null | null | spiralOrder.py | xiaochuan-cd/leetcode | 8da7fb9c1a8344f5f258936c8a7d6cd25d3b3393 | [
"MIT"
] | null | null | null | spiralOrder.py | xiaochuan-cd/leetcode | 8da7fb9c1a8344f5f258936c8a7d6cd25d3b3393 | [
"MIT"
] | null | null | null | class Solution:
def spiralOrder(self, matrix):
"""
:type matrix: List[List[int]]
:rtype: List[int]
"""
if not matrix:
return []
lvl, lenw, lenh, ret = 0, len(matrix[0]), len(matrix), []
while lvl <= int(min(lenw, lenh)/2):
if len(ret)... | 26.755556 | 65 | 0.41113 | 896 | 0.744186 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.07392 |
bb44989d1b925d469bd603867f4a7ffaa3d4a4d3 | 400 | py | Python | lang/py/pylib/11/socket/function/gethostbyname_ex.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/pylib/11/socket/function/gethostbyname_ex.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/pylib/11/socket/function/gethostbyname_ex.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:UTF-8 -*-
import socket
for host in ['homer','www','www.python.org','nosuchnamenamenameche']:
print host
try:
hostname, aliases, addresses = socket.gethostbyname_ex(host)
print' Hostname:',hostname
print' Aliases:',aliases
print' Addresses:... | 25 | 69 | 0.63 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 141 | 0.3525 |
bb44aa42ddd32a1beb60abcb2a915654994335c3 | 7,786 | py | Python | bups/manager.py | emersion/bups | 95dac7fabe8261dfff3bccad1e384af07c702945 | [
"MIT"
] | 106 | 2015-01-02T11:11:39.000Z | 2022-01-09T08:03:30.000Z | bups/manager.py | emersion/bups | 95dac7fabe8261dfff3bccad1e384af07c702945 | [
"MIT"
] | 33 | 2015-01-01T15:01:38.000Z | 2020-09-06T15:13:49.000Z | bups/manager.py | emersion/bups | 95dac7fabe8261dfff3bccad1e384af07c702945 | [
"MIT"
] | 15 | 2015-02-01T10:38:20.000Z | 2022-02-08T21:45:44.000Z | import os
import time
import subprocess
import tempfile
import re
from worker import BupWorker
#from sudo import sudo
from fuse.root import FuseRoot
from fuse.bup import FuseBup
from fuse.sshfs import FuseSshfs
from fuse.google_drive import FuseGoogleDrive
from fuse.encfs import FuseEncfs
def noop(*args):
pass
clas... | 25.953333 | 84 | 0.656563 | 7,469 | 0.959286 | 0 | 0 | 0 | 0 | 0 | 0 | 1,845 | 0.236964 |
bb464176e752765ae17771663cfb6e6d7f9714b9 | 1,177 | py | Python | integreat_cms/cms/templatetags/tree_filters.py | Integreat/cms-v2 | c79a54fd5abb792696420aa6427a5e5a356fa79c | [
"Apache-2.0"
] | 21 | 2018-10-26T20:10:45.000Z | 2020-10-22T09:41:46.000Z | integreat_cms/cms/templatetags/tree_filters.py | Integreat/cms-v2 | c79a54fd5abb792696420aa6427a5e5a356fa79c | [
"Apache-2.0"
] | 392 | 2018-10-25T08:34:07.000Z | 2020-11-19T08:20:30.000Z | integreat_cms/cms/templatetags/tree_filters.py | Integreat/cms-v2 | c79a54fd5abb792696420aa6427a5e5a356fa79c | [
"Apache-2.0"
] | 23 | 2019-03-06T17:11:35.000Z | 2020-10-16T04:36:41.000Z | """
This is a collection of tags and filters for models which inherit from the MPTT model
:class:`~integreat_cms.cms.models.abstract_tree_node.AbstractTreeNode`
(:class:`~integreat_cms.cms.models.pages.page.Page` and
:class:`~integreat_cms.cms.models.languages.language_tree_node.LanguageTreeNode`).
"""
from django impo... | 29.425 | 86 | 0.731521 | 0 | 0 | 0 | 0 | 808 | 0.686491 | 0 | 0 | 849 | 0.721325 |
bb4652a753ab3b1a67b9185a0d10ad240ff3d243 | 5,220 | py | Python | Preprocess.py | Rawan19/HMNet | 2aa8de20558412c1adb15fac69f18f50d6f59227 | [
"MIT"
] | null | null | null | Preprocess.py | Rawan19/HMNet | 2aa8de20558412c1adb15fac69f18f50d6f59227 | [
"MIT"
] | null | null | null | Preprocess.py | Rawan19/HMNet | 2aa8de20558412c1adb15fac69f18f50d6f59227 | [
"MIT"
] | null | null | null | import json
import spacy
from nltk.tokenize import word_tokenize
import nltk
nltk.download('punkt')
# print("argss:")
# print(sys.argv[0])
# text = sys.argv[0]
print("Preprocessing the input file ...")
def preprocess_raw(raw_text : str) :
json_dict_outer = {}
json_dict = {}
json_dict_outer['id']="1"
nlp = spa... | 61.411765 | 614 | 0.717625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,744 | 0.717241 |
bb46960a624b1fcc9ef41fe1b43cb6eb44c59062 | 14,165 | py | Python | src/bos_consensus/blockchain/test_blockchain.py | LuffyEMonkey/isaac-consensus-protocol | 806d967d56ef8862a477b2515c7854af289c10a0 | [
"Apache-2.0"
] | 1 | 2018-04-10T11:00:59.000Z | 2018-04-10T11:00:59.000Z | src/bos_consensus/blockchain/test_blockchain.py | LuffyEMonkey/isaac-consensus-protocol | 806d967d56ef8862a477b2515c7854af289c10a0 | [
"Apache-2.0"
] | null | null | null | src/bos_consensus/blockchain/test_blockchain.py | LuffyEMonkey/isaac-consensus-protocol | 806d967d56ef8862a477b2515c7854af289c10a0 | [
"Apache-2.0"
] | null | null | null | from ..common import Ballot, BallotVotingResult, Message, node_factory
from ..network import Endpoint
from ..blockchain import Blockchain
from ..consensus import get_fba_module
from ..consensus.fba.isaac import IsaacState
from .util import StubTransport
IsaacConsensus = get_fba_module('isaac').IsaacConsensus
def bl... | 35.32419 | 108 | 0.710131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 856 | 0.060431 |
bb470997d608e5d11cdde33ab3f008db973fea29 | 780 | py | Python | problems/python/reverse_integer.py | kcc3/leetcode-solutions | 9a38f76c702a6df0f4bc798ac94b7137ae31ea76 | [
"MIT"
] | null | null | null | problems/python/reverse_integer.py | kcc3/leetcode-solutions | 9a38f76c702a6df0f4bc798ac94b7137ae31ea76 | [
"MIT"
] | null | null | null | problems/python/reverse_integer.py | kcc3/leetcode-solutions | 9a38f76c702a6df0f4bc798ac94b7137ae31ea76 | [
"MIT"
] | null | null | null | def reverse(x):
"""Given a 32-bit signed integer, reverse digits of an integer.
Solve:
Cast int to a string and use string slicing to easily do reversing
Args:
x (int): integer to reverse
Returns:
int: reversed integer or 0 if it exceeds the 32-bit signed integer range: [−2^31... | 25.16129 | 100 | 0.546154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 340 | 0.433673 |
bb48963dd6288ee9be3650594810acbe8bced547 | 1,466 | py | Python | alembic/versions/3ea865991c72_create_user_notification_table.py | modist-io/modist-api | 827d4b1962caee9a2fde1470df30d8fd60f8f998 | [
"0BSD"
] | 1 | 2021-01-03T00:20:07.000Z | 2021-01-03T00:20:07.000Z | alembic/versions/3ea865991c72_create_user_notification_table.py | modist-io/modist-api | 827d4b1962caee9a2fde1470df30d8fd60f8f998 | [
"0BSD"
] | null | null | null | alembic/versions/3ea865991c72_create_user_notification_table.py | modist-io/modist-api | 827d4b1962caee9a2fde1470df30d8fd60f8f998 | [
"0BSD"
] | null | null | null | """Create user_notification table.
Revision ID: 3ea865991c72
Revises: 4e8c8d41f23f
Create Date: 2020-04-15 18:43:23.856094
"""
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from alembic import op
# revision identifiers, used by Alembic.
revision = "3ea865991c72"
down_revision = "4e8c8d41f23f"
b... | 27.660377 | 84 | 0.65075 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 516 | 0.351978 |
bb48c15a637195ee193c14fecf22f1af1ff953ad | 813 | py | Python | migrations/versions/0974ecc7059c_protocols_table_add_col_is_cool.py | Spin14/wolf-backend | 21fc9d1a0df092eaa6a533149a165d2898f5fe40 | [
"MIT"
] | 2 | 2020-01-04T17:46:20.000Z | 2020-01-19T17:41:38.000Z | migrations/versions/0974ecc7059c_protocols_table_add_col_is_cool.py | Spin14/wolf-backend | 21fc9d1a0df092eaa6a533149a165d2898f5fe40 | [
"MIT"
] | 7 | 2019-05-06T01:42:12.000Z | 2019-05-14T23:22:54.000Z | migrations/versions/0974ecc7059c_protocols_table_add_col_is_cool.py | Spin14/wolf-backend | 21fc9d1a0df092eaa6a533149a165d2898f5fe40 | [
"MIT"
] | 1 | 2019-09-24T21:15:52.000Z | 2019-09-24T21:15:52.000Z | """protocols table: add col is cool
Revision ID: 0974ecc7059c
Revises: a5d44f24dd74
Create Date: 2019-05-12 01:17:23.068006
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '0974ecc7059c'
down_revision = 'a5d44f24dd74'
branch_labels = None
depends_on = None
de... | 24.636364 | 78 | 0.701107 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 419 | 0.515375 |
bb4979a9585e712765aa4115058b93473d1d95ca | 1,225 | py | Python | avalon/__main__.py | noflame/core | 79ea85a26f0296d7c1f72670d377611d4502307b | [
"MIT"
] | 6 | 2018-09-13T04:44:28.000Z | 2020-02-16T22:27:50.000Z | avalon/__main__.py | noflame/core | 79ea85a26f0296d7c1f72670d377611d4502307b | [
"MIT"
] | 23 | 2017-11-14T15:38:32.000Z | 2019-07-25T11:18:42.000Z | avalon/__main__.py | noflame/core | 79ea85a26f0296d7c1f72670d377611d4502307b | [
"MIT"
] | 3 | 2018-02-02T22:11:56.000Z | 2018-09-19T07:40:00.000Z | import argparse
from . import pipeline
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--creator", action="store_true",
help="Launch Instance Creator in standalone mode")
parser.add_argument("--loader", action="store_true",
... | 32.236842 | 74 | 0.631837 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.25551 |
bb4a49b8b6d974716033873278cdc931b262790b | 1,607 | py | Python | Codementor.io/GarethDwyer/apps/clickbait/clickbait_classifier.py | nitin-cherian/Webapps | fbfbef6cb22fc742ee66460268afe6ff7834faa1 | [
"MIT"
] | 1 | 2017-11-22T08:56:06.000Z | 2017-11-22T08:56:06.000Z | Codementor.io/GarethDwyer/apps/clickbait/clickbait_classifier.py | nitin-cherian/Webapps | fbfbef6cb22fc742ee66460268afe6ff7834faa1 | [
"MIT"
] | null | null | null | Codementor.io/GarethDwyer/apps/clickbait/clickbait_classifier.py | nitin-cherian/Webapps | fbfbef6cb22fc742ee66460268afe6ff7834faa1 | [
"MIT"
] | null | null | null | # clickbait_classifier.py
# Import libraries
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.svm import LinearSVC
from sklearn.metrics import accuracy_score
# globals
DATA_SET_FILE = "clickbait.txt"
def is_clicbait(text):
svm, vectorizer = classifier()
# Vectorize the text. Input... | 23.289855 | 60 | 0.711886 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 430 | 0.267579 |
bb4ad73a6351ad5b11f7022c36288870b0aeaaa3 | 1,166 | py | Python | commands/google_search.py | UnityRobbie/bottomly | ae5f1b9c6ee74392a8525a1c0d611927fe0d7cda | [
"MIT"
] | 4 | 2018-03-12T09:16:49.000Z | 2021-07-15T08:21:32.000Z | commands/google_search.py | UnityRobbie/bottomly | ae5f1b9c6ee74392a8525a1c0d611927fe0d7cda | [
"MIT"
] | 5 | 2018-03-17T20:27:31.000Z | 2020-11-17T09:50:48.000Z | commands/google_search.py | UnityRobbie/bottomly | ae5f1b9c6ee74392a8525a1c0d611927fe0d7cda | [
"MIT"
] | 7 | 2018-03-12T10:01:31.000Z | 2022-01-18T14:55:00.000Z | import warnings
from commands.abstract_command import AbstractCommand
from config import ConfigKeys, Config
from googleapiclient.discovery import build
class GoogleSearchCommand(AbstractCommand):
def get_purpose(self):
return "Performs a google search and returns the top hit."
def execu... | 36.4375 | 89 | 0.657804 | 1,002 | 0.859348 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.104631 |
bb4cb07300adc722e5ea30f3413a6aed3a6f72bd | 2,972 | py | Python | CHIMAclient/client_api.py | ANTLab-polimi/CHIMA | 368602b1555ac46a005b9111446c3a7e0952e72d | [
"Apache-2.0"
] | 1 | 2021-12-16T14:50:50.000Z | 2021-12-16T14:50:50.000Z | CHIMAclient/client_api.py | ANTLab-polimi/CHIMA | 368602b1555ac46a005b9111446c3a7e0952e72d | [
"Apache-2.0"
] | null | null | null | CHIMAclient/client_api.py | ANTLab-polimi/CHIMA | 368602b1555ac46a005b9111446c3a7e0952e72d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
from flask import Flask
from flask import request
from flask import send_file
app = Flask(__name__)
#To suppress Flask's request logs on stdout
import logging
from config import *
from mpls import *
from utils import *
from encapsulator.userspace import *
#Configured with StubAPI's constructor
CLI... | 24.766667 | 96 | 0.659825 | 302 | 0.101615 | 0 | 0 | 1,885 | 0.634253 | 0 | 0 | 744 | 0.250336 |
bb4d5f68daee5cc9ce1c6b5d3a404612daf578b0 | 1,225 | py | Python | tests/getHighIntensityRegionEdgeTest.py | yaukwankiu/armor | 6c57df82fe3e7761f43f9fbfe4f3b21882c91436 | [
"CC0-1.0"
] | 1 | 2015-11-06T06:41:33.000Z | 2015-11-06T06:41:33.000Z | tests/getHighIntensityRegionEdgeTest.py | yaukwankiu/armor | 6c57df82fe3e7761f43f9fbfe4f3b21882c91436 | [
"CC0-1.0"
] | null | null | null | tests/getHighIntensityRegionEdgeTest.py | yaukwankiu/armor | 6c57df82fe3e7761f43f9fbfe4f3b21882c91436 | [
"CC0-1.0"
] | null | null | null | import itertools
from armor import pattern
from armor import objects4 as ob
outputFolder = '/media/TOSHIBA EXT/ARMOR/labLogs2/charts2_local_features_distribution/misc/'
def getXY(a, name='', thres=thres):
a1 = a.levelSet(thres)
a1.show()
I, J = np.where(a.matrix==thres)
I = I.compressed()
J = J.c... | 24.019608 | 92 | 0.62449 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 183 | 0.149388 |
bb4daa67b3a7c1bebded6811d734bba3fae430ae | 105 | py | Python | wcics/mail/errors.py | CS-Center/CS-Center | 3cd09f29d214406e6618fc67b9faf59a18f3f11b | [
"MIT"
] | null | null | null | wcics/mail/errors.py | CS-Center/CS-Center | 3cd09f29d214406e6618fc67b9faf59a18f3f11b | [
"MIT"
] | 6 | 2019-12-06T18:06:28.000Z | 2021-12-01T20:19:05.000Z | wcics/mail/errors.py | CS-Center/CS-Center | 3cd09f29d214406e6618fc67b9faf59a18f3f11b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class MailError(Exception):
def __init__(self, addrs):
self.failed = addrs | 21 | 28 | 0.647619 | 80 | 0.761905 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.219048 |
bb4ee9418756d227fb920b5482b1a70d72f470a7 | 5,163 | py | Python | tests/test_cli.py | epandurski/swpt_creditors | 35b9c6fa8ec84fe26e203a2604aff9cd5280dc4c | [
"MIT"
] | null | null | null | tests/test_cli.py | epandurski/swpt_creditors | 35b9c6fa8ec84fe26e203a2604aff9cd5280dc4c | [
"MIT"
] | null | null | null | tests/test_cli.py | epandurski/swpt_creditors | 35b9c6fa8ec84fe26e203a2604aff9cd5280dc4c | [
"MIT"
] | 1 | 2020-01-16T13:24:31.000Z | 2020-01-16T13:24:31.000Z | import logging
from datetime import date, timedelta
from swpt_creditors import procedures as p
from swpt_creditors import models as m
D_ID = -1
C_ID = 4294967296
def _create_new_creditor(creditor_id: int, activate: bool = False):
creditor = p.reserve_creditor(creditor_id)
if activate:
p.activate_cred... | 34.192053 | 118 | 0.654852 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,205 | 0.233391 |
bb4f9fcdd845899468417c334c142d81c1bbc6d8 | 888 | py | Python | pajbot/web/routes/base/playsounds.py | KasperHelsted/pajbot | c366dcfc5e6076f9adcfce24c7a666653068b031 | [
"MIT"
] | null | null | null | pajbot/web/routes/base/playsounds.py | KasperHelsted/pajbot | c366dcfc5e6076f9adcfce24c7a666653068b031 | [
"MIT"
] | null | null | null | pajbot/web/routes/base/playsounds.py | KasperHelsted/pajbot | c366dcfc5e6076f9adcfce24c7a666653068b031 | [
"MIT"
] | 1 | 2020-03-11T19:37:10.000Z | 2020-03-11T19:37:10.000Z | from flask import render_template
from pajbot.managers.db import DBManager
from pajbot.models.module import Module
from pajbot.models.playsound import Playsound
from pajbot.modules import PlaysoundModule
def init(app):
@app.route("/playsounds/")
def user_playsounds():
with DBManager.create_session_sc... | 34.153846 | 106 | 0.665541 | 0 | 0 | 0 | 0 | 661 | 0.744369 | 0 | 0 | 31 | 0.03491 |
bb50ddc7c9fdf4690ca7e9bb60ec4a0df3dd0ba9 | 1,542 | py | Python | cla_backend/apps/timer/tests/test_managers.py | uk-gov-mirror/ministryofjustice.cla_backend | 4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6 | [
"MIT"
] | 3 | 2019-10-02T15:31:03.000Z | 2022-01-13T10:15:53.000Z | cla_backend/apps/timer/tests/test_managers.py | uk-gov-mirror/ministryofjustice.cla_backend | 4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6 | [
"MIT"
] | 206 | 2015-01-02T16:50:11.000Z | 2022-02-16T20:16:05.000Z | cla_backend/apps/timer/tests/test_managers.py | uk-gov-mirror/ministryofjustice.cla_backend | 4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6 | [
"MIT"
] | 6 | 2015-03-23T23:08:42.000Z | 2022-02-15T17:04:44.000Z | from django.test import TestCase
from django.utils import timezone
from django.db import IntegrityError
from django.core.exceptions import MultipleObjectsReturned
from core.tests.mommy_utils import make_recipe, make_user
from timer.models import Timer
class RunningTimerManagerTestCase(TestCase):
def test_query_... | 35.860465 | 95 | 0.713359 | 1,285 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.097276 |
bb51cff9c7fd98ea2e3be2188c9165fb1f513dcf | 372 | py | Python | 02-python-oo/aula-05/exemplos/train.py | opensanca/trilha-python | 9ffadd266e22a920a3c1acfdbc6a5a4645fce9d6 | [
"MIT"
] | 47 | 2016-05-19T22:37:18.000Z | 2022-02-22T02:34:18.000Z | 02-python-oo/aula-05/exemplos/train.py | opensanca/trilha-python | 9ffadd266e22a920a3c1acfdbc6a5a4645fce9d6 | [
"MIT"
] | 21 | 2016-05-20T12:35:25.000Z | 2016-07-26T00:23:33.000Z | 02-python-oo/aula-05/exemplos/train.py | lamenezes/python-intro | 9ffadd266e22a920a3c1acfdbc6a5a4645fce9d6 | [
"MIT"
] | 25 | 2016-05-19T22:52:32.000Z | 2022-01-08T15:15:36.000Z | """
Cria uma classe trem que possui carros. O trem é iterável e cada elemento
retornado pela iteração retorna um sring com o número do carro.
"""
class Train:
def __init__(self, cars):
self.cars = cars
def __len__(self): # len(train)
return self.cars
def __iter__(self):
return ... | 23.25 | 73 | 0.642473 | 223 | 0.591512 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.453581 |
bb52f0733efe5513920fdebfb1eef593a99fcd79 | 471 | py | Python | home/migrations/0003_auto_20210622_1116.py | screw-pack/hazel | ade9b6c6a396b3da2bb2d5505cfb63e1579cdab8 | [
"MIT"
] | null | null | null | home/migrations/0003_auto_20210622_1116.py | screw-pack/hazel | ade9b6c6a396b3da2bb2d5505cfb63e1579cdab8 | [
"MIT"
] | null | null | null | home/migrations/0003_auto_20210622_1116.py | screw-pack/hazel | ade9b6c6a396b3da2bb2d5505cfb63e1579cdab8 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-06-22 09:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('home', '0002_auto_20210618_1545'),
]
operations = [
migrations.AlterModelOptions(
name='activity',
options={'ordering': ['st... | 21.409091 | 49 | 0.562633 | 386 | 0.819533 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.286624 |
bb52f288b0e795d00e5f3bf63b427429792a24ad | 9,486 | py | Python | house_load_profiler.py | gianmarco-lorenti/RECOpt | c7916861db033f9d917d05094102194202e3bb09 | [
"MIT"
] | 8 | 2021-03-08T09:30:16.000Z | 2022-02-18T19:40:41.000Z | house_load_profiler.py | gianmarco-lorenti/RECOpt | c7916861db033f9d917d05094102194202e3bb09 | [
"MIT"
] | null | null | null | house_load_profiler.py | gianmarco-lorenti/RECOpt | c7916861db033f9d917d05094102194202e3bb09 | [
"MIT"
] | 1 | 2021-05-24T13:21:36.000Z | 2021-05-24T13:21:36.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 28 18:37:58 2020
@author: giamm
"""
# from tictoc import tic, toc
import numpy as np
import datareader #routine created to properly read the files needed in the following
from load_profiler import load_profiler as lp
##################################################... | 37.2 | 134 | 0.621969 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,634 | 0.804765 |
bb542cac2a03cdb3c031650c9fa28df93e7a1256 | 309 | py | Python | ex9-11.py | yiyidhuang/PythonCrashCrouse2nd | 3512f9ab8fcf32c6145604a37e2a62feddf174d1 | [
"MIT"
] | null | null | null | ex9-11.py | yiyidhuang/PythonCrashCrouse2nd | 3512f9ab8fcf32c6145604a37e2a62feddf174d1 | [
"MIT"
] | null | null | null | ex9-11.py | yiyidhuang/PythonCrashCrouse2nd | 3512f9ab8fcf32c6145604a37e2a62feddf174d1 | [
"MIT"
] | null | null | null | from admins import Admin, Privileges
eric = Admin('eric', 'matthes', 'e_mattches', 'e_mattches@example.com', 'alaska')
eric_privileges = [
'can reset passwords',
'can moderate discussions',
'can suspend accounts',
]
eric.privileges.privileges = eric_privileges
eric.privileges.show_privileges()
| 25.75 | 81 | 0.734628 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.414239 |
bb5494d212a707197321c71bdad0900003edabec | 1,201 | py | Python | sample_synth02/make_config.py | clinfo/DeepKF | ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1 | [
"MIT"
] | 5 | 2019-12-19T13:33:36.000Z | 2021-06-01T06:08:16.000Z | sample_synth02/make_config.py | clinfo/DeepKF | ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1 | [
"MIT"
] | 24 | 2020-03-03T19:40:55.000Z | 2021-05-26T15:27:38.000Z | sample_synth02/make_config.py | clinfo/DeepKF | ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1 | [
"MIT"
] | 1 | 2019-12-19T13:35:07.000Z | 2019-12-19T13:35:07.000Z | import numpy as np
import os
import json
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
os.makedirs("data",exist_ok=True)
np.random.seed(10)
filename="config_base.json"
o=json.load(open(filename))
print(o)
for j in range(10):
i=j+1
o['data_train_npy']='data/data_train.n'+str(i)+'... | 25.020833 | 57 | 0.673605 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 378 | 0.314738 |
bb55579c6f96ecbc21cea483d25ad02b38e7aa01 | 92 | py | Python | plot_bokeh/__init__.py | amarkpayne/ampayne_tools | a47e9baa70edaedfb655ab51f79bf5035eaacd83 | [
"MIT"
] | null | null | null | plot_bokeh/__init__.py | amarkpayne/ampayne_tools | a47e9baa70edaedfb655ab51f79bf5035eaacd83 | [
"MIT"
] | null | null | null | plot_bokeh/__init__.py | amarkpayne/ampayne_tools | a47e9baa70edaedfb655ab51f79bf5035eaacd83 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, print_function
from plot_bokeh.plot_bokeh import *
| 23 | 54 | 0.858696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bb5619127572d5c7abef2ce8289d84bfdb46675d | 6,075 | py | Python | content/model_funcs.py | nathanlyons/sensitivity_analysis_clinic_CSDMS_2019 | ca1ae2cdc5239bae755929f6a92d669a82192813 | [
"MIT"
] | null | null | null | content/model_funcs.py | nathanlyons/sensitivity_analysis_clinic_CSDMS_2019 | ca1ae2cdc5239bae755929f6a92d669a82192813 | [
"MIT"
] | null | null | null | content/model_funcs.py | nathanlyons/sensitivity_analysis_clinic_CSDMS_2019 | ca1ae2cdc5239bae755929f6a92d669a82192813 | [
"MIT"
] | null | null | null | """Model functions sensitivity analysis clinic at CSDMS 2019.
Written by Nathan Lyons, May 2019
"""
from os.path import join
from landlab import RasterModelGrid
from landlab.components import FastscapeEroder, FlowAccumulator, LinearDiffuser
from landlab.io import write_esri_ascii
import numpy as np
import experiment... | 33.196721 | 79 | 0.624691 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,972 | 0.324609 |
bb565d6a848c25f10f712bae53673495afeccc03 | 4,865 | py | Python | src/preprocessing.py | jimmystique/AudioClassification | 9f9966306068cff7419f6c190752bab4d35b3870 | [
"MIT"
] | null | null | null | src/preprocessing.py | jimmystique/AudioClassification | 9f9966306068cff7419f6c190752bab4d35b3870 | [
"MIT"
] | null | null | null | src/preprocessing.py | jimmystique/AudioClassification | 9f9966306068cff7419f6c190752bab4d35b3870 | [
"MIT"
] | null | null | null | import os
import pandas as pd
import pickle as pkl
import numpy as np
import argparse
import yaml
import librosa
import scipy
from scipy.io import wavfile
import multiprocessing
import time
import datetime
import socket
def resample_wav_data(wav_data, orig_sr, target_sr):
""" Resample wav_data from sampling rate ... | 41.581197 | 182 | 0.763001 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,335 | 0.274409 |
bb5669ae64601c0a6365ad7e4ed02e95b6e730f0 | 506 | py | Python | tests/builtins/test_dir.py | VeliborKrivokuca/batavia | ecbdc21dc7e002415e6c0ea8654d2b8a8c7a85fa | [
"BSD-3-Clause"
] | 1,256 | 2015-08-09T07:44:02.000Z | 2019-03-27T05:41:24.000Z | tests/builtins/test_dir.py | VeliborKrivokuca/batavia | ecbdc21dc7e002415e6c0ea8654d2b8a8c7a85fa | [
"BSD-3-Clause"
] | 406 | 2015-08-12T03:40:29.000Z | 2019-02-25T19:26:02.000Z | tests/builtins/test_dir.py | VeliborKrivokuca/batavia | ecbdc21dc7e002415e6c0ea8654d2b8a8c7a85fa | [
"BSD-3-Clause"
] | 589 | 2015-08-10T03:27:31.000Z | 2019-03-10T20:58:07.000Z | from ..utils import TranspileTestCase, BuiltinFunctionTestCase
class DirTests(TranspileTestCase):
pass
class BuiltinDirFunctionTests(BuiltinFunctionTestCase, TranspileTestCase):
function = "dir"
not_implemented = [
'test_class',
]
class BuiltinDirTypeFunctionTests(BuiltinFunctionTestCase,... | 22 | 78 | 0.715415 | 434 | 0.857708 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 0.237154 |
bb574f490a6c4afce6122ec48aebabf0148da56e | 3,999 | py | Python | threemegawatt/threemegawatt/settings/development.py | opemipoVRB/MeterTracker | 3c52e704844628db31b72d008983b6c090266775 | [
"MIT"
] | null | null | null | threemegawatt/threemegawatt/settings/development.py | opemipoVRB/MeterTracker | 3c52e704844628db31b72d008983b6c090266775 | [
"MIT"
] | null | null | null | threemegawatt/threemegawatt/settings/development.py | opemipoVRB/MeterTracker | 3c52e704844628db31b72d008983b6c090266775 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←
←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←
↓↓...........................................................................↓↓
↓↓..........................↓... | 58.808824 | 79 | 0.112778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,264 | 0.980742 |
bb59b961461cedfb2ddeb8299bd41e4af9504caf | 5,260 | py | Python | {{ cookiecutter.namespace }}/src/pynwb/tests/test_tetrodeseries.py | TheChymera/ndx-template | 44ee210181d5770d037106acff345fe1d30e0477 | [
"BSD-3-Clause-LBNL"
] | 3 | 2020-02-06T01:18:47.000Z | 2022-01-05T21:21:38.000Z | {{ cookiecutter.namespace }}/src/pynwb/tests/test_tetrodeseries.py | TheChymera/ndx-template | 44ee210181d5770d037106acff345fe1d30e0477 | [
"BSD-3-Clause-LBNL"
] | 38 | 2019-05-15T19:07:12.000Z | 2022-01-27T01:26:57.000Z | {{ cookiecutter.namespace }}/src/pynwb/tests/test_tetrodeseries.py | TheChymera/ndx-template | 44ee210181d5770d037106acff345fe1d30e0477 | [
"BSD-3-Clause-LBNL"
] | 4 | 2019-05-15T18:03:42.000Z | 2020-05-08T11:38:53.000Z | import datetime
import numpy as np
from pynwb import NWBHDF5IO, NWBFile
from pynwb.core import DynamicTableRegion
from pynwb.device import Device
from pynwb.ecephys import ElectrodeGroup
from pynwb.file import ElectrodeTable as get_electrode_table
from pynwb.testing import TestCase, remove_test_file, AcquisitionH5IOMi... | 30.760234 | 116 | 0.61692 | 4,143 | 0.787643 | 0 | 0 | 0 | 0 | 0 | 0 | 1,040 | 0.197719 |
bb5b9e701abf5095d0390b5cf553b81d80794a1b | 5,113 | py | Python | calaccess_website/views/docs/ccdc.py | california-civic-data-coalition/django-calaccess-downloads | 198f3b5b7fca846d9ce7c84f3a5bfa0ff4d3d3f7 | [
"MIT"
] | 3 | 2016-09-16T16:50:31.000Z | 2021-07-30T23:58:29.000Z | calaccess_website/views/docs/ccdc.py | world-admin/django-calaccess-downloads-website | 205480959358f51f4a7f11275fb8f60bd1091025 | [
"MIT"
] | 193 | 2016-05-27T16:34:10.000Z | 2021-09-24T16:11:04.000Z | calaccess_website/views/docs/ccdc.py | world-admin/django-calaccess-downloads-website | 205480959358f51f4a7f11275fb8f60bd1091025 | [
"MIT"
] | 4 | 2016-06-14T00:41:19.000Z | 2022-01-14T00:29:45.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Views for CCDC file documetnation pages.
"""
# Django tricks
from django.apps import apps
from django.http import Http404
from django.urls import reverse
from calaccess_website.templatetags.calaccess_website_tags import slugify
# Models
from calaccess_processed.models ... | 32.775641 | 113 | 0.656171 | 3,986 | 0.779581 | 0 | 0 | 0 | 0 | 0 | 0 | 1,906 | 0.372775 |
bb5c8ea17ee9ecb16f8a2b9c72c06dd3eb1f5f67 | 2,536 | py | Python | comment/models/reactions.py | setayeshmbr/coronavirus_blog | 2bb94e905ac7e5401776ac81fd301a90a24f1a9f | [
"MIT"
] | null | null | null | comment/models/reactions.py | setayeshmbr/coronavirus_blog | 2bb94e905ac7e5401776ac81fd301a90a24f1a9f | [
"MIT"
] | null | null | null | comment/models/reactions.py | setayeshmbr/coronavirus_blog | 2bb94e905ac7e5401776ac81fd301a90a24f1a9f | [
"MIT"
] | null | null | null | from enum import IntEnum, unique
from django.contrib.auth import get_user_model
from django.db import models
from django.db.models.signals import post_delete, post_save
from django.dispatch import receiver
from django.utils import timezone
from comment.models import Comment
from comment.managers import ReactionManage... | 32.935065 | 98 | 0.729101 | 1,594 | 0.628549 | 0 | 0 | 657 | 0.259069 | 0 | 0 | 72 | 0.028391 |
246de88d2fe441aebedc83fc4f8b906aee07ae8a | 1,394 | py | Python | gorp/test/test_b_option.py | molsonkiko/gorpy | 1dceb8bb530a7c7c558d51cedbbbf1cdc9e6f914 | [
"MIT"
] | null | null | null | gorp/test/test_b_option.py | molsonkiko/gorpy | 1dceb8bb530a7c7c558d51cedbbbf1cdc9e6f914 | [
"MIT"
] | null | null | null | gorp/test/test_b_option.py | molsonkiko/gorpy | 1dceb8bb530a7c7c558d51cedbbbf1cdc9e6f914 | [
"MIT"
] | null | null | null | from gorp.readfiles import *
from gorp.test.test_ku_options import setup_tempdir
import itertools
import unittest
og_dirname = os.getcwd()
def get_combos():
setup_tempdir()
os.chdir(os.path.join(gorpdir, "test", "temp"))
base_query = " -b '[bp]l[uo]t' /."
gorptags = ["-r", "-l", "-h", "-i", "-c", "-o... | 29.041667 | 91 | 0.58967 | 269 | 0.19297 | 0 | 0 | 0 | 0 | 0 | 0 | 178 | 0.12769 |
246e6304dc03101d69f37d5890c1e8f95b162696 | 45 | py | Python | api/__init__.py | jbrownrs/issue-376-GDS-link | e8cce1b79f46b98a7d24b2da5eca48430fd904a3 | [
"MIT"
] | 5 | 2019-01-07T17:22:34.000Z | 2020-10-08T15:03:12.000Z | api/__init__.py | jbrownrs/issue-376-GDS-link | e8cce1b79f46b98a7d24b2da5eca48430fd904a3 | [
"MIT"
] | 203 | 2017-12-14T09:51:56.000Z | 2018-08-28T14:04:08.000Z | api/__init__.py | jbrownrs/issue-376-GDS-link | e8cce1b79f46b98a7d24b2da5eca48430fd904a3 | [
"MIT"
] | 5 | 2018-10-22T11:36:01.000Z | 2020-07-20T05:47:49.000Z | """
Implement a REST-ful API interface.
"""
| 9 | 35 | 0.644444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.977778 |
2471c183baaffa838c1d8f4a682290146e29d206 | 8,689 | py | Python | stancode_projects/Break out games/breakoutgraphics.py | itinghuang/iting-projects | 304d41fe8a4b3ae45a01611a8868981f31e72d68 | [
"MIT"
] | null | null | null | stancode_projects/Break out games/breakoutgraphics.py | itinghuang/iting-projects | 304d41fe8a4b3ae45a01611a8868981f31e72d68 | [
"MIT"
] | null | null | null | stancode_projects/Break out games/breakoutgraphics.py | itinghuang/iting-projects | 304d41fe8a4b3ae45a01611a8868981f31e72d68 | [
"MIT"
] | null | null | null | """
stanCode Breakout Project
Adapted from Eric Roberts's Breakout by
Sonja Johnson-Yu, Kylie Jue, Nick Bowman,
and Jerry Liao
YOUR DESCRIPTION HERE
"""
from campy.graphics.gwindow import GWindow
from campy.graphics.gobjects import GOval, GRect, GLabel
from campy.gui.events.mouse import onmouseclicked, onmousemoved
im... | 33.941406 | 142 | 0.589711 | 7,426 | 0.854644 | 0 | 0 | 0 | 0 | 0 | 0 | 2,339 | 0.269191 |
24727a12dfdb6e231648e565e4b96e1b20eb8aae | 434 | py | Python | python/src/algorithm/coding/set/setupdate.py | kakaba2009/MachineLearning | 26b389f8ffb5f3af939dfc9ebfdf2c6b2fc2ae33 | [
"Apache-2.0"
] | null | null | null | python/src/algorithm/coding/set/setupdate.py | kakaba2009/MachineLearning | 26b389f8ffb5f3af939dfc9ebfdf2c6b2fc2ae33 | [
"Apache-2.0"
] | null | null | null | python/src/algorithm/coding/set/setupdate.py | kakaba2009/MachineLearning | 26b389f8ffb5f3af939dfc9ebfdf2c6b2fc2ae33 | [
"Apache-2.0"
] | null | null | null | n = int(input())
s = set(map(int, input().split()))
N = int(input())
for i in range(N):
cmd = input()
B = set(map(int, input().split()))
if "symmetric_difference_update" in cmd:
s.symmetric_difference_update(B)
elif "intersection_update" in cmd:
s.intersection_update(B)
elif "diffe... | 22.842105 | 44 | 0.615207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.177419 |
2472a45f4c27ad8a50bc1b6d23712affd350c953 | 4,329 | py | Python | RemoteRunner/Controllers/ROS/ROS2Controller.py | StanSwanborn/robot-runner | 4b8d294d403326b3027eb43e7f9d2b44276bce2b | [
"MIT"
] | 1 | 2020-01-24T21:02:57.000Z | 2020-01-24T21:02:57.000Z | RemoteRunner/Controllers/ROS/ROS2Controller.py | StanSwanborn/robot-runner | 4b8d294d403326b3027eb43e7f9d2b44276bce2b | [
"MIT"
] | null | null | null | RemoteRunner/Controllers/ROS/ROS2Controller.py | StanSwanborn/robot-runner | 4b8d294d403326b3027eb43e7f9d2b44276bce2b | [
"MIT"
] | 1 | 2020-04-06T14:18:39.000Z | 2020-04-06T14:18:39.000Z | import time
from pathlib import Path
from Procedures.ProcessProcedure import ProcessProcedure
from Controllers.ROS.IROSController import IROSController
from Procedures.OutputProcedure import OutputProcedure as output
### =========================================================
### | ... | 50.929412 | 120 | 0.594364 | 3,120 | 0.720721 | 0 | 0 | 0 | 0 | 0 | 0 | 2,537 | 0.586048 |
24740d66448ac9fd6d0157a46216f7339a2b5d04 | 6,035 | py | Python | cosine_similarity.py | caikehe/YELP_DS | c9baa8626a22d6aca2a786e221bff5e184e521d7 | [
"Apache-2.0"
] | null | null | null | cosine_similarity.py | caikehe/YELP_DS | c9baa8626a22d6aca2a786e221bff5e184e521d7 | [
"Apache-2.0"
] | null | null | null | cosine_similarity.py | caikehe/YELP_DS | c9baa8626a22d6aca2a786e221bff5e184e521d7 | [
"Apache-2.0"
] | null | null | null | import io, json, random
import matplotlib.pyplot as plt
from sklearn.metrics.pairwise import pairwise_distances
from matplotlib.backends.backend_pdf import PdfPages
def drawCOSFigure(features, output):
histogram1Star = []
histogram2Star = []
histogram3Star = []
histogram4Star = []
hist... | 34.485714 | 89 | 0.594532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 417 | 0.069097 |
247640d80add47e8ea829bcb77b7fb6e623ffeff | 579 | py | Python | cobu/constants.py | tlancaster6/cobu | 444f249bdec5b009858011002fa0782520891e2b | [
"MIT"
] | null | null | null | cobu/constants.py | tlancaster6/cobu | 444f249bdec5b009858011002fa0782520891e2b | [
"MIT"
] | null | null | null | cobu/constants.py | tlancaster6/cobu | 444f249bdec5b009858011002fa0782520891e2b | [
"MIT"
] | null | null | null | import os
try:
from importlib.metadata import metadata # Python 3.8
except ImportError:
from importlib_metadata import metadata # Python < 3.8
COBU_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_DIR = os.path.dirname(COBU_DIR)
DATA_DIR = os.path.join(BASE_DIR, 'data')
# package metadata
_META = metad... | 27.571429 | 59 | 0.723661 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.241796 |
247809f8e798b2d4ad909e369111e3462830ca09 | 2,339 | py | Python | wandroid/devices/utils.py | westurner/wandroid | f05e085f1f9d722b69c321bf8bd7320a8fa9f93e | [
"BSD-3-Clause"
] | null | null | null | wandroid/devices/utils.py | westurner/wandroid | f05e085f1f9d722b69c321bf8bd7320a8fa9f93e | [
"BSD-3-Clause"
] | null | null | null | wandroid/devices/utils.py | westurner/wandroid | f05e085f1f9d722b69c321bf8bd7320a8fa9f93e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
from __future__ import print_function
"""
wandroid devices
"""
import pkg_resources
import wandroid.adbw as adbw
def get_devices():
"""
mainfunc
"""
entry_points = pkg_resources.iter_entry_points(group='wandroid_devices')
for ep in entry_points:
yield... | 24.364583 | 76 | 0.558786 | 187 | 0.079949 | 185 | 0.079094 | 0 | 0 | 0 | 0 | 450 | 0.19239 |
2479d7af5d28d64ede7ccc8bebd1054c83190763 | 885 | py | Python | params_flow/utils/learn_scheduler.py | kpe/params-flow | 5857dfd67cf15e89803e5987316c81fe6c4cc54d | [
"MIT"
] | 23 | 2019-06-08T17:24:05.000Z | 2022-01-16T17:53:15.000Z | params_flow/utils/learn_scheduler.py | kpe/params-flow | 5857dfd67cf15e89803e5987316c81fe6c4cc54d | [
"MIT"
] | null | null | null | params_flow/utils/learn_scheduler.py | kpe/params-flow | 5857dfd67cf15e89803e5987316c81fe6c4cc54d | [
"MIT"
] | 4 | 2019-09-29T07:25:24.000Z | 2020-11-25T15:02:15.000Z | # coding=utf-8
#
# created by kpe on 10.08.2019 at 12:39 AM
#
from __future__ import division, absolute_import, print_function
import math
from tensorflow import keras
def create_one_cycle_lr_scheduler(max_learn_rate=5e-5,
end_learn_rate=1e-7,
war... | 30.517241 | 100 | 0.640678 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.065537 |
247aaaa9afe8af3944f0215ec29353a612a9ac89 | 445 | py | Python | cegid/apps/main/urls.py | vsoch/tcell | 3c4a19e5c78f1a36a2fe5e0f3229d1d70ef3a2c6 | [
"MIT"
] | null | null | null | cegid/apps/main/urls.py | vsoch/tcell | 3c4a19e5c78f1a36a2fe5e0f3229d1d70ef3a2c6 | [
"MIT"
] | 9 | 2016-08-04T22:56:21.000Z | 2016-08-17T20:55:57.000Z | cegid/apps/main/urls.py | vsoch/tcell | 3c4a19e5c78f1a36a2fe5e0f3229d1d70ef3a2c6 | [
"MIT"
] | 1 | 2016-10-11T04:22:52.000Z | 2016-10-11T04:22:52.000Z | from django.views.generic.base import TemplateView
from django.conf.urls import patterns, url
from .views import index_view, signup_view, about_view, search_view, \
home_view, contact_view
urlpatterns = [
url(r'^$', index_view, name="index"),
url(r'^search$', search_view, name="search"),
url(r'^contact$'... | 34.230769 | 70 | 0.694382 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.188764 |
247b0f2580310cad3e1f381e524fdce487e2bc44 | 212 | py | Python | students/K33422/Larionova Anastasia/lab 1/task1_client.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 4 | 2020-09-03T15:41:42.000Z | 2021-12-24T15:28:20.000Z | students/K33422/Larionova Anastasia/lab 1/task1_client.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 48 | 2020-09-13T20:22:42.000Z | 2021-04-30T11:13:30.000Z | students/K33422/Larionova Anastasia/lab 1/task1_client.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 69 | 2020-09-06T10:32:37.000Z | 2021-11-28T18:13:17.000Z | import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('localhost', 7777))
sock.send('Hello, server! :)'.encode('utf-8'))
d = sock.recv(1024)
print(d.decode('utf-8'))
sock.close() | 21.2 | 56 | 0.70283 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.207547 |
247dc70e6437fecc8408f5935f960b8ac070e582 | 5,589 | py | Python | chapter-4/gridworld.py | epignatelli/Reinforcement-Learning-An-Introduction_exercises | e260cacdb1ec8e51af46da4031054d4c6771322c | [
"MIT"
] | 6 | 2020-12-13T00:34:40.000Z | 2022-03-05T03:58:46.000Z | chapter-4/gridworld.py | epignatelli/Reinforcement-Learning-An-Introduction_exercises | e260cacdb1ec8e51af46da4031054d4c6771322c | [
"MIT"
] | null | null | null | chapter-4/gridworld.py | epignatelli/Reinforcement-Learning-An-Introduction_exercises | e260cacdb1ec8e51af46da4031054d4c6771322c | [
"MIT"
] | 4 | 2021-02-03T06:32:24.000Z | 2021-09-14T22:46:51.000Z | # MIT License
# Copyright (c) 2020 Eduardo Pignatelli
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, me... | 39.359155 | 150 | 0.627661 | 2,540 | 0.454464 | 0 | 0 | 0 | 0 | 0 | 0 | 2,983 | 0.533727 |
247eb44c889ef4965c1c10cc694955ebaa4b8ea6 | 2,571 | py | Python | client.py | esperantomerkato/tuner | b3998f6bcaf8acd1b541e2aa0670e0f0a0a8eb7d | [
"BSD-Source-Code"
] | null | null | null | client.py | esperantomerkato/tuner | b3998f6bcaf8acd1b541e2aa0670e0f0a0a8eb7d | [
"BSD-Source-Code"
] | null | null | null | client.py | esperantomerkato/tuner | b3998f6bcaf8acd1b541e2aa0670e0f0a0a8eb7d | [
"BSD-Source-Code"
] | null | null | null | import asyncio
import json
import websockets
from merkato.merkato_config import get_config
from merkato.parser import parse
from merkato.utils.database_utils import no_merkatos_table_exists, create_merkatos_table, drop_merkatos_table, \
no_exchanges_table_exists, create_exchanges_table, drop_exchanges_table
impor... | 30.975904 | 112 | 0.669 | 0 | 0 | 0 | 0 | 0 | 0 | 573 | 0.22287 | 741 | 0.288215 |
24801d3763c6b4f5d5fdf3b1bc18bbe2654427a3 | 356 | py | Python | application/web/helper.py | satan1a/poopak | 9862f09edc22c030db520e317020b54a36e070ac | [
"curl"
] | 91 | 2019-01-17T13:35:49.000Z | 2022-03-30T21:16:37.000Z | application/web/helper.py | satan1a/poopak | 9862f09edc22c030db520e317020b54a36e070ac | [
"curl"
] | 13 | 2019-01-13T14:35:51.000Z | 2021-04-26T05:13:42.000Z | application/web/helper.py | satan1a/poopak | 9862f09edc22c030db520e317020b54a36e070ac | [
"curl"
] | 33 | 2019-01-17T13:37:22.000Z | 2022-03-25T09:35:54.000Z | import re
def extract_onions(s):
result = []
print(s)
for m in re.finditer(r'(?:https?://)?(?:www)?(\S*?\.onion)\b', s, re.M | re.IGNORECASE):
url = str(m.group(0))
# url = url[len(url) - 22:]
# if "'" in url:
# url = url[url.index("'")+1:]
result.append(url)
... | 20.941176 | 92 | 0.485955 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.328652 |
2484b713073294f833a7aedb426225a3f08b5595 | 299 | py | Python | __init__.py | d-we/binja-golang-symbol-restore | 251cc45cab66512fd404eaf69ec6e018684aa5d4 | [
"MIT"
] | 9 | 2020-06-15T09:14:18.000Z | 2021-12-30T19:39:33.000Z | __init__.py | d-we/binja-golang-symbol-restore | 251cc45cab66512fd404eaf69ec6e018684aa5d4 | [
"MIT"
] | 3 | 2020-06-10T03:29:26.000Z | 2021-02-08T19:25:51.000Z | __init__.py | d-we/binja-golang-symbol-restore | 251cc45cab66512fd404eaf69ec6e018684aa5d4 | [
"MIT"
] | 3 | 2020-08-15T16:01:14.000Z | 2020-10-14T21:48:32.000Z | import binaryninja
from .golang_symbol_restore import restore_golang_symbols
binaryninja.plugin.PluginCommand.register("Restore Golang Symbols",
"Fill region with breakpoint instructions.",
restore_golang_symbols)
| 42.714286 | 86 | 0.622074 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.22408 |