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
647f1a2745d409d408f040287d5811bb8c5667a4
1,788
py
Python
tests/test_inf_dim_rosenbrock.py
jungtaekkim/bayeso-benchmarks
3650aaeeaa123da14f0f839da664b071ee17bf9a
[ "MIT" ]
20
2019-12-17T09:01:59.000Z
2022-01-17T02:06:28.000Z
tests/test_inf_dim_rosenbrock.py
jungtaekkim/bayeso-benchmarks
3650aaeeaa123da14f0f839da664b071ee17bf9a
[ "MIT" ]
null
null
null
tests/test_inf_dim_rosenbrock.py
jungtaekkim/bayeso-benchmarks
3650aaeeaa123da14f0f839da664b071ee17bf9a
[ "MIT" ]
5
2019-12-18T08:41:36.000Z
2020-11-06T07:25:57.000Z
# # author: Jungtaek Kim (jtkim@postech.ac.kr) # last updated: February 8, 2021 # import numpy as np import pytest from bayeso_benchmarks.inf_dim_rosenbrock import * class_fun = Rosenbrock TEST_EPSILON = 1e-5 def test_init(): obj_fun = class_fun(2) with pytest.raises(TypeError) as error: class_fu...
24.493151
78
0.599553
0
0
0
0
0
0
0
0
88
0.049217
647f55fab23ad506dc4f355454eebadf13262216
26,314
py
Python
pgoapi/protos/POGOProtos/Data/Battle_pb2.py
neoz/pgoapi
fd462be412ac347ab517b68f269e2342a7226909
[ "MIT" ]
1,457
2016-07-19T00:35:05.000Z
2022-02-05T15:19:44.000Z
pgoapi/protos/POGOProtos/Data/Battle_pb2.py
neoz/pgoapi
fd462be412ac347ab517b68f269e2342a7226909
[ "MIT" ]
196
2016-07-19T00:23:53.000Z
2018-06-07T16:12:27.000Z
pgoapi/protos/POGOProtos/Data/Battle_pb2.py
neoz/pgoapi
fd462be412ac347ab517b68f269e2342a7226909
[ "MIT" ]
501
2016-07-19T00:31:16.000Z
2022-03-25T06:31:59.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos.Data.Battle.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf impor...
44.751701
3,275
0.764802
0
0
0
0
0
0
0
0
7,387
0.280725
6480456942a3d47797294bda49a77fcd8def40ed
28
py
Python
tests/tattoos_controllers/test_get_all.py
Poketnans/capstone-q3
38d550a54ff41387534241df85eb8aa8c9b6ba7e
[ "MIT" ]
null
null
null
tests/tattoos_controllers/test_get_all.py
Poketnans/capstone-q3
38d550a54ff41387534241df85eb8aa8c9b6ba7e
[ "MIT" ]
4
2022-03-03T12:47:02.000Z
2022-03-08T18:10:34.000Z
tests/tattoos_controllers/test_get_all.py
Poketnans/capstone-q3
38d550a54ff41387534241df85eb8aa8c9b6ba7e
[ "MIT" ]
1
2022-03-17T14:21:30.000Z
2022-03-17T14:21:30.000Z
def test_get_all(): ...
9.333333
19
0.535714
0
0
0
0
0
0
0
0
0
0
64808ef89b84bb0c8f0cd239793909c476cae64b
1,162
py
Python
function_zoo.py
RamiroFuentes/Procesos-de-separacion-II
d68873f8ee3e9eb081f1040f9510335746b1a0b4
[ "MIT" ]
null
null
null
function_zoo.py
RamiroFuentes/Procesos-de-separacion-II
d68873f8ee3e9eb081f1040f9510335746b1a0b4
[ "MIT" ]
null
null
null
function_zoo.py
RamiroFuentes/Procesos-de-separacion-II
d68873f8ee3e9eb081f1040f9510335746b1a0b4
[ "MIT" ]
null
null
null
# Librerias import numpy as np from numpy import poly1d,polyfit import matplotlib.pyplot as plt from sympy import Symbol import pandas as pd # Para imprimir en formato LaTex from sympy.interactive import printing printing.init_printing(use_latex=True) def Rachford_Rice_4(z,k,Li,Ls,p): psi = np.arange(Li,Ls+p,...
24.208333
168
0.557659
0
0
0
0
0
0
0
0
44
0.037866
6480abc07da7997c5213c7de64b16b108725ed90
840
py
Python
Python/lc_523_continuous_subarray_sum.py
cmattey/leetcode_problems
fe57e668db23f7c480835c0a10f363d718fbaefd
[ "MIT" ]
6
2019-07-01T22:03:25.000Z
2020-04-06T15:17:46.000Z
Python/lc_523_continuous_subarray_sum.py
cmattey/leetcode_problems
fe57e668db23f7c480835c0a10f363d718fbaefd
[ "MIT" ]
null
null
null
Python/lc_523_continuous_subarray_sum.py
cmattey/leetcode_problems
fe57e668db23f7c480835c0a10f363d718fbaefd
[ "MIT" ]
1
2020-04-01T22:31:41.000Z
2020-04-01T22:31:41.000Z
# Time: O(n) # Space: O(n) , min(n,k) since only storing num%k element in map. class Solution: def checkSubarraySum(self, nums: List[int], k: int) -> bool: """ Lots of edge cases to take care of with 0. if a%k == b%k, then b-a%k==0 eg: if a%k==3, b%k==3, then (a+3)%k==0, (b+3)%k==0,...
30
122
0.492857
760
0.904762
0
0
0
0
0
0
377
0.44881
648156a0f59f1f2c08d7464a8925a30d4b6a2f12
1,180
py
Python
api/routers/gifs.py
janaSunrise/AIO-API-discord-bots
e280959f7023bb9d745c843e823b980ccf627438
[ "Apache-2.0" ]
2
2021-02-13T08:08:23.000Z
2021-05-09T13:10:54.000Z
api/routers/gifs.py
janaSunrise/AIO-API-discord-bots
e280959f7023bb9d745c843e823b980ccf627438
[ "Apache-2.0" ]
null
null
null
api/routers/gifs.py
janaSunrise/AIO-API-discord-bots
e280959f7023bb9d745c843e823b980ccf627438
[ "Apache-2.0" ]
1
2021-04-17T19:44:52.000Z
2021-04-17T19:44:52.000Z
from fastapi import APIRouter, Request from api.core import log_error router = APIRouter( prefix="/gifs", tags=["GIF generation endpoints"], responses={ 404: {"description": "Not found"}, }, ) # -- Router paths -- @router.get("/wink") @log_error() async def wink(request: Request) -> dict: ...
24.081633
88
0.64322
0
0
0
0
931
0.788983
831
0.704237
326
0.276271
6483fef3d85844e7f3c1dc2eb3bf6958fc1d4faa
565
py
Python
feature_extract_pc/demo.py
zzc-1998/NR-3DQA
4773b598a92f707892fabafd7061b758dfb37508
[ "MIT" ]
5
2021-08-04T08:24:28.000Z
2022-02-16T15:30:18.000Z
feature_extract_pc/demo.py
zzc-1998/NR-QA-for-point-cloud
4773b598a92f707892fabafd7061b758dfb37508
[ "MIT" ]
null
null
null
feature_extract_pc/demo.py
zzc-1998/NR-QA-for-point-cloud
4773b598a92f707892fabafd7061b758dfb37508
[ "MIT" ]
null
null
null
from feature_extract import get_feature_vector import time #demo objpath = "models/hhi_5.ply" start = time.time() features = get_feature_vector(objpath) end = time.time() time_cost = end-start #show the features cnt = 0 for feature_domain in ['l','a','b','curvature','anisotropy','linearity','planarity','sphericity']...
29.736842
106
0.661947
0
0
0
0
0
0
0
0
204
0.361062
64850fc8936473f12079768631779f5e9426371c
784
py
Python
docs/pyxamples/glyphs.py
JuliaPackageMirrors/Bokeh.jl
47ec974a2759f81069e5143d74c22876e60f8ec2
[ "MIT", "BSD-3-Clause" ]
31
2015-02-23T03:21:48.000Z
2017-05-13T13:10:22.000Z
docs/pyxamples/glyphs.py
JuliaPackageMirrors/Bokeh.jl
47ec974a2759f81069e5143d74c22876e60f8ec2
[ "MIT", "BSD-3-Clause" ]
35
2015-01-03T16:38:01.000Z
2017-05-19T19:55:14.000Z
docs/pyxamples/glyphs.py
JuliaPackageMirrors/Bokeh.jl
47ec974a2759f81069e5143d74c22876e60f8ec2
[ "MIT", "BSD-3-Clause" ]
13
2015-01-06T12:38:32.000Z
2017-05-16T05:54:38.000Z
import numpy as np from bokeh.plotting import * N = 100 x = np.linspace(0, 4*np.pi, N) y = np.sin(x) output_file("glyphs.html", title="glyphs.py example") TOOLS = "pan,wheel_zoom,box_zoom,reset,save,box_select" p2 = figure(title="Another Legend Example", tools=TOOLS) p2.circle(x, y, legend="sin(x)") p2.line(x, y...
23.757576
56
0.690051
0
0
0
0
0
0
0
0
187
0.23852
64855ec485719a4209443f6e47f00e7cc576af85
2,103
py
Python
unit_tests/test_main.py
cloverleaf/npm
4845bc7e483291f2a2a847c242613bae2c6a11d2
[ "MIT" ]
null
null
null
unit_tests/test_main.py
cloverleaf/npm
4845bc7e483291f2a2a847c242613bae2c6a11d2
[ "MIT" ]
4
2021-01-29T11:17:53.000Z
2021-09-04T16:01:28.000Z
unit_tests/test_main.py
cloverleaf/npm
4845bc7e483291f2a2a847c242613bae2c6a11d2
[ "MIT" ]
1
2021-11-23T09:59:36.000Z
2021-11-23T09:59:36.000Z
import pytest import json import subprocess defaultMinLength = 4 defaultMaxLength = 512 sites = {} with open("../data/sites.json", 'r') as json_file: sites = json.load(json_file) def test_lengths(): for length in range(defaultMinLength, defaultMaxLength): batcmd = "node -e \"consol...
31.38806
136
0.555873
0
0
0
0
0
0
0
0
461
0.219211
6486381637823d2233cc5e2e755dff8914311f6f
5,841
py
Python
third-party/rlimit/scripts/codegen.py
capyloon/api-daemon
ab4e4b60aa9bb617734c64655c0b8940fff098bc
[ "Apache-2.0" ]
4
2022-02-08T05:32:15.000Z
2022-03-29T22:35:33.000Z
third-party/rlimit/scripts/codegen.py
capyloon/api-daemon
ab4e4b60aa9bb617734c64655c0b8940fff098bc
[ "Apache-2.0" ]
null
null
null
third-party/rlimit/scripts/codegen.py
capyloon/api-daemon
ab4e4b60aa9bb617734c64655c0b8940fff098bc
[ "Apache-2.0" ]
1
2022-03-20T11:14:51.000Z
2022-03-20T11:14:51.000Z
from typing import Optional, Dict, List import json import os import re from pprint import pprint LIBC_REPO_PATH = os.getenv("LIBC_REPO_PATH", "libc") PREDICATES = { "fuchsia/mod.rs": {"os": ["fuchsia"]}, "unix/bsd/apple/mod.rs": {"os": ["macos", "ios"]}, "unix/bsd/freebsdlike/dragonfly/mod.rs": {"os": ["...
34.56213
104
0.541174
0
0
0
0
0
0
0
0
2,763
0.473035
64866e488fcf4d0cd9c082174609e3027b9764d4
686
py
Python
pyaviso/custom_exceptions.py
mpejcoch/aviso
250b5646220fae85725278b3ca80fed4e15a103a
[ "Apache-2.0" ]
6
2021-02-03T17:55:05.000Z
2022-02-20T08:05:42.000Z
pyaviso/custom_exceptions.py
mpejcoch/aviso
250b5646220fae85725278b3ca80fed4e15a103a
[ "Apache-2.0" ]
1
2021-04-26T14:42:39.000Z
2021-04-26T14:42:39.000Z
pyaviso/custom_exceptions.py
mpejcoch/aviso
250b5646220fae85725278b3ca80fed4e15a103a
[ "Apache-2.0" ]
2
2021-02-09T15:07:41.000Z
2021-08-13T09:55:30.000Z
# (C) Copyright 1996- ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an intergovernment...
21.4375
78
0.771137
290
0.422741
0
0
0
0
0
0
371
0.540816
648750adbc05c90a3008835050a97537f6588346
45
py
Python
packages/pyright-internal/src/tests/samples/package1/psyche/pysche.py
lipovsek/pytea
c536515a5e5947fac8871784323ba7eddc58956d
[ "MIT" ]
null
null
null
packages/pyright-internal/src/tests/samples/package1/psyche/pysche.py
lipovsek/pytea
c536515a5e5947fac8871784323ba7eddc58956d
[ "MIT" ]
null
null
null
packages/pyright-internal/src/tests/samples/package1/psyche/pysche.py
lipovsek/pytea
c536515a5e5947fac8871784323ba7eddc58956d
[ "MIT" ]
null
null
null
def psyche1() -> str: return "3"
11.25
22
0.444444
0
0
0
0
0
0
0
0
3
0.066667
64879ceed73b3f3ed843d40690f61395ac4530f2
13,389
py
Python
deepatari/tools/statistics.py
cowhi/deepatari
3b676ca4fc66266d766cd2366226f3e10213bc78
[ "MIT" ]
10
2016-06-10T01:13:44.000Z
2017-10-15T10:47:09.000Z
deepatari/tools/statistics.py
cowhi/deepatari
3b676ca4fc66266d766cd2366226f3e10213bc78
[ "MIT" ]
null
null
null
deepatari/tools/statistics.py
cowhi/deepatari
3b676ca4fc66266d766cd2366226f3e10213bc78
[ "MIT" ]
2
2016-06-10T14:38:08.000Z
2020-08-29T03:11:06.000Z
import logging _logger = logging.getLogger(__name__) import sys import os import csv import time import numpy as np class Statistics(object): """ This class handles all statistics of an experiment. The class keeps the statistics running and saves certain paramaters at the end of an epoch to files. It's a...
44.481728
276
0.56778
13,270
0.991112
0
0
0
0
0
0
6,273
0.468519
6488b1c28baaff292669122a86d2163e41ff8cf6
1,284
py
Python
cmskit/products/views.py
ozgurgunes/django-cmskit
19d14fbb57702a6c56b6b3a5d859c93533ff1535
[ "MIT" ]
1
2015-09-28T10:10:34.000Z
2015-09-28T10:10:34.000Z
cmskit/products/views.py
ozgurgunes/django-cmskit
19d14fbb57702a6c56b6b3a5d859c93533ff1535
[ "MIT" ]
null
null
null
cmskit/products/views.py
ozgurgunes/django-cmskit
19d14fbb57702a6c56b6b3a5d859c93533ff1535
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.utils.translation import get_language from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django.http import Http404 from cmskit.products.models import Category, Product def index(request): categories = Category.obje...
41.419355
80
0.662773
0
0
0
0
0
0
0
0
233
0.181464
648919faa81c812b312bc58cbd08e8cc789afe5f
307
py
Python
main.py
baifengbai/xlart
d4568dcc3c221b25a9227af1ae022c4f0a5b3476
[ "MIT" ]
1
2022-03-12T02:40:51.000Z
2022-03-12T02:40:51.000Z
main.py
baifengbai/xlart
d4568dcc3c221b25a9227af1ae022c4f0a5b3476
[ "MIT" ]
null
null
null
main.py
baifengbai/xlart
d4568dcc3c221b25a9227af1ae022c4f0a5b3476
[ "MIT" ]
null
null
null
from time import time import xlart if __name__ == '__main__': start = time() xlart.resize_image('picture.jpg', 'picture_resized.jpg', 200, 200) xlart.image_to_xlsx('picture_resized.jpg', 'demo.xlsx') end = time() print('An xlart file has been generated in ' + str(end - start) + 's.')
27.909091
75
0.664495
0
0
0
0
0
0
0
0
118
0.384365
6489d5635a822fcdc10fe744a26044fe5cedea48
528
py
Python
tests/units/Vault/test_withdraw_all.py
benber86/alcom_contracts
57136d97d0d30088679e358a2fc3345e82ccb0f7
[ "MIT" ]
2
2021-07-14T16:26:14.000Z
2021-08-01T22:24:51.000Z
tests/units/Vault/test_withdraw_all.py
benber86/alcom_contracts
57136d97d0d30088679e358a2fc3345e82ccb0f7
[ "MIT" ]
null
null
null
tests/units/Vault/test_withdraw_all.py
benber86/alcom_contracts
57136d97d0d30088679e358a2fc3345e82ccb0f7
[ "MIT" ]
null
null
null
import brownie AMOUNT = 10 ** 18 def test_single_withdraw_all(alice, vault, alcx, ss_compounder): prior_pool_balance = ss_compounder.stakeBalance() prior_alcx_balance = alcx.balanceOf(alice) alcx.approve(vault, AMOUNT, {'from': alice}) vault.deposit(AMOUNT, {'from': alice}) vault.withdrawAll({'...
27.789474
64
0.717803
0
0
0
0
0
0
0
0
18
0.034091
648a4501d473d939e72e3971c0c63e4c5c253da2
34
py
Python
sigcom/__main__.py
dcic/signature-commons-controller
b69c4063235d927da27891e8a30d2822c6768a66
[ "Apache-2.0" ]
null
null
null
sigcom/__main__.py
dcic/signature-commons-controller
b69c4063235d927da27891e8a30d2822c6768a66
[ "Apache-2.0" ]
2
2020-06-09T14:52:34.000Z
2020-11-06T18:02:49.000Z
sigcom/__main__.py
dcic/signature-commons-controller
b69c4063235d927da27891e8a30d2822c6768a66
[ "Apache-2.0" ]
null
null
null
from sigcom.cli import main main()
17
27
0.794118
0
0
0
0
0
0
0
0
0
0
648aec550e075b1bc9c41b89b9001500027781fb
221
py
Python
mentorship_api/views.py
brickfaced/mentorship-app
b2fd44f2689bd0e613f2f4836c81aa1de9ecf0b3
[ "MIT" ]
null
null
null
mentorship_api/views.py
brickfaced/mentorship-app
b2fd44f2689bd0e613f2f4836c81aa1de9ecf0b3
[ "MIT" ]
null
null
null
mentorship_api/views.py
brickfaced/mentorship-app
b2fd44f2689bd0e613f2f4836c81aa1de9ecf0b3
[ "MIT" ]
null
null
null
from rest_framework.decorators import api_view from rest_framework.response import Response @api_view() def hello_world(request): """Get for the hello world test.""" return Response({'message': 'Hello World!'})
24.555556
48
0.746606
0
0
0
0
126
0.570136
0
0
58
0.262443
648b823acfa1c931f329b120da5595b30d0999f3
685
py
Python
tests/test_constituency_parsing.py
jayten42/pororo
0b02e6a633b9a32ec4241b8ed96745e6592db317
[ "Apache-2.0" ]
1,137
2021-02-02T02:09:06.000Z
2022-03-29T03:10:40.000Z
tests/test_constituency_parsing.py
jayten42/pororo
0b02e6a633b9a32ec4241b8ed96745e6592db317
[ "Apache-2.0" ]
57
2021-02-02T03:29:54.000Z
2022-03-31T16:20:00.000Z
tests/test_constituency_parsing.py
jayten42/pororo
0b02e6a633b9a32ec4241b8ed96745e6592db317
[ "Apache-2.0" ]
216
2021-02-02T02:49:02.000Z
2022-03-28T01:19:58.000Z
"""Test Constituency Parsing module""" import unittest from pororo import Pororo class PororoConstParsingTester(unittest.TestCase): def test_modules(self): const = Pororo(task="const", lang="ko") const_res = const( "지금까지 최원호 한화 이글스 감독대행, 이동욱 NC 다이노스 감독, 이강철 KT 감독에 이어 4번째 선물이었다.") ...
25.37037
77
0.640876
640
0.825806
0
0
0
0
0
0
261
0.336774
648bc0fbcc9b572dd1e815e182903fd435d432c6
6,120
py
Python
goat_scraper.py
Joseph1337/Snkr-Findr-API
7caf2eef5beb487d1a5446dafec796c37c7e6be4
[ "MIT" ]
4
2021-03-03T17:14:25.000Z
2022-01-22T14:52:49.000Z
goat_scraper.py
Joseph1337/Snkr-Trakr-API
7caf2eef5beb487d1a5446dafec796c37c7e6be4
[ "MIT" ]
null
null
null
goat_scraper.py
Joseph1337/Snkr-Trakr-API
7caf2eef5beb487d1a5446dafec796c37c7e6be4
[ "MIT" ]
null
null
null
import json import requests import pprint from time import sleep import random #extracts all user-agents from the provided 'ua_file.txt' into a list then randomly selects a user-agent def getUserAgent(): randomUserAgent = "" listOfUserAgents = [] userAgentFile = 'ua_file.txt' with open('ua_file.txt') ...
39.483871
244
0.584967
633
0.103431
0
0
0
0
0
0
2,249
0.367484
648cfa630e52c9714c4474f00133814086416c14
585
py
Python
src/ChapterTwo/insertionSort.py
Ivehui/Algorithms
3f5e183100f84f59cf62fe35422128490b7be0cb
[ "MIT" ]
null
null
null
src/ChapterTwo/insertionSort.py
Ivehui/Algorithms
3f5e183100f84f59cf62fe35422128490b7be0cb
[ "MIT" ]
null
null
null
src/ChapterTwo/insertionSort.py
Ivehui/Algorithms
3f5e183100f84f59cf62fe35422128490b7be0cb
[ "MIT" ]
null
null
null
import numpy as np class InsertionSort(object): def insertionSort(self, array): """ :type array: before sort :rtype: array: after sort """ l = len(array) for i in range(1, l): key = array[i] j = i - 1 while j >= 0 and array[j] > ke...
24.375
44
0.495726
413
0.705983
0
0
0
0
0
0
93
0.158974
648e62a712e9527d4e41e9d0aa25cde0e47d754b
4,674
py
Python
src/morsecoder.py
PyMorseCoder/MorseCoder
3266f2ec7c0563affd0c6d7a71a621245fb890e4
[ "Apache-2.0" ]
7
2021-06-20T22:57:36.000Z
2021-07-05T21:43:24.000Z
src/morsecoder.py
HestStudio/MorseCoder
3266f2ec7c0563affd0c6d7a71a621245fb890e4
[ "Apache-2.0" ]
null
null
null
src/morsecoder.py
HestStudio/MorseCoder
3266f2ec7c0563affd0c6d7a71a621245fb890e4
[ "Apache-2.0" ]
2
2021-07-30T04:28:14.000Z
2022-01-02T07:45:30.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Update time: 2021/6/19 class MorsecodeError(Exception): ''' 自定义异常, 更明了的异常信息 ''' def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class Morsecoder: ''' 基于Python3.6+的摩斯密码库, 支持编码...
22.257143
78
0.384467
4,477
0.87203
869
0.169264
0
0
0
0
1,905
0.371056
648f3c72677968d9346724e918ca2c01342d3bfb
6,629
py
Python
third_party/chromite/scripts/sysmon/puppet_metrics_unittest.py
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/chromite/scripts/sysmon/puppet_metrics_unittest.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/chromite/scripts/sysmon/puppet_metrics_unittest.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# -*- coding: utf-8 -*- # Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for puppet_metrics.""" # pylint: disable=protected-access from __future__ import absolute_import from __future__ i...
33.821429
77
0.607633
5,406
0.815508
0
0
0
0
0
0
2,080
0.313773
6490cc9b76431e255aeab4722b02c97b8014ad01
5,628
py
Python
src/flocker/blueprints/mvg-frame/__init__.py
Muxelmann/home-projects
85bd06873174b9c5c6276160988c19b460370db8
[ "MIT" ]
null
null
null
src/flocker/blueprints/mvg-frame/__init__.py
Muxelmann/home-projects
85bd06873174b9c5c6276160988c19b460370db8
[ "MIT" ]
null
null
null
src/flocker/blueprints/mvg-frame/__init__.py
Muxelmann/home-projects
85bd06873174b9c5c6276160988c19b460370db8
[ "MIT" ]
null
null
null
import os import time from flask import Blueprint, render_template, redirect, url_for, request, current_app from . import mvg from . import displays from PIL import Image, ImageFont, ImageDraw def create_bp(app): bp_mvg = Blueprint('mvg-frame', __name__, url_prefix='/mvg-frame') displays.init(app) @bp_m...
39.083333
122
0.555792
0
0
0
0
5,230
0.929282
0
0
1,316
0.233831
649106bcf86144f6cc9ff5c528dd98e420f849a0
4,770
py
Python
friendly/runtime_errors/value_error.py
MrGreenTea/friendly
091f6af1d3c2be8fee078e52db6e16074d5518e5
[ "MIT" ]
null
null
null
friendly/runtime_errors/value_error.py
MrGreenTea/friendly
091f6af1d3c2be8fee078e52db6e16074d5518e5
[ "MIT" ]
null
null
null
friendly/runtime_errors/value_error.py
MrGreenTea/friendly
091f6af1d3c2be8fee078e52db6e16074d5518e5
[ "MIT" ]
null
null
null
"""value_error.py Collection of functions useful in parsing ValueError messages and providing a more detailed explanation. """ import re from ..my_gettext import current_lang, no_information, internal_error from .. import info_variables from .. import debug_helper from .. import utils convert_type = info_variables....
31.176471
87
0.639832
0
0
0
0
2,720
0.570231
0
0
1,500
0.314465
64925ae9eca3932ebf1ffc775b41ccb44e8ec05b
874
py
Python
tests/api_test.py
pierscin/battleships
1014c6c87769c687838f43644d534d5f034e53bc
[ "MIT" ]
null
null
null
tests/api_test.py
pierscin/battleships
1014c6c87769c687838f43644d534d5f034e53bc
[ "MIT" ]
null
null
null
tests/api_test.py
pierscin/battleships
1014c6c87769c687838f43644d534d5f034e53bc
[ "MIT" ]
null
null
null
import jwt from flask import json def test_token_with_game_data_is_generated_after_posting_valid_data(app, test_client, session): grid = ('CCCCC.....' + 'BBBB......' + 'RRR.......' + 'SSS.......' + 'DD........' + '..........' + '..........' + '..........' ...
28.193548
95
0.509153
0
0
0
0
0
0
0
0
210
0.240275
6492a201029a7d225176b66fd3ca085b9340bf5b
5,951
py
Python
bctree/bctree.py
lad/bctree
7f99917fab9071af8ad870ba39304bd804e78e12
[ "Apache-2.0" ]
1
2016-02-16T20:07:34.000Z
2016-02-16T20:07:34.000Z
bctree/bctree.py
lad/bctree
7f99917fab9071af8ad870ba39304bd804e78e12
[ "Apache-2.0" ]
null
null
null
bctree/bctree.py
lad/bctree
7f99917fab9071af8ad870ba39304bd804e78e12
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """BeatCleaver Unsorted Tree Implementation.""" from collections import deque # pylint: disable-msg=W0212 # pylint can't figure out that we're accessing a protected member of our own # class. class BcTree(object): """Unsorted Native Python Tree.""" DFS = 0 BFS = 1 def __init_...
33.621469
77
0.584104
5,732
0.963199
966
0.162326
0
0
0
0
1,851
0.31104
6493ad91016eb24320a1dda1bde3e1ebc624f532
324
py
Python
pypheus/__init__.py
xod442/pypheus
11988d7c0efe2772bca80c2d40a71cc8ba707153
[ "Apache-2.0" ]
null
null
null
pypheus/__init__.py
xod442/pypheus
11988d7c0efe2772bca80c2d40a71cc8ba707153
[ "Apache-2.0" ]
null
null
null
pypheus/__init__.py
xod442/pypheus
11988d7c0efe2772bca80c2d40a71cc8ba707153
[ "Apache-2.0" ]
null
null
null
""" Information ================== pypheus is a Python binding for Morpheus a prominent Cloud Management Platform. This application will abstract the the Morpheus API and allow users to make simple python requests. wookieware 2022 version 0.1.0 - init release """ from pypheus import (auth, network, storage, monitori...
24.923077
99
0.743827
0
0
0
0
0
0
0
0
266
0.820988
64949fc4b1f9f8284a4942246dab5340df67e65c
773
py
Python
src/main.py
juhovan/stuk-dose-rate-exporter
7eec62cc3c9dad48a0a2868dcb55e9a9b4bd569e
[ "MIT" ]
null
null
null
src/main.py
juhovan/stuk-dose-rate-exporter
7eec62cc3c9dad48a0a2868dcb55e9a9b4bd569e
[ "MIT" ]
1
2022-03-08T20:52:02.000Z
2022-03-08T20:52:02.000Z
src/main.py
juhovan/stuk-dose-rate-exporter
7eec62cc3c9dad48a0a2868dcb55e9a9b4bd569e
[ "MIT" ]
null
null
null
#!/bin/python import datetime from http.server import HTTPServer, BaseHTTPRequestHandler import dose_rates class SimpleHTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): if self.path == '/metrics': results = dose_rates.get_data() body = '\n'.join(results) s...
26.655172
75
0.609314
574
0.742561
0
0
0
0
0
0
107
0.138422
64964ba79d274a79f8d5db3be6c5c4e25679a0db
824
py
Python
trpg/views/auth.py
jffifa/trpg
d808e5ce208a164154d93b177cb0c013a0d5f742
[ "MIT" ]
2
2018-08-01T16:02:10.000Z
2018-08-11T05:08:14.000Z
trpg/views/auth.py
jffifa/trpg
d808e5ce208a164154d93b177cb0c013a0d5f742
[ "MIT" ]
5
2018-08-01T12:59:03.000Z
2018-08-10T19:32:20.000Z
trpg/views/auth.py
jffifa/trpg
d808e5ce208a164154d93b177cb0c013a0d5f742
[ "MIT" ]
null
null
null
from .base import JSONView from django.contrib.auth import authenticate, login, logout from django.urls import reverse from ..registration.utility import decrypt as password_decrypt class LoginView(JSONView): def get_context_data(self, **kwargs): username = self.request.POST['username'] password ...
28.413793
79
0.639563
635
0.770631
0
0
0
0
0
0
54
0.065534
6496e828b7afe578a9d14aa5a0c97a8185b15a63
7,487
py
Python
service/api.py
psorianom/csv_detective_api
7c96f497374d842226a95a26cb6627ac22cd799b
[ "MIT" ]
2
2020-02-04T05:24:56.000Z
2021-05-05T17:22:55.000Z
service/api.py
psorianom/csv_detective_api
7c96f497374d842226a95a26cb6627ac22cd799b
[ "MIT" ]
10
2019-10-24T13:29:59.000Z
2022-02-26T17:06:15.000Z
service/api.py
psorianom/csv_detective_api
7c96f497374d842226a95a26cb6627ac22cd799b
[ "MIT" ]
2
2019-12-30T23:26:53.000Z
2020-03-27T17:23:28.000Z
#!flask/bin/python import os import sys from collections import defaultdict sys.path.append("./csv_detective_ml") # horrible hack to load my features class to load my ML pipeline :/ from flask import Flask from flask import request from flask import jsonify from flask_restplus import Api, Resource, fields from flask_...
33.573991
112
0.625351
2,884
0.385201
0
0
3,032
0.404969
0
0
1,522
0.203286
6497557f12dce30fe9d34eda6e562520909cd934
624
py
Python
Python-code-snippets-001-100/080-crop image and save.py
abartoha/python-snippets-ref
04e4feada96077f0e849b277204c012194e8fbcd
[ "Unlicense" ]
null
null
null
Python-code-snippets-001-100/080-crop image and save.py
abartoha/python-snippets-ref
04e4feada96077f0e849b277204c012194e8fbcd
[ "Unlicense" ]
null
null
null
Python-code-snippets-001-100/080-crop image and save.py
abartoha/python-snippets-ref
04e4feada96077f0e849b277204c012194e8fbcd
[ "Unlicense" ]
null
null
null
''' 80-Crop Image Source: vars sources and shambleized pip install opencv-python ''' import cv2 # Load image to crop. img = cv2.imread('weird.jpg', cv2.IMREAD_UNCHANGED) # Set crop dimensions # We first supply the startY and endY coordinates, #followed by the startX and endX coordinates to the slice. #top-line-230 ...
20.8
61
0.740385
0
0
0
0
0
0
0
0
422
0.676282
649796fc6892373cd358b9ae0ff0471d9dffe9cf
1,474
py
Python
own/recursive_lomuto_quick_select_k_set_coderpad.py
MrCsabaToth/IK
713f91c28af7b4a964ba854ede9fec73bf0c4682
[ "Apache-2.0" ]
null
null
null
own/recursive_lomuto_quick_select_k_set_coderpad.py
MrCsabaToth/IK
713f91c28af7b4a964ba854ede9fec73bf0c4682
[ "Apache-2.0" ]
null
null
null
own/recursive_lomuto_quick_select_k_set_coderpad.py
MrCsabaToth/IK
713f91c28af7b4a964ba854ede9fec73bf0c4682
[ "Apache-2.0" ]
null
null
null
import random def quick_select_helper(a, beg, end, k): if beg >= end: return if end == beg + 1: if a[beg] > a[end]: a[beg], a[end] = a[end], a[beg] return pivot_index = random.randint(beg, end) pivot = a[pivot_index] # 1 swap pivot with beginning if pivot_i...
23.03125
90
0.57327
0
0
0
0
408
0.276798
0
0
192
0.130258
6497a361fbfe4776b2db4e33d8ba9a4805544636
1,212
py
Python
app.py
Programmer-RD-AI/Simple-Blog
188343b9ed039690e2081026ec604c37d821ad57
[ "Apache-2.0" ]
null
null
null
app.py
Programmer-RD-AI/Simple-Blog
188343b9ed039690e2081026ec604c37d821ad57
[ "Apache-2.0" ]
null
null
null
app.py
Programmer-RD-AI/Simple-Blog
188343b9ed039690e2081026ec604c37d821ad57
[ "Apache-2.0" ]
null
null
null
from flask import * import pymongo from pymongo import * app = Flask(__name__) app.debug = True app.secret_key = 'test' cluster = MongoClient("mongodb://Ranuga:ranuga2008@cluster0-shard-00-00.odlbl.mongodb.net:27017,cluster0-shard-00-01.odlbl.mongodb.net:27017,cluster0-shard-00-02.odlbl.mongodb.net:27017/myFirstDatabas...
36.727273
289
0.670792
0
0
0
0
712
0.587459
0
0
482
0.39769
649a540a7b30e7793e5deda92e69dcaf44168a57
371
py
Python
app/src/subtitle/models.py
robertzm/VideoWebDemo
96e0e80b794c35ef77e92d1afce2e9bb498f0a2a
[ "Apache-2.0" ]
2
2020-12-09T23:34:58.000Z
2020-12-10T06:39:28.000Z
app/src/subtitle/models.py
robertzm/VideoWebDemo
96e0e80b794c35ef77e92d1afce2e9bb498f0a2a
[ "Apache-2.0" ]
2
2021-01-11T08:59:37.000Z
2021-01-11T09:00:06.000Z
app/src/subtitle/models.py
robertzm/VideoWebDemo
96e0e80b794c35ef77e92d1afce2e9bb498f0a2a
[ "Apache-2.0" ]
null
null
null
from app import db class SubtitlePath(db.Model): __tablename__ = "subtitle" id = db.Column(db.Integer, primary_key=True) uuid = db.Column(db.String(64), unique=True, nullable=True) lang = db.Column(db.String(32)) filepath = db.Column(db.String(128), nullable=False) def __repr__(self): ...
28.538462
63
0.67655
349
0.940701
0
0
0
0
0
0
30
0.080863
649bebb548c8b13728e620cc10bd445dcea417f4
263
py
Python
meme/admin.py
mkimartinez/Lyfey
8a27ef7fea92146f043c68c7ef5ee3672014c3fc
[ "MIT" ]
null
null
null
meme/admin.py
mkimartinez/Lyfey
8a27ef7fea92146f043c68c7ef5ee3672014c3fc
[ "MIT" ]
null
null
null
meme/admin.py
mkimartinez/Lyfey
8a27ef7fea92146f043c68c7ef5ee3672014c3fc
[ "MIT" ]
null
null
null
from django.contrib import admin from .import models from meme.models import Comment # Register your models here. admin.site.register(models.Mem) class CommentAdmin(admin.ModelAdmin): list_display =('user','approved') admin.site.register(Comment,CommentAdmin)
26.3
41
0.802281
72
0.273764
0
0
0
0
0
0
44
0.1673
649d0ca596b6a034bd16e8ed6193bec8d572c9c4
2,033
py
Python
ProgrammingAssignments/IrisClassification/Vowpal/convertToVowpal.py
ckcortright/CSCI4830MachineLearning
5d1c6c7bfb05b54f7c000c940b1f6410054f10f0
[ "MIT" ]
null
null
null
ProgrammingAssignments/IrisClassification/Vowpal/convertToVowpal.py
ckcortright/CSCI4830MachineLearning
5d1c6c7bfb05b54f7c000c940b1f6410054f10f0
[ "MIT" ]
null
null
null
ProgrammingAssignments/IrisClassification/Vowpal/convertToVowpal.py
ckcortright/CSCI4830MachineLearning
5d1c6c7bfb05b54f7c000c940b1f6410054f10f0
[ "MIT" ]
2
2016-11-30T07:28:47.000Z
2017-01-28T05:52:45.000Z
################################################################################ # A simple script to convert the iris training data to the vowpal wabbit format. # # Author: Carl Cortright # Date: 9/10/2016 # # Copyright 2016 Carl Cortright ###############################################################################...
27.849315
80
0.567634
0
0
0
0
0
0
0
0
662
0.325627
649d8bfa1c8ee1ea90e6d40d1fff1eb930a5b1f6
767
py
Python
trainstalker/sncfdata_rt/views.py
miludmann/trainstalker
7ecb6f052f459b66d42d727c9b162f47b908b98f
[ "BSD-3-Clause" ]
null
null
null
trainstalker/sncfdata_rt/views.py
miludmann/trainstalker
7ecb6f052f459b66d42d727c9b162f47b908b98f
[ "BSD-3-Clause" ]
null
null
null
trainstalker/sncfdata_rt/views.py
miludmann/trainstalker
7ecb6f052f459b66d42d727c9b162f47b908b98f
[ "BSD-3-Clause" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse from sncfdata_rt.models import Station # Create your views here. def index(request): stations_list = Station.objects.order_by('station_name')[:5] context = {'stations_list': stations_list} return render(request, 'sncfdata_rt/index.ht...
30.68
67
0.749674
0
0
0
0
0
0
0
0
211
0.275098
649fc4b512a5b9fc6782de731a26e50560bffbcf
516
py
Python
z.uncategorized/programmers87946.py
kimminki10/algorithms2
5d3b2d970dbc88169108632ce0d234bf74446316
[ "MIT" ]
null
null
null
z.uncategorized/programmers87946.py
kimminki10/algorithms2
5d3b2d970dbc88169108632ce0d234bf74446316
[ "MIT" ]
null
null
null
z.uncategorized/programmers87946.py
kimminki10/algorithms2
5d3b2d970dbc88169108632ce0d234bf74446316
[ "MIT" ]
null
null
null
""" https://programmers.co.kr/learn/courses/30/lessons/87946 피로도 """ result = 0 def gogo(k, dun, depth=0): global result if result < depth: result = depth if k < 1: return if dun == None: return for i in range(len(dun)): if k >= dun[i][0]: gogo(k - dun[i]...
19.111111
61
0.550388
0
0
0
0
0
0
0
0
74
0.141762
64a02aaa94244083fe284a70aa2f56168c273094
10,914
py
Python
nicos/clients/gui/utils.py
ess-dmsc/nicos
755d61d403ff7123f804c45fc80c7ff4d762993b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
1
2021-03-26T10:30:45.000Z
2021-03-26T10:30:45.000Z
nicos/clients/gui/utils.py
ess-dmsc/nicos
755d61d403ff7123f804c45fc80c7ff4d762993b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
91
2020-08-18T09:20:26.000Z
2022-02-01T11:07:14.000Z
nicos/clients/gui/utils.py
ess-dmsc/nicos
755d61d403ff7123f804c45fc80c7ff4d762993b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
3
2020-08-04T18:35:05.000Z
2021-04-16T11:22:08.000Z
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
31.45245
87
0.616731
7,180
0.657871
737
0.067528
177
0.016218
0
0
1,867
0.171065
64a323ffac34c092ee3ab917bb34c846d0e4e329
5,391
py
Python
python/functest/sv_perf_check_full.py
spiralgenetics/biograph
33c78278ce673e885f38435384f9578bfbf9cdb8
[ "BSD-2-Clause" ]
16
2021-07-14T23:32:31.000Z
2022-03-24T16:25:15.000Z
python/functest/sv_perf_check_full.py
spiralgenetics/biograph
33c78278ce673e885f38435384f9578bfbf9cdb8
[ "BSD-2-Clause" ]
9
2021-07-20T20:39:47.000Z
2021-09-16T20:57:59.000Z
python/functest/sv_perf_check_full.py
spiralgenetics/biograph
33c78278ce673e885f38435384f9578bfbf9cdb8
[ "BSD-2-Clause" ]
9
2021-07-15T19:38:35.000Z
2022-01-31T19:24:56.000Z
""" sv_performance_test.py: Medium tests to ensure variant discovery hasn't changed too much """ import os import json import unittest import sys import subprocess from glob import glob from python.functest.utils.setup import ( ftest_setup, ftest_teardown, ftest_module_setup ) SEARCH_PATH = ["/scratch"] ...
35.235294
201
0.592283
3,822
0.708959
0
0
0
0
0
0
2,093
0.38824
64a35f680e8ea36296637c6eb5830f1e36cb28a7
177
py
Python
fireCatcher.py
n1cfury/ViolentPython
c758de753bd56fe8b5c5b6db6f0f1b134023bf6f
[ "MIT" ]
null
null
null
fireCatcher.py
n1cfury/ViolentPython
c758de753bd56fe8b5c5b6db6f0f1b134023bf6f
[ "MIT" ]
null
null
null
fireCatcher.py
n1cfury/ViolentPython
c758de753bd56fe8b5c5b6db6f0f1b134023bf6f
[ "MIT" ]
null
null
null
def banner(): print "### Firesheep Detector p197-200 ###" print "" def fireCatcher(pkt): def main(): banner() fireCatcher(pkt): if __name__ == '__main__': main()
11.0625
48
0.615819
0
0
0
0
0
0
0
0
53
0.299435
64a5e4b1934441d33265c0c90517da3ddd60146a
27,257
py
Python
pythonScripts/blenderMeshExport.py
dsnettleton/whipstitch-game-engine
1c91a2e90274f18723141ec57d0cb4930bd29b25
[ "MIT" ]
null
null
null
pythonScripts/blenderMeshExport.py
dsnettleton/whipstitch-game-engine
1c91a2e90274f18723141ec57d0cb4930bd29b25
[ "MIT" ]
null
null
null
pythonScripts/blenderMeshExport.py
dsnettleton/whipstitch-game-engine
1c91a2e90274f18723141ec57d0cb4930bd29b25
[ "MIT" ]
null
null
null
# Blender Mesh Export for the Whipstitch Game Engine # Copyright D. Scott Nettleton, 2013 # This software is released under the terms of the # Lesser GNU Public License (LGPL). import bpy,os from math import sqrt from mathutils import Matrix, Vector, Quaternion from copy import deepcopy workingDirectory = "./"...
39.849415
125
0.602341
3,626
0.13303
0
0
0
0
0
0
4,285
0.157207
64a6891558cc648a2a978e43a61510b62a12beb7
2,214
py
Python
cogs/Basic.py
yoggys/discord-bot-template
25b2e8dd830c0900323927cd9bbc0ec6baa22fec
[ "MIT" ]
2
2021-01-12T11:36:23.000Z
2021-01-13T12:29:58.000Z
cogs/Basic.py
yoggys/discord-bot-template
25b2e8dd830c0900323927cd9bbc0ec6baa22fec
[ "MIT" ]
1
2021-12-07T12:47:36.000Z
2021-12-16T14:07:00.000Z
cogs/Basic.py
yoggys/discord-bot-template
25b2e8dd830c0900323927cd9bbc0ec6baa22fec
[ "MIT" ]
null
null
null
from functions.Logger import log_info, error_handle from discord.ext import commands import sys class Basic(commands.Cog): def __init__(self, client): self.client = client #on_ready event example @commands.Cog.listener() async def on_ready(self): log_info("Basic module loaded!") ...
36.9
114
0.631436
2,062
0.931346
0
0
1,802
0.813911
1,584
0.715447
821
0.370822
64a70ed160e992e374d323deae21b2f96b2a2c39
638
py
Python
python/listnode/219.contains-duplicate-ii.py
Nobodylesszb/LeetCode
0e902f6bff4834a93ce64cf9c57fd64297e63523
[ "MIT" ]
null
null
null
python/listnode/219.contains-duplicate-ii.py
Nobodylesszb/LeetCode
0e902f6bff4834a93ce64cf9c57fd64297e63523
[ "MIT" ]
null
null
null
python/listnode/219.contains-duplicate-ii.py
Nobodylesszb/LeetCode
0e902f6bff4834a93ce64cf9c57fd64297e63523
[ "MIT" ]
null
null
null
# Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i and j is at most k. # Example 1: # Input: nums = [1,2,3,1], k = 3 # Output: true # Example 2: # Input: nums = [1,0,1,1], k = 1 # Output...
25.52
201
0.597179
241
0.377743
0
0
0
0
0
0
380
0.595611
64a73e1098cc1dff298ecb88f5712e1ebc04b918
23,120
py
Python
network/utils.py
lukaspie/xpsdeeplearning
0e5cf818cb0fe7bcfda707f58a1d2194301a9f24
[ "MIT" ]
1
2022-01-05T09:41:58.000Z
2022-01-05T09:41:58.000Z
network/utils.py
lukaspie/xpsdeeplearning
0e5cf818cb0fe7bcfda707f58a1d2194301a9f24
[ "MIT" ]
null
null
null
network/utils.py
lukaspie/xpsdeeplearning
0e5cf818cb0fe7bcfda707f58a1d2194301a9f24
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Jun 9 14:10:44 2020. @author: pielsticker """ import os import pickle import numpy as np import json from matplotlib import pyplot as plt import matplotlib.colors as mcolors import seaborn as sns from docx import Document from docx.enum.table import WD_TABLE_ALIGNMENT, WD_R...
31.033557
80
0.530882
22,485
0.972535
0
0
0
0
0
0
6,821
0.295026
64a76d80d9db98ea61ff9254492492045784c0fa
7,743
py
Python
pyzbar/wrapper.py
spmallick/pyzbar
372003b5fc129e15bcf35d464118ea43432a56b8
[ "MIT" ]
null
null
null
pyzbar/wrapper.py
spmallick/pyzbar
372003b5fc129e15bcf35d464118ea43432a56b8
[ "MIT" ]
null
null
null
pyzbar/wrapper.py
spmallick/pyzbar
372003b5fc129e15bcf35d464118ea43432a56b8
[ "MIT" ]
2
2018-11-21T14:17:48.000Z
2020-02-26T22:21:59.000Z
"""Low-level wrapper around zbar's interface """ import platform import sys from ctypes import ( cdll, c_ubyte, c_char_p, c_int, c_uint, c_ulong, c_void_p, Structure, CFUNCTYPE, POINTER ) from ctypes.util import find_library from enum import IntEnum, unique from pathlib import Path # Types c_ubyte_p = POINTE...
28.784387
76
0.592923
2,157
0.278574
0
0
1,971
0.254552
0
0
3,256
0.420509
64a8df9ffa0c33a95bf84e16379536e77b819f43
1,281
py
Python
connector/write_rnd.py
lodrantl/pimenk
7871c872d1d93c2e2bb17d48c891696887dbf3b4
[ "Apache-2.0" ]
null
null
null
connector/write_rnd.py
lodrantl/pimenk
7871c872d1d93c2e2bb17d48c891696887dbf3b4
[ "Apache-2.0" ]
2
2016-10-12T15:43:59.000Z
2016-10-12T15:46:38.000Z
connector/write_rnd.py
lodrantl/pimenk
7871c872d1d93c2e2bb17d48c891696887dbf3b4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import argparse import time import random from configparser import ConfigParser from influxdb import SeriesHelper, InfluxDBClient parser = argparse.ArgumentParser() parser.add_argument('config', help='path to the config file') args = parser.parse_args() config_parser = ConfigParser() config_...
23.722222
79
0.693208
227
0.177205
0
0
0
0
0
0
280
0.218579
64a8e9e329731638734656b698ff0ab9bec0827e
2,084
py
Python
kyu_5/number_of_trailing_zeros_of_n/test_zeros.py
pedrocodacyorg2/codewars
ba3ea81125b6082d867f0ae34c6c9be15e153966
[ "Unlicense" ]
1
2022-02-12T05:56:04.000Z
2022-02-12T05:56:04.000Z
kyu_5/number_of_trailing_zeros_of_n/test_zeros.py
pedrocodacyorg2/codewars
ba3ea81125b6082d867f0ae34c6c9be15e153966
[ "Unlicense" ]
182
2020-04-30T00:51:36.000Z
2021-09-07T04:15:05.000Z
kyu_5/number_of_trailing_zeros_of_n/test_zeros.py
pedrocodacyorg2/codewars
ba3ea81125b6082d867f0ae34c6c9be15e153966
[ "Unlicense" ]
4
2020-04-29T22:04:20.000Z
2021-07-13T20:04:14.000Z
# Created by Egor Kostan. # GitHub: https://github.com/ikostan # LinkedIn: https://www.linkedin.com/in/egor-kostan/ # ALGORITHMS MATHEMATICS NUMBERS import unittest import allure from kyu_5.number_of_trailing_zeros_of_n.zeros import zeros from utils.log_func import print_log @allure.epic('5 kyu') @allure.parent_...
32.061538
94
0.540787
1,441
0.691459
0
0
1,799
0.863244
0
0
838
0.402111
64a9349d4758e8a5e3292009a5229618d221633a
1,404
py
Python
fairness/visualise_target_distribution_datasets_joosje.py
JSGoedhart/fairness-comparison
f6fcb7f39f15bb63aeab03ef24e41d0ffe353bb8
[ "Apache-2.0" ]
null
null
null
fairness/visualise_target_distribution_datasets_joosje.py
JSGoedhart/fairness-comparison
f6fcb7f39f15bb63aeab03ef24e41d0ffe353bb8
[ "Apache-2.0" ]
1
2021-11-15T17:52:04.000Z
2021-11-15T17:52:04.000Z
fairness/visualise_target_distribution_datasets_joosje.py
JSGoedhart/fairness-comparison
f6fcb7f39f15bb63aeab03ef24e41d0ffe353bb8
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd import os import seaborn as sns import matplotlib.pyplot as plt from fairness.data.objects.list import DATASETS, get_dataset_names sns.set_context(rc={"figure.figsize": (8, 4)}) sns.set(style = 'white', font_scale = 1.5) colors = ['#2ECC71' , '#FFEB3B'] # Green, yellow curren...
33.428571
134
0.698718
0
0
0
0
0
0
0
0
220
0.156695
64aa3d37b85cc243ccdf71e09e84298f1e19d500
25,744
py
Python
venv/Lib/site-packages/dateparser/data/date_translation_data/pt.py
realwaynesun/cryptotradedata
4bd4d3f80438507fbb2b611a9cf451ed1aa2bde1
[ "MIT" ]
2
2020-09-28T21:23:59.000Z
2021-11-10T15:01:15.000Z
venv/Lib/site-packages/dateparser/data/date_translation_data/pt.py
realwaynesun/cryptotradedata
4bd4d3f80438507fbb2b611a9cf451ed1aa2bde1
[ "MIT" ]
21
2021-02-04T01:37:44.000Z
2022-03-12T01:00:55.000Z
venv/Lib/site-packages/dateparser/data/date_translation_data/pt.py
realwaynesun/cryptotradedata
4bd4d3f80438507fbb2b611a9cf451ed1aa2bde1
[ "MIT" ]
1
2021-03-27T19:41:10.000Z
2021-03-27T19:41:10.000Z
info = { "name": "pt", "date_order": "DMY", "january": [ "janeiro", "jan" ], "february": [ "fevereiro", "fev" ], "march": [ "março", "mar" ], "april": [ "abril", "abr" ], "may": [ "maio", "mai" ...
26.215886
48
0.235977
0
0
0
0
0
0
0
0
10,109
0.391245
64aa3e1874f0f343663a3b5eb7d3f0e4ccdcb368
284
py
Python
pyinstagram/agents/web_agent.py
OlegYurchik/pyInstagram
d71ce6918fa0a3d6ed641318efa6a55a41dec939
[ "MIT" ]
152
2019-03-26T23:33:28.000Z
2022-01-04T15:33:25.000Z
pyinstagram/agents/web_agent.py
OlegYurchik/pyInstagram
d71ce6918fa0a3d6ed641318efa6a55a41dec939
[ "MIT" ]
58
2019-03-27T09:30:21.000Z
2020-12-03T13:40:39.000Z
pyinstagram/agents/web_agent.py
OlegYurchik/pyInstagram
d71ce6918fa0a3d6ed641318efa6a55a41dec939
[ "MIT" ]
60
2019-04-05T14:34:45.000Z
2021-01-20T02:44:24.000Z
from .async_web_agent import AsyncWebAgent from .utils import sync class WebAgent(AsyncWebAgent): update = sync(AsyncWebAgent.update) get_media = sync(AsyncWebAgent.get_media) get_likes = sync(AsyncWebAgent.get_likes) get_comments = sync(AsyncWebAgent.get_comments)
28.4
51
0.785211
214
0.753521
0
0
0
0
0
0
0
0
64ac038d0826dd17f9a516ada94d2873b01d30ab
511
py
Python
examples/ex1.py
nathanfdunn/ipymd
cca5f98e34a024396e21ab7a3f322bbe2e3f37d1
[ "BSD-3-Clause" ]
521
2015-01-01T09:22:05.000Z
2022-02-06T23:54:10.000Z
examples/ex1.py
nathanfdunn/ipymd
cca5f98e34a024396e21ab7a3f322bbe2e3f37d1
[ "BSD-3-Clause" ]
79
2015-01-04T21:17:29.000Z
2018-08-28T16:39:21.000Z
examples/ex1.py
nathanfdunn/ipymd
cca5f98e34a024396e21ab7a3f322bbe2e3f37d1
[ "BSD-3-Clause" ]
56
2015-03-01T08:48:26.000Z
2022-01-29T03:11:13.000Z
# List of ipymd cells expected for this example. output = [ {'cell_type': 'markdown', 'source': '# Header'}, {'cell_type': 'markdown', 'source': 'A paragraph.'}, {'cell_type': 'markdown', 'source': 'Python code:'}, {'cell_type': 'code', 'input': 'print("Hello world!")', 'out...
21.291667
66
0.547945
0
0
0
0
0
0
0
0
368
0.720157
64ac4e0c696328a0793c73c2ffb9c229acc0aada
2,508
py
Python
examples/kddcup2021/WikiKG90M/feature/dump_feat/1_rrt_feat.py
zbmain/PGL
dbded6a1543248b0a33c05eb476ddc513401a774
[ "Apache-2.0" ]
1,389
2019-06-11T03:29:20.000Z
2022-03-29T18:25:43.000Z
examples/kddcup2021/WikiKG90M/feature/dump_feat/1_rrt_feat.py
zbmain/PGL
dbded6a1543248b0a33c05eb476ddc513401a774
[ "Apache-2.0" ]
232
2019-06-21T06:52:10.000Z
2022-03-29T08:20:31.000Z
examples/kddcup2021/WikiKG90M/feature/dump_feat/1_rrt_feat.py
zbmain/PGL
dbded6a1543248b0a33c05eb476ddc513401a774
[ "Apache-2.0" ]
229
2019-06-20T12:13:58.000Z
2022-03-25T12:04:48.000Z
# -*- coding: utf-8 -*- ######################################################################## # # Copyright (c) 2021 Baidu.com, Inc. All Rights Reserved # # Author: suweiyue(suweiyue@baidu.com) # Date: 2021/06/03 23:12:20 # ######################################################################## """ Comment. """...
30.216867
78
0.637959
0
0
0
0
0
0
0
0
844
0.336523
64ac9a9800fc56bffbd8416996ff63c66a3c1e04
1,463
py
Python
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/occlusion_query.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/occlusion_query.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/occlusion_query.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p, constants as _cs, arrays from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_ARB_occlusion_query' def _f( function ): return _p.createFunction( function,_p.GL,'GL_ARB_occlusion_query',False) _p.unpack_constan...
33.25
76
0.796309
0
0
0
0
707
0.483254
0
0
335
0.228982
64ae4132f882d01178b0d9e0b77c964a7b55c91a
959
py
Python
tests/test_db_access_in_repr.py
bdauvergne/pytest-django
66205b3d6ac21e65fbd3d95f1f541db30a596e53
[ "BSD-3-Clause" ]
967
2015-01-06T14:36:22.000Z
2022-03-29T21:07:03.000Z
tests/test_db_access_in_repr.py
bdauvergne/pytest-django
66205b3d6ac21e65fbd3d95f1f541db30a596e53
[ "BSD-3-Clause" ]
743
2015-01-02T12:20:13.000Z
2022-03-25T17:13:05.000Z
tests/test_db_access_in_repr.py
bdauvergne/pytest-django
66205b3d6ac21e65fbd3d95f1f541db30a596e53
[ "BSD-3-Clause" ]
308
2015-01-08T11:40:23.000Z
2022-03-23T02:53:14.000Z
def test_db_access_with_repr_in_report(django_testdir) -> None: django_testdir.create_test_module( """ import pytest from .app.models import Item def test_via_db_blocker(django_db_setup, django_db_blocker): with django_db_blocker.unblock(): Item.objects....
34.25
73
0.637122
0
0
0
0
0
0
0
0
602
0.627737
64b1a7488c274f4dd72529847c355261e656d578
2,754
py
Python
myssh/threads_func.py
samblabla/myssh
ed105766e7d295652bce72352e0ac9ee3348dfd2
[ "Apache-2.0" ]
65
2018-02-09T07:28:57.000Z
2021-11-02T22:53:35.000Z
myssh/threads_func.py
samblabla/myssh
ed105766e7d295652bce72352e0ac9ee3348dfd2
[ "Apache-2.0" ]
3
2019-05-02T09:47:54.000Z
2020-08-11T15:06:28.000Z
myssh/threads_func.py
samblabla/myssh
ed105766e7d295652bce72352e0ac9ee3348dfd2
[ "Apache-2.0" ]
8
2018-10-19T03:49:02.000Z
2021-03-25T08:09:32.000Z
#coding:utf-8 import data import ssh import sftp import common import time import threading def threads_connect(name,i): ssh.create_conn(i) sftp.create_conn(i) print('\33[34m%d:\33[31m%s成功:%s(%s) \33[0m' %(i,name,data.servers[i]['name'],common.hideipFun(data.servers[i]['host']))) def threads_handle(threa...
31.655172
124
0.526507
0
0
0
0
0
0
0
0
248
0.088953
64b306b8769d1a5395b2ff462d244969453f0281
39
py
Python
main/models/__init__.py
trandat9h/GotitFinalProject
c32b12ab7099ee7d389ba67816fde7d48b3014bc
[ "MIT" ]
1
2022-03-29T09:58:16.000Z
2022-03-29T09:58:16.000Z
main/models/__init__.py
trandat9h/GotitFinalProject
c32b12ab7099ee7d389ba67816fde7d48b3014bc
[ "MIT" ]
null
null
null
main/models/__init__.py
trandat9h/GotitFinalProject
c32b12ab7099ee7d389ba67816fde7d48b3014bc
[ "MIT" ]
null
null
null
__all__ = ["category", "item", "user"]
19.5
38
0.589744
0
0
0
0
0
0
0
0
22
0.564103
64b3729d10855edc071cb1c3176a8d1e927629f4
588
py
Python
tests/test_need_to_wrap.py
ffreemt/simple-proxy-pool
15cb083904e515ad909cc5fa30cb030e200f5787
[ "MIT" ]
2
2020-01-01T12:55:01.000Z
2020-02-25T03:59:12.000Z
tests/test_need_to_wrap.py
ffreemt/simple-proxy-pool
15cb083904e515ad909cc5fa30cb030e200f5787
[ "MIT" ]
null
null
null
tests/test_need_to_wrap.py
ffreemt/simple-proxy-pool
15cb083904e515ad909cc5fa30cb030e200f5787
[ "MIT" ]
1
2020-08-06T02:29:00.000Z
2020-08-06T02:29:00.000Z
''' test need_to_wrap >>> assert not need_to_wrap(['127.0.0.1:8889', '127.0.0.1']) >>> assert need_to_wrap(['127.0.0.1:8889', 'source']) ''' from simple_pp.need_to_wrap import need_to_wrap def test_trivial(): ''' trivial tests''' assert not need_to_wrap(['127.0.0.1:8889', '127.0.0.1']) # extra...
24.5
64
0.636054
0
0
0
0
0
0
0
0
366
0.622449
64b6cb679b43df545569ed71a1c4d61297d2aef9
6,304
py
Python
CIM14/IEC61970/Generation/Production/__init__.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
58
2015-04-22T10:41:03.000Z
2022-03-29T16:04:34.000Z
CIM14/IEC61970/Generation/Production/__init__.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
12
2015-08-26T03:57:23.000Z
2020-12-11T20:14:42.000Z
CIM14/IEC61970/Generation/Production/__init__.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
35
2015-01-10T12:21:03.000Z
2020-09-09T08:18:16.000Z
# Copyright (C) 2010-2011 Richard Lincoln # # 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, merge, publish...
43.178082
256
0.805996
1,872
0.296954
0
0
0
0
0
0
2,656
0.42132
64b89274265285939232ef95666539dcfdd02614
319
py
Python
client.py
cms42/i-display
fc1737ec522c7e1088d8891dd0838f11454e8f38
[ "MIT" ]
null
null
null
client.py
cms42/i-display
fc1737ec522c7e1088d8891dd0838f11454e8f38
[ "MIT" ]
null
null
null
client.py
cms42/i-display
fc1737ec522c7e1088d8891dd0838f11454e8f38
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import configparser import cv2 import sys if (len(sys.argv)<2) : print("usage: ",sys.argv[0]," [config]") exit() if (sys.argv[1] == '--help')|(sys.argv[1] == '-h') : print("usage: ",sys.argv[0]," [config]") exit() config = configparser.ConfigParser() config.read(sys.argv[1])
19.9375
52
0.583072
0
0
0
0
0
0
0
0
75
0.23511
64b9710adc87f43f75a6a4f22eff06a3622b0bf8
411
py
Python
interface_blockchain/product/forms.py
kultimovn/interface_blockchain
5e827d7241200c1aed1ca551649a1ef651297032
[ "MIT" ]
null
null
null
interface_blockchain/product/forms.py
kultimovn/interface_blockchain
5e827d7241200c1aed1ca551649a1ef651297032
[ "MIT" ]
null
null
null
interface_blockchain/product/forms.py
kultimovn/interface_blockchain
5e827d7241200c1aed1ca551649a1ef651297032
[ "MIT" ]
null
null
null
from django import forms from .models import Product, Good class GoodForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(GoodForm, self).__init__(*args, **kwargs) class Meta: model = Good fields = ('name', 'options', 'description', 'image', 'tmp_responsibility', 'tmp_amo...
27.4
96
0.620438
349
0.849148
0
0
0
0
0
0
87
0.211679
64b97f2e2ba70fea221b6d73b9b60cadc991d3e9
9,219
py
Python
shark/shark/report/warehouse_wise_stock_ageing/warehouse_wise_stock_ageing.py
umaepoch/Shark
2ebf715efba796f96c2d9807bbe930e354606492
[ "MIT" ]
null
null
null
shark/shark/report/warehouse_wise_stock_ageing/warehouse_wise_stock_ageing.py
umaepoch/Shark
2ebf715efba796f96c2d9807bbe930e354606492
[ "MIT" ]
null
null
null
shark/shark/report/warehouse_wise_stock_ageing/warehouse_wise_stock_ageing.py
umaepoch/Shark
2ebf715efba796f96c2d9807bbe930e354606492
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals from operator import itemgetter import frappe from frappe import _ from frappe.utils import cint, date_diff, flt from six import iteritems from erpne...
29.082019
108
0.678599
0
0
0
0
0
0
0
0
2,427
0.263261
64b9f79dfb03bb9df611fd80e6a0c850dbeafe2f
248
py
Python
savejpg.py
gewangcn/spiders
991ccc571417c721aea5ed92fd81419522d07869
[ "MIT" ]
null
null
null
savejpg.py
gewangcn/spiders
991ccc571417c721aea5ed92fd81419522d07869
[ "MIT" ]
null
null
null
savejpg.py
gewangcn/spiders
991ccc571417c721aea5ed92fd81419522d07869
[ "MIT" ]
null
null
null
import requests resp = requests.get("https://edu-tob.bdimg.com/v1/pc/pc%E5%85%88%E9%A6%96%E9%A1%B5%E5%A4%B4%E5%9B%BE5120-640-1608686903810.png") with open("a.png", "wb") as f: f.write(resp.content) # 返回cookie信息转换的字典 键值对 se = requests.session()
35.428571
128
0.709677
0
0
0
0
0
0
0
0
163
0.599265
64bb99f7ba68e5c75620ffdbf50cc594972bec36
2,652
py
Python
src/nasty_analysis/document/maxqda_coded_nasty.py
lschmelzeisen/nasty-analysis
50e2f2d5f6b8b9649a8c8adba1d94b59f01a8dca
[ "ECL-2.0", "Apache-2.0" ]
2
2020-05-23T19:18:42.000Z
2020-05-26T12:33:44.000Z
src/nasty_analysis/document/maxqda_coded_nasty.py
lschmelzeisen/nasty-analysis
50e2f2d5f6b8b9649a8c8adba1d94b59f01a8dca
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/nasty_analysis/document/maxqda_coded_nasty.py
lschmelzeisen/nasty-analysis
50e2f2d5f6b8b9649a8c8adba1d94b59f01a8dca
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# # Copyright 2019-2020 Lukas Schmelzeisen # # 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 t...
34
82
0.691931
1,050
0.395928
570
0.214932
676
0.254902
0
0
833
0.314103
64bbd761800292d0813bdc9b13e2cbfd9dcb6e21
80
py
Python
tests/__init__.py
xakiy/falcon-ratelimit
68bb239f0bbe5c09657dd06d230e9923039beb10
[ "MIT" ]
10
2018-06-24T08:33:46.000Z
2022-01-02T14:23:20.000Z
tests/__init__.py
xakiy/falcon-ratelimit
68bb239f0bbe5c09657dd06d230e9923039beb10
[ "MIT" ]
4
2018-04-24T12:00:49.000Z
2021-08-05T14:49:31.000Z
tests/__init__.py
xakiy/falcon-ratelimit
68bb239f0bbe5c09657dd06d230e9923039beb10
[ "MIT" ]
9
2018-04-09T10:40:47.000Z
2020-07-02T13:27:23.000Z
# coding=UTF-8 from __future__ import print_function, absolute_import, division
26.666667
64
0.8375
0
0
0
0
0
0
0
0
14
0.175
64bd2dcfa1b16991bf3ec6fda735704c506a25ed
358
py
Python
mq/rabbitmq/py/helloworld/producer.py
wjiec/packages
4ccaf8f717265a1f8a9af533f9a998b935efb32a
[ "MIT" ]
null
null
null
mq/rabbitmq/py/helloworld/producer.py
wjiec/packages
4ccaf8f717265a1f8a9af533f9a998b935efb32a
[ "MIT" ]
1
2016-09-15T07:06:15.000Z
2016-09-15T07:06:15.000Z
mq/rabbitmq/py/helloworld/producer.py
wjiec/packages
4ccaf8f717265a1f8a9af533f9a998b935efb32a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # Copyright (C) 2019 jayson # from utils.connection import get_connection from config import RABBITMQ_MASTER if __name__ == '__main__': with get_connection(RABBITMQ_MASTER, 'hello') as channel: while True: channel.basic_publish(exchange='', routing_key='hell...
27.538462
101
0.695531
0
0
0
0
0
0
0
0
107
0.298883
64bd439f7c8735ddf6edf662567de783df1b760f
6,188
py
Python
mpinterfaces/nanoparticle.py
yw-fang/MPInterfaces
ca2e43b590fdfbcf87a116c5c758e54cb7cb2d2e
[ "MIT" ]
null
null
null
mpinterfaces/nanoparticle.py
yw-fang/MPInterfaces
ca2e43b590fdfbcf87a116c5c758e54cb7cb2d2e
[ "MIT" ]
12
2016-11-07T23:46:01.000Z
2018-08-24T19:00:12.000Z
mpinterfaces/nanoparticle.py
joshgabriel/MPInterfaces
2799ae161fa94c78842092fb24ef468607afa465
[ "MIT" ]
null
null
null
# coding: utf-8 # Copyright (c) Henniggroup. # Distributed under the terms of the MIT License. from __future__ import division, print_function, unicode_literals, \ absolute_import """ Wulff construction to create the nanoparticle """ from six.moves import range import itertools from math import gcd from functoo...
36.833333
83
0.626212
3,942
0.637039
0
0
0
0
0
0
1,796
0.290239
64bd7c10430f6a161fe1d2e13a9a45bf6a6cda3c
1,262
py
Python
src/day07.py
birdman74/advent-of-code-2021
190cd4110ef3553258a26c8521bdf372c006a77c
[ "Apache-2.0" ]
null
null
null
src/day07.py
birdman74/advent-of-code-2021
190cd4110ef3553258a26c8521bdf372c006a77c
[ "Apache-2.0" ]
null
null
null
src/day07.py
birdman74/advent-of-code-2021
190cd4110ef3553258a26c8521bdf372c006a77c
[ "Apache-2.0" ]
null
null
null
import os from collections import Counter MODULE_DIR = os.path.dirname(os.path.realpath(__file__)) PROJECT_DIR = os.path.join(MODULE_DIR, "..") INPUT_SOURCE_DIR = os.path.join(PROJECT_DIR, "input") def get_data_lines(input_file_name): input_file = os.path.join(INPUT_SOURCE_DIR, input_file_name) print(f"Inpu...
25.755102
120
0.659271
0
0
0
0
0
0
0
0
215
0.170365
64bdb2fbf30aa7f6c7c89de13064542fa9d7162e
1,460
py
Python
bin/check_files_yml.py
synesthesiam/voice2json-profiles
4618d121d8d64985deb43d14e2f01b1e12743a18
[ "MIT" ]
10
2020-01-01T09:08:50.000Z
2022-01-09T00:18:33.000Z
bin/check_files_yml.py
synesthesiam/voice2json-profiles
4618d121d8d64985deb43d14e2f01b1e12743a18
[ "MIT" ]
null
null
null
bin/check_files_yml.py
synesthesiam/voice2json-profiles
4618d121d8d64985deb43d14e2f01b1e12743a18
[ "MIT" ]
3
2020-07-25T03:20:21.000Z
2022-01-23T03:56:16.000Z
#!/usr/bin/env python3 """Verifies sizes and sha256 sums for files.yml files.""" import os import subprocess import sys from pathlib import Path import yaml def main(): """Main entry point""" for files_yaml_path in sys.argv[1:]: profile_root = Path(files_yaml_path).parent with open(files_yaml...
31.06383
100
0.584247
0
0
0
0
0
0
0
0
329
0.225342
64beb60d078cf10c3f14199bcdc7a0d43c7a432a
1,370
py
Python
witness.py
barryZZJ/dp-finder
ddf8e3589110b4b35920b437d605b45dd56291da
[ "MIT" ]
null
null
null
witness.py
barryZZJ/dp-finder
ddf8e3589110b4b35920b437d605b45dd56291da
[ "MIT" ]
null
null
null
witness.py
barryZZJ/dp-finder
ddf8e3589110b4b35920b437d605b45dd56291da
[ "MIT" ]
null
null
null
from abc import ABC from collections import OrderedDict class Witness(ABC): def __init__(self, a1, a2, s, eps, method, **kwargs): self.meth = method self.a1 = a1 self.a2 = a2 self.s = s self.eps = eps self.kwargs = OrderedDict(kwargs) def get_witness(self): ...
24.909091
57
0.550365
883
0.644526
0
0
0
0
0
0
193
0.140876
64c0a446da789593ff960351a0ce0f86e665e35a
6,873
py
Python
TicTacToe/classes/TicTacToe.py
camilleAmaury/ReinforcementLearning
c5d9ec3f17ca02e84ea3786fa2048b35864fc724
[ "CNRI-Python", "Info-ZIP" ]
null
null
null
TicTacToe/classes/TicTacToe.py
camilleAmaury/ReinforcementLearning
c5d9ec3f17ca02e84ea3786fa2048b35864fc724
[ "CNRI-Python", "Info-ZIP" ]
null
null
null
TicTacToe/classes/TicTacToe.py
camilleAmaury/ReinforcementLearning
c5d9ec3f17ca02e84ea3786fa2048b35864fc724
[ "CNRI-Python", "Info-ZIP" ]
null
null
null
import numpy as np from tqdm import tqdm class TicTacToe(object): # Constructor of the TicTacToe class # <Params name="player1" type="Agent">The first player</Params> # <Params name="player2" type="Agent">The second player</Params> # <Params name="rewards" type="object"> # <Contains key="w...
45.217105
112
0.559144
6,791
0.988069
0
0
0
0
0
0
2,249
0.327222
64c0d45dc9b180f6c1dd6f97a24cb3227649d735
9,780
py
Python
poem/cv_mim/action_recognition/train_with_encoder_base.py
DionysisChristopoulos/google-research
7f59ef421beef32ca16c2a7215be74f7eba01a0f
[ "Apache-2.0" ]
23,901
2018-10-04T19:48:53.000Z
2022-03-31T21:27:42.000Z
poem/cv_mim/action_recognition/train_with_encoder_base.py
DionysisChristopoulos/google-research
7f59ef421beef32ca16c2a7215be74f7eba01a0f
[ "Apache-2.0" ]
891
2018-11-10T06:16:13.000Z
2022-03-31T10:42:34.000Z
poem/cv_mim/action_recognition/train_with_encoder_base.py
admariner/google-research
7cee4b22b925581d912e8d993625c180da2a5a4f
[ "Apache-2.0" ]
6,047
2018-10-12T06:31:02.000Z
2022-03-31T13:59:28.000Z
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
37.760618
80
0.720143
0
0
0
0
0
0
0
0
2,947
0.301329
64c210806c5cc219f6c4e3fa272f46558ce9bbfc
1,216
py
Python
misc/get_magnitude.py
cinjon/ml-capsules-inverted-attention-routing
978b0f58eba1007bcef0b6cb045f3d2040f76a31
[ "AML" ]
null
null
null
misc/get_magnitude.py
cinjon/ml-capsules-inverted-attention-routing
978b0f58eba1007bcef0b6cb045f3d2040f76a31
[ "AML" ]
null
null
null
misc/get_magnitude.py
cinjon/ml-capsules-inverted-attention-routing
978b0f58eba1007bcef0b6cb045f3d2040f76a31
[ "AML" ]
null
null
null
import os import json import argparse import numpy as np from glob import glob from multiprocessing import Pool parser = argparse.ArgumentParser() parser.add_argument( "--root", default="/misc/kcgscratch1/ChoGroup/resnick/spaceofmotion/flows", type=str) parser.add_argument( "--store_dir", default="...
29.658537
73
0.629934
0
0
0
0
0
0
0
0
308
0.253289
64c2188244333a65c7be325fa85c1fffbc0b6a2e
1,171
py
Python
libs/core/setup.py
ggsdc/corn
4c17c46a70f95b8882bcb6a55ef7daa1f69e0456
[ "MIT" ]
2
2020-07-09T20:58:47.000Z
2020-07-20T20:40:46.000Z
libs/core/setup.py
baobabsoluciones/cornflow
bd7cae22107e5fe148704d5f41d4f58f9c410b40
[ "Apache-2.0" ]
2
2022-03-31T08:42:10.000Z
2022-03-31T12:05:23.000Z
libs/core/setup.py
ggsdc/corn
4c17c46a70f95b8882bcb6a55ef7daa1f69e0456
[ "MIT" ]
null
null
null
import setuptools with open("README.rst") as fh: long_description = fh.read() required = [] with open("requirements.txt", "r") as fh: required.append(fh.read().splitlines()) setuptools.setup( name="cornflow-core", version="0.0.3a11", author="baobab soluciones", author_email="sistemas@baobabso...
32.527778
97
0.680615
0
0
0
0
0
0
0
0
573
0.489325
64c23f62d2310087d63f2f3ff158df2b5e9d0168
1,265
py
Python
eoana/readers/xlsx.py
JohannesSMHI/eoana
7950a3567cdd9726296021f3de031493c8dfeba6
[ "MIT" ]
null
null
null
eoana/readers/xlsx.py
JohannesSMHI/eoana
7950a3567cdd9726296021f3de031493c8dfeba6
[ "MIT" ]
null
null
null
eoana/readers/xlsx.py
JohannesSMHI/eoana
7950a3567cdd9726296021f3de031493c8dfeba6
[ "MIT" ]
null
null
null
# Copyright (c) 2020 SMHI, Swedish Meteorological and Hydrological Institute # License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit). """ Created on 2020-12-11 16:04 @author: johannes """ import pandas as pd class PandasReaderBase: """ """ def __init__(self, *args, **kwargs): ...
23.425926
79
0.544664
1,026
0.810427
0
0
357
0.281991
0
0
616
0.486572
64c2c755c64c0a9f83d7975c84e2954e482ade05
575
py
Python
appinit_backend/app/lib/websockets/server.py
lost-osiris/webplatform-backend
8b1b7c94dbc5314450fbe75b8ca4625d39608d4a
[ "MIT" ]
1
2020-09-11T01:20:07.000Z
2020-09-11T01:20:07.000Z
appinit_backend/app/lib/websockets/server.py
lost-osiris/webplatform-backend
8b1b7c94dbc5314450fbe75b8ca4625d39608d4a
[ "MIT" ]
null
null
null
appinit_backend/app/lib/websockets/server.py
lost-osiris/webplatform-backend
8b1b7c94dbc5314450fbe75b8ca4625d39608d4a
[ "MIT" ]
null
null
null
from gevent import pywsgi from geventwebsocket.handler import WebSocketHandler from flask import Flask, render_template, session, request app = Flask(__name__) server = pywsgi.WSGIServer(('127.0.0.1', 3001), app, handler_class=WebSocketHandler) if __name__ == '__main__': server.serve_forever() # import os # ...
28.75
66
0.791304
0
0
0
0
0
0
0
0
283
0.492174
64c313cfd9b762378f88f2ab75f1f1485ab4f677
17,890
py
Python
quex/output/analyzer/lexeme_converter.py
smmckay/quex-mirror
7d75ed560e9f3a591935e59243188676eecb112a
[ "MIT" ]
null
null
null
quex/output/analyzer/lexeme_converter.py
smmckay/quex-mirror
7d75ed560e9f3a591935e59243188676eecb112a
[ "MIT" ]
null
null
null
quex/output/analyzer/lexeme_converter.py
smmckay/quex-mirror
7d75ed560e9f3a591935e59243188676eecb112a
[ "MIT" ]
null
null
null
"""PURPOSE: Converters: Lexemes towards encodings UTF8/UTF16/UTF32. During exical analysis matches delivers lexemes in the encoding of the buffer. The functions develops converters of those lexemes to standard encodings, so that they can easily be reflected. Let 'Character' be a character in the buffer's encoding, '...
41.896956
110
0.578927
11,348
0.634321
0
0
345
0.019285
0
0
6,499
0.363276
64c3753507f4f5601298a10f34ef315b523cd811
642
py
Python
02 - Functions, logic and conditionals/exercises/hours-to-seconds.py
PableraShow/python-exercises
e1648fd42f3009ec6fb1e2096852b6d399e91d5b
[ "MIT" ]
8
2018-10-01T17:35:57.000Z
2022-02-01T08:12:12.000Z
02 - Functions, logic and conditionals/exercises/hours-to-seconds.py
PableraShow/python-exercises
e1648fd42f3009ec6fb1e2096852b6d399e91d5b
[ "MIT" ]
null
null
null
02 - Functions, logic and conditionals/exercises/hours-to-seconds.py
PableraShow/python-exercises
e1648fd42f3009ec6fb1e2096852b6d399e91d5b
[ "MIT" ]
6
2018-07-22T19:15:21.000Z
2022-02-05T07:54:58.000Z
""" Write a function total_seconds that takes three parameters hours, minutes and seconds and returns the total number of seconds for hours hours, minutes minutes and seconds seconds """ # Hours, minutes, and seconds to seconds conversion formula def total_seconds(hours, minutes, seconds): return (hours *...
30.571429
68
0.682243
0
0
0
0
0
0
0
0
324
0.504673
64c3d1fff1672856579374529a10c8f0ae92b828
1,089
py
Python
media_nommer/utils/logger.py
duointeractive/media-nommer
ba8095748582934ab44f6972210381b074bd9d14
[ "BSD-3-Clause" ]
2
2015-11-05T18:52:05.000Z
2021-02-16T20:26:23.000Z
media_nommer/utils/logger.py
duointeractive/media-nommer
ba8095748582934ab44f6972210381b074bd9d14
[ "BSD-3-Clause" ]
null
null
null
media_nommer/utils/logger.py
duointeractive/media-nommer
ba8095748582934ab44f6972210381b074bd9d14
[ "BSD-3-Clause" ]
3
2015-06-04T11:27:39.000Z
2017-12-06T22:10:07.000Z
""" Some logging configuration and shortcut methods. """ from twisted.python import log def debug(message): """ Shortcut to logging a debug message through Twisted's logging module. :param str message: The message to log. """ log.msg(message) def info(message): """ Shortcut to logging...
26.560976
76
0.672176
0
0
0
0
0
0
0
0
849
0.779614
64c42589b65636e8d944299c620d7537a9631738
1,084
py
Python
RecoTracker/TkNavigation/python/CosmicsNavigationSchoolESProducer_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
RecoTracker/TkNavigation/python/CosmicsNavigationSchoolESProducer_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
RecoTracker/TkNavigation/python/CosmicsNavigationSchoolESProducer_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
#do not comment that line import FWCore.ParameterSet.Config as cms #cosmicsNavigationSchoolESProducer = cms.ESProducer("NavigationSchoolESProducer", # ComponentName = cms.string('CosmicNavigationSchool') #) cosmicsNavigationSchoolESProducer = cms.ESProducer("SkippingLayerCosmicNavigationSchoolESProducer", ...
51.619048
104
0.412362
0
0
0
0
0
0
0
0
236
0.217712
64c4bf7462033e3ab3a3144b3d87044b6d19e736
1,568
py
Python
script/model/sklearn_like_model/SessionManager.py
demetoir/MLtools
8c42fcd4cc71728333d9c116ade639fe57d50d37
[ "MIT" ]
null
null
null
script/model/sklearn_like_model/SessionManager.py
demetoir/MLtools
8c42fcd4cc71728333d9c116ade639fe57d50d37
[ "MIT" ]
null
null
null
script/model/sklearn_like_model/SessionManager.py
demetoir/MLtools
8c42fcd4cc71728333d9c116ade639fe57d50d37
[ "MIT" ]
null
null
null
import tensorflow as tf from script.util.MixIn import LoggerMixIn from script.util.misc_util import error_trace class SessionManager(LoggerMixIn): def __init__(self, sess=None, config=None, verbose=0): super().__init__(verbose) self.sess = sess self.config = config if...
26.576271
85
0.589286
1,445
0.921556
0
0
92
0.058673
0
0
193
0.123087
64c6ded8ce35837ed8c633aa32ede13e3f7ab314
9,500
py
Python
code/reasoningtool/QueryBioLink.py
dkoslicki/NCATS
5d8e38d5868d830d8f8c215b8c649e3979ca03fb
[ "MIT" ]
2
2018-02-26T19:16:26.000Z
2020-12-16T03:31:58.000Z
code/reasoningtool/QueryBioLink.py
dkoslicki/NCATS
5d8e38d5868d830d8f8c215b8c649e3979ca03fb
[ "MIT" ]
17
2017-12-09T01:13:20.000Z
2018-03-06T02:17:32.000Z
code/reasoningtool/QueryBioLink.py
dkoslicki/NCATS
5d8e38d5868d830d8f8c215b8c649e3979ca03fb
[ "MIT" ]
null
null
null
''' This module defines the class QueryBioLink. QueryBioLink class is designed to communicate with Monarch APIs and their corresponding data sources. The available methods include: * query phenotype for disease * query disease for gene * query gene for disease * query phenotype for gene * query gene...
39.915966
124
0.666211
7,634
0.803579
0
0
6,585
0.693158
0
0
2,936
0.309053
64c7153fbfe5b356314570fdcfd44d046cdbf473
2,056
py
Python
mpf/plugins/twitch_bot.py
Scottacus64/mpf
fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a
[ "MIT" ]
163
2015-01-25T02:19:50.000Z
2022-03-26T12:00:28.000Z
mpf/plugins/twitch_bot.py
Scottacus64/mpf
fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a
[ "MIT" ]
1,086
2015-03-23T19:53:17.000Z
2022-03-24T20:46:11.000Z
mpf/plugins/twitch_bot.py
Scottacus64/mpf
fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a
[ "MIT" ]
148
2015-01-28T02:31:39.000Z
2022-03-22T13:54:01.000Z
"""MPF plugin which adds events from monitoring a Twitch chat room.""" import threading from mpf.core.logging import LogMixin from .twitch.twitch_client import TwitchClient MYPY = False if MYPY: # pragma: no cover from mpf.core.machine import MachineController # pylint: disable-msg=cyclic-import,unused-import ...
34.847458
101
0.633755
1,733
0.842899
0
0
0
0
0
0
542
0.263619
64c72ead265362a6fd2cf5c37958f0fa44622e3f
7,319
py
Python
tb_auto_publsh/publish_product.py
sinalma/taobao_tools
222800ccd808ef4bbbcbcffc6b3f4fde133d8685
[ "MIT" ]
null
null
null
tb_auto_publsh/publish_product.py
sinalma/taobao_tools
222800ccd808ef4bbbcbcffc6b3f4fde133d8685
[ "MIT" ]
null
null
null
tb_auto_publsh/publish_product.py
sinalma/taobao_tools
222800ccd808ef4bbbcbcffc6b3f4fde133d8685
[ "MIT" ]
null
null
null
import os from selenium import webdriver driver = webdriver.Chrome("D:/Programming/python/chromedriver.exe") driver.maximize_window() from os import path from selenium.webdriver.common.action_chains import ActionChains from selenium.common.exceptions import UnexpectedAlertPresentException import time,unittest, re fro...
35.357488
148
0.704741
0
0
0
0
0
0
0
0
2,822
0.385572
64cab6ea6f760144dc93cfc4e17978d33d93817a
778
py
Python
djangoenv/lib/python3.8/site-packages/pypl/scale.py
zawad2221/courier_delivery
f96c41a60943946f9f7e0837d017215aa8cd02dd
[ "MIT" ]
6
2020-02-21T15:50:34.000Z
2021-11-09T19:45:50.000Z
djangoenv/lib/python3.8/site-packages/pypl/scale.py
zawad2221/courier_delivery
f96c41a60943946f9f7e0837d017215aa8cd02dd
[ "MIT" ]
null
null
null
djangoenv/lib/python3.8/site-packages/pypl/scale.py
zawad2221/courier_delivery
f96c41a60943946f9f7e0837d017215aa8cd02dd
[ "MIT" ]
null
null
null
from . import utils class ContinuousScale(object): def __init__(self, data_lim, svg_lim): self.data_0 = data_lim[0] self.data_len = utils.lims2len(data_lim) self.svg_0 = svg_lim[0] self.svg_len = utils.lims2len(svg_lim) def __call__(self, value): return self.svg_0 + s...
27.785714
76
0.637532
752
0.966581
0
0
0
0
0
0
0
0
64cc4da63c52447e3507f875e905f219bd67e494
271
py
Python
config/__init__.py
hajareshyam/flask-seed
5e1cddebd8496e39cc99c012e8a203ef9bd4b834
[ "MIT" ]
3
2018-02-11T23:20:18.000Z
2019-12-15T10:29:22.000Z
config/__init__.py
hajareshyam/flask-seed
5e1cddebd8496e39cc99c012e8a203ef9bd4b834
[ "MIT" ]
null
null
null
config/__init__.py
hajareshyam/flask-seed
5e1cddebd8496e39cc99c012e8a203ef9bd4b834
[ "MIT" ]
1
2019-11-01T06:42:47.000Z
2019-11-01T06:42:47.000Z
__all__ = ['local', 'development', 'production', 'test', 'constants'] # from .base import BaseConfig from .development import DevelopmentConfig from .local import LocalConfig from .production import ProductionConfig from .test import TestConfig from .constants import *
30.111111
69
0.785978
0
0
0
0
0
0
0
0
79
0.291513
64cc5aac32b4fc2a5556f4d550730a0acdbd74d3
5,781
py
Python
sailor/assetcentral/workorder.py
gecko17/project-sailor
7a35eeec2a6a8ec9bc998e39e8ffad4703cec5d7
[ "Apache-2.0" ]
19
2021-03-02T12:27:48.000Z
2022-03-31T15:24:41.000Z
sailor/assetcentral/workorder.py
gecko17/project-sailor
7a35eeec2a6a8ec9bc998e39e8ffad4703cec5d7
[ "Apache-2.0" ]
75
2021-03-04T16:58:47.000Z
2022-03-31T08:31:06.000Z
sailor/assetcentral/workorder.py
gecko17/project-sailor
7a35eeec2a6a8ec9bc998e39e8ffad4703cec5d7
[ "Apache-2.0" ]
2
2021-11-08T12:45:05.000Z
2022-02-27T18:42:13.000Z
""" Workorder module can be used to retrieve Workorder information from AssetCentral. Classes are provided for individual Workorders as well as groups of Workorders (WorkorderSet). """ from sailor import _base from ..utils.timestamps import _string_to_timestamp_parser from .constants import VIEW_WORKORDERS from .util...
43.141791
116
0.733437
384
0.066424
0
0
172
0.029753
0
0
3,298
0.57049
64cc7a5f5c43f80efef521c2171660053264a4c7
796
py
Python
widgets2/pixmap.py
gnthibault/PyQt6-Tutorial-Examples
c54819f74154de923df0bdfaa302d62b4bad890b
[ "BSD-2-Clause" ]
38
2021-05-18T07:47:54.000Z
2022-03-31T13:10:41.000Z
widgets2/pixmap.py
gnthibault/PyQt6-Tutorial-Examples
c54819f74154de923df0bdfaa302d62b4bad890b
[ "BSD-2-Clause" ]
3
2021-08-03T03:49:42.000Z
2021-09-09T08:09:23.000Z
widgets2/pixmap.py
gnthibault/PyQt6-Tutorial-Examples
c54819f74154de923df0bdfaa302d62b4bad890b
[ "BSD-2-Clause" ]
16
2021-06-12T11:25:58.000Z
2022-03-05T07:43:10.000Z
#!/usr/bin/python """ ZetCode PyQt6 tutorial In this example, we display an image on the window. Author: Jan Bodnar Website: zetcode.com """ from PyQt6.QtWidgets import (QWidget, QHBoxLayout, QLabel, QApplication) from PyQt6.QtGui import QPixmap import sys class Example(QWidget): def __init__(self): ...
15.307692
50
0.614322
392
0.492462
0
0
0
0
0
0
165
0.207286
64ce6f6efb2fdb2724c45647b09d052115673dcc
3,423
py
Python
scripts/get_dataset100.py
AShedko/UIR8_im2gps
f4a7adb7e632b42a306ebdfbffb8a3843d43a594
[ "MIT" ]
1
2020-11-12T11:46:30.000Z
2020-11-12T11:46:30.000Z
scripts/get_dataset100.py
AShedko/UIR8_im2gps
f4a7adb7e632b42a306ebdfbffb8a3843d43a594
[ "MIT" ]
null
null
null
scripts/get_dataset100.py
AShedko/UIR8_im2gps
f4a7adb7e632b42a306ebdfbffb8a3843d43a594
[ "MIT" ]
null
null
null
import math import os import random import sys from multiprocessing.pool import ThreadPool import urllib import file_util import pandas as pd ds = pd.read_csv("../data/simplemaps-worldcities-basic.csv") # Heuristically select from DB cities likely to be on google maps cities = ds[ds["pop"]>20000][ds....
36.414894
103
0.646217
0
0
0
0
0
0
0
0
1,078
0.314928
64cecd3b99a712aa861b433a62ca164039a43fef
146
py
Python
MLSD/__init__.py
HaoranXue/Machine_Learning_For_Structured_Data
376fb2b78ba5dea4d6214931f6a60e3b4477c883
[ "MIT" ]
4
2017-09-03T23:09:02.000Z
2017-09-15T13:01:38.000Z
MLSD/__init__.py
HaoranXue/SDM
376fb2b78ba5dea4d6214931f6a60e3b4477c883
[ "MIT" ]
null
null
null
MLSD/__init__.py
HaoranXue/SDM
376fb2b78ba5dea4d6214931f6a60e3b4477c883
[ "MIT" ]
null
null
null
''' SDM is a package for using Series as features ''' from .StructureData import * from .StructureDataFrame import * from .Transformers import *
18.25
45
0.753425
0
0
0
0
0
0
0
0
53
0.363014
64cf331bf3aec4cd73fb15b8c3551c47a61671fb
1,501
py
Python
mistral/auth/keystone.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
205
2015-06-21T11:51:47.000Z
2022-03-05T04:00:04.000Z
mistral/auth/keystone.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
21
2015-04-14T22:41:53.000Z
2019-02-20T09:30:10.000Z
mistral/auth/keystone.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
110
2015-06-14T03:34:38.000Z
2021-11-11T12:12:56.000Z
# Copyright 2016 - Brocade Communications Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
34.906977
78
0.691539
758
0.504997
0
0
0
0
0
0
927
0.617588
64d17a7f9f6e04f18e7fe0677f5b3c4e404da64e
1,587
py
Python
integrationtests/utils_tests.py
landcast/flaskseed
15b73fef7345e8c05c4b6efe26c889f9818fabe3
[ "Apache-2.0" ]
null
null
null
integrationtests/utils_tests.py
landcast/flaskseed
15b73fef7345e8c05c4b6efe26c889f9818fabe3
[ "Apache-2.0" ]
1
2018-10-21T14:28:46.000Z
2018-10-21T14:28:46.000Z
integrationtests/utils_tests.py
landcast/flaskseed
15b73fef7345e8c05c4b6efe26c889f9818fabe3
[ "Apache-2.0" ]
null
null
null
import json import re import subprocess import sys import unittest sys.path.append('.') from integrationtests import TestBase, json_header, server_location class CourseTest(TestBase): def test_course(self): url = f'{server_location}/test/add_account_single_session' json_data = "'" + json.dumps(...
31.117647
76
0.558286
1,377
0.867675
0
0
0
0
0
0
588
0.37051
64d1b1489599d8bc0f2e6f5976da2e6c4b0ee762
3,465
py
Python
pylinquery/enumerable.py
mw-ste/PyLinQuery
ef0e941503577f4adf867d6b499efe7b9e114c65
[ "MIT" ]
null
null
null
pylinquery/enumerable.py
mw-ste/PyLinQuery
ef0e941503577f4adf867d6b499efe7b9e114c65
[ "MIT" ]
null
null
null
pylinquery/enumerable.py
mw-ste/PyLinQuery
ef0e941503577f4adf867d6b499efe7b9e114c65
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 11 15:51:21 2019 @author: michi """ import inspect from types import FunctionType # In[] class Enumerable: _generator = None _values = None # In[] def __init__(self, values): if Enumerable._is_generator_type(va...
25.477941
93
0.598846
3,303
0.953247
611
0.176335
0
0
0
0
333
0.096104
64d2c172df3283a327a114c985bcc7b09bf329f7
5,309
py
Python
scripts/evalutate_excell_data_condition_study.py
llucid-97/AdaS
298beca98d5b432460c9f268364c0fe7ce8323a6
[ "MIT" ]
1
2020-06-12T17:14:31.000Z
2020-06-12T17:14:31.000Z
scripts/evalutate_excell_data_condition_study.py
llucid-97/AdaS
298beca98d5b432460c9f268364c0fe7ce8323a6
[ "MIT" ]
1
2020-08-12T21:10:48.000Z
2020-08-12T21:10:48.000Z
scripts/evalutate_excell_data_condition_study.py
llucid-97/AdaS
298beca98d5b432460c9f268364c0fe7ce8323a6
[ "MIT" ]
3
2020-06-17T21:51:16.000Z
2020-07-23T03:26:13.000Z
""" MIT License Copyright (c) 2020 Mahdi S. Hosseini Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, mer...
41.476563
140
0.680542
0
0
0
0
0
0
0
0
2,251
0.423997
64d2fdd94ccdefb499475d5010e12ef3310e43be
13,438
py
Python
debexpo/tests/test_gnupg.py
jadonk/debexpo
a022160492e40cd02bafc413a3cb009551fd6f8d
[ "MIT" ]
null
null
null
debexpo/tests/test_gnupg.py
jadonk/debexpo
a022160492e40cd02bafc413a3cb009551fd6f8d
[ "MIT" ]
null
null
null
debexpo/tests/test_gnupg.py
jadonk/debexpo
a022160492e40cd02bafc413a3cb009551fd6f8d
[ "MIT" ]
2
2017-01-20T23:08:40.000Z
2019-08-13T20:30:00.000Z
# -*- coding: utf-8 -*- # # utils.py — Debexpo utility functions # # This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Serafeim Zanikolas <serzan@hellug.gr> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and ass...
45.398649
81
0.828992
4,112
0.305884
0
0
0
0
0
0
10,064
0.748642
64d38dd03c462339859dc58f5f3a4b1ad11731fd
3,272
py
Python
bombolone/core/utils/utils.py
LaudateCorpus1/bombolone
2658bfe2ea3e659fe98e86c548e49ff0aa08f0c2
[ "BSD-3-Clause" ]
31
2015-01-04T08:38:55.000Z
2021-09-05T08:53:03.000Z
bombolone/core/utils/utils.py
LaudateCorpus1/bombolone
2658bfe2ea3e659fe98e86c548e49ff0aa08f0c2
[ "BSD-3-Clause" ]
6
2015-02-26T12:57:05.000Z
2015-06-24T06:11:43.000Z
bombolone/core/utils/utils.py
LaudateCorpus1/bombolone
2658bfe2ea3e659fe98e86c548e49ff0aa08f0c2
[ "BSD-3-Clause" ]
11
2015-01-09T21:54:05.000Z
2021-11-30T04:54:19.000Z
# -*- coding: utf-8 -*- """ utils.py ~~~~~~~~~~~ Generic helper functions :copyright: (c) 2014 by @zizzamia :license: BSD (See LICENSE for details) """ import datetime import json import string import re import unicodedata from collections import Iterable from flask import request, render_template from hashlib import...
29.477477
105
0.67665
291
0.088936
0
0
0
0
0
0
1,247
0.381112
64d4eca2a01366e3a22a289ad383de96073f8bac
1,286
py
Python
var/spack/repos/builtin/packages/netcdf-fortran/package.py
mrzv/spack
a0fb2838ea60f020179f480a2db1438da9d2e2ab
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2018-11-27T03:39:44.000Z
2021-09-06T15:50:35.000Z
var/spack/repos/builtin/packages/netcdf-fortran/package.py
matzke1/spack
9af44814b12639744926c56cdf16ac9e95490011
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/netcdf-fortran/package.py
matzke1/spack
9af44814b12639744926c56cdf16ac9e95490011
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class NetcdfFortran(AutotoolsPackage): """Fortran interface for NetCDF4""" homepage = "http...
32.974359
93
0.688958
1,065
0.828149
0
0
410
0.318818
0
0
730
0.567652
64d5db1f326dd6948ae5b6aa2e86f60f45afe760
2,293
py
Python
tests/db/test_v5_to_v6.py
inmanta/inmanta-core
ae2153d57f124d00ad1b58e6d4bc6818364be4a8
[ "Apache-2.0" ]
6
2021-03-09T10:24:02.000Z
2022-01-16T03:52:11.000Z
tests/db/test_v5_to_v6.py
inmanta/inmanta-core
ae2153d57f124d00ad1b58e6d4bc6818364be4a8
[ "Apache-2.0" ]
1,319
2020-12-18T08:52:29.000Z
2022-03-31T18:17:32.000Z
tests/db/test_v5_to_v6.py
inmanta/inmanta-core
ae2153d57f124d00ad1b58e6d4bc6818364be4a8
[ "Apache-2.0" ]
4
2021-03-03T15:36:50.000Z
2022-03-11T11:41:51.000Z
""" Copyright 2020 Inmanta 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 ...
34.742424
105
0.73659
0
0
483
0.210641
1,481
0.645879
1,422
0.620148
1,323
0.576973
64d7181aa28285f0d3f1964a7724ac9342f291a9
306
py
Python
home/views.py
morion4000/ophion
016310ec0f702cb7f5d6b4e72e11817ef8bcdfae
[ "MIT" ]
null
null
null
home/views.py
morion4000/ophion
016310ec0f702cb7f5d6b4e72e11817ef8bcdfae
[ "MIT" ]
3
2020-02-12T03:26:52.000Z
2021-06-10T22:29:27.000Z
home/views.py
morion4000/ophion
016310ec0f702cb7f5d6b4e72e11817ef8bcdfae
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.views.generic.base import TemplateView from lists.models import List def index(request): my_lists = List.objects.filter(user=request.user) if request.user.username else [] return render(request, 'home.html', { 'my_lists': my_lists })
23.538462
86
0.728758
0
0
0
0
0
0
0
0
21
0.068627