hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
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
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
837b92dddbae0dc98b7e864dde146fb9764b4eec
3,090
py
Python
app/request.py
JohnKarima/news-hub
261969fe949bf7efbdc6dabb502b7b9b9eecabac
[ "MIT" ]
null
null
null
app/request.py
JohnKarima/news-hub
261969fe949bf7efbdc6dabb502b7b9b9eecabac
[ "MIT" ]
null
null
null
app/request.py
JohnKarima/news-hub
261969fe949bf7efbdc6dabb502b7b9b9eecabac
[ "MIT" ]
null
null
null
import urllib.request, json from .models import Source, Article api_key = None base_url = None base_url2 = None def configure_request(app): global api_key, base_url, base_url2 api_key = app.config['NEWS_API_KEY'] base_url = app.config['NEWS_API_BASE_URL'] base_url2 = app.config['NEWS_API_BASE_URL2'] ...
31.212121
106
0.687702
5c5515dcf70b5a288cf5238f542ee10a3db2caf3
6,810
py
Python
arcade/examples/perf_test/stress_test_draw_moving_arcade.py
biggzlar/arcade
fc444db356452660ac6cb2ffe241f0b1a3d4bcf3
[ "MIT" ]
1
2020-01-18T04:48:38.000Z
2020-01-18T04:48:38.000Z
arcade/examples/perf_test/stress_test_draw_moving_arcade.py
biggzlar/arcade
fc444db356452660ac6cb2ffe241f0b1a3d4bcf3
[ "MIT" ]
null
null
null
arcade/examples/perf_test/stress_test_draw_moving_arcade.py
biggzlar/arcade
fc444db356452660ac6cb2ffe241f0b1a3d4bcf3
[ "MIT" ]
null
null
null
""" Moving Sprite Stress Test Simple program to test how fast we can draw sprites that are moving Artwork from http://kenney.nl If Python and Arcade are installed, this example can be run from the command line with: python -m arcade.examples.stress_test_draw_moving """ import random import arcade import os import t...
31.971831
105
0.604699
38c4c6daad8cec0a25956c51cd312c0ca4f8712a
2,799
py
Python
lib/modules/powershell/code_execution/invoke_metasploitpayload.py
lex0tanl/Empire
c8217e87cf333797eb363b782f769cc4b2f64b0b
[ "BSD-3-Clause" ]
3
2018-01-05T03:59:44.000Z
2020-02-11T03:25:46.000Z
lib/modules/powershell/code_execution/invoke_metasploitpayload.py
gcxtx/Empire
dfb049ed48165eff2a8c1fe41941d0fbfa42df31
[ "BSD-3-Clause" ]
null
null
null
lib/modules/powershell/code_execution/invoke_metasploitpayload.py
gcxtx/Empire
dfb049ed48165eff2a8c1fe41941d0fbfa42df31
[ "BSD-3-Clause" ]
3
2017-11-27T07:29:34.000Z
2018-09-23T06:27:05.000Z
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-MetasploitPayload', 'Author': ['@jaredhaight'], 'Description': ('Spawns a new, hidden PowerShell window that downloads' 'and ...
35.884615
116
0.511969
325eef407ec1f936b7d73e7682c124b965f23617
1,027
py
Python
csr/_struct.py
mdekstrand/csr
665ceefff882d7e42db41034246b6ddb1f93e372
[ "MIT" ]
11
2021-02-07T16:37:31.000Z
2022-03-19T15:19:16.000Z
csr/_struct.py
mdekstrand/csr
665ceefff882d7e42db41034246b6ddb1f93e372
[ "MIT" ]
25
2021-02-11T22:42:01.000Z
2022-01-27T21:04:31.000Z
csr/_struct.py
lenskit/csr
03fde2d8c3cb7eb330028f34765ff2a06f849631
[ "MIT" ]
2
2021-02-07T02:05:04.000Z
2021-06-01T15:23:09.000Z
""" Base definitions of CSR structure. """ from numba import njit from numba.core import types from numba.experimental import structref @structref.register class CSRType(types.StructRef): def preprocess_fields(self, fields): return tuple((name, types.unliteral(typ)) for name, typ in fields) @propert...
17.40678
74
0.685492
12a8a2cfde4d1d9552d7ffeff2f9c6b2914e0360
10,624
py
Python
mindspore/ops/operations/other_ops.py
XinYao1994/mindspore
2c1a2bf752a1fde311caddba22633d2f4f63cb4e
[ "Apache-2.0" ]
2
2020-04-28T03:49:10.000Z
2020-04-28T03:49:13.000Z
mindspore/ops/operations/other_ops.py
XinYao1994/mindspore
2c1a2bf752a1fde311caddba22633d2f4f63cb4e
[ "Apache-2.0" ]
null
null
null
mindspore/ops/operations/other_ops.py
XinYao1994/mindspore
2c1a2bf752a1fde311caddba22633d2f4f63cb4e
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
39.058824
117
0.622835
ab326fc5a7f745a2fc6ba8f847787ad6947ba75b
68,860
py
Python
src/sage/combinat/designs/steiner_quadruple_systems.py
robertwb/sage
1b1e6f608d1ef8ee664bb19e991efbbc68cbd51f
[ "BSL-1.0" ]
2
2018-06-30T01:37:35.000Z
2018-06-30T01:37:39.000Z
src/sage/combinat/designs/steiner_quadruple_systems.py
boothby/sage
1b1e6f608d1ef8ee664bb19e991efbbc68cbd51f
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/designs/steiner_quadruple_systems.py
boothby/sage
1b1e6f608d1ef8ee664bb19e991efbbc68cbd51f
[ "BSL-1.0" ]
null
null
null
r""" Steiner Quadruple Systems A Steiner Quadruple System on `n` points is a family `SQS_n \subset \binom {[n]} 4` of `4`-sets, such that any set `S\subset [n]` of size three is a subset of exactly one member of `SQS_n`. This module implements Haim Hanani's constructive proof that a Steiner Quadruple System exists if...
52.484756
113
0.405794
2241dcaf3c91c26080c8a73a0797ba48e4989895
620
py
Python
test/test_add_group.py
shtepkaa/SoftwareTesting
d3da30238d35cde84701bfdfa43c2db659404684
[ "Apache-2.0" ]
null
null
null
test/test_add_group.py
shtepkaa/SoftwareTesting
d3da30238d35cde84701bfdfa43c2db659404684
[ "Apache-2.0" ]
null
null
null
test/test_add_group.py
shtepkaa/SoftwareTesting
d3da30238d35cde84701bfdfa43c2db659404684
[ "Apache-2.0" ]
1
2021-08-10T14:36:00.000Z
2021-08-10T14:36:00.000Z
from model.group import Group # def test_add_group(app, data_groups): # def test_add_group(app, json_groups): def test_add_group(app, db, json_groups, check_ui): # group = data_groups group = json_groups old_groups = db.get_group_list() app.group.create(group) new_groups = db.get_group_list() ...
36.470588
113
0.727419
d97e42ad3b121160ff4380ad6991c899d6b6f3e8
4,735
py
Python
hopenet.py
theSoenke/headpose
098db4585878fce5184fa4ae5629af20ccf3d608
[ "MIT" ]
4
2020-09-17T07:58:23.000Z
2022-03-17T18:43:36.000Z
hopenet.py
theSoenke/headpose
098db4585878fce5184fa4ae5629af20ccf3d608
[ "MIT" ]
null
null
null
hopenet.py
theSoenke/headpose
098db4585878fce5184fa4ae5629af20ccf3d608
[ "MIT" ]
2
2019-07-18T08:30:34.000Z
2021-06-29T15:14:48.000Z
import math import torch.nn as nn import torchvision class Hopenet(nn.Module): def __init__(self, resnet=50, num_bins=66): self.inplanes = 64 super().__init__() if resnet == 50: block = torchvision.models.resnet.Bottleneck layers = [3, 4, 6, 3] else: ...
35.871212
86
0.577402
13640d9378acfb345b69b0c750725a6c35d80b34
4,742
py
Python
apache_beam_wtbq_multiple.py
ronniejoshua/apache_beam_write_to_bigquery
bef4ea8da5939ad05bc3a0d997ff91ffe343532f
[ "MIT" ]
null
null
null
apache_beam_wtbq_multiple.py
ronniejoshua/apache_beam_write_to_bigquery
bef4ea8da5939ad05bc3a0d997ff91ffe343532f
[ "MIT" ]
null
null
null
apache_beam_wtbq_multiple.py
ronniejoshua/apache_beam_write_to_bigquery
bef4ea8da5939ad05bc3a0d997ff91ffe343532f
[ "MIT" ]
null
null
null
import datetime as dt import pytz from apache_beam.io.gcp.internal.clients import bigquery import apache_beam as beam from apache_beam.options.pipeline_options import PipelineOptions, GoogleCloudOptions, StandardOptions import os print("Loading Apache Beam Dataflow Wrapper") CREDENTIALS = r'Path-to-credential-file-jso...
52.688889
143
0.619992
8b06804b13a2d692fe4f14c6958afdb4ff25cd34
59,856
py
Python
py_insightvm_sdk/models/syslog_alert.py
greenpau/py_insightvm_sdk
bd881f26e14cb9f0f9c47927469ec992de9de8e6
[ "Apache-2.0" ]
2
2019-03-15T16:05:54.000Z
2020-07-19T18:37:50.000Z
py_insightvm_sdk/models/syslog_alert.py
greenpau/py_insightvm_sdk
bd881f26e14cb9f0f9c47927469ec992de9de8e6
[ "Apache-2.0" ]
1
2021-03-26T04:46:12.000Z
2021-03-26T04:51:23.000Z
py_insightvm_sdk/models/syslog_alert.py
greenpau/py_insightvm_sdk
bd881f26e14cb9f0f9c47927469ec992de9de8e6
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ InsightVM API # Overview This guide documents the InsightVM Application Programming Interface (API) Version 3. This API supports the Representation State Transfer (REST) design pattern. Unless noted otherwise this API accepts and produces the `application/json` media type. This API uses ...
168.134831
48,045
0.512931
5a0148093027725474a9672e2bbeccd0163d9f54
7,243
py
Python
sopel/modules/helpers.py
paulmadore/funkshelper
cfe60ef4015381b6c4fb01e453523d571af0b2de
[ "EFL-2.0" ]
null
null
null
sopel/modules/helpers.py
paulmadore/funkshelper
cfe60ef4015381b6c4fb01e453523d571af0b2de
[ "EFL-2.0" ]
null
null
null
sopel/modules/helpers.py
paulmadore/funkshelper
cfe60ef4015381b6c4fb01e453523d571af0b2de
[ "EFL-2.0" ]
null
null
null
# name='sopel_modules.idlerpg', # version='0.1.0', # description='A rewrite of the original IdleRPG to work as a module for Sopel. It incorporates some of the features of Shocky\'s IdleRPG system, though is much more in-depth.', # long_description=readme + '\n\n' + history, # author='Max Gurela', ...
31.907489
181
0.562474
f1d1862e98168393ce778620616d6184f7766d12
15,276
py
Python
utils/clean.py
astrocatalogs/tidaldisruptions
87558308b09c4d08a20dec141e438ccbcddb491b
[ "MIT" ]
2
2018-11-18T21:17:29.000Z
2022-01-25T18:29:10.000Z
utils/clean.py
astrocatalogs/tidaldisruptions
87558308b09c4d08a20dec141e438ccbcddb491b
[ "MIT" ]
5
2016-11-01T13:31:06.000Z
2022-03-28T18:35:21.000Z
utils/clean.py
astrocatalogs/tidaldisruptions
87558308b09c4d08a20dec141e438ccbcddb491b
[ "MIT" ]
1
2022-03-17T23:26:36.000Z
2022-03-17T23:26:36.000Z
'''Clean various supernova-specific values. ''' from astrocats.catalog.utils import is_number, zpad, get_sig_digits, pretty_num from decimal import Decimal from math import floor __all__ = ['name_clean', 'host_clean', 'radec_clean', 'clean_snname'] def name_clean(name): newname = name.strip(' ;,*') if newnam...
44.666667
79
0.542158
ed1346663ea39af48d47b7c836c109eee9ef0f52
1,977
py
Python
libraries/lambda_handlers/trigger_handler.py
unfoldingWord-dev/d43-catalog
6c36f59b9b326e0ead45739c09631ef1e57c4932
[ "MIT" ]
1
2017-05-18T22:18:31.000Z
2017-05-18T22:18:31.000Z
libraries/lambda_handlers/trigger_handler.py
unfoldingWord-dev/d43-catalog
6c36f59b9b326e0ead45739c09631ef1e57c4932
[ "MIT" ]
54
2016-11-07T03:07:03.000Z
2021-04-14T21:24:04.000Z
libraries/lambda_handlers/trigger_handler.py
unfoldingWord-dev/d43-catalog
6c36f59b9b326e0ead45739c09631ef1e57c4932
[ "MIT" ]
7
2016-10-26T18:15:14.000Z
2018-06-01T18:37:32.000Z
from libraries.lambda_handlers.instance_handler import InstanceHandler import grequests from functools import partial import json class TriggerHandler(InstanceHandler): """ Triggers necessary lambda functions in the catalog pipeline. This setup allows the functions to use the same set of stage variabl...
34.684211
113
0.603945
e68401678abe421f3db481a67785c6c51ed94c29
635
py
Python
desafio/desafio086.py
henriquekirchheck/Curso-em-video-Python
1a29f68515313af85c8683f626ba35f8fcdd10e7
[ "MIT" ]
null
null
null
desafio/desafio086.py
henriquekirchheck/Curso-em-video-Python
1a29f68515313af85c8683f626ba35f8fcdd10e7
[ "MIT" ]
null
null
null
desafio/desafio086.py
henriquekirchheck/Curso-em-video-Python
1a29f68515313af85c8683f626ba35f8fcdd10e7
[ "MIT" ]
null
null
null
# Crie um programa que declare uma matriz de dimensão 3×3 e preencha com valores lidos pelo teclado. No final, mostre a matriz na tela, com a formatação correta. matriz = [[None, None, None] ,[None, None, None], [None, None, None]] max = 0 for x in range(0, len(matriz)): for y in range(0, len(matriz)): ma...
33.421053
161
0.588976
b07887dbfa4a058c17121a1671125ca605086d04
3,450
py
Python
player.py
I4-Projektseminar-HHU-2016/seminar-project-marionline03
ec2b2d2b588baa647c7a5e542e1d20a39cd0fc09
[ "CC0-1.0" ]
null
null
null
player.py
I4-Projektseminar-HHU-2016/seminar-project-marionline03
ec2b2d2b588baa647c7a5e542e1d20a39cd0fc09
[ "CC0-1.0" ]
null
null
null
player.py
I4-Projektseminar-HHU-2016/seminar-project-marionline03
ec2b2d2b588baa647c7a5e542e1d20a39cd0fc09
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- import logging # for DB usage import sqlite3 logging.basicConfig(filename='log.txt',level=logging.DEBUG) #Player def make_tabel_player(): try: con = sqlite3.connect('game.db') con.execute('''CREATE TABLE IF NOT EXISTS player ( id INTEGER PRIMARY KEY, ...
29.741379
125
0.6
7c201aa0c5a842aaa0eb61268f04d28d4b782b60
868
py
Python
modin/backends/pyarrow/__init__.py
ienkovich/modin
b7e1188f7ba01e3a313996e092a65b63f6b76fa0
[ "ECL-2.0", "Apache-2.0" ]
1
2021-05-19T04:01:17.000Z
2021-05-19T04:01:17.000Z
modin/backends/pyarrow/__init__.py
ienkovich/modin
b7e1188f7ba01e3a313996e092a65b63f6b76fa0
[ "ECL-2.0", "Apache-2.0" ]
57
2021-01-22T15:52:03.000Z
2021-06-12T18:22:04.000Z
modin/backends/pyarrow/__init__.py
ienkovich/modin
b7e1188f7ba01e3a313996e092a65b63f6b76fa0
[ "ECL-2.0", "Apache-2.0" ]
1
2022-01-29T12:12:42.000Z
2022-01-29T12:12:42.000Z
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
51.058824
87
0.789171
9bb0c3991eb143511c4d97bd0bf075702fac40fc
2,682
py
Python
src/hed_utils/support/file_utils/csv_file.py
Hrissimir/hed_utils
22e340f2f0637b999a67cf8ff201c044c93597a1
[ "MIT" ]
null
null
null
src/hed_utils/support/file_utils/csv_file.py
Hrissimir/hed_utils
22e340f2f0637b999a67cf8ff201c044c93597a1
[ "MIT" ]
1
2021-07-26T04:16:58.000Z
2021-07-26T04:16:58.000Z
src/hed_utils/support/file_utils/csv_file.py
Hrissimir/hed_utils
22e340f2f0637b999a67cf8ff201c044c93597a1
[ "MIT" ]
null
null
null
import csv import logging from concurrent.futures import ProcessPoolExecutor from os import walk from os.path import abspath, join from pathlib import Path from typing import List, Union _log = logging.getLogger(__name__) _log.addHandler(logging.NullHandler()) def get_csv_files(folder: Union[str, Path]) -> List[str]...
35.289474
116
0.60179
d3225d9f90b85e393a9fdf5d77b8159bb898d1b9
1,588
py
Python
python/designer-door-mat.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
21
2015-02-09T18:08:38.000Z
2021-11-08T15:00:48.000Z
python/designer-door-mat.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
7
2020-04-12T23:00:19.000Z
2021-01-30T23:44:24.000Z
python/designer-door-mat.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
27
2015-07-22T18:08:12.000Z
2022-02-28T19:50:26.000Z
# Size: 7 x 21 # ---------.|.--------- # ------.|..|..|.------ # ---.|..|..|..|..|.--- # -------WELCOME------- # ---.|..|..|..|..|.--- # ------.|..|..|.------ # ---------.|.--------- class DoorMat: DASH = "-" DOT = "." PIPE = "|" WELCOME = "WELCOME" def __init__(self, N, M): self.N = N ...
26.915254
89
0.564861
eca47e0638468ffe08cafd127bd5d650528aa6dc
1,442
py
Python
bag/contexts.py
vladoprea/dream-woollies
7113400a03e4047312b88a3afff7e5969ff96f6b
[ "W3C", "PostgreSQL" ]
null
null
null
bag/contexts.py
vladoprea/dream-woollies
7113400a03e4047312b88a3afff7e5969ff96f6b
[ "W3C", "PostgreSQL" ]
5
2021-06-04T23:31:01.000Z
2021-09-22T19:18:34.000Z
bag/contexts.py
vladoprea/dream-woollies
7113400a03e4047312b88a3afff7e5969ff96f6b
[ "W3C", "PostgreSQL" ]
1
2020-08-17T14:27:29.000Z
2020-08-17T14:27:29.000Z
from decimal import Decimal from django.conf import settings from django.shortcuts import get_object_or_404 from products.models import Product def bag_contents(request): """ Calculates the total quantity, total price, delivery costs, total price considering delivery costs. """ bag_items = [] ...
28.84
79
0.643551
5bd4958ab7105f8859f7abd3293673238aca3123
1,625
py
Python
RegionOfInterest.py
uniquetrij/CarND-P4-Advanced-Lane-Lines
6efff80839b2dd6d4460ce58b20fcf656fb68d7e
[ "MIT" ]
null
null
null
RegionOfInterest.py
uniquetrij/CarND-P4-Advanced-Lane-Lines
6efff80839b2dd6d4460ce58b20fcf656fb68d7e
[ "MIT" ]
10
2020-03-24T15:34:51.000Z
2022-03-11T23:17:30.000Z
RegionOfInterest.py
uniquetrij/CarND-P4-Advanced-Lane-Lines
6efff80839b2dd6d4460ce58b20fcf656fb68d7e
[ "MIT" ]
1
2020-10-01T16:30:09.000Z
2020-10-01T16:30:09.000Z
import numpy as np from ColorComponents import ColorComponents class RegionOfInterest: margin = None rows = None cols = None def crop(self, image, margin=75): self.margin = margin self.rows = image.shape[0] self.cols = image.shape[1] x1 = int(self.cols / 2 - margin) ...
30.092593
86
0.601846
ca4e33bcee8bf5d8dd345e47b70c7d551df94914
1,370
py
Python
rand_wc_model_gen/config/core.py
KarrLab/rand_wc_model_gen
4b48a3acea96fca01e3930ab024e8352166a12a5
[ "MIT" ]
1
2021-07-05T17:47:54.000Z
2021-07-05T17:47:54.000Z
rand_wc_model_gen/config/core.py
KarrLab/rand_wc_model_gen
4b48a3acea96fca01e3930ab024e8352166a12a5
[ "MIT" ]
4
2018-08-09T15:08:25.000Z
2020-04-29T22:01:55.000Z
rand_wc_model_gen/config/core.py
KarrLab/rand_wc_model_gen
4b48a3acea96fca01e3930ab024e8352166a12a5
[ "MIT" ]
null
null
null
""" Configuration :Author: Jonathan Karr <jonrkarr@gmail.com> :Author: Ashwin Srinivasan <ashwins@mit.edu> :Date: 2018-06-11 :Copyright: 2018, Karr Lab :License: MIT """ import configobj import os import pkg_resources import rand_wc_model_gen import wc_utils.config.core def get_config(extra_path=None, extra_vals=No...
31.136364
126
0.707299
4bfc95528202483fd378bcf367dc40cc8410e260
1,952
py
Python
modules/time/time_utils.py
kevslinger/bot-be-named
a476598044a06e446e5d0a52da66fff1d7b69a27
[ "MIT" ]
4
2021-10-30T15:42:33.000Z
2021-11-29T20:02:45.000Z
modules/time/time_utils.py
kevslinger/bot-be-named
a476598044a06e446e5d0a52da66fff1d7b69a27
[ "MIT" ]
97
2021-10-30T14:40:34.000Z
2022-03-01T15:19:29.000Z
modules/time/time_utils.py
kevslinger/bot-be-named
a476598044a06e446e5d0a52da66fff1d7b69a27
[ "MIT" ]
1
2022-03-05T11:53:27.000Z
2022-03-05T11:53:27.000Z
from typing import Any, Dict, Optional from datetime import datetime import dateparser import re def __fix_tz(text: str) -> str: """Overrides certain timezones with more relevant ones""" replacements = { "BST": "+0100", # British Summer Time "IST": "+0530", # Indian Standard Time } f...
37.538462
123
0.663422
7b45f70c746bed50137c3e00066c665df4ccbb50
1,380
py
Python
python/pyarrow/fs.py
cool-RR/arrow
e78aa4c986e6f0b58d857b55997955ba3dc10b02
[ "Apache-2.0" ]
null
null
null
python/pyarrow/fs.py
cool-RR/arrow
e78aa4c986e6f0b58d857b55997955ba3dc10b02
[ "Apache-2.0" ]
null
null
null
python/pyarrow/fs.py
cool-RR/arrow
e78aa4c986e6f0b58d857b55997955ba3dc10b02
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
28.163265
78
0.751449
a562629329cf26a0db04d7a221f78ff10fd75546
17,271
py
Python
nuitka/codegen/FrameCodes.py
sthagen/Nuitka-Nuitka
023dc76eeafd9c53ee2a51931474ddd98a3ba083
[ "Apache-2.0" ]
null
null
null
nuitka/codegen/FrameCodes.py
sthagen/Nuitka-Nuitka
023dc76eeafd9c53ee2a51931474ddd98a3ba083
[ "Apache-2.0" ]
null
null
null
nuitka/codegen/FrameCodes.py
sthagen/Nuitka-Nuitka
023dc76eeafd9c53ee2a51931474ddd98a3ba083
[ "Apache-2.0" ]
null
null
null
# Copyright 2022, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
34.065089
114
0.672225
a4d80bf919fb48c59c8ba7a4494196da79ee66d5
3,906
py
Python
softlabels/Deepfashion2-Faster-RCNN/train_RCNN.py
bsridatta/robotfashion
594853c59a536a83e5c81d3a825dcfa72f7ac03b
[ "MIT" ]
null
null
null
softlabels/Deepfashion2-Faster-RCNN/train_RCNN.py
bsridatta/robotfashion
594853c59a536a83e5c81d3a825dcfa72f7ac03b
[ "MIT" ]
null
null
null
softlabels/Deepfashion2-Faster-RCNN/train_RCNN.py
bsridatta/robotfashion
594853c59a536a83e5c81d3a825dcfa72f7ac03b
[ "MIT" ]
null
null
null
# import necessary libraries from PIL import Image from train_epoch import train_one_epoch, evaluate import matplotlib.pyplot as plt import torch import transforms as T import torchvision.utils import torchvision import copy import torch import numpy as np import cv2 import random import utils import coco_utils from ...
37.557692
99
0.661034
acb7446db31b59646445b2777d2c6027a740b2b2
2,064
py
Python
jobs/SCH/JB_WORK_DEBOOKING_TRUNCATE.py
bibinvasudev/EBI_Project
df2560139e463d68a37e67e0bb683c06fa9ef91b
[ "CNRI-Python" ]
null
null
null
jobs/SCH/JB_WORK_DEBOOKING_TRUNCATE.py
bibinvasudev/EBI_Project
df2560139e463d68a37e67e0bb683c06fa9ef91b
[ "CNRI-Python" ]
null
null
null
jobs/SCH/JB_WORK_DEBOOKING_TRUNCATE.py
bibinvasudev/EBI_Project
df2560139e463d68a37e67e0bb683c06fa9ef91b
[ "CNRI-Python" ]
null
null
null
# SCH1101.SH --> JB_WORK_DEBOOKING_TRUNCATE.py #************************************************************************************************************** # # Programmer : bibin # Version : 1.0 # # Description : # 1. Truncates the 'STG_DEBOOKING_POS_TRUNCATE' table based on Oracle procedure # # Init...
30.80597
111
0.58624
6d1787e8c0940d0aaf22035cf421b62c163ded04
301
py
Python
pylib/test/extract_video_images.py
dxv2k/pixel_link_py3
c9837ea57823b3354b045f34b168ddb3e19dc17d
[ "MIT" ]
1
2021-06-30T03:26:34.000Z
2021-06-30T03:26:34.000Z
pylib/test/extract_video_images.py
dxv2k/pixel_link_py3
c9837ea57823b3354b045f34b168ddb3e19dc17d
[ "MIT" ]
null
null
null
pylib/test/extract_video_images.py
dxv2k/pixel_link_py3
c9837ea57823b3354b045f34b168ddb3e19dc17d
[ "MIT" ]
null
null
null
import util video_path = util.argv[1] out_dir = util.argv[2] if not util.io.exists(out_dir): util.io.mkdir(out_dir) reader = util.video.VideoReader(video_path) for idx, img in enumerate(reader): path = "%s/%d.jpg"%(out_dir, idx) print("writing to ", path) util.img.imwrite(path, img)
25.083333
43
0.687708
2b9e990adc02774f03317f91bc7b4cb9eb32fde7
11,514
py
Python
model/det/nets/lffdv2.py
qrsforever/torchcv
e2e17f730497fb838237357a1df4bf6ca278f107
[ "Apache-2.0" ]
171
2019-01-23T12:51:47.000Z
2019-04-15T03:57:09.000Z
model/det/nets/lffdv2.py
qrsforever/torchcv
e2e17f730497fb838237357a1df4bf6ca278f107
[ "Apache-2.0" ]
6
2019-02-14T11:28:35.000Z
2019-04-15T04:05:47.000Z
model/det/nets/lffdv2.py
qrsforever/torchcv
e2e17f730497fb838237357a1df4bf6ca278f107
[ "Apache-2.0" ]
36
2019-01-23T12:51:55.000Z
2019-04-11T13:50:48.000Z
# -*- coding: utf-8 -*- """ network description: network structure: """ import torch import torch.nn as nn from model.det.layers.ssd_priorbox_layer import SSDPriorBoxLayer from model.det.layers.ssd_target_generator import SSDTargetGenerator from model.det.loss.loss import BASE_LOSS_DICT from lib.tools.util.logger impo...
48.175732
119
0.492878
600836ac1a9847d9d247a42740b502a7968263dc
8,620
py
Python
tensorflow_datasets/scripts/download_and_prepare.py
mohitreddy1996/datasets
feeaaae92d02ce6e813f3d866076c6ed1da96f15
[ "Apache-2.0" ]
1
2020-06-21T06:57:55.000Z
2020-06-21T06:57:55.000Z
tensorflow_datasets/scripts/download_and_prepare.py
javierespinozat/datasets
1465d97b2e8b2a030f5df7872e8390b90dba8926
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/scripts/download_and_prepare.py
javierespinozat/datasets
1465d97b2e8b2a030f5df7872e8390b90dba8926
[ "Apache-2.0" ]
1
2021-06-30T17:45:23.000Z
2021-06-30T17:45:23.000Z
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets 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 appl...
35.619835
80
0.718213
482335cfb93f221b0eded84386eab700a7846de1
16,827
py
Python
pydevd_lib.macosx-10.9-x86_64-3.7/pydevd_concurrency_analyser/pydevd_concurrency_logger.py
jeremyherbert/jeremyherbert
270671c625b7b82be705fcc35b590b0c1e955d6b
[ "MIT" ]
15
2018-12-14T20:59:16.000Z
2022-03-14T21:33:08.000Z
pydevd_lib.macosx-10.9-x86_64-3.7/pydevd_concurrency_analyser/pydevd_concurrency_logger.py
jeremyherbert/jeremyherbert
270671c625b7b82be705fcc35b590b0c1e955d6b
[ "MIT" ]
16
2019-01-07T18:01:59.000Z
2022-03-24T23:15:45.000Z
pydevd_lib.macosx-10.9-x86_64-3.7/pydevd_concurrency_analyser/pydevd_concurrency_logger.py
jeremyherbert/jeremyherbert
270671c625b7b82be705fcc35b590b0c1e955d6b
[ "MIT" ]
10
2019-01-07T16:18:18.000Z
2021-08-05T07:36:11.000Z
import time from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding from _pydev_imps._pydev_saved_modules import threading from _pydevd_bundle import pydevd_xml from _pydevd_bundle.pydevd_constants import GlobalDebuggerHolder from _pydevd_bundle.pydevd_constants import get_thread_id, IS_PY3K from _p...
48.077143
140
0.558923
9025297e11578f01f25c85a4d4cd2958f74cfd37
5,102
py
Python
src/tests/testScripts/test_scenarioAttGuideHyperbolic.py
ian-cooke/basilisk_mag
a8b1e37c31c1287549d6fd4d71fcaa35b6fc3f14
[ "0BSD" ]
null
null
null
src/tests/testScripts/test_scenarioAttGuideHyperbolic.py
ian-cooke/basilisk_mag
a8b1e37c31c1287549d6fd4d71fcaa35b6fc3f14
[ "0BSD" ]
1
2019-03-13T20:52:22.000Z
2019-03-13T20:52:22.000Z
src/tests/testScripts/test_scenarioAttGuideHyperbolic.py
ian-cooke/basilisk_mag
a8b1e37c31c1287549d6fd4d71fcaa35b6fc3f14
[ "0BSD" ]
null
null
null
''' ''' ''' ISC License Copyright (c) 2016, Autonomous Vehicle Systems Lab, University of Colorado at Boulder Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all c...
39.550388
105
0.726578
1d90b1ede8d69db3e4e698ed5b2060dc661caee6
10,405
py
Python
qiskit/transpiler/passes/routing/bip_mapping.py
mehisback/qiskit-terra
a35deeb3001acd378df591ae982dfa0e16d06547
[ "Apache-2.0" ]
null
null
null
qiskit/transpiler/passes/routing/bip_mapping.py
mehisback/qiskit-terra
a35deeb3001acd378df591ae982dfa0e16d06547
[ "Apache-2.0" ]
null
null
null
qiskit/transpiler/passes/routing/bip_mapping.py
mehisback/qiskit-terra
a35deeb3001acd378df591ae982dfa0e16d06547
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
42.995868
100
0.647573
32194b8fb4703b6b761ca8f3c30fc65230806683
2,123
py
Python
denyhosts/setup.py
uesp/uesp-setup
353a09cd199cffb1c339f34080775bb9c6c07918
[ "MIT" ]
null
null
null
denyhosts/setup.py
uesp/uesp-setup
353a09cd199cffb1c339f34080775bb9c6c07918
[ "MIT" ]
null
null
null
denyhosts/setup.py
uesp/uesp-setup
353a09cd199cffb1c339f34080775bb9c6c07918
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright 2005-2006 (C) Phil Schwartz <phil_schwartz@users.sourceforge.net> # Copyright 2014 (C) Jesse Smith <jessefrgsmith@yahoo.ca> from glob import glob import sys from os.path import join as ospj from os.path import exists as fcheck from distutils.core import setup from DenyHosts.util imp...
31.686567
117
0.66651
7f1e6aff068f06d806a9ea88f22d301615b8950a
4,051
py
Python
cumulus/steps/ec2/alb.py
john-shaskin/cumulus
4687d83ab324e57d900d9888da62e2fb7f4505e9
[ "MIT" ]
null
null
null
cumulus/steps/ec2/alb.py
john-shaskin/cumulus
4687d83ab324e57d900d9888da62e2fb7f4505e9
[ "MIT" ]
11
2018-09-10T22:57:31.000Z
2019-02-28T17:21:24.000Z
cumulus/steps/ec2/alb.py
john-shaskin/cumulus
4687d83ab324e57d900d9888da62e2fb7f4505e9
[ "MIT" ]
3
2018-09-05T20:33:35.000Z
2018-10-17T16:01:26.000Z
from cumulus.chain import step from troposphere import ( Ref, Not, Equals, Join, ec2, If, Output ) from troposphere import elasticloadbalancingv2 as alb SG_NAME = "%sSecurityGroup" ALB_LISTENER = "%sListener" ALB_NAME = "LoadBalancer" TARGET_GROUP_DEFAULT = "TargetGroup" class Alb(step.Step): def __init...
29.355072
70
0.560602
958dd38b659fa8a976cf39f0d816ebd8e149445a
61,275
py
Python
SubEthaEdit-Mac/SubEthaPerf/Resources/TestFiles/Arguments.py
subethaedit/SubEthaEd
0b43a74b33a4a5531727e8bc66636df2e168d26a
[ "MIT" ]
1,240
2018-10-25T21:22:38.000Z
2022-03-26T14:13:52.000Z
SubEthaEdit-Mac/SubEthaPerf/Resources/TestFiles/Arguments.py
subethaedit/SubEthaEd
0b43a74b33a4a5531727e8bc66636df2e168d26a
[ "MIT" ]
200
2018-11-21T11:44:57.000Z
2022-03-28T19:51:41.000Z
SubEthaEdit-Mac/SubEthaPerf/Resources/TestFiles/Arguments.py
subethaedit/SubEthaEd
0b43a74b33a4a5531727e8bc66636df2e168d26a
[ "MIT" ]
115
2018-11-28T09:49:01.000Z
2022-03-31T03:26:05.000Z
import os ### class InvalidArgumentsError(ValueError): """InvalidArgumentsError - The driver arguments are invalid or inconsistent.""" class MissingArgumentError(ValueError): """MissingArgumentError - An option required an argument but none was given.""" ### class Option(object): """Option - Ro...
51.276151
131
0.657185
107afcfb64ba503c9df08ea837fc37e0f3f156c5
967
py
Python
Program/SteamVR/restore.py
Madmalicius/RMTRMS
91ce153fe106a4fffb363f3aef07ca10109433e7
[ "MIT" ]
1
2022-02-14T16:10:56.000Z
2022-02-14T16:10:56.000Z
Program/SteamVR/restore.py
Madmalicius/RMTRMS
91ce153fe106a4fffb363f3aef07ca10109433e7
[ "MIT" ]
null
null
null
Program/SteamVR/restore.py
Madmalicius/RMTRMS
91ce153fe106a4fffb363f3aef07ca10109433e7
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Restores the original SteamVR settings file and removes backup file. See README for more info. """ import os import shutil import subprocess class SteamVRRunningError(Exception): """ Raised when SteamVR is running while trying to modify config files""" pass processes = subproce...
21.488889
85
0.700103
271d2459a549c60f3ac8adb390857ed87aaa0478
1,128
py
Python
django_fileupload/urls.py
mila411/django-fileupload
ad5a7eea8c3742bce96266881df9bb2dc874f851
[ "MIT" ]
null
null
null
django_fileupload/urls.py
mila411/django-fileupload
ad5a7eea8c3742bce96266881df9bb2dc874f851
[ "MIT" ]
9
2019-12-04T23:30:14.000Z
2022-02-10T12:20:06.000Z
django_fileupload/urls.py
mila411/django-fileupload
ad5a7eea8c3742bce96266881df9bb2dc874f851
[ "MIT" ]
null
null
null
"""django_fileupload URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') C...
36.387097
80
0.723404
9d55d2451090b98a63d1710f543d1ce71d62b3c2
4,080
py
Python
lnbits/extensions/withdraw/crud.py
pseudozach/lnbits-legend
b90eb0a3ba403d60cc151af12ffabb74fd529db0
[ "MIT" ]
null
null
null
lnbits/extensions/withdraw/crud.py
pseudozach/lnbits-legend
b90eb0a3ba403d60cc151af12ffabb74fd529db0
[ "MIT" ]
null
null
null
lnbits/extensions/withdraw/crud.py
pseudozach/lnbits-legend
b90eb0a3ba403d60cc151af12ffabb74fd529db0
[ "MIT" ]
null
null
null
from datetime import datetime from typing import List, Optional, Union from lnbits.helpers import urlsafe_short_hash from . import db from .models import CreateWithdrawData, HashCheck, WithdrawLink async def create_withdraw_link( data: CreateWithdrawData, wallet_id: str, usescsv: str ) -> WithdrawLink: link...
28.137931
87
0.587255
c7c7c7f89f0989a2199b45628fc1e269f5d842f9
464
py
Python
app/migrations/0002_alter_student_cohort.py
lambrosopos/bible-school-web-app
7206026d0cb014c518314b76bd6fd7a223582044
[ "MIT" ]
null
null
null
app/migrations/0002_alter_student_cohort.py
lambrosopos/bible-school-web-app
7206026d0cb014c518314b76bd6fd7a223582044
[ "MIT" ]
null
null
null
app/migrations/0002_alter_student_cohort.py
lambrosopos/bible-school-web-app
7206026d0cb014c518314b76bd6fd7a223582044
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2021-09-21 13:17 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('app', '0001_initial'), ] operations = [ migrations.AlterField( model_name='student', ...
23.2
109
0.627155
b4903aeb46a35ba50698960c9ee5ca313c2e0043
6,453
py
Python
manila/db/migrations/alembic/versions/097fad24d2fc_add_share_instances_share_id_index.py
sapcc/manila
22e5617729274ea25fa66b9f25d7434970ad785e
[ "Apache-2.0" ]
1
2020-01-21T11:18:14.000Z
2020-01-21T11:18:14.000Z
manila/db/migrations/alembic/versions/097fad24d2fc_add_share_instances_share_id_index.py
sapcc/manila
22e5617729274ea25fa66b9f25d7434970ad785e
[ "Apache-2.0" ]
6
2021-02-11T16:09:43.000Z
2022-03-15T09:56:25.000Z
manila/db/migrations/alembic/versions/097fad24d2fc_add_share_instances_share_id_index.py
sapcc/manila
22e5617729274ea25fa66b9f25d7434970ad785e
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 SAP SE # # 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 i...
28.808036
78
0.620177
ff5fed9c81ed09f859f0f18a3d3f0d3177117048
9,161
py
Python
opensfm/actions/detect_features.py
sebhaner/OpenSfM
99e647243a97acc3ae59d7cba6813d089a793f09
[ "BSD-2-Clause" ]
2,535
2015-01-04T17:59:20.000Z
2022-03-31T06:12:43.000Z
opensfm/actions/detect_features.py
sebhaner/OpenSfM
99e647243a97acc3ae59d7cba6813d089a793f09
[ "BSD-2-Clause" ]
752
2015-01-11T22:15:20.000Z
2022-03-31T15:23:47.000Z
opensfm/actions/detect_features.py
sebhaner/OpenSfM
99e647243a97acc3ae59d7cba6813d089a793f09
[ "BSD-2-Clause" ]
780
2015-01-15T15:06:00.000Z
2022-03-26T20:47:26.000Z
import itertools import logging import math import queue import threading from timeit import default_timer as timer from typing import Optional, List, Dict, Any, Tuple import numpy as np from opensfm import bow, features, io, log, pygeometry, upright from opensfm.context import parallel_map from opensfm.dataset import...
32.14386
93
0.637485
36cece903710d9872cdbb2c84b63a86c814672aa
64
py
Python
tui/__init__.py
classPythonAddike/python-debugger-assistant
a82a21cb97799df4b8081c73796d252cdd9658ee
[ "MIT" ]
1
2021-08-29T03:36:42.000Z
2021-08-29T03:36:42.000Z
tui/__init__.py
classPythonAddike/python-debugger-assistant
a82a21cb97799df4b8081c73796d252cdd9658ee
[ "MIT" ]
1
2021-09-07T01:56:49.000Z
2021-09-07T01:56:49.000Z
tui/__init__.py
classPythonAddike/python-debugger-assistant
a82a21cb97799df4b8081c73796d252cdd9658ee
[ "MIT" ]
1
2021-08-29T03:46:11.000Z
2021-08-29T03:46:11.000Z
from tui.screen import DebuggerScreen from tui.logo import logo
21.333333
37
0.84375
70a9f9c6799c81a260b7a051d3ae60ba208e5539
3,680
py
Python
pushmanager/tests/test_core_db.py
Mango-J/pushmanager
1fcae14de463f6dcd6a847aa45d67613757cba50
[ "Apache-2.0" ]
null
null
null
pushmanager/tests/test_core_db.py
Mango-J/pushmanager
1fcae14de463f6dcd6a847aa45d67613757cba50
[ "Apache-2.0" ]
2
2017-07-09T04:26:22.000Z
2017-07-09T04:27:05.000Z
pushmanager/tests/test_core_db.py
rockdog/pushmanager
5b5b4831da4bc9e660ca1d85e3213a7030919772
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os import sqlalchemy as SA from sqlalchemy.schema import Column from sqlalchemy.schema import Table from sqlalchemy.sql.compiler import SQLCompiler from sqlalchemy.types import Integer import mock import testify as T from pushmanager.core import db from pushmanager.testing import testdb ...
34.074074
89
0.65
ff91691e1928a210da390275f1b9df1135d5dcb7
325
py
Python
app/forms.py
zhaoxin151/testPython
7c9bc6866011a718d48318384acfefd6fda52fd6
[ "MIT" ]
null
null
null
app/forms.py
zhaoxin151/testPython
7c9bc6866011a718d48318384acfefd6fda52fd6
[ "MIT" ]
null
null
null
app/forms.py
zhaoxin151/testPython
7c9bc6866011a718d48318384acfefd6fda52fd6
[ "MIT" ]
null
null
null
#!/user/bin/python #-*- coding:utf-8 -*- #author wanghaibo from flask_wtf import Form from wtforms import StringField, BooleanField from wtforms.validators import DataRequired class LoginForm(Form): openid = StringField("openid", validators=[DataRequired()]) remember_me = BooleanField('remember_me', default=F...
29.545455
63
0.766154
f1edb91fc770c8967281734e06a72932911e9f12
3,227
py
Python
app/models.py
DancanOduor/Pitches
50d56a609dfd7a5719f19ad3297959c3585dcd1c
[ "MIT" ]
null
null
null
app/models.py
DancanOduor/Pitches
50d56a609dfd7a5719f19ad3297959c3585dcd1c
[ "MIT" ]
null
null
null
app/models.py
DancanOduor/Pitches
50d56a609dfd7a5719f19ad3297959c3585dcd1c
[ "MIT" ]
null
null
null
from werkzeug.security import generate_password_hash,check_password_hash from flask_login import UserMixin from . import login_manager from datetime import datetime from . import db @login_manager.user_loader def load_user(user_id): return User.query.get(int(user_id)) class User(UserMixin,db.Model): __tablena...
30.733333
80
0.677719
13bb16c61a7e47849fee9b2ad858ea33951d9379
573
py
Python
Tools/Statistics/build_time.py
zolo-mario/ZeloEngine
e595467dd057157c47cc8fa91399b0c7137dae63
[ "MIT" ]
null
null
null
Tools/Statistics/build_time.py
zolo-mario/ZeloEngine
e595467dd057157c47cc8fa91399b0c7137dae63
[ "MIT" ]
null
null
null
Tools/Statistics/build_time.py
zolo-mario/ZeloEngine
e595467dd057157c47cc8fa91399b0c7137dae63
[ "MIT" ]
null
null
null
""" test command time usage example: python build_time.py build_vs2019.py """ import datetime import os import timeit if __name__ == '__main__': exe_filename = "../../Build/build_vs2019.bat" output_filename = "build_time_vs2019.txt" clean_filename = "../../Build/build_clean_vs2019.bat" os.system(clean...
28.65
96
0.687609
b27cff6ebaa80e2d71892b4998e7c79be6462274
3,348
py
Python
dataflow/sampleGetMassBalanceDataFrame.py
GLAMOS/dataflow
af7ca2dea122b3bccee0bdfd4292190bd71eccca
[ "MIT" ]
1
2018-05-22T14:46:48.000Z
2018-05-22T14:46:48.000Z
dataflow/sampleGetMassBalanceDataFrame.py
GLAMOS/dataflow
af7ca2dea122b3bccee0bdfd4292190bd71eccca
[ "MIT" ]
22
2018-05-18T15:28:48.000Z
2019-09-05T06:19:33.000Z
dataflow/sampleGetMassBalanceDataFrame.py
GLAMOS/dataflow
af7ca2dea122b3bccee0bdfd4292190bd71eccca
[ "MIT" ]
4
2018-07-09T05:08:49.000Z
2021-03-23T08:19:36.000Z
''' Created on 12.07.2018 @author: yvo Sample script showing polymorphistic approach to retrieve attribute data of glaciers from the database. ''' import configparser import inspect import sys from dataflow.DataReaders.DatabaseReaders.GlacierReader import GlacierReader from dataflow.DataReaders.DatabaseReaders.Vol...
38.045455
130
0.664875
74ad7041aef0d60ea9769e0561bc3bdfbc10c2cd
4,251
py
Python
webssh/settings.py
tianyongjun/webssh
87bacc786c2d87a953cf3532c3293168d039fd27
[ "MIT" ]
null
null
null
webssh/settings.py
tianyongjun/webssh
87bacc786c2d87a953cf3532c3293168d039fd27
[ "MIT" ]
null
null
null
webssh/settings.py
tianyongjun/webssh
87bacc786c2d87a953cf3532c3293168d039fd27
[ "MIT" ]
null
null
null
import logging import os.path import ssl import sys from tornado.options import define from webssh.policy import ( load_host_keys, get_policy_class, check_policy_setting ) from webssh.utils import to_ip_address from webssh._version import __version__ def print_version(flag): if flag: print(__version_...
34.282258
79
0.707128
58e24a25c59e999bef3e2cc8c620e893560b5ecc
3,737
py
Python
webfriend/scripting/parser/loops.py
PerformLine/webfriend
579f226f94b937f8685454235d1653a9ee542c36
[ "BSD-2-Clause" ]
32
2017-05-31T01:52:17.000Z
2021-12-15T18:06:09.000Z
webfriend/scripting/parser/loops.py
PerformLine/webfriend
579f226f94b937f8685454235d1653a9ee542c36
[ "BSD-2-Clause" ]
4
2017-06-14T03:53:19.000Z
2022-01-17T14:29:08.000Z
webfriend/scripting/parser/loops.py
PerformLine/webfriend
579f226f94b937f8685454235d1653a9ee542c36
[ "BSD-2-Clause" ]
2
2020-07-20T20:12:48.000Z
2022-03-23T08:35:59.000Z
from __future__ import absolute_import from __future__ import unicode_literals from webfriend.scripting.parser import MetaModel, to_value, variables class LoopBlock(MetaModel): def execute_loop(self, environment, scope=None): if scope is None: scope = environment.scope i = 0 ...
31.141667
89
0.535456
ca14b051637a2cb8c55a9123c95c18ee0a6529e2
8,792
py
Python
models/resnet.py
huitangtang/SRDC-
6595ac3a743ed85821091e1a07ca5742649d12f3
[ "MIT" ]
2
2021-12-26T18:57:14.000Z
2022-02-21T04:26:53.000Z
models/resnet.py
huitangtang/H-SRDC
6595ac3a743ed85821091e1a07ca5742649d12f3
[ "MIT" ]
null
null
null
models/resnet.py
huitangtang/H-SRDC
6595ac3a743ed85821091e1a07ca5742649d12f3
[ "MIT" ]
null
null
null
import torch.nn as nn import math import torch.utils.model_zoo as model_zoo import torch import torch.nn.functional as F from torch.autograd import Variable from collections import OrderedDict import ipdb __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152'] model_urls = { ...
33.30303
105
0.618631
3a30b1c80ff3195d1a0a220c169a32c11ac04a31
7,299
py
Python
src/train.py
DaHye9/KoBertSum
7fc6552338de24b2c8d9f6eb5d9334d3d3a83246
[ "MIT" ]
47
2020-12-22T06:45:09.000Z
2022-03-15T17:14:57.000Z
src/train.py
DaHye9/KoBertSum
7fc6552338de24b2c8d9f6eb5d9334d3d3a83246
[ "MIT" ]
4
2021-01-04T02:28:57.000Z
2021-11-19T05:40:12.000Z
src/train.py
DaHye9/KoBertSum
7fc6552338de24b2c8d9f6eb5d9334d3d3a83246
[ "MIT" ]
29
2021-01-13T05:41:59.000Z
2022-03-18T04:08:02.000Z
#!/usr/bin/env python """ Main training workflow """ from __future__ import division import argparse import os from others.logging import init_logger #from train_abstractive import validate_abs, train_abs, baseline, test_abs, test_text_abs from train_extractive import train_ext, validate_ext, test_ext model_flags...
44.506098
109
0.645979
4d34eba49314cd9abaaca1c6bbce50204dfaa098
5,244
py
Python
ComedyParser/Command.py
minoskt/ComedyParser
b7cf5b4be7b63ebae3e0e1f4ce316475793abb37
[ "MIT" ]
2
2019-06-11T21:09:38.000Z
2020-09-10T12:06:07.000Z
ComedyParser/Command.py
minoskt/ComedyParser
b7cf5b4be7b63ebae3e0e1f4ce316475793abb37
[ "MIT" ]
1
2019-06-18T12:24:36.000Z
2019-08-01T15:06:26.000Z
ComedyParser/Command.py
minoskt/ComedyParser
b7cf5b4be7b63ebae3e0e1f4ce316475793abb37
[ "MIT" ]
null
null
null
import sys import random from UserString import MutableString class Command(object): '''Command Superclass''' def __init__(self, filename): # read the xml file and save it in message xmlfile = open(filename, 'r') self.message = xmlfile.read() xmlfile.close() # set r...
25.211538
73
0.638825
2a2597555ad2fe8282bf6713d5b0c1161b692402
459
py
Python
Section 2/StopWords.py
PacktPublishing/Clean-Data-Tips-Tricks-and-Techniques
4ca6a8025e3825f1e3083a9162117c9d888571e9
[ "MIT" ]
11
2018-11-10T16:42:59.000Z
2021-10-01T23:23:52.000Z
Section 2/StopWords.py
PacktPublishing/Clean-Data-Tips-Tricks-and-Techniques
4ca6a8025e3825f1e3083a9162117c9d888571e9
[ "MIT" ]
null
null
null
Section 2/StopWords.py
PacktPublishing/Clean-Data-Tips-Tricks-and-Techniques
4ca6a8025e3825f1e3083a9162117c9d888571e9
[ "MIT" ]
7
2018-10-31T13:07:56.000Z
2021-03-13T19:48:38.000Z
from nltk.corpus import stopwords from nltk.tokenize import word_tokenize stopwords = set(stopwords.words('english')) print('All tokens in a English alphabet', stopwords) with open("shakespeare.txt", "rb") as f: content = f.read().decode('utf-8') tokens = word_tokenize(content) withoutStopWords = [w for w...
27
64
0.723312
4a2f49f6cc891fa54b8718f89f4dd7df15af5aa3
773
py
Python
virtual/lib/python3.6/site-packages/friendship/signals.py
Brayonski/awwwards
46a080d491a1ff5ad28465d75d0b60d3c1aaa71a
[ "MIT" ]
2
2021-11-11T00:23:07.000Z
2022-01-06T17:16:16.000Z
virtual/lib/python3.6/site-packages/friendship/signals.py
Brayonski/awwwards
46a080d491a1ff5ad28465d75d0b60d3c1aaa71a
[ "MIT" ]
11
2020-06-05T18:48:11.000Z
2022-02-20T07:02:49.000Z
virtual/lib/python3.6/site-packages/friendship/signals.py
Brayonski/awwwards
46a080d491a1ff5ad28465d75d0b60d3c1aaa71a
[ "MIT" ]
6
2021-04-02T11:36:48.000Z
2022-03-22T09:39:34.000Z
from django.dispatch import Signal friendship_request_created = Signal() friendship_request_rejected = Signal() friendship_request_canceled = Signal() friendship_request_viewed = Signal() friendship_request_accepted = Signal(providing_args=['from_user', 'to_user']) friendship_removed = Signal(providing_args=['from_us...
42.944444
77
0.807245
0e2be2dfd2155325d15f1b70a30ef0f68fd83871
2,849
py
Python
examples/confluence-page-versions-cleaner.py
approximatenumber/atlassian-python-api
340d4962d5f6a0f79bae40472daf683fe18544f9
[ "Apache-2.0" ]
null
null
null
examples/confluence-page-versions-cleaner.py
approximatenumber/atlassian-python-api
340d4962d5f6a0f79bae40472daf683fe18544f9
[ "Apache-2.0" ]
null
null
null
examples/confluence-page-versions-cleaner.py
approximatenumber/atlassian-python-api
340d4962d5f6a0f79bae40472daf683fe18544f9
[ "Apache-2.0" ]
null
null
null
from atlassian import Confluence CONFLUENCE_URL = "confluence.example.com" CONFLUENCE_LOGIN = "gonchik.tsymzhitov" CONFLUENCE_PASSWORD = "passwordpassword" def page_version_remover(server, content_id, remained_page_numbers): response = server.get_content_history(content_id) if not response.get('latest'): ...
33.916667
120
0.664444
b3f7a2433d890385a57737f3c2cef36f0c6e3989
2,532
py
Python
setup.py
huangyh09/diceseq
86c0a598d85ca60816189d58d6b4b1a4541a8755
[ "Apache-2.0" ]
2
2016-09-11T20:55:09.000Z
2019-06-05T15:55:54.000Z
setup.py
huangyh09/diceseq
86c0a598d85ca60816189d58d6b4b1a4541a8755
[ "Apache-2.0" ]
5
2015-11-05T07:31:57.000Z
2021-12-10T09:00:54.000Z
setup.py
huangyh09/diceseq
86c0a598d85ca60816189d58d6b4b1a4541a8755
[ "Apache-2.0" ]
1
2016-06-07T14:49:47.000Z
2016-06-07T14:49:47.000Z
""" DICEseq - Dynamic Isoform spliCing Estimator via sequencing data See: http://diceseq.sourceforge.net """ import sys if sys.version_info >= (3,): sys.exit('diceseq requires Python 2') # Always prefer setuptools over distutils from setuptools import setup, find_packages, Extension # To use a consistent encoding...
30.506024
82
0.6797
f844a37de3113a6a692756414cae18334ef9e5eb
6,804
py
Python
new.py
nirmalunagar/Sentiment-Analysis-on-Tweets
f29e4f35e4812a9ad671127da4ccbf9afd4c8844
[ "MIT" ]
null
null
null
new.py
nirmalunagar/Sentiment-Analysis-on-Tweets
f29e4f35e4812a9ad671127da4ccbf9afd4c8844
[ "MIT" ]
null
null
null
new.py
nirmalunagar/Sentiment-Analysis-on-Tweets
f29e4f35e4812a9ad671127da4ccbf9afd4c8844
[ "MIT" ]
null
null
null
import os import logging import dash import dash_core_components as dcc import dash_bootstrap_components as dbc import dash_html_components as html from dash.dependencies import Input, Output, State from dash.exceptions import PreventUpdate from dash_table import DataTable from dash_table.FormatTemplate impo...
43.063291
139
0.487654
07cf8e490a6acba88397b361534a33e668a3a62b
257
py
Python
Python/decorators/c.py
Suraj-Rajesh/code
3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9
[ "MIT" ]
null
null
null
Python/decorators/c.py
Suraj-Rajesh/code
3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9
[ "MIT" ]
null
null
null
Python/decorators/c.py
Suraj-Rajesh/code
3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9
[ "MIT" ]
null
null
null
class FOSS(object): def __init__(self, ip_addr): self.ip_addr = ip_addr self.name = 'route' def __len__(self): return len(self.ip_addr) if __name__ == '__main__': f = FOSS([1,2,3]) print len(f) print f.ip_addr
18.357143
32
0.583658
ec42b4f1658d0715be522023ec6d43a57809f9dd
5,690
py
Python
src/nets.py
yfsong0709/RA-GCNv1
1495e7331266a489edb34a41e124649471baafe1
[ "MIT" ]
67
2019-05-17T08:31:07.000Z
2022-02-28T06:00:50.000Z
src/nets.py
yfsong0709/RA-GCNv1
1495e7331266a489edb34a41e124649471baafe1
[ "MIT" ]
11
2019-05-25T13:01:01.000Z
2021-07-16T06:51:59.000Z
src/nets.py
yfsong0709/RA-GCNv1
1495e7331266a489edb34a41e124649471baafe1
[ "MIT" ]
14
2019-06-08T04:07:11.000Z
2021-03-29T12:08:42.000Z
import torch from torch import nn from torch.nn import functional as F class RA_GCN(nn.Module): def __init__(self, data_shape, num_class, A, drop_prob, gcn_kernel_size, model_stream, subset, pretrained): super().__init__() C, T, V, M = data_shape self.register_buffer('A', A) # ba...
30.10582
144
0.565905
aa4ab7dba513489283869441504457ebfb150ca4
4,971
py
Python
python/fledge/plugins/north/kafka_python/kafka_python.py
fledge-iot/fledge-north-kafka-python
3409239f85ea5cbdbf39040f21ce6db714a7a7bd
[ "Apache-2.0" ]
null
null
null
python/fledge/plugins/north/kafka_python/kafka_python.py
fledge-iot/fledge-north-kafka-python
3409239f85ea5cbdbf39040f21ce6db714a7a7bd
[ "Apache-2.0" ]
1
2020-07-03T07:41:53.000Z
2020-07-03T07:41:53.000Z
python/fledge/plugins/north/kafka_python/kafka_python.py
fledge-iot/fledge-north-kafka-python
3409239f85ea5cbdbf39040f21ce6db714a7a7bd
[ "Apache-2.0" ]
1
2020-06-19T13:19:35.000Z
2020-06-19T13:19:35.000Z
# -*- coding: utf-8 -*- """ Kafka North plugin""" from kafka import KafkaProducer from kafka.errors import KafkaError import asyncio import json from fledge.common import logger from fledge.plugins.north.common.common import * __author__ = "Rob Raesemann" __copyright__ = "Copyright (c) 2020 Raesemann Enterprises" __...
31.66242
146
0.605512
7a43ff6dc80de92ff1038a2d22cab707f80ecf39
9,397
py
Python
counting/counting.py
kreus7/OB13-Cogs
2e5d3d772d2f6e1ae1d92545648898d314fe851e
[ "MIT" ]
null
null
null
counting/counting.py
kreus7/OB13-Cogs
2e5d3d772d2f6e1ae1d92545648898d314fe851e
[ "MIT" ]
null
null
null
counting/counting.py
kreus7/OB13-Cogs
2e5d3d772d2f6e1ae1d92545648898d314fe851e
[ "MIT" ]
null
null
null
from redbot.core import commands, Config import discord from copy import copy import datetime class Counting(commands.Cog): """Counting Channel.""" def __init__(self, bot): self.bot = bot self.config = Config.get_conf(self, identifier=14000605, force_registration=True) default_guild =...
47.700508
200
0.614026
c433f431a9c083429e308c903da9315744940906
42,799
py
Python
mpf/platforms/fast/fast.py
toomanybrians/mpf
1d05184950f06272cffa44f3dd402f48a56126c3
[ "MIT" ]
null
null
null
mpf/platforms/fast/fast.py
toomanybrians/mpf
1d05184950f06272cffa44f3dd402f48a56126c3
[ "MIT" ]
null
null
null
mpf/platforms/fast/fast.py
toomanybrians/mpf
1d05184950f06272cffa44f3dd402f48a56126c3
[ "MIT" ]
1
2022-03-24T00:13:09.000Z
2022-03-24T00:13:09.000Z
"""FAST hardware platform. Contains the hardware interface and drivers for the FAST Pinball platform hardware, including the FAST Neuron, Nano, and Retro controllers as well as FAST I/O boards. """ import asyncio import os from copy import deepcopy from packaging import version from typing import Dict, Set, Optional f...
42.670987
120
0.58992
5c95633e8faa7cd033d61e4a1eab729340f92a29
3,640
py
Python
src/onelogin/saml2/errors.py
maykinmedia/python3-saml
e000b39ed0ce38270e6351ec6634e6b3a53bbc3d
[ "MIT" ]
null
null
null
src/onelogin/saml2/errors.py
maykinmedia/python3-saml
e000b39ed0ce38270e6351ec6634e6b3a53bbc3d
[ "MIT" ]
1
2021-10-01T14:41:51.000Z
2021-10-01T14:41:51.000Z
src/onelogin/saml2/errors.py
maykinmedia/python3-saml
e000b39ed0ce38270e6351ec6634e6b3a53bbc3d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ OneLogin_Saml2_Error class Copyright (c) 2010-2021 OneLogin, Inc. MIT License Error class of OneLogin's Python Toolkit. Defines common Error codes and has a custom initializator. """ class OneLogin_Saml2_Error(Exception): """ This class implements a custom Exception handler. ...
28.4375
77
0.69533
fb2a58284127abc359f263a12ac523aa7b8da86e
2,011
py
Python
HP Code Wars Documents/2014/Solutions/prob04_CandyCount.py
p473lr/i-urge-mafia-gear
ae19efb1af2e85ed8bcbbcc3d12ae0f024f3565e
[ "Apache-2.0" ]
null
null
null
HP Code Wars Documents/2014/Solutions/prob04_CandyCount.py
p473lr/i-urge-mafia-gear
ae19efb1af2e85ed8bcbbcc3d12ae0f024f3565e
[ "Apache-2.0" ]
null
null
null
HP Code Wars Documents/2014/Solutions/prob04_CandyCount.py
p473lr/i-urge-mafia-gear
ae19efb1af2e85ed8bcbbcc3d12ae0f024f3565e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python #CodeWars 2014 # #Candy Count # #Original problem text: # #Input: #Input for each day of the contest begins with an integer C (0 < C < 1000) # describing the candy count for that day. #The next line contains the number of students S (0 < S < 30) guessing that day. # #The following S lines contai...
28.728571
179
0.69816
be5298894efd5770c9db2a93b30b85dbe000bd77
11,680
py
Python
flax/util/merkle_set.py
ReadyNeutron/shitcoin-blockchain
80add4e545ad22a317244f7fd958d118a5a75c5d
[ "Apache-2.0" ]
174
2021-06-16T17:49:22.000Z
2022-03-17T03:03:17.000Z
flax/util/merkle_set.py
ReadyNeutron/shitcoin-blockchain
80add4e545ad22a317244f7fd958d118a5a75c5d
[ "Apache-2.0" ]
49
2021-06-17T14:10:53.000Z
2022-01-31T11:04:21.000Z
flax/util/merkle_set.py
ReadyNeutron/shitcoin-blockchain
80add4e545ad22a317244f7fd958d118a5a75c5d
[ "Apache-2.0" ]
80
2021-06-17T14:23:31.000Z
2022-02-24T05:52:47.000Z
from abc import ABCMeta, abstractmethod from hashlib import sha256 from typing import Any, Dict, List, Tuple from flax.types.blockchain_format.sized_bytes import bytes32 """ A simple, confidence-inspiring Merkle Set standard Advantages of this standard: Low CPU requirements Small proofs of inclusion/exclusion Reason...
29.054726
112
0.617723
b00e18aa4746739bd5258d90cf7c371f1d64404b
12,288
py
Python
python/ray/train/session.py
johnpjust/ray
cdba1d6a971bc1f3c009753eb46bedb7b28eb3bd
[ "Apache-2.0" ]
21,382
2016-09-26T23:12:52.000Z
2022-03-31T21:47:45.000Z
python/ray/train/session.py
oscarknagg/ray
20d47873c9e8f5bbb80fe36e5d16256c337c4db3
[ "Apache-2.0" ]
19,689
2016-09-17T08:21:25.000Z
2022-03-31T23:59:30.000Z
python/ray/train/session.py
cc13ny/ray
48ecb1f88a89c3894e2a92d66d89d3965c179ecd
[ "Apache-2.0" ]
4,114
2016-09-23T18:54:01.000Z
2022-03-31T15:07:32.000Z
import os import platform import queue import threading import time from datetime import datetime from enum import Enum, auto from typing import Callable from typing import Optional, Dict import warnings import ray from ray.train.constants import ( DETAILED_AUTOFILLED_KEYS, TIME_THIS_ITER_S, PID, TIMESTAMP, TIME_T...
30.491315
79
0.611165
06d7ac46703970e5ce179a3aea78f9b1c4691410
1,063
py
Python
app/core/models.py
mahdiasefiy/recipe-app-api
859e56e40cb963077f91428597406367d593f6ae
[ "MIT" ]
null
null
null
app/core/models.py
mahdiasefiy/recipe-app-api
859e56e40cb963077f91428597406367d593f6ae
[ "MIT" ]
null
null
null
app/core/models.py
mahdiasefiy/recipe-app-api
859e56e40cb963077f91428597406367d593f6ae
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import PermissionsMixin,AbstractBaseUser,BaseUserManager class UserManager(BaseUserManager): def create_user(self,email,password=None,**extra_fields): if not email: raise ValueError("it shouldn't be") ...
23.622222
88
0.689558
682b6a73e476929cf3ab0a3d7c379f441651d76f
6,203
py
Python
redings-rabbits-2018.py
BIGred053/redings-rabbits-original
20ba646ea768e4680be5a45754107b4b1b55e194
[ "MIT" ]
null
null
null
redings-rabbits-2018.py
BIGred053/redings-rabbits-original
20ba646ea768e4680be5a45754107b4b1b55e194
[ "MIT" ]
null
null
null
redings-rabbits-2018.py
BIGred053/redings-rabbits-original
20ba646ea768e4680be5a45754107b4b1b55e194
[ "MIT" ]
null
null
null
import random import math import timeit start = timeit.default_timer() num_alb=10 # The number of albino (recessive) alleles in the population. 10 is a default value to start. num_brown=10 # The number of brown (dominant) alleles in the population. 10 is a default value to start. # The simulation starts with a 50-5...
41.07947
214
0.696437
a2abf967601d5f707bee69daea523c6f9a51aad5
372
py
Python
accounts/urls.py
UmarSyal/port_proj--social
f7fd04f20dec37ac4f3b686975443e2ff87c7264
[ "MIT" ]
null
null
null
accounts/urls.py
UmarSyal/port_proj--social
f7fd04f20dec37ac4f3b686975443e2ff87c7264
[ "MIT" ]
null
null
null
accounts/urls.py
UmarSyal/port_proj--social
f7fd04f20dec37ac4f3b686975443e2ff87c7264
[ "MIT" ]
null
null
null
from django.urls import path from django.contrib.auth.views import LoginView, LogoutView from accounts import views app_name = 'accounts' urlpatterns = [ path('signup/', views.SignupView.as_view(), name='signup'), path('login/', LoginView.as_view(template_name = 'accounts/login.html'), name='login'), path...
31
91
0.72043
9ced8e91315efbfcdfe2ec3bdc0c80c9b8f66869
298
py
Python
deriv_api/__init__.py
sasikala-binary/python-deriv-api
b40fca1b5ba06a47579f87258f41a50de9fb55fc
[ "MIT" ]
2
2022-01-23T13:31:22.000Z
2022-03-04T23:26:41.000Z
deriv_api/__init__.py
sasikala-binary/python-deriv-api
b40fca1b5ba06a47579f87258f41a50de9fb55fc
[ "MIT" ]
1
2021-12-20T14:55:03.000Z
2021-12-22T03:00:53.000Z
deriv_api/__init__.py
sasikala-binary/python-deriv-api
b40fca1b5ba06a47579f87258f41a50de9fb55fc
[ "MIT" ]
4
2021-12-10T05:18:44.000Z
2022-03-07T20:06:11.000Z
""" .. include:: ../README.md .. include:: ../docs/usage_examples.md """ __pdoc__ = { 'deriv_api.errors': False, 'deriv_api.utils': False, 'deriv_api.easy_future': False } from .deriv_api import DerivAPI from .errors import AddedTaskError, APIError, ConstructionError, ResponseError
19.866667
78
0.701342
c6d8fd85ccb0e6831b981eac0454409f0dc5ff86
14,074
py
Python
src/spaceone/inventory/connector/aws_documentdb_connector/schema/data.py
khl6235/plugin-aws-cloudservices
e13554df78ff97daefa7011559c00adc44fa10ea
[ "Apache-2.0" ]
null
null
null
src/spaceone/inventory/connector/aws_documentdb_connector/schema/data.py
khl6235/plugin-aws-cloudservices
e13554df78ff97daefa7011559c00adc44fa10ea
[ "Apache-2.0" ]
null
null
null
src/spaceone/inventory/connector/aws_documentdb_connector/schema/data.py
khl6235/plugin-aws-cloudservices
e13554df78ff97daefa7011559c00adc44fa10ea
[ "Apache-2.0" ]
null
null
null
import logging from schematics import Model from schematics.types import ModelType, StringType, IntType, DateTimeType, serializable, ListType, BooleanType _LOGGER = logging.getLogger(__name__) ''' TAG ''' class Tag(Model): key = StringType(deserialize_from="Key") value = StringType(deserialize_from="Value") ...
45.993464
161
0.770712
c22aec25dc29136903a694fe3e8a74367a350bec
9,008
py
Python
QbvSystem.py
zhiqiarcher/QbvCalculationTool
cc6650eda55ae1534a8d21d6de1f235023389d6b
[ "MIT" ]
4
2021-01-10T14:38:50.000Z
2022-03-01T10:59:33.000Z
QbvSystem.py
zhiqiarcher/QbvCalculationTool
cc6650eda55ae1534a8d21d6de1f235023389d6b
[ "MIT" ]
null
null
null
QbvSystem.py
zhiqiarcher/QbvCalculationTool
cc6650eda55ae1534a8d21d6de1f235023389d6b
[ "MIT" ]
1
2021-08-17T09:23:46.000Z
2021-08-17T09:23:46.000Z
import QbvMath import os,sys import copy class QSys: def __init__(self,StreamList,PortList,StepSizeinNs,LongestCycleinMs,NoofQbvClass): self.StreamList = StreamList self.PortList= PortList self.StepSizeinNs = StepSizeinNs self.LongestCycle = LongestCycle self.NoofQ...
40.760181
155
0.664964
3627591de2061c519c03f5cbb6baa7b6ada2a36b
4,585
py
Python
tethysapp/modflow/job_executables/geoserver_layers_executable.py
Aquaveo/tethysapp-modflow
5e662d8346f2ffd414ac912a531eef06c5ae79d9
[ "BSD-3-Clause" ]
null
null
null
tethysapp/modflow/job_executables/geoserver_layers_executable.py
Aquaveo/tethysapp-modflow
5e662d8346f2ffd414ac912a531eef06c5ae79d9
[ "BSD-3-Clause" ]
null
null
null
tethysapp/modflow/job_executables/geoserver_layers_executable.py
Aquaveo/tethysapp-modflow
5e662d8346f2ffd414ac912a531eef06c5ae79d9
[ "BSD-3-Clause" ]
null
null
null
#!/opt/tethys-python import sys import traceback from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from tethys_dataset_services.engines.geoserver_engine import GeoServerSpatialDatasetEngine from tethysext.atcore.services.model_file_database_connection import ModelFileDatabaseConnection fro...
44.086538
131
0.679607
1fd07e9612fbca0f67398f6343d358a812a8494e
4,755
py
Python
Controllers/inverted_pendulum_mpc_control.py
MapleNSteel/AckermannControl
bca97ca0900dde416f247a3a1c30fbf7dba51aa6
[ "MIT" ]
3
2019-02-14T21:15:45.000Z
2022-01-03T13:00:22.000Z
Controllers/inverted_pendulum_mpc_control.py
MapleNSteel/AckermannControl
bca97ca0900dde416f247a3a1c30fbf7dba51aa6
[ "MIT" ]
null
null
null
Controllers/inverted_pendulum_mpc_control.py
MapleNSteel/AckermannControl
bca97ca0900dde416f247a3a1c30fbf7dba51aa6
[ "MIT" ]
1
2018-03-23T00:49:10.000Z
2018-03-23T00:49:10.000Z
""" Inverted Pendulum MPC control author: Atsushi Sakai """ from LinearMPC import * import matplotlib.pyplot as plt import numpy as np import math import time import cvxpy cvxopt.matrix_repr = cvxopt.printing.matrix_str_default cvxopt.printing.options['dformat'] = '%.2f' cvxopt.printing.options['width'] = -1 cvxop...
22.971014
108
0.536067
2ae3f76e5e6d78210c2aa1c8992c06d2370342a8
2,645
py
Python
homeassistant/components/device_tracker/unifi.py
beschouten/home-assistant
f50c30bbbad4d92e342c8547630c63c0c7882803
[ "MIT" ]
null
null
null
homeassistant/components/device_tracker/unifi.py
beschouten/home-assistant
f50c30bbbad4d92e342c8547630c63c0c7882803
[ "MIT" ]
null
null
null
homeassistant/components/device_tracker/unifi.py
beschouten/home-assistant
f50c30bbbad4d92e342c8547630c63c0c7882803
[ "MIT" ]
null
null
null
""" Support for Unifi WAP controllers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.unifi/ """ import logging import urllib from homeassistant.components.device_tracker import DOMAIN from homeassistant.const import CONF_HOST, CONF_USERN...
30.755814
74
0.651796
549bc68a0fcbb77cad3879566771cec1ba439a53
122
py
Python
API/pagination.py
dragonman164/Youtube-BASIC-API-
afa0f12fdf05ab715164f33c13b3aa55a69d29d3
[ "MIT" ]
null
null
null
API/pagination.py
dragonman164/Youtube-BASIC-API-
afa0f12fdf05ab715164f33c13b3aa55a69d29d3
[ "MIT" ]
null
null
null
API/pagination.py
dragonman164/Youtube-BASIC-API-
afa0f12fdf05ab715164f33c13b3aa55a69d29d3
[ "MIT" ]
null
null
null
from rest_framework.pagination import PageNumberPagination class VideoPagination(PageNumberPagination): page_size = 1
30.5
58
0.852459
f97e142eec04f2e54fa29cb45a747f942fb3aba8
1,085
py
Python
day13/solve1.py
tomaszmj/AdventOfCode2020
28b59176d969b00e9630bd7a47a77bcd8275567b
[ "MIT" ]
null
null
null
day13/solve1.py
tomaszmj/AdventOfCode2020
28b59176d969b00e9630bd7a47a77bcd8275567b
[ "MIT" ]
null
null
null
day13/solve1.py
tomaszmj/AdventOfCode2020
28b59176d969b00e9630bd7a47a77bcd8275567b
[ "MIT" ]
null
null
null
from typing import List, NamedTuple class Departure(NamedTuple): timestamp: int bus_number: int def main(): with open("data.txt") as f: current_timestamp = int(f.readline().strip()) buses = f.readline().strip().split(",") bus_numbers = [] for b in buses: if b != "x": ...
33.90625
108
0.666359
d9083c7cfd17b28a43b8f832ba8fa8446d18a756
2,895
py
Python
utils/shared/keyvalue_simple.py
kristiker/source1import
c0f22434c37f32acd598d5a5115dfbc2103d8277
[ "MIT" ]
9
2021-08-29T19:24:55.000Z
2022-02-11T18:25:57.000Z
utils/shared/keyvalue_simple.py
kristiker/source1import
c0f22434c37f32acd598d5a5115dfbc2103d8277
[ "MIT" ]
4
2022-02-04T00:31:13.000Z
2022-03-18T16:15:58.000Z
utils/shared/keyvalue_simple.py
kristiker/source1import
c0f22434c37f32acd598d5a5115dfbc2103d8277
[ "MIT" ]
1
2021-11-22T16:46:59.000Z
2021-11-22T16:46:59.000Z
import re from pathlib import Path def parseKeyValue(line, vmtKeyValues): words = [] nextLine = '' # doesn't split inside qotes words = re.split(r'\s', line, maxsplit=1) #+(?=(?:[^"]*"[^"]*")*[^"]*$) words = list(filter(len, words)) if not words: return elif len(words) == 1: Quott...
29.540816
88
0.47772
badd681c91b9871185d94f3f0c994b69bff3c6b1
411
py
Python
problem0002.py
NorimasaNabeta/projecteuler
9a19fd83c62c23e6e7d2d04a466f04ae52d70790
[ "MIT" ]
null
null
null
problem0002.py
NorimasaNabeta/projecteuler
9a19fd83c62c23e6e7d2d04a466f04ae52d70790
[ "MIT" ]
null
null
null
problem0002.py
NorimasaNabeta/projecteuler
9a19fd83c62c23e6e7d2d04a466f04ae52d70790
[ "MIT" ]
null
null
null
import os, sys sum = 0 f1 = 1 f2 = 2 fseq = [1, 2] for i in range(1,100): next = fseq[i-1] + fseq[i] if next < 4000000: fseq.append(next) print (i, next) else: break sum = 0 for idx in range(0, len(fseq)): if ((fseq[idx] % 2) == 0): sum = sum + fseq[idx] p...
16.44
40
0.49635
4c37328e6bce72b6d21b967a6fb38d0fd510125e
1,557
py
Python
calendareshop/shopping/management/commands/update_foreign_prices.py
Kaarhai/calendar-eshop
4ba4141034fe0042f0b3eec6194efd4b5c815f66
[ "BSD-3-Clause" ]
1
2016-09-20T22:01:05.000Z
2016-09-20T22:01:05.000Z
calendareshop/shopping/management/commands/update_foreign_prices.py
Kaarhai/calendar-eshop
4ba4141034fe0042f0b3eec6194efd4b5c815f66
[ "BSD-3-Clause" ]
6
2016-10-08T09:57:49.000Z
2022-03-11T23:16:41.000Z
calendareshop/shopping/management/commands/update_foreign_prices.py
Kaarhai/calendar-eshop
4ba4141034fe0042f0b3eec6194efd4b5c815f66
[ "BSD-3-Clause" ]
2
2016-10-03T21:47:55.000Z
2019-10-17T07:56:09.000Z
# -*- coding: utf-8 -*- import logging import math from decimal import Decimal from django.core.management.base import BaseCommand from shopping.models import Region, Country, ShippingRegionPrice, ShippingRegion logger = logging.getLogger(__name__) class Command(BaseCommand): def add_arguments(self, parser): ...
33.847826
99
0.592807
c430f241acd7117a0cdab51e3248e82faa94d295
11,588
py
Python
yt/frontends/open_pmd/tests/test_outputs.py
kastalpes/yt
b1e197ca84433fbd61eaf44b28ff5cdb37981d4c
[ "BSD-3-Clause-Clear" ]
2
2021-03-02T18:59:49.000Z
2021-03-02T18:59:50.000Z
yt/frontends/open_pmd/tests/test_outputs.py
kastalpes/yt
b1e197ca84433fbd61eaf44b28ff5cdb37981d4c
[ "BSD-3-Clause-Clear" ]
4
2018-04-13T23:03:42.000Z
2018-05-08T17:50:43.000Z
yt/frontends/open_pmd/tests/test_outputs.py
kastalpes/yt
b1e197ca84433fbd61eaf44b28ff5cdb37981d4c
[ "BSD-3-Clause-Clear" ]
2
2020-05-16T15:29:37.000Z
2020-06-22T10:17:08.000Z
""" openPMD frontend tests """ # ----------------------------------------------------------------------------- # Copyright (c) 2016, Fabian Koller (HZDR). # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # -----------------...
44.741313
92
0.553072
8fa4003413bc35f64e3d3a965f09a343e29c80ff
4,638
py
Python
analyze/statistics.py
adiyoss/Representation_Analysis
5d56cf1c98a3d284cfa329efc7425e58cc55acdc
[ "MIT" ]
2
2018-02-26T21:02:11.000Z
2018-02-27T08:20:16.000Z
analyze/statistics.py
adiyoss/InDepth-Analysis
5d56cf1c98a3d284cfa329efc7425e58cc55acdc
[ "MIT" ]
null
null
null
analyze/statistics.py
adiyoss/InDepth-Analysis
5d56cf1c98a3d284cfa329efc7425e58cc55acdc
[ "MIT" ]
null
null
null
import argparse import numpy as np import operator from matplotlib import pyplot as plt def run_stats(idx_path, dict_size): fid = open(idx_path) x_train = fid.readlines() fid.close() first_word = dict() last_word = dict() sen_lens = dict() for sen in x_train: s = sen.split() ...
34.355556
115
0.578698
bf21674857c9231f98bbca7cf0c19f28ee66ad5c
4,751
py
Python
src/Optuna.py
BrandonGower-Winter/ABM-gecco2022
2178c91397011bb11453b0c7f0252f9c9aacca6e
[ "MIT" ]
null
null
null
src/Optuna.py
BrandonGower-Winter/ABM-gecco2022
2178c91397011bb11453b0c7f0252f9c9aacca6e
[ "MIT" ]
null
null
null
src/Optuna.py
BrandonGower-Winter/ABM-gecco2022
2178c91397011bb11453b0c7f0252f9c9aacca6e
[ "MIT" ]
null
null
null
import argparse import logging import NeoCOOP import optuna import optuna.logging as olog import random import statistics from Agents import AgentIEAdaptationSystem, HouseholdPreferenceComponent, IEComponent, ResourceComponent from ECAgent.Decode import JsonDecoder from VegetationModel import GlobalEnvironme...
41.675439
125
0.680699
9d817da787f9a019960a7218e020bf1d9b4e709a
2,266
py
Python
tests/test_cli_main.py
zel4ever/streamlink
0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d
[ "BSD-2-Clause" ]
1
2018-09-25T04:13:04.000Z
2018-09-25T04:13:04.000Z
tests/test_cli_main.py
zel4ever/streamlink
0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d
[ "BSD-2-Clause" ]
1
2018-09-26T04:33:51.000Z
2018-09-26T04:33:51.000Z
tests/test_cli_main.py
zel4ever/streamlink
0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d
[ "BSD-2-Clause" ]
null
null
null
import os.path import os.path import tempfile import streamlink_cli.main from streamlink_cli.main import resolve_stream_name, check_file_output from streamlink_cli.output import FileOutput import unittest from tests.mock import Mock, patch class TestCLIMain(unittest.TestCase): def test_check_file_output(self): ...
34.861538
85
0.642983
03f465148148d393086a87ce492ee2c1aff0976f
2,330
py
Python
Lib/site-packages/swocket/auth/plaintext.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/swocket/auth/plaintext.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/swocket/auth/plaintext.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
r"""authorize from a comma delimited plaintext file, cache the file for speed, check its mtime and update incase you feel like changing user/passwords during runtime.. slick :)""" import os,string from swocket import authorizeError from stat import * def authInit (parent, doc): """do the initial setup and cache"""...
34.776119
73
0.651502
80beac7c3e8734c354667bd80d8562211ce6533c
6,443
py
Python
tests/test_misc_functions.py
agraubert/agutil
d9a568df01959ed985c9c8e77bdd501ac13bdbbf
[ "MIT" ]
3
2017-06-05T15:46:22.000Z
2019-05-22T21:26:54.000Z
tests/test_misc_functions.py
agraubert/agutil
d9a568df01959ed985c9c8e77bdd501ac13bdbbf
[ "MIT" ]
93
2016-06-22T18:57:47.000Z
2022-02-14T10:50:27.000Z
tests/test_misc_functions.py
agraubert/agutil
d9a568df01959ed985c9c8e77bdd501ac13bdbbf
[ "MIT" ]
null
null
null
import unittest import os from py_compile import compile import sys import hashlib import random import tempfile import threading def make_random_string(length=25, lower=0, upper=255): return "".join(chr(random.randint(lower,upper)) for i in range(length)) class test(unittest.TestCase): @classmethod def s...
39.527607
104
0.565575
60ccffc631afdec5afdf3a62b46b01a84a1c5ac0
13,825
py
Python
flair/models/language_model.py
shuu-tatsu/insert_vec_flair
979a4bbbac165f13addcbaa06f1648e5fd9136a5
[ "MIT" ]
null
null
null
flair/models/language_model.py
shuu-tatsu/insert_vec_flair
979a4bbbac165f13addcbaa06f1648e5fd9136a5
[ "MIT" ]
null
null
null
flair/models/language_model.py
shuu-tatsu/insert_vec_flair
979a4bbbac165f13addcbaa06f1648e5fd9136a5
[ "MIT" ]
null
null
null
from pathlib import Path import torch.nn as nn import torch import math from typing import Union, Tuple from typing import List from torch.optim import Optimizer import flair from flair.data import Dictionary # fix start import random # fix end class LanguageModel(nn.Module): """Container module with an encode...
36.286089
116
0.582568
980d7bc8e8b2c9ba129c3d191cd40fda87f5970d
65
py
Python
tests/__init__.py
SinaMostafanejad/rdkit_step
c742bcca6d33e57617b35b94a99724fe151ebb85
[ "BSD-3-Clause" ]
null
null
null
tests/__init__.py
SinaMostafanejad/rdkit_step
c742bcca6d33e57617b35b94a99724fe151ebb85
[ "BSD-3-Clause" ]
2
2021-11-10T23:29:51.000Z
2022-01-11T20:27:04.000Z
tests/__init__.py
SinaMostafanejad/rdkit_step
c742bcca6d33e57617b35b94a99724fe151ebb85
[ "BSD-3-Clause" ]
1
2021-09-23T15:04:59.000Z
2021-09-23T15:04:59.000Z
# -*- coding: utf-8 -*- """Unit test package for rdkit_step."""
16.25
39
0.584615
787e3b63293da1064bf38bb164daf06b637d1fea
2,201
py
Python
uqbar/apis/ClassDocumenter.py
josiah-wolf-oberholtzer/uqbar
96f86eb6264b0677a9e2931a527769640e5658b6
[ "MIT" ]
7
2018-12-02T05:59:54.000Z
2021-12-28T22:40:18.000Z
uqbar/apis/ClassDocumenter.py
josiah-wolf-oberholtzer/uqbar
96f86eb6264b0677a9e2931a527769640e5658b6
[ "MIT" ]
16
2017-12-28T22:08:09.000Z
2022-02-26T14:47:23.000Z
uqbar/apis/ClassDocumenter.py
josiah-wolf-oberholtzer/uqbar
96f86eb6264b0677a9e2931a527769640e5658b6
[ "MIT" ]
5
2020-03-28T14:57:47.000Z
2022-02-01T10:02:18.000Z
import enum import inspect from typing import cast from uqbar.apis.MemberDocumenter import MemberDocumenter class ClassDocumenter(MemberDocumenter): """ A basic class documenter. :: >>> import uqbar.apis >>> path = 'uqbar.apis.ClassDocumenter.ClassDocumenter' >>> documenter = uq...
30.569444
88
0.628351
1e437b8c6dfb33c82e9207f01bcc1ef682fb4d09
17,061
py
Python
tests/test_demographics.py
pep8speaks/true_nth_usa_portal
31ff755b0cfe61ab908e2a399e3c41ef17ca8c16
[ "BSD-3-Clause" ]
1
2019-03-11T12:25:20.000Z
2019-03-11T12:25:20.000Z
tests/test_demographics.py
pep8speaks/true_nth_usa_portal
31ff755b0cfe61ab908e2a399e3c41ef17ca8c16
[ "BSD-3-Clause" ]
null
null
null
tests/test_demographics.py
pep8speaks/true_nth_usa_portal
31ff755b0cfe61ab908e2a399e3c41ef17ca8c16
[ "BSD-3-Clause" ]
null
null
null
"""Unit test module for Demographics API""" from __future__ import unicode_literals # isort:skip import json from flask_webtest import SessionScope from portal.extensions import db from portal.models.audit import Audit from portal.models.auth import AuthProvider from portal.models.identifier import Identifier from ...
37.496703
82
0.547272
a4e2d5a67045272653356d88eb10fd647ccdc420
3,735
py
Python
examples/minigrid/test_minigrid.py
AIDefender/Tianshou-ReMPER
297ba383fc1e4e19cd52bd89df7d0d3148bd4e68
[ "MIT" ]
null
null
null
examples/minigrid/test_minigrid.py
AIDefender/Tianshou-ReMPER
297ba383fc1e4e19cd52bd89df7d0d3148bd4e68
[ "MIT" ]
null
null
null
examples/minigrid/test_minigrid.py
AIDefender/Tianshou-ReMPER
297ba383fc1e4e19cd52bd89df7d0d3148bd4e68
[ "MIT" ]
null
null
null
import gym import os import gym_minigrid from gym_minigrid.wrappers import * from atari_network import DQN import argparse import torch from tianshou.policy import DQNPolicy import pickle import numpy as np from fourrooms import FourRoomsEnv from maze import MazeEnv def get_args(): parser = argparse.ArgumentParser...
38.90625
111
0.649264
f9ceada1cd0fd1d0f92fd20ddf95e089f2dbdef6
1,109
py
Python
reddit.py
sm5art/cancer-bot
c122a2ff35e4646be54ab410f958517ae69a325c
[ "MIT" ]
null
null
null
reddit.py
sm5art/cancer-bot
c122a2ff35e4646be54ab410f958517ae69a325c
[ "MIT" ]
null
null
null
reddit.py
sm5art/cancer-bot
c122a2ff35e4646be54ab410f958517ae69a325c
[ "MIT" ]
null
null
null
import asyncio import discord.discord as discord import requests import re import logging import json import random logging.basicConfig(level=logging.INFO, format="%(levelname)s:%(filename)s:%(lineno)d:%(message)s") log = logging.getLogger(__name__) async def gime(message, text, bot): print("https://www.reddit.co...
44.36
233
0.682597
7f8c05ee69de188e8689b5644090e69ba47a42f4
11,253
py
Python
ibmsecurity/isam/web/authorization_server/configuration/entry.py
svetterIO/backup_ibmsecurity
f6e7db3ad95cfe03657e04e582771e37f470354d
[ "Apache-2.0" ]
2
2019-12-05T13:51:10.000Z
2019-12-20T08:02:35.000Z
ibmsecurity/isam/web/authorization_server/configuration/entry.py
svetterIO/backup_ibmsecurity
f6e7db3ad95cfe03657e04e582771e37f470354d
[ "Apache-2.0" ]
null
null
null
ibmsecurity/isam/web/authorization_server/configuration/entry.py
svetterIO/backup_ibmsecurity
f6e7db3ad95cfe03657e04e582771e37f470354d
[ "Apache-2.0" ]
null
null
null
import logging import ibmsecurity.utilities.tools try: basestring except NameError: basestring = (str, bytes) logger = logging.getLogger(__name__) # URI for this module uri = "/isam/authzserver" def get_all(isamAppliance, id, stanza_id, check_mode=False, force=False): """ Retrieving all configurati...
40.189286
120
0.561983
640f123e45ba9b78c25124226e6a6a5e7366a286
2,717
py
Python
data/p3BR/R1/benchmark/startPyquil414.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R1/benchmark/startPyquil414.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R1/benchmark/startPyquil414.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=2 # total number=74 import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() # circuit begin prog += H(0) # number=1 pr...
26.90099
64
0.550975
55af2802f765097daa7340384417276ae0bedf96
5,664
py
Python
setup.py
rjungbeck/pysat
f281c5aeacfd64a3903d855adfd6455a0e0e57bd
[ "MIT" ]
null
null
null
setup.py
rjungbeck/pysat
f281c5aeacfd64a3903d855adfd6455a0e0e57bd
[ "MIT" ]
null
null
null
setup.py
rjungbeck/pysat
f281c5aeacfd64a3903d855adfd6455a0e0e57bd
[ "MIT" ]
1
2020-03-06T14:21:27.000Z
2020-03-06T14:21:27.000Z
#!/usr/bin/env python #-*- coding:utf-8 -*- ## ## setup.py ## ## Created on: Jan 23, 2018 ## Author: Alexey S. Ignatiev ## E-mail: aignatiev@ciencias.ulisboa.pt ## # #============================================================================== import os import os.path import contextlib import glob try: ...
32.739884
138
0.584216
1f22bfad4cef9b33d23d7c049222d4fd5f8ce575
1,693
py
Python
testing/snapshot-test.py
dbarentine/udi-poly-treatlife-switch-python-master
a581a80698c24cc180ae390bc3c3abdb8cb6b712
[ "MIT" ]
1
2021-11-17T13:11:28.000Z
2021-11-17T13:11:28.000Z
snapshot-test.py
simplextech/udi-poly-treatlife-switch-python-master
9e703e8ef3e48f7fec99064b91b56dbf98974a7d
[ "MIT" ]
1
2021-07-28T06:09:07.000Z
2021-08-05T23:15:59.000Z
snapshot-test.py
simplextech/udi-poly-treatlife-switch-python-master
9e703e8ef3e48f7fec99064b91b56dbf98974a7d
[ "MIT" ]
2
2021-04-02T03:40:02.000Z
2021-07-28T04:19:18.000Z
# TinyTuya Example # -*- coding: utf-8 -*- """ TinyTuya - Example script that uses the snapshot.json to manage Tuya Devices Author: Jason A. Cox For more information see https://github.com/jasonacox/tinytuya """ import tinytuya import json import time with open('snapshot.json') as json_file: data = json.load...
26.873016
79
0.604843
d99775945c32690e25df7437f9d3572481366e66
718
py
Python
sensor_validate.py
clean-code-craft-tcq-1/ms1snippet-py-aswinmath94
e4a7a5aa7a7f800a4133d77496bfcec7ad400d62
[ "MIT" ]
null
null
null
sensor_validate.py
clean-code-craft-tcq-1/ms1snippet-py-aswinmath94
e4a7a5aa7a7f800a4133d77496bfcec7ad400d62
[ "MIT" ]
null
null
null
sensor_validate.py
clean-code-craft-tcq-1/ms1snippet-py-aswinmath94
e4a7a5aa7a7f800a4133d77496bfcec7ad400d62
[ "MIT" ]
null
null
null
tolerance_limit = {'soc': 0.05, 'current': 0.1} def in_max_tolerence_limit(value, nextValue, maxDelta): if nextValue - value > maxDelta: return False return True def validate_sensor_reading(values, parameter_type): last_but_one_reading = len(values) - 1 for i in range(last_but_one_reading): ...
31.217391
99
0.714485
52f38cd9760ade4baf64e55785994b8a39f99f2b
17,834
py
Python
google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc.py
galz100/python-dialogflow
a6d5a08ea1a996ecea6a2512ffcc6d99d4fd6302
[ "Apache-2.0" ]
null
null
null
google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc.py
galz100/python-dialogflow
a6d5a08ea1a996ecea6a2512ffcc6d99d4fd6302
[ "Apache-2.0" ]
null
null
null
google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc.py
galz100/python-dialogflow
a6d5a08ea1a996ecea6a2512ffcc6d99d4fd6302
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
44.809045
101
0.652125
5f4b66672ec39b9006c88cc10d355bcd559bb99c
5,877
py
Python
tests/e2e/bento_server_general_features/tests/test_io.py
SAB-6/BentoML
d16d3dc75d75a8da300b47a15493ca53f51baabd
[ "Apache-2.0" ]
1
2022-02-13T05:35:47.000Z
2022-02-13T05:35:47.000Z
tests/e2e/bento_server_general_features/tests/test_io.py
khuyentran1401/BentoML
06973901fd04d115eab862956ba26732644dcd52
[ "Apache-2.0" ]
null
null
null
tests/e2e/bento_server_general_features/tests/test_io.py
khuyentran1401/BentoML
06973901fd04d115eab862956ba26732644dcd52
[ "Apache-2.0" ]
null
null
null
# pylint: disable=redefined-outer-name # type: ignore[no-untyped-def] import io import numpy as np import pytest import aiohttp from bentoml.testing.utils import async_request from bentoml.testing.utils import parse_multipart_form @pytest.fixture() def img_file(tmpdir): import PIL.Image img_file_ = tmpdir...
26.472973
87
0.596393
b7da64cd806cd2468aa3306b6736d146d91bd467
702
py
Python
rltorch/network/base.py
cindycia/Atari-SAC-Discrete
5d92339f3efbac34488a14db024499b8951fc3b3
[ "MIT" ]
16
2019-11-15T13:37:20.000Z
2022-01-24T10:29:38.000Z
rltorch/network/base.py
cindycia/Atari-SAC-Discrete
5d92339f3efbac34488a14db024499b8951fc3b3
[ "MIT" ]
1
2020-05-09T18:24:21.000Z
2020-05-10T12:44:39.000Z
rltorch/network/base.py
ku2482/rltorch
7819af49d95bfa268e00413a7606564b0e7286a7
[ "MIT" ]
3
2020-12-21T08:21:15.000Z
2022-01-24T10:29:43.000Z
import torch import torch.nn as nn def grad_false(m): for param in m.parameters(): param.requires_grad = False class BaseNetwork(nn.Module): _n = None def save(self, path): torch.save(self.state_dict(), path) def load(self, path): self.load_state_dict(torch.load(path)) ...
21.272727
64
0.52849