hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f71ad0247ebf714503f6f8492d0d47f17da35091
623
py
Python
course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/main.py
sepam/machine-learning-engineering-for-production-public
cd6053459eee9b7f30bf86da63104b3f1381383a
[ "Apache-2.0" ]
null
null
null
course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/main.py
sepam/machine-learning-engineering-for-production-public
cd6053459eee9b7f30bf86da63104b3f1381383a
[ "Apache-2.0" ]
null
null
null
course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/main.py
sepam/machine-learning-engineering-for-production-public
cd6053459eee9b7f30bf86da63104b3f1381383a
[ "Apache-2.0" ]
null
null
null
import pickle import numpy as np from typing import List from fastapi import FastAPI from pydantic import BaseModel, conlist app = FastAPI(title="Predicting Wine Class with batching") # Open classifier in global scope with open("models/wine-95-fixed.pkl", "rb") as file: clf = pickle.load(file) class Wine(Base...
23.074074
71
0.731942
import pickle import numpy as np from typing import List from fastapi import FastAPI from pydantic import BaseModel, conlist app = FastAPI(title="Predicting Wine Class with batching") with open("models/wine-95-fixed.pkl", "rb") as file: clf = pickle.load(file) class Wine(BaseModel): batches: List[conlist...
true
true
f71ad074c1c6f98c66a9513ea45897d958bd392f
1,461
py
Python
python/config_default_48k.py
entn-at/GlottDNN
b7db669d7f34da92ab34742d75a8ba3c70763a65
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
python/config_default_48k.py
entn-at/GlottDNN
b7db669d7f34da92ab34742d75a8ba3c70763a65
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
python/config_default_48k.py
entn-at/GlottDNN
b7db669d7f34da92ab34742d75a8ba3c70763a65
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# run flags make_dirs = True make_scp = True do_sptk_pitch_analysis = False do_reaper_pitch_analysis = False do_glott_vocoder_analysis = False make_dnn_train_data = False make_dnn_infofile = False do_dnn_training = False do_glott_vocoder_synthesis = True # directories prjdir = '/l/CODE/GlottDNN' # add your own local i...
26.563636
110
0.713895
make_dirs = True make_scp = True do_sptk_pitch_analysis = False do_reaper_pitch_analysis = False do_glott_vocoder_analysis = False make_dnn_train_data = False make_dnn_infofile = False do_dnn_training = False do_glott_vocoder_synthesis = True prjdir = '/l/CODE/GlottDNN' datadir = prjdir + '/data/ansyn_jenny' samp...
true
true
f71ad0e03a1f64c0b8808cee586a271e9c91b997
950
py
Python
clif/testing/python/non_raising_test.py
wangxf123456/clif
9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1
[ "Apache-2.0" ]
966
2017-04-18T04:14:04.000Z
2022-03-03T21:22:44.000Z
clif/testing/python/non_raising_test.py
wangxf123456/clif
9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1
[ "Apache-2.0" ]
48
2017-05-02T23:51:29.000Z
2021-12-06T19:10:11.000Z
clif/testing/python/non_raising_test.py
wangxf123456/clif
9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1
[ "Apache-2.0" ]
135
2017-04-26T06:15:30.000Z
2022-01-07T02:17:20.000Z
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
28.787879
74
0.753684
from absl.testing import absltest from clif.testing.python import non_raising class NonRaisingTest(absltest.TestCase): def testPlain(self): num = non_raising.MakeTestNonRaisingPlain() self.assertEqual(num, 1) def testMarked(self): num = non_raising.MakeTestNonRaisingMarked() self....
true
true
f71ad1078d00053f655a55288594e5cc3c29cabe
6,120
py
Python
custom_components/pandora_cas/binary_sensor.py
alryaz/hass-pandora-cas
684e9d5e95c89fcf5ac9ede75df3e18c05c03452
[ "MIT" ]
15
2020-09-15T01:05:05.000Z
2022-03-15T11:18:07.000Z
custom_components/pandora_cas/binary_sensor.py
alryaz/hass-pandora-cas
684e9d5e95c89fcf5ac9ede75df3e18c05c03452
[ "MIT" ]
12
2020-09-13T13:22:27.000Z
2022-03-15T12:03:45.000Z
custom_components/pandora_cas/binary_sensor.py
alryaz/hass-pandora-cas
684e9d5e95c89fcf5ac9ede75df3e18c05c03452
[ "MIT" ]
2
2021-06-03T16:32:22.000Z
2021-10-01T20:53:50.000Z
"""Binary sensor platform for Pandora Car Alarm System.""" __all__ = ["ENTITY_TYPES", "async_setup_entry"] import logging from functools import partial from typing import Any, Dict import attr from homeassistant.components.binary_sensor import ( DEVICE_CLASS_CONNECTIVITY, DEVICE_CLASS_DOOR, DEVICE_CLASS_M...
31.709845
87
0.662745
__all__ = ["ENTITY_TYPES", "async_setup_entry"] import logging from functools import partial from typing import Any, Dict import attr from homeassistant.components.binary_sensor import ( DEVICE_CLASS_CONNECTIVITY, DEVICE_CLASS_DOOR, DEVICE_CLASS_MOTION, DOMAIN as PLATFORM_DOMAIN, BinarySensorEntit...
true
true
f71ad2d57334e5b52814c0e8d8c40e1550a4d52b
1,141
py
Python
assignment_seven_2021_09_14/cycle_sort.py
Soyvolon/CISS_380
81ba41ef45ba8f4a4cfc55f9e20b87c5feddba08
[ "Unlicense" ]
null
null
null
assignment_seven_2021_09_14/cycle_sort.py
Soyvolon/CISS_380
81ba41ef45ba8f4a4cfc55f9e20b87c5feddba08
[ "Unlicense" ]
null
null
null
assignment_seven_2021_09_14/cycle_sort.py
Soyvolon/CISS_380
81ba41ef45ba8f4a4cfc55f9e20b87c5feddba08
[ "Unlicense" ]
null
null
null
def cycle_sort(data: list): cap = len(data) for start in range(0, cap - 1): # get item item = data[start] # get new pos for said item pos = start for i in range(start + 1, cap): if data[i] < item: pos += 1 # if there isnt a new pos, ski...
31.694444
62
0.473269
def cycle_sort(data: list): cap = len(data) for start in range(0, cap - 1): item = data[start] pos = start for i in range(start + 1, cap): if data[i] < item: pos += 1 if start == pos: continue # skip past ...
true
true
f71ad48e5cbbd6870f5adadbf55d52267e89621a
5,044
py
Python
options.py
Kunalmighty/BlueJaysGame
76936cea8a57542bf7ea3d546f851f9f9771931f
[ "MIT" ]
null
null
null
options.py
Kunalmighty/BlueJaysGame
76936cea8a57542bf7ea3d546f851f9f9771931f
[ "MIT" ]
null
null
null
options.py
Kunalmighty/BlueJaysGame
76936cea8a57542bf7ea3d546f851f9f9771931f
[ "MIT" ]
null
null
null
""" #EmbraceTheS's options menu state. """ import state import menu import globes import pygame import joystick import volume class Options(state.State): """ Option menu state with the options to clear high scores, and adjust brightness/volume (not yet implemented) """ TEXT = [] BACKGROUND = Non...
45.035714
79
0.490682
import state import menu import globes import pygame import joystick import volume class Options(state.State): TEXT = [] BACKGROUND = None LEFT_MARGIN = None HEIGHTS = None def __init__(self, sound=False, option=0): state.State.__init__(self) if not sound: globes.pla...
true
true
f71ad5d930f9670c92bb44ed061e73d50e006900
1,532
py
Python
tests/functional/test_lock.py
box/etcdb
0f27846a0ca13efff9750b97a38939f66172debc
[ "Apache-2.0" ]
12
2016-10-25T18:03:49.000Z
2019-06-27T13:20:22.000Z
tests/functional/test_lock.py
box/etcdb
0f27846a0ca13efff9750b97a38939f66172debc
[ "Apache-2.0" ]
30
2016-10-20T23:27:09.000Z
2018-12-06T17:23:59.000Z
tests/functional/test_lock.py
box/etcdb
0f27846a0ca13efff9750b97a38939f66172debc
[ "Apache-2.0" ]
4
2016-10-20T23:24:48.000Z
2022-03-01T09:59:29.000Z
import pytest from etcdb import OperationalError from etcdb.lock import Lock, ReadLock, WriteLock def test_readers(etcdb_connection): cur = etcdb_connection.cursor() cur.execute('CREATE TABLE bar(id int not null PRIMARY KEY)') lock = ReadLock(etcdb_connection.client, 'foo', 'bar') lock.acquire(ttl=0)...
30.039216
64
0.679504
import pytest from etcdb import OperationalError from etcdb.lock import Lock, ReadLock, WriteLock def test_readers(etcdb_connection): cur = etcdb_connection.cursor() cur.execute('CREATE TABLE bar(id int not null PRIMARY KEY)') lock = ReadLock(etcdb_connection.client, 'foo', 'bar') lock.acquire(ttl=0)...
true
true
f71ad6efb1b2752e5513922cac67d1c668226597
6,403
py
Python
django_mako_plus/uid.py
knowsuchagency/django-mako-plus
e737be6a2db6e9e897cc804c660494415c4ea180
[ "Apache-2.0" ]
null
null
null
django_mako_plus/uid.py
knowsuchagency/django-mako-plus
e737be6a2db6e9e897cc804c660494415c4ea180
[ "Apache-2.0" ]
null
null
null
django_mako_plus/uid.py
knowsuchagency/django-mako-plus
e737be6a2db6e9e897cc804c660494415c4ea180
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ''' Created by Conan Albrecht <doconix@gmail.com> Apache open source license. November, 2017 ''' ################################################## ### Unique id generator. Similar to uuid1() but ### also includes the process id. ### ### Note that upping the counter requires a global lock. #...
25.109804
144
0.558176
true
true
f71ad714eec52284cdcd59b0da289a9e2213538e
646
py
Python
data_source.py
ReimuYk/aws-line-counter
ce6131b8a2f3c9b9e70b8496e3f9ce1cfdd64804
[ "MIT" ]
null
null
null
data_source.py
ReimuYk/aws-line-counter
ce6131b8a2f3c9b9e70b8496e3f9ce1cfdd64804
[ "MIT" ]
null
null
null
data_source.py
ReimuYk/aws-line-counter
ce6131b8a2f3c9b9e70b8496e3f9ce1cfdd64804
[ "MIT" ]
null
null
null
import requests import os import time def get_page(i): url = r'https://shr32taah3.execute-api.us-east-1.amazonaws.com/Prod/applications/browse?pageSize=12&pageNumber=%d&searchText=&category=&runtime=&verified=&sortFields=' page = requests.get(url%i) return eval(page.text.replace("true", "True").replace("fa...
32.3
171
0.645511
import requests import os import time def get_page(i): url = r'https://shr32taah3.execute-api.us-east-1.amazonaws.com/Prod/applications/browse?pageSize=12&pageNumber=%d&searchText=&category=&runtime=&verified=&sortFields=' page = requests.get(url%i) return eval(page.text.replace("true", "True").replace("fa...
true
true
f71ad7b7135ea8f54cdfded058aa8b21c4b24595
762
py
Python
learntools/core/multiproblem.py
bkmalayC/learntools
c739a1ee131caebcb9bbd8b138d51cff75152f3a
[ "Apache-2.0" ]
1
2020-06-24T18:25:31.000Z
2020-06-24T18:25:31.000Z
learntools/core/multiproblem.py
bkmalayC/learntools
c739a1ee131caebcb9bbd8b138d51cff75152f3a
[ "Apache-2.0" ]
null
null
null
learntools/core/multiproblem.py
bkmalayC/learntools
c739a1ee131caebcb9bbd8b138d51cff75152f3a
[ "Apache-2.0" ]
null
null
null
class MultipartProblem: """A container for multiple related Problems grouped together in one question. If q1 is a MPP, its subquestions are accessed as q1.a, q1.b, etc. """ def __init__(self, *probs): self.problems = probs # TODO: This should be ordered. self._prob_map = {}...
34.636364
85
0.616798
class MultipartProblem: def __init__(self, *probs): self.problems = probs self._prob_map = {} def _repr_markdown_(self): return repr(self) def __repr__(self): varname = self._varname part_names = ['`{}.{}`'.format(varname, letter) for letter in self._p...
true
true
f71ad7f78f34b02d7d0b0895dc72b58d6a84bcbe
1,775
py
Python
{{cookiecutter.repo_name}}/python/{{cookiecutter.package_name}}/api/__init__.py
havok2063/cookiecutter-marvin
3e64169b865012c5a6099e71a91789770222e5b5
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.repo_name}}/python/{{cookiecutter.package_name}}/api/__init__.py
havok2063/cookiecutter-marvin
3e64169b865012c5a6099e71a91789770222e5b5
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.repo_name}}/python/{{cookiecutter.package_name}}/api/__init__.py
havok2063/cookiecutter-marvin
3e64169b865012c5a6099e71a91789770222e5b5
[ "BSD-3-Clause" ]
null
null
null
# !usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under a 3-clause BSD license. # from __future__ import print_function, division, absolute_import from flask import request def process_request(request=None, as_dict=None, param=None): '''Generally process the request for POST or GET, and build a form dic...
30.603448
98
0.579155
from __future__ import print_function, division, absolute_import from flask import request def process_request(request=None, as_dict=None, param=None): if request.method == 'POST': if not request.form: data = request.get_json() else: da...
true
true
f71ad891414e822ed9504c04e3c021fb01b0b6e5
13,313
py
Python
negative_inline_editor/templatetags/negative_inline_edit.py
negative-space/negative-inline-editor
dde28b9ada65b81cb996bb9197826df45b67c48b
[ "MIT" ]
null
null
null
negative_inline_editor/templatetags/negative_inline_edit.py
negative-space/negative-inline-editor
dde28b9ada65b81cb996bb9197826df45b67c48b
[ "MIT" ]
null
null
null
negative_inline_editor/templatetags/negative_inline_edit.py
negative-space/negative-inline-editor
dde28b9ada65b81cb996bb9197826df45b67c48b
[ "MIT" ]
null
null
null
import os import re from django import template from django.conf import settings from django.contrib import admin from django.contrib.contenttypes.models import ContentType from django.core.exceptions import MultipleObjectsReturned from django.urls import reverse from django.db.models import Model from django.template...
32.234867
189
0.621948
import os import re from django import template from django.conf import settings from django.contrib import admin from django.contrib.contenttypes.models import ContentType from django.core.exceptions import MultipleObjectsReturned from django.urls import reverse from django.db.models import Model from django.template...
true
true
f71ad930fc472c80200a4a8c8b4190aa61e62059
675
py
Python
components/app/App_tpl.py
bitbuit/billterm
553bf2afb6ff2c1e15becbe1b4ab59346e5a87b5
[ "MIT" ]
null
null
null
components/app/App_tpl.py
bitbuit/billterm
553bf2afb6ff2c1e15becbe1b4ab59346e5a87b5
[ "MIT" ]
null
null
null
components/app/App_tpl.py
bitbuit/billterm
553bf2afb6ff2c1e15becbe1b4ab59346e5a87b5
[ "MIT" ]
null
null
null
from libs.Screen import * class App_tpl(object): @staticmethod def hello(): print(" _ _ _ _ _ ") print(" | |__(_) | | |_ ___ _ _ _ __ ") print(" | '_ \ | | | _/ -_) '_| ' \ ") print("__|_.__/_|_|_|\__\___|_| |_|_|_|_...
30.681818
109
0.459259
from libs.Screen import * class App_tpl(object): @staticmethod def hello(): print(" _ _ _ _ _ ") print(" | |__(_) | | |_ ___ _ _ _ __ ") print(" | '_ \ | | | _/ -_) '_| ' \ ") print("__|_.__/_|_|_|\__\___|_| |_|_|_|_...
true
true
f71adab4390632d131f94912e04795cf9ddfadd8
408
py
Python
tbx/people/migrations/0009_personpage_alt_short_intro.py
arush15june/wagtail-torchbox
c4d06e096c72bd8007975dc016133024f9d27fab
[ "MIT" ]
null
null
null
tbx/people/migrations/0009_personpage_alt_short_intro.py
arush15june/wagtail-torchbox
c4d06e096c72bd8007975dc016133024f9d27fab
[ "MIT" ]
null
null
null
tbx/people/migrations/0009_personpage_alt_short_intro.py
arush15june/wagtail-torchbox
c4d06e096c72bd8007975dc016133024f9d27fab
[ "MIT" ]
null
null
null
# Generated by Django 2.1.5 on 2019-02-16 07:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('people', '0008_personpage_short_intro'), ] operations = [ migrations.AddField( model_name='personpage', name='alt_sh...
21.473684
58
0.612745
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('people', '0008_personpage_short_intro'), ] operations = [ migrations.AddField( model_name='personpage', name='alt_short_intro', field=models.TextField(...
true
true
f71adb37c06a58da63ac0e0d5a07fe9ff030a284
2,941
py
Python
southwest-headers.py
WGriffing/southwest-headers
0dd4ac4e2ea50872638499b5b14673aa4b5fa60b
[ "MIT" ]
12
2021-12-09T16:04:52.000Z
2022-03-25T01:03:58.000Z
southwest-headers.py
WGriffing/southwest-headers
0dd4ac4e2ea50872638499b5b14673aa4b5fa60b
[ "MIT" ]
3
2021-12-13T00:04:53.000Z
2022-01-02T06:37:13.000Z
southwest-headers.py
WGriffing/southwest-headers
0dd4ac4e2ea50872638499b5b14673aa4b5fa60b
[ "MIT" ]
2
2021-12-20T16:36:41.000Z
2021-12-28T06:51:17.000Z
# this code is based on original work by @jasonwbarnett. # https://github.com/pyro2927/SouthwestCheckin/issues/70#issuecomment-921166994 import json import time import re import os import random import string import sys from pathlib import Path from seleniumwire import webdriver from selenium.webdriver.chrome.options ...
43.895522
177
0.782387
me import re import os import random import string import sys from pathlib import Path from seleniumwire import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expe...
true
true
f71adbc103a2cba26d96345692d6ef2e185b7c56
5,133
py
Python
part_14/setfirmware.py
zcutlip/broken_abandoned
76f2f8577de3c1a570e28f081349e6f22fb33a34
[ "MIT" ]
28
2015-05-02T22:19:26.000Z
2021-04-26T20:01:00.000Z
part_14/setfirmware.py
zcutlip/broken_abandoned
76f2f8577de3c1a570e28f081349e6f22fb33a34
[ "MIT" ]
null
null
null
part_14/setfirmware.py
zcutlip/broken_abandoned
76f2f8577de3c1a570e28f081349e6f22fb33a34
[ "MIT" ]
6
2015-11-03T08:12:43.000Z
2018-08-19T21:48:18.000Z
#!/usr/bin/env python # Copyright (c) 2015 # - Zachary Cutlip <uid000()gmail.com> # # See LICENSE for more details. # import sys import socket import time import base64 from bowcaster.common import Logging HOST="10.12.34.1" #HOST="192.168.127.141" class SetFirmwareRequest(object): """ Generate a "SetFir...
32.903846
90
0.633742
import sys import socket import time import base64 from bowcaster.common import Logging HOST="10.12.34.1" class SetFirmwareRequest(object): MIN_CONTENT_LENGTH=102401 def __init__(self,firmware_file=None,logger=None): b64encode=True if not logger: logger=Logging(max_level...
true
true
f71adbd3d7f37d3e3cf4898f63bddfd194187306
4,593
py
Python
DQMOffline/L1Trigger/test/runDQMOffline_step1_L1TStage2CaloLayer2_cfg.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
1
2019-08-09T08:42:11.000Z
2019-08-09T08:42:11.000Z
DQMOffline/L1Trigger/test/runDQMOffline_step1_L1TStage2CaloLayer2_cfg.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
DQMOffline/L1Trigger/test/runDQMOffline_step1_L1TStage2CaloLayer2_cfg.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
1
2019-04-03T19:23:27.000Z
2019-04-03T19:23:27.000Z
import os import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing from Configuration.StandardSequences.Eras import eras def get_root_files(path): files = os.listdir(path) root_files = [f for f in files if f.endswith(".root")] full_paths = [os.path.join(path, f) for f...
32.34507
119
0.775963
import os import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing from Configuration.StandardSequences.Eras import eras def get_root_files(path): files = os.listdir(path) root_files = [f for f in files if f.endswith(".root")] full_paths = [os.path.join(path, f) for f...
true
true
f71ade1259b4cf0d7e2485e0b9af1fdc780966f1
4,862
py
Python
tests/core/test_tracker_stores.py
vinit134/rasa
58c122fbf459c587fd947d48af5c76ae30bf39be
[ "Apache-2.0" ]
3
2020-02-04T08:44:02.000Z
2021-05-25T19:46:55.000Z
tests/core/test_tracker_stores.py
vinit134/rasa
58c122fbf459c587fd947d48af5c76ae30bf39be
[ "Apache-2.0" ]
21
2019-12-16T17:37:54.000Z
2020-07-06T06:19:04.000Z
tests/core/test_tracker_stores.py
zijiannc/RASA_NLU
4ffafb62b7414cabae07149533e01afe5fc26c14
[ "Apache-2.0" ]
1
2021-03-08T15:04:09.000Z
2021-03-08T15:04:09.000Z
import pytest from rasa.core.channels.channel import UserMessage from rasa.core.domain import Domain from rasa.core.events import SlotSet, ActionExecuted, Restarted from rasa.core.tracker_store import ( TrackerStore, InMemoryTrackerStore, RedisTrackerStore, SQLTrackerStore, ) from rasa.utils.endpoints ...
29.646341
88
0.719663
import pytest from rasa.core.channels.channel import UserMessage from rasa.core.domain import Domain from rasa.core.events import SlotSet, ActionExecuted, Restarted from rasa.core.tracker_store import ( TrackerStore, InMemoryTrackerStore, RedisTrackerStore, SQLTrackerStore, ) from rasa.utils.endpoints ...
true
true
f71adf5f0868af6fbec61be245b281682e33dcf5
3,884
py
Python
configs/top_down/resnext/coco/resnext101_coco_256x192.py
ssumin6/buob
4fb4537423a993cd2894f54cb12f5f3b3fb73141
[ "Apache-2.0" ]
5
2022-01-13T15:06:45.000Z
2022-01-28T19:39:54.000Z
configs/top_down/resnext/coco/resnext101_coco_256x192.py
ssumin6/buob
4fb4537423a993cd2894f54cb12f5f3b3fb73141
[ "Apache-2.0" ]
null
null
null
configs/top_down/resnext/coco/resnext101_coco_256x192.py
ssumin6/buob
4fb4537423a993cd2894f54cb12f5f3b3fb73141
[ "Apache-2.0" ]
1
2021-06-17T13:56:23.000Z
2021-06-17T13:56:23.000Z
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) # learning...
27.742857
79
0.627703
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) lr_config...
true
true
f71adf69a610b566f88a21e94d9a8d804f8523db
7,872
py
Python
sdk/ml/azure-ai-ml/azure/ai/ml/entities/_assets/_artifacts/model.py
dubiety/azure-sdk-for-python
62ffa839f5d753594cf0fe63668f454a9d87a346
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/ml/azure-ai-ml/azure/ai/ml/entities/_assets/_artifacts/model.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
sdk/ml/azure-ai-ml/azure/ai/ml/entities/_assets/_artifacts/model.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- from os import PathLike from pathlib import Path from typing import Any, Dict, Union from azure.ai.ml.constants import BASE_PATH_CONTEXT_KE...
38.778325
144
0.650788
from os import PathLike from pathlib import Path from typing import Any, Dict, Union from azure.ai.ml.constants import BASE_PATH_CONTEXT_KEY, PARAMS_OVERRIDE_KEY, ArmConstants, LONG_URI_FORMAT, AssetTypes from azure.ai.ml._restclient.v2022_05_01.models import ( ModelContainerData, ModelVersionDetails, M...
true
true
f71adf72ecef2e4ad8d1dacf64125bbdfd663a2d
3,023
py
Python
pixelsort/argparams.py
jackylu97/pixelsort
24e36518f21636c201ad8624c831e08462a25414
[ "MIT" ]
570
2015-03-01T16:16:42.000Z
2022-03-28T23:12:11.000Z
pixelsort/argparams.py
ebanaut/pixelsort
c4a823c8363e27fb0aebd4f8738ee82dc636f6a8
[ "MIT" ]
20
2016-03-25T16:28:16.000Z
2021-11-11T21:39:28.000Z
pixelsort/argparams.py
ebanaut/pixelsort
c4a823c8363e27fb0aebd4f8738ee82dc636f6a8
[ "MIT" ]
79
2015-03-16T20:14:22.000Z
2022-02-01T17:05:02.000Z
import argparse import logging from pixelsort.interval import choices as interval_choices from pixelsort.sorting import choices as sorting_choices from pixelsort.constants import DEFAULTS def parse_args(): parser = argparse.ArgumentParser(description="Pixel mangle an image.") parser.add_argument("image", help...
33.966292
74
0.585511
import argparse import logging from pixelsort.interval import choices as interval_choices from pixelsort.sorting import choices as sorting_choices from pixelsort.constants import DEFAULTS def parse_args(): parser = argparse.ArgumentParser(description="Pixel mangle an image.") parser.add_argument("image", help...
true
true
f71ae016370c3402b30ac0827d01b9242344e952
1,491
py
Python
example/blog/admin2.py
montiniz/django-admin2
eb3ba7e98a68686f80af80c5c3b8c9c10296fe7a
[ "BSD-3-Clause" ]
1
2015-01-16T23:00:09.000Z
2015-01-16T23:00:09.000Z
example/blog/admin2.py
montiniz/django-admin2
eb3ba7e98a68686f80af80c5c3b8c9c10296fe7a
[ "BSD-3-Clause" ]
null
null
null
example/blog/admin2.py
montiniz/django-admin2
eb3ba7e98a68686f80af80c5c3b8c9c10296fe7a
[ "BSD-3-Clause" ]
1
2017-01-18T08:27:21.000Z
2017-01-18T08:27:21.000Z
# -*- coding: utf-8 -*- from __future__ import division, absolute_import, unicode_literals from django.utils.translation import ugettext_lazy import djadmin2 from djadmin2 import renderers from djadmin2.actions import DeleteSelectedAction # Import your custom models from .actions import (CustomPublishAction, Publish...
27.611111
68
0.729041
from __future__ import division, absolute_import, unicode_literals from django.utils.translation import ugettext_lazy import djadmin2 from djadmin2 import renderers from djadmin2.actions import DeleteSelectedAction from .actions import (CustomPublishAction, PublishAllItemsAction, unpublish_it...
true
true
f71ae15d38428c33a761ff30c5fe22e701f6415c
28,827
py
Python
electrum/lnsweep.py
roth-a/electrum
b6a5f6f2fc11b94bc863d2ccd43f166091badda9
[ "MIT" ]
null
null
null
electrum/lnsweep.py
roth-a/electrum
b6a5f6f2fc11b94bc863d2ccd43f166091badda9
[ "MIT" ]
1
2020-01-31T17:11:07.000Z
2020-01-31T17:11:07.000Z
electrum/lnsweep.py
roth-a/electrum
b6a5f6f2fc11b94bc863d2ccd43f166091badda9
[ "MIT" ]
null
null
null
# Copyright (C) 2018 The Electrum developers # Distributed under the MIT software license, see the accompanying # file LICENCE or http://www.opensource.org/licenses/mit-license.php from typing import Optional, Dict, List, Tuple, TYPE_CHECKING, NamedTuple, Callable from enum import Enum, auto from .util import bfh, bh...
52.034296
132
0.648073
from typing import Optional, Dict, List, Tuple, TYPE_CHECKING, NamedTuple, Callable from enum import Enum, auto from .util import bfh, bh2u from .bitcoin import redeem_script_to_address, dust_threshold from . import ecc from .lnutil import (make_commitment_output_to_remote_address, make_commitment_output_to_local_...
true
true
f71ae1ea2aec311b4f7e6cd58d35f326af88dcb8
892
py
Python
python/projeto02/meusite/urls.py
WilliamDeveloper/udemy_cursos
f592bafbe3d2a5d631458f8c42151c880aadef17
[ "MIT" ]
null
null
null
python/projeto02/meusite/urls.py
WilliamDeveloper/udemy_cursos
f592bafbe3d2a5d631458f8c42151c880aadef17
[ "MIT" ]
null
null
null
python/projeto02/meusite/urls.py
WilliamDeveloper/udemy_cursos
f592bafbe3d2a5d631458f8c42151c880aadef17
[ "MIT" ]
null
null
null
"""meusite 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') Class-based...
34.307692
77
0.693946
from django.contrib import admin from django.urls import path, include from home import views urlpatterns = [ path('', views.index), path('admin/', admin.site.urls), path('blog/', include('blog.urls')), path('sobre/', include('sobre.urls')), ]
true
true
f71ae28487a6c137bf0a9c98196c4d1383a39139
489
py
Python
nnwordembed.py
GLaDO8/pytorch_playground
3623de18881a37ce413c92d8a63ea9ba1cc401a5
[ "MIT" ]
2
2019-02-06T18:07:47.000Z
2020-08-12T21:56:50.000Z
nnwordembed.py
GLaDO8/pytorch_playground
3623de18881a37ce413c92d8a63ea9ba1cc401a5
[ "MIT" ]
null
null
null
nnwordembed.py
GLaDO8/pytorch_playground
3623de18881a37ce413c92d8a63ea9ba1cc401a5
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim torch.manual_seed(1) word_to_ix = {"hello": 0, "world": 1} #first argument is the size of the embedded matrix. The second argument is the dimension of each word embedding. embeds = nn.Embedding(2, 5) # 2 words in vocab, 5...
37.615385
113
0.766871
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim torch.manual_seed(1) word_to_ix = {"hello": 0, "world": 1} embeds = nn.Embedding(2, 5) lookup_tensor = torch.tensor([word_to_ix["hello"], word_to_ix["world"]], dtype=torch.long) hello_embed = embeds(lookup_tensor) print(...
true
true
f71ae39173f45a9863447511633a81e7b7687552
1,529
py
Python
Admin-Scripts/Video2.py
vijayshankarrealdeal/Java
2dff1a79c91782bf2aeb1bee057b19c41cafd2a1
[ "MIT" ]
3
2021-03-07T16:29:35.000Z
2021-03-22T07:41:04.000Z
Admin-Scripts/Video2.py
vijayshankarrealdeal/Java
2dff1a79c91782bf2aeb1bee057b19c41cafd2a1
[ "MIT" ]
null
null
null
Admin-Scripts/Video2.py
vijayshankarrealdeal/Java
2dff1a79c91782bf2aeb1bee057b19c41cafd2a1
[ "MIT" ]
2
2021-03-08T06:12:52.000Z
2021-03-14T05:01:19.000Z
import firebase_admin from firebase_admin import credentials,firestore from firebase_admin import storage cred = credentials.Certificate("./adminKey.json") firebase_admin.initialize_app(cred, { 'storageBucket': 'women-e598c.appspot.com' }) #Database Methods db = firestore.client() #discrip = "" title = "GenderEq...
40.236842
264
0.737083
import firebase_admin from firebase_admin import credentials,firestore from firebase_admin import storage cred = credentials.Certificate("./adminKey.json") firebase_admin.initialize_app(cred, { 'storageBucket': 'women-e598c.appspot.com' }) db = firestore.client() title = "GenderEquality" cloudStorageLink = "ht...
true
true
f71ae3b9a7a99ffd6aec250a1fe54db87c9201ae
15,356
py
Python
src/python/analyzer_executor/src/analyzer_executor_lib/analyzer_executor.py
inickles/grapl
f906aba74b2249c9c7d7b1afe6fc540551cdee8b
[ "Apache-2.0" ]
313
2018-10-15T05:58:39.000Z
2020-04-21T20:31:39.000Z
src/python/analyzer_executor/src/analyzer_executor_lib/analyzer_executor.py
graplsec/grapl
68386b425c8e9e34f7380a078279b67b316fe2a0
[ "Apache-2.0" ]
33
2018-10-16T00:47:10.000Z
2020-03-16T22:32:45.000Z
src/python/analyzer_executor/src/analyzer_executor_lib/analyzer_executor.py
graplsec/grapl
68386b425c8e9e34f7380a078279b67b316fe2a0
[ "Apache-2.0" ]
29
2018-11-18T08:39:14.000Z
2020-04-09T20:59:15.000Z
from __future__ import annotations import base64 import hashlib import inspect import json import os import sys import traceback from collections import defaultdict from logging import Logger from multiprocessing import Pipe, Process from multiprocessing.connection import Connection from multiprocessing.pool import Th...
34.276786
93
0.604259
from __future__ import annotations import base64 import hashlib import inspect import json import os import sys import traceback from collections import defaultdict from logging import Logger from multiprocessing import Pipe, Process from multiprocessing.connection import Connection from multiprocessing.pool import Th...
true
true
f71ae3c9f30e5074c6179b84ba1638c42566b5fa
6,730
py
Python
randomdest.py
gbowerman/random-destination
88f6a6a6e6cf971cb9d4bea477b093a4b0eef84e
[ "MIT" ]
null
null
null
randomdest.py
gbowerman/random-destination
88f6a6a6e6cf971cb9d4bea477b093a4b0eef84e
[ "MIT" ]
null
null
null
randomdest.py
gbowerman/random-destination
88f6a6a6e6cf971cb9d4bea477b093a4b0eef84e
[ "MIT" ]
null
null
null
"""randomdest.py - dearpygui app to plot random destinations""" import math import os import random import requests from dotenv import load_dotenv from dearpygui.core import * from dearpygui.simple import * # globals/constants EARTH_RADIUS = 6378.1 MAX_DIST = 16 # destination radius in KM maps_key = "" BASE_URL = "...
32.990196
188
0.673254
import math import os import random import requests from dotenv import load_dotenv from dearpygui.core import * from dearpygui.simple import * EARTH_RADIUS = 6378.1 MAX_DIST = 16 maps_key = "" BASE_URL = "https://dev.virtualearth.net/REST/v1/Imagery/Map/AerialWithLabels/" zoom = "18" distance = MAX_DIST img_size_...
true
true
f71ae3f98733e595da1ffdd6566812f756e6d03b
3,576
py
Python
metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_schema_tags.py
ShubhamThakre/datahub
08a5fcfd017d4a2903a7b637f1e2129b9d7793ea
[ "Apache-2.0" ]
1,603
2016-03-03T17:21:03.000Z
2020-01-22T22:12:02.000Z
metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_schema_tags.py
ShubhamThakre/datahub
08a5fcfd017d4a2903a7b637f1e2129b9d7793ea
[ "Apache-2.0" ]
1,157
2016-03-03T19:29:22.000Z
2020-01-20T14:41:59.000Z
metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_schema_tags.py
ShubhamThakre/datahub
08a5fcfd017d4a2903a7b637f1e2129b9d7793ea
[ "Apache-2.0" ]
570
2016-03-03T17:21:05.000Z
2020-01-21T06:54:10.000Z
from typing import Callable, List, Optional, Union import datahub.emitter.mce_builder as builder from datahub.configuration.common import ConfigModel, KeyValuePattern from datahub.configuration.import_resolver import pydantic_resolve_key from datahub.ingestion.api.common import PipelineContext from datahub.ingestion.t...
33.735849
108
0.699105
from typing import Callable, List, Optional, Union import datahub.emitter.mce_builder as builder from datahub.configuration.common import ConfigModel, KeyValuePattern from datahub.configuration.import_resolver import pydantic_resolve_key from datahub.ingestion.api.common import PipelineContext from datahub.ingestion.t...
true
true
f71ae4f35d601be11c164199f86811680f877aef
8,965
py
Python
teambition/api/works.py
jxtech/teambition-api
a15b845fa029d56c084fe134bd082ee8ba25d534
[ "MIT" ]
47
2015-06-18T15:26:39.000Z
2022-02-22T08:01:58.000Z
teambition/api/works.py
messense/teambition-api
a15b845fa029d56c084fe134bd082ee8ba25d534
[ "MIT" ]
5
2015-07-07T11:09:36.000Z
2020-02-17T08:38:22.000Z
teambition/api/works.py
jxtech/teambition-api
a15b845fa029d56c084fe134bd082ee8ba25d534
[ "MIT" ]
13
2015-06-18T10:07:04.000Z
2021-09-22T03:36:05.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from optionaldict import optionaldict from teambition.api.base import TeambitionAPI class Works(TeambitionAPI): def get(self, id=None, parent_id=None, page=None, count=None, all=None): """ 获取文件信息 详情请参考 ...
25.112045
79
0.530508
from __future__ import absolute_import, unicode_literals from optionaldict import optionaldict from teambition.api.base import TeambitionAPI class Works(TeambitionAPI): def get(self, id=None, parent_id=None, page=None, count=None, all=None): assert id or parent_id params = optionaldict( ...
true
true
f71ae8cf1533e7bd8ad8fa5b8cf9a24021f79424
623
py
Python
example/your_app/app.py
keyloguer/flask_middleware
38d01d7f87484f85aaeb7bb6deaa0f1055497c1a
[ "Apache-2.0" ]
21
2019-10-09T18:50:57.000Z
2020-10-14T20:49:57.000Z
example/your_app/app.py
keyloguer/flask_middleware
38d01d7f87484f85aaeb7bb6deaa0f1055497c1a
[ "Apache-2.0" ]
null
null
null
example/your_app/app.py
keyloguer/flask_middleware
38d01d7f87484f85aaeb7bb6deaa0f1055497c1a
[ "Apache-2.0" ]
null
null
null
from flask import Flask from flask_middleware_jwt import Middleware, middleware_jwt_required app = Flask(__name__) app.config['MIDDLEWARE_URL_IDENTITY'] = 'http://0.0.0.0:5000' app.config['MIDDLEWARE_VERIFY_ENDPOINT'] = '/token/verify' app.config['MIDDLEWARE_BEARER'] = True app.config['MIDDLEWARE_VERIF...
28.318182
68
0.693419
from flask import Flask from flask_middleware_jwt import Middleware, middleware_jwt_required app = Flask(__name__) app.config['MIDDLEWARE_URL_IDENTITY'] = 'http://0.0.0.0:5000' app.config['MIDDLEWARE_VERIFY_ENDPOINT'] = '/token/verify' app.config['MIDDLEWARE_BEARER'] = True app.config['MIDDLEWARE_VERIF...
true
true
f71ae8eb0aa5e13e7033134268ddae1c0ba1dd97
6,344
py
Python
modules/pulse/pulse_sim.py
timsnow/PandABlocks-FPGA
7df03a7a4415c5c9e02c80dc80c3d377ab480e5c
[ "Apache-2.0" ]
null
null
null
modules/pulse/pulse_sim.py
timsnow/PandABlocks-FPGA
7df03a7a4415c5c9e02c80dc80c3d377ab480e5c
[ "Apache-2.0" ]
null
null
null
modules/pulse/pulse_sim.py
timsnow/PandABlocks-FPGA
7df03a7a4415c5c9e02c80dc80c3d377ab480e5c
[ "Apache-2.0" ]
null
null
null
from common.python.simulations import BlockSimulation, properties_from_ini from collections import deque # max queue size MAX_QUEUE = 1023 # min FPGA deadtime between queued pulses MIN_QUEUE_DELTA = 4 # time taken to clear queue QUEUE_CLEAR_TIME = 4 NAMES, PROPERTIES = properties_from_ini(__file__, "pulse.block.in...
36.45977
79
0.565889
from common.python.simulations import BlockSimulation, properties_from_ini from collections import deque MAX_QUEUE = 1023 MIN_QUEUE_DELTA = 4 QUEUE_CLEAR_TIME = 4 NAMES, PROPERTIES = properties_from_ini(__file__, "pulse.block.ini") class PulseSimulation(BlockSimulation): ENABLE, TRIG, DELAY_L, DELAY_H, WI...
true
true
f71ae95e60037316cd6d37acc29a87db6cdf90d0
25,177
py
Python
Lib/fontTools/ttLib/tables/E_B_L_C_.py
ViktorRubenko/fonttools
522c32547c569d655feafd475987284bc0dabed1
[ "MIT", "BSD-3-Clause" ]
1
2020-05-07T16:29:02.000Z
2020-05-07T16:29:02.000Z
Lib/fontTools/ttLib/tables/E_B_L_C_.py
ViktorRubenko/fonttools
522c32547c569d655feafd475987284bc0dabed1
[ "MIT", "BSD-3-Clause" ]
null
null
null
Lib/fontTools/ttLib/tables/E_B_L_C_.py
ViktorRubenko/fonttools
522c32547c569d655feafd475987284bc0dabed1
[ "MIT", "BSD-3-Clause" ]
null
null
null
from fontTools.misc.py23 import * from fontTools.misc import sstruct from . import DefaultTable from fontTools.misc.textTools import safeEval from .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsFormat import struct import itertools from collections import deque im...
40.154705
139
0.743059
from fontTools.misc.py23 import * from fontTools.misc import sstruct from . import DefaultTable from fontTools.misc.textTools import safeEval from .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsFormat import struct import itertools from collections import deque im...
true
true
f71ae98a1105d01fa234bdf25931e02f5302919f
1,327
py
Python
interface/gaussian.py
R-Laurent/detection
66823e8664b66caadef2ee35ee197fd9a5066f56
[ "MIT" ]
null
null
null
interface/gaussian.py
R-Laurent/detection
66823e8664b66caadef2ee35ee197fd9a5066f56
[ "MIT" ]
null
null
null
interface/gaussian.py
R-Laurent/detection
66823e8664b66caadef2ee35ee197fd9a5066f56
[ "MIT" ]
null
null
null
def generate_gaussianFile(geom, grid, logger, outdir="./", igrid=0, maxbq=200): gaussianfile = outdir + \ "input_batch_{:05d}.com".format(igrid) f = open(gaussianfile, "w") # f.write("%OldChk=/home/aartigas/chk/molecule_spe.chk\n".format()) f.write("%nproc=8\n".format()) f.write("%mem=1000MB\...
39.029412
144
0.553881
def generate_gaussianFile(geom, grid, logger, outdir="./", igrid=0, maxbq=200): gaussianfile = outdir + \ "input_batch_{:05d}.com".format(igrid) f = open(gaussianfile, "w") f.write("%nproc=8\n".format()) f.write("%mem=1000MB\n".format()) f.write("#P b3lyp/6-311++G(d,p) SCF(Tight) CPHF(Sepa...
true
true
f71aea3701b57a737d5aa551497f3aa64313bab4
6,197
py
Python
mmdet/models/dense_heads/pisa_retinanet_head.py
zactodd/mmdetection
9596b9a4c916ae601f9a8a641c3a0ea47265abec
[ "Apache-2.0" ]
549
2020-01-02T05:14:57.000Z
2022-03-29T18:34:12.000Z
mmdet/models/dense_heads/pisa_retinanet_head.py
wondervictor/lvis-mmdet
68532eb6f4643ddf0179a4384c8c9e004a2c1d07
[ "Apache-2.0" ]
136
2021-07-11T11:26:54.000Z
2022-03-31T02:45:34.000Z
mmdet/models/dense_heads/pisa_retinanet_head.py
wondervictor/lvis-mmdet
68532eb6f4643ddf0179a4384c8c9e004a2c1d07
[ "Apache-2.0" ]
233
2020-01-18T03:46:27.000Z
2022-03-19T03:17:47.000Z
import torch from mmdet.core import force_fp32, images_to_levels from ..builder import HEADS from ..losses import carl_loss, isr_p from .retina_head import RetinaHead @HEADS.register_module() class PISARetinaHead(RetinaHead): """PISA Retinanet Head. The head owns the same structure with Retinanet Head, but ...
40.24026
79
0.598031
import torch from mmdet.core import force_fp32, images_to_levels from ..builder import HEADS from ..losses import carl_loss, isr_p from .retina_head import RetinaHead @HEADS.register_module() class PISARetinaHead(RetinaHead): @force_fp32(apply_to=('cls_scores', 'bbox_preds')) def loss(self, cls...
true
true
f71aebb3c6779bbbbac6736bbbca965e3ddbbe88
4,718
py
Python
diff_representation/model/edit_encoder/bag_of_edits_change_encoder.py
microsoft/iclr2019-learning-to-represent-edits
e5777d6aa6cdeda500cf076646177c48d1cb4622
[ "MIT" ]
8
2021-03-15T18:57:18.000Z
2021-08-23T11:28:22.000Z
diff_representation/model/edit_encoder/bag_of_edits_change_encoder.py
microsoft/iclr2019-learning-to-represent-edits
e5777d6aa6cdeda500cf076646177c48d1cb4622
[ "MIT" ]
null
null
null
diff_representation/model/edit_encoder/bag_of_edits_change_encoder.py
microsoft/iclr2019-learning-to-represent-edits
e5777d6aa6cdeda500cf076646177c48d1cb4622
[ "MIT" ]
4
2021-03-27T14:19:09.000Z
2021-09-13T12:35:31.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from itertools import chain import numpy as np import torch from torch import nn as nn from torch.autograd import Variable from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from tqdm import tqdm import sys from diff_repres...
42.504505
167
0.636922
from itertools import chain import numpy as np import torch from torch import nn as nn from torch.autograd import Variable from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from tqdm import tqdm import sys from diff_representation.change_entry import ChangeExample from diff_representation.mod...
true
true
f71aebc2afaca9f74e0aad77ccea915a36978cb2
1,995
py
Python
examples/classify_capture.py
tbeatty/edgetpu
14237f65ba07b7b1d8287e9f60dd20c88562871a
[ "Apache-2.0" ]
10
2019-04-12T08:02:12.000Z
2020-12-27T13:53:37.000Z
examples/classify_capture.py
tbeatty/edgetpu
14237f65ba07b7b1d8287e9f60dd20c88562871a
[ "Apache-2.0" ]
1
2019-04-03T12:22:55.000Z
2019-04-04T10:42:35.000Z
examples/classify_capture.py
tbeatty/edgetpu
14237f65ba07b7b1d8287e9f60dd20c88562871a
[ "Apache-2.0" ]
3
2019-04-25T13:44:36.000Z
2021-02-17T06:00:56.000Z
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.25
80
0.702757
import argparse import io import time from edgetpu.classification.engine import ClassificationEngine from edgetpu.utils import dataset_utils import numpy as np import picamera def main(): parser = argparse.ArgumentParser() parser.add_argument( '--model', help='File path of Tflite model.', req...
true
true
f71aec18d787da6ff5ca5c22add4823da1992bf0
718
py
Python
Solution/0081.Search_in_Rotated_Sorted_Array_II/0081.Search_in_Rotated_Sorted_Array_II.py
xleslie/LeetCode
0af08817b3922e1bbc558091963fd4ff65a506ea
[ "MIT" ]
null
null
null
Solution/0081.Search_in_Rotated_Sorted_Array_II/0081.Search_in_Rotated_Sorted_Array_II.py
xleslie/LeetCode
0af08817b3922e1bbc558091963fd4ff65a506ea
[ "MIT" ]
null
null
null
Solution/0081.Search_in_Rotated_Sorted_Array_II/0081.Search_in_Rotated_Sorted_Array_II.py
xleslie/LeetCode
0af08817b3922e1bbc558091963fd4ff65a506ea
[ "MIT" ]
null
null
null
class Solution: def search(self, nums: List[int], target: int) -> bool: i,j=0,len(nums) while i<j: m=i+(j-i)//2 if nums[m]==target: return True if nums[m]>nums[i]: if target>=nums[i] and target<nums[m]: j=m else:...
31.217391
59
0.367688
class Solution: def search(self, nums: List[int], target: int) -> bool: i,j=0,len(nums) while i<j: m=i+(j-i)//2 if nums[m]==target: return True if nums[m]>nums[i]: if target>=nums[i] and target<nums[m]: j=m else:...
true
true
f71aedc6bc7df22a8c1ea544a471fb0c4efcfc27
1,844
py
Python
tvm_test/run_simple_mod_op2_pth.py
junarwohn/tvm
96c2e06cd063a695b3b485f2bdf8875df55fff1a
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
tvm_test/run_simple_mod_op2_pth.py
junarwohn/tvm
96c2e06cd063a695b3b485f2bdf8875df55fff1a
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
tvm_test/run_simple_mod_op2_pth.py
junarwohn/tvm
96c2e06cd063a695b3b485f2bdf8875df55fff1a
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
import tvm from tvm import relay from tvm import relay from tvm.runtime.vm import VirtualMachine from tvm.contrib.download import download_testdata from SimpleModel import Net import numpy as np import cv2 # PyTorch imports import torch import torchvision # Time library for speed check import time in_size = 32 inpu...
25.260274
98
0.741323
import tvm from tvm import relay from tvm import relay from tvm.runtime.vm import VirtualMachine from tvm.contrib.download import download_testdata from SimpleModel import Net import numpy as np import cv2 import torch import torchvision import time in_size = 32 input_shape = (1, 3, in_size, in_size) def do_tra...
true
true
f71af005c4808726491024543d12346686c50421
3,691
py
Python
travel_time_visualization/server.py
rogerfitz/tutorials
dae6470bad63b71e755caaff0b69893f5c9a1d63
[ "MIT" ]
45
2017-07-13T23:20:54.000Z
2022-02-25T16:48:52.000Z
flask_viz_server/server.py
rogerfitz/tutorials
dae6470bad63b71e755caaff0b69893f5c9a1d63
[ "MIT" ]
51
2017-07-28T13:48:26.000Z
2021-11-29T06:37:41.000Z
flask_viz_server/server.py
rogerfitz/tutorials
dae6470bad63b71e755caaff0b69893f5c9a1d63
[ "MIT" ]
38
2017-07-13T15:48:30.000Z
2022-02-26T04:12:06.000Z
from flask import Flask, jsonify,render_template,request from config import API_KEY import datetime from collections import defaultdict import requests import pandas as pd import sys import logging from itertools import repeat app = Flask(__name__) gunicorn_error_logger = logging.getLogger('gunicorn.error') app.logger...
35.490385
145
0.715253
from flask import Flask, jsonify,render_template,request from config import API_KEY import datetime from collections import defaultdict import requests import pandas as pd import sys import logging from itertools import repeat app = Flask(__name__) gunicorn_error_logger = logging.getLogger('gunicorn.error') app.logger...
true
true
f71af0636d15e0878c031743b0f73cf871004237
19,689
py
Python
paddlenlp/transformers/bert/tokenizer.py
Leedoo/PaddleNLP
ac3a6165e5eb6d638a4165709fd6cf91c11077c7
[ "Apache-2.0" ]
3
2021-09-06T11:27:49.000Z
2021-11-09T08:19:00.000Z
paddlenlp/transformers/bert/tokenizer.py
narrowser/PaddleNLP
fd740cb7a9d83b91116d3ad9cf6b4e3a683481f4
[ "Apache-2.0" ]
null
null
null
paddlenlp/transformers/bert/tokenizer.py
narrowser/PaddleNLP
fd740cb7a9d83b91116d3ad9cf6b4e3a683481f4
[ "Apache-2.0" ]
4
2021-08-23T07:46:06.000Z
2021-09-23T08:37:03.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # # 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 Licens...
37.863462
121
0.565646
import copy import io import json import os import six import unicodedata from .. import PretrainedTokenizer from ..tokenizer_utils import convert_to_unicode, whitespace_tokenize, _is_whitespace, _is_control, _is_punctuation __all__ = ['BasicTokenizer', 'BertTokenizer', 'WordpieceTokenizer'] class Ba...
true
true
f71af1cd54d5851bd4030703d9d6a0bb37011f59
8,309
py
Python
src/mission_node/src/intersection_detector.py
mommy79/AuDi-GIT-turtlebot3_autorace
fd1382246f1ee74ee70857006563184d672a6666
[ "Apache-2.0" ]
1
2021-06-13T06:20:15.000Z
2021-06-13T06:20:15.000Z
src/mission_node/src/intersection_detector.py
taening/AuDi-GIT-turtlebot3_autorace
fd1382246f1ee74ee70857006563184d672a6666
[ "Apache-2.0" ]
null
null
null
src/mission_node/src/intersection_detector.py
taening/AuDi-GIT-turtlebot3_autorace
fd1382246f1ee74ee70857006563184d672a6666
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import cv2 import math class IntersectionDetector: def __init__(self): self.lower_blue = np.array([85, 90, 120], np.uint8) self.upper_blue = np.array([115, 255, 255], np.uint8) def fn_find_intersection_line(self, img_trans): ...
54.664474
197
0.603562
import numpy as np import cv2 import math class IntersectionDetector: def __init__(self): self.lower_blue = np.array([85, 90, 120], np.uint8) self.upper_blue = np.array([115, 255, 255], np.uint8) def fn_find_intersection_line(self, img_trans): pers_height, pers_width = img_...
true
true
f71af1f582d2aaa6d4011db4c3ff8c3821e87e34
32,935
py
Python
numpyro/distributions/transforms.py
ahoho/numpyro
64e94e346c51a6c0c1ba51aa7b608e73513f158f
[ "Apache-2.0" ]
null
null
null
numpyro/distributions/transforms.py
ahoho/numpyro
64e94e346c51a6c0c1ba51aa7b608e73513f158f
[ "Apache-2.0" ]
null
null
null
numpyro/distributions/transforms.py
ahoho/numpyro
64e94e346c51a6c0c1ba51aa7b608e73513f158f
[ "Apache-2.0" ]
null
null
null
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import math import warnings import weakref import numpy as np from jax import lax, ops, tree_flatten, tree_map, vmap from jax.flatten_util import ravel_pytree from jax.nn import softplus import jax.numpy as jnp from jax.scipy.linalg ...
34.851852
120
0.637559
import math import warnings import weakref import numpy as np from jax import lax, ops, tree_flatten, tree_map, vmap from jax.flatten_util import ravel_pytree from jax.nn import softplus import jax.numpy as jnp from jax.scipy.linalg import solve_triangular from jax.scipy.special import expit, logit from numpyro.d...
true
true
f71af30647e8b3464f41ad8052f431bd92a2243e
2,623
py
Python
christmas_lights/Sprite1d.py
rec/christmas_lights
da72b3941b097b6854ba1ba999c0a6cf9b029b0f
[ "MIT" ]
1
2019-05-26T15:10:04.000Z
2019-05-26T15:10:04.000Z
christmas_lights/Sprite1d.py
rec/christmas_lights
da72b3941b097b6854ba1ba999c0a6cf9b029b0f
[ "MIT" ]
null
null
null
christmas_lights/Sprite1d.py
rec/christmas_lights
da72b3941b097b6854ba1ba999c0a6cf9b029b0f
[ "MIT" ]
null
null
null
import numbers, random class Sprite1d: """A one-dimensional sprite with subpixel positioning.""" def __init__(self, icon, color_list, speed=0, acceleration=0, bound=(0, 1), position=0, center=None): self.color_list = color_list if hasattr(color_list, 'dtype'): self...
33.202532
79
0.576439
import numbers, random class Sprite1d: def __init__(self, icon, color_list, speed=0, acceleration=0, bound=(0, 1), position=0, center=None): self.color_list = color_list if hasattr(color_list, 'dtype'): self._combine = self._combine_numpy self.icon = icon ...
true
true
f71af32c0f552806810683bb603031e425d1a879
95
py
Python
core/response/__init__.py
ryanolee/pager-duty-sync
1fd88634e461b5db647d856bc6b59f990944685e
[ "MIT" ]
null
null
null
core/response/__init__.py
ryanolee/pager-duty-sync
1fd88634e461b5db647d856bc6b59f990944685e
[ "MIT" ]
2
2020-09-27T18:19:17.000Z
2021-06-29T09:21:04.000Z
core/response/__init__.py
ryanolee/pager-duty-sync
1fd88634e461b5db647d856bc6b59f990944685e
[ "MIT" ]
null
null
null
from .response import get_response from .lambda_proxy_response import get_lambda_proxy_response
47.5
60
0.905263
from .response import get_response from .lambda_proxy_response import get_lambda_proxy_response
true
true
f71af42134cc4cc0f0fd59f5b0ef650eed03bbb9
2,051
py
Python
pagarmecoreapi/models/list_customers_response.py
pagarme/pagarme-core-api-python
c7b11ca78ab3e7e896e5b75048e6f72b511db00e
[ "MIT" ]
6
2021-09-02T19:55:04.000Z
2022-03-16T14:06:15.000Z
pagarmecoreapi/models/list_customers_response.py
pagarme/pagarme-core-api-python
c7b11ca78ab3e7e896e5b75048e6f72b511db00e
[ "MIT" ]
2
2021-10-11T22:48:15.000Z
2022-01-24T18:24:23.000Z
pagarmecoreapi/models/list_customers_response.py
pagarme/pagarme-core-api-python
c7b11ca78ab3e7e896e5b75048e6f72b511db00e
[ "MIT" ]
2
2021-09-12T21:43:32.000Z
2022-03-07T16:58:54.000Z
# -*- coding: utf-8 -*- """ pagarmecoreapi This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ import pagarmecoreapi.models.get_customer_response import pagarmecoreapi.models.paging_response class ListCustomersResponse(object): """Implementation of the 'List...
29.3
150
0.611409
import pagarmecoreapi.models.get_customer_response import pagarmecoreapi.models.paging_response class ListCustomersResponse(object): _names = { "data":'data', "paging":'paging' } def __init__(self, data=None, paging=None): ...
true
true
f71af554f8fb983c51ebf2f5979bbb45ab0484fa
1,434
py
Python
services/web/server/src/simcore_service_webserver/log.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
25
2018-04-13T12:44:12.000Z
2022-03-12T15:01:17.000Z
services/web/server/src/simcore_service_webserver/log.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
2,553
2018-01-18T17:11:55.000Z
2022-03-31T16:26:40.000Z
services/web/server/src/simcore_service_webserver/log.py
odeimaiz/osparc-simcore
71c2fc58dcfe067487dcd75cb70298a4d6237e97
[ "MIT" ]
20
2018-01-18T19:45:33.000Z
2022-03-29T07:08:47.000Z
""" Configuration and utilities for service logging """ import logging from typing import Optional, Union from aiodebug import log_slow_callbacks from aiohttp.log import access_logger from servicelib.logging_utils import config_all_loggers LOG_LEVEL_STEP = logging.CRITICAL - logging.ERROR def setup_logging(*, lev...
30.510638
111
0.739191
import logging from typing import Optional, Union from aiodebug import log_slow_callbacks from aiohttp.log import access_logger from servicelib.logging_utils import config_all_loggers LOG_LEVEL_STEP = logging.CRITICAL - logging.ERROR def setup_logging(*, level: Union[str, int], slow_duration: Optional[float] = Non...
true
true
f71af6b92295f3372a61cc87a1cb4e7b3810469d
336
py
Python
Algorithms/Sort Array By Parity.py
KushRabadia/Leetcode
f6af5bf0b9ef8daf9870570b52012297128aa9e1
[ "MIT" ]
null
null
null
Algorithms/Sort Array By Parity.py
KushRabadia/Leetcode
f6af5bf0b9ef8daf9870570b52012297128aa9e1
[ "MIT" ]
null
null
null
Algorithms/Sort Array By Parity.py
KushRabadia/Leetcode
f6af5bf0b9ef8daf9870570b52012297128aa9e1
[ "MIT" ]
null
null
null
class Solution(object): def sortArrayByParity(self, A): """ :type A: List[int] :rtype: List[int] """ result = [] for i in A: if i%2 == 0: result.insert(0,i) else: result.append(i) ...
21
35
0.383929
class Solution(object): def sortArrayByParity(self, A): result = [] for i in A: if i%2 == 0: result.insert(0,i) else: result.append(i) return result
true
true
f71af7240c9eccec7c0e6d401d254719234a7b2b
1,119
py
Python
pyunity/examples/example6/__init__.py
rayzchen/PyUnity
8ed436eca7a84f05190c1fa275c58da5c6059926
[ "MIT" ]
null
null
null
pyunity/examples/example6/__init__.py
rayzchen/PyUnity
8ed436eca7a84f05190c1fa275c58da5c6059926
[ "MIT" ]
null
null
null
pyunity/examples/example6/__init__.py
rayzchen/PyUnity
8ed436eca7a84f05190c1fa275c58da5c6059926
[ "MIT" ]
null
null
null
# Copyright (c) 2020-2022 The PyUnity Team # This file is licensed under the MIT License. # See https://docs.pyunity.x10.bz/en/latest/license.html from pyunity import Behaviour, GameObject, SceneManager, Material, RGB, Mesh, Vector3, MeshRenderer, WaitForSeconds class Switch(Behaviour): async def Start(sel...
31.971429
116
0.680965
from pyunity import Behaviour, GameObject, SceneManager, Material, RGB, Mesh, Vector3, MeshRenderer, WaitForSeconds class Switch(Behaviour): async def Start(self): await WaitForSeconds(3) SceneManager.LoadSceneByIndex(1) def main(): scene = SceneManager.AddScene("Scene") scen...
true
true
f71af7bed48f507c7621116150709b5c2b26365b
2,239
py
Python
setup.py
fmarco76/DiscourseSSO
97d3318c6ebe9cb10af3d5aeaff4da1b60472ff8
[ "Apache-2.0" ]
14
2015-06-03T09:32:16.000Z
2021-04-28T13:39:40.000Z
setup.py
fmarco76/DiscourseSSO
97d3318c6ebe9cb10af3d5aeaff4da1b60472ff8
[ "Apache-2.0" ]
3
2015-06-03T09:45:04.000Z
2018-02-21T07:25:47.000Z
setup.py
fmarco76/DiscourseSSO
97d3318c6ebe9cb10af3d5aeaff4da1b60472ff8
[ "Apache-2.0" ]
5
2015-05-29T11:23:20.000Z
2019-09-15T23:54:48.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import, print_function import io import re from glob import glob from os.path import basename from os.path import dirname from os.path import join from os.path import splitext from setuptools import find_packages from setuptools import se...
31.985714
113
0.618133
from __future__ import absolute_import, print_function import io import re from glob import glob from os.path import basename from os.path import dirname from os.path import join from os.path import splitext from setuptools import find_packages from setuptools import setup def read(*names, **kwargs): return io...
true
true
f71af8d2ec295f87bf614c74aa31266459b19da0
3,373
py
Python
stactools_cgls_lc100/stactools/cgls_lc100/stac.py
jonas-eberle/stactools
ce82450343caf71c08f04d2a4a16590285585735
[ "Apache-2.0" ]
null
null
null
stactools_cgls_lc100/stactools/cgls_lc100/stac.py
jonas-eberle/stactools
ce82450343caf71c08f04d2a4a16590285585735
[ "Apache-2.0" ]
2
2021-08-12T17:54:36.000Z
2021-08-12T18:21:28.000Z
src/stactools/cgls_lc100/stac.py
stactools-packages/stactools-cgls_lc100
9cc863336cd946d0e8651c1a3670cfc9c866f54c
[ "Apache-2.0" ]
null
null
null
import os import pystac from pystac.utils import str_to_datetime import rasterio as rio from shapely.geometry import box, mapping, shape from stactools.cgls_lc100.constants import ( PROVIDER_NAME, ITEM_TIF_IMAGE_NAME, DISCRETE_CLASSIFICATION_CLASS_NAMES, DISCRETE_CLASSIFICATION_CLASS_PALETTE) def create_ite...
34.070707
92
0.602728
import os import pystac from pystac.utils import str_to_datetime import rasterio as rio from shapely.geometry import box, mapping, shape from stactools.cgls_lc100.constants import ( PROVIDER_NAME, ITEM_TIF_IMAGE_NAME, DISCRETE_CLASSIFICATION_CLASS_NAMES, DISCRETE_CLASSIFICATION_CLASS_PALETTE) def create_ite...
true
true
f71af958c9c9d5d07c4709793698bfeea578307a
2,917
py
Python
tests/unit/test_requester.py
HKLM/sync-connect-sdk
16ec0fecd31042970ee29146011250a74f4742ae
[ "MIT" ]
null
null
null
tests/unit/test_requester.py
HKLM/sync-connect-sdk
16ec0fecd31042970ee29146011250a74f4742ae
[ "MIT" ]
null
null
null
tests/unit/test_requester.py
HKLM/sync-connect-sdk
16ec0fecd31042970ee29146011250a74f4742ae
[ "MIT" ]
null
null
null
import syncconnect import responses import unittest class TestRequester(unittest.TestCase): EXPECTED = 'expected' URL = 'http://ford.url' def queue(self, status_code, **kwargs): """ queue fake responses with passed status code """ if not kwargs: json = {'message': self.EXPECT...
28.881188
71
0.637299
import syncconnect import responses import unittest class TestRequester(unittest.TestCase): EXPECTED = 'expected' URL = 'http://ford.url' def queue(self, status_code, **kwargs): if not kwargs: json = {'message': self.EXPECTED} else: json = kwargs response...
true
true
f71af9645244b8b41948a3f0545272ecb692549e
2,122
py
Python
lib/CollectionCheckerDIF.py
joser1945/cmr-metadata-review
df0bb24dd06f981af907569f1a97966753053a99
[ "Apache-2.0" ]
15
2018-06-26T19:58:44.000Z
2022-03-01T21:19:34.000Z
lib/CollectionCheckerDIF.py
joser1945/cmr-metadata-review
df0bb24dd06f981af907569f1a97966753053a99
[ "Apache-2.0" ]
61
2018-06-27T15:15:41.000Z
2022-03-08T15:39:32.000Z
lib/CollectionCheckerDIF.py
joser1945/cmr-metadata-review
df0bb24dd06f981af907569f1a97966753053a99
[ "Apache-2.0" ]
9
2019-01-22T15:48:48.000Z
2021-10-01T18:38:30.000Z
''' Copyright 2016, United States Government, as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved. The "pyCMR" platform is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may ...
33.15625
88
0.661169
import json import sys from CheckerDIF import checkerRules from CSVDIF import DIFOutputCSV from JsonDIF import DIFOutputJSON class Checker(): def __init__(self): self.checkerRules = checkerRules() self.DIFOutputCSV = DIFOutputCSV(self.checkerRules,self.wrap) self.DIFOutputJSON = DIFOutput...
true
true
f71afa37b95ab3440c489490d28114d5823b2630
409
py
Python
job_extract/jobs/impl/indeed_cursor.py
evbarnett/job_extract
dafa4d69a5daca83d337192617b244c89e4b5ae6
[ "MIT" ]
null
null
null
job_extract/jobs/impl/indeed_cursor.py
evbarnett/job_extract
dafa4d69a5daca83d337192617b244c89e4b5ae6
[ "MIT" ]
null
null
null
job_extract/jobs/impl/indeed_cursor.py
evbarnett/job_extract
dafa4d69a5daca83d337192617b244c89e4b5ae6
[ "MIT" ]
null
null
null
class IndeedCursor(JobCursor): def __init__(self, title: str, location: str, radius: int = 25): base_url = "https://www.indeed.com/jobs?" self._title = title self._location = location title_esc = ul.quote(self._title, safe='') location_esc = ul.quote(self._location, safe='')...
37.181818
72
0.611247
class IndeedCursor(JobCursor): def __init__(self, title: str, location: str, radius: int = 25): base_url = "https://www.indeed.com/jobs?" self._title = title self._location = location title_esc = ul.quote(self._title, safe='') location_esc = ul.quote(self._location, safe='')...
true
true
f71afacc656469a5f59aa99865a3ea05cae6a31d
6,053
py
Python
Test/Machine/rbm.py
tvieijra/netket
ef3ff32b242f25b6a6ae0f08db1aada85775a2ea
[ "Apache-2.0" ]
10
2019-11-29T02:51:53.000Z
2021-08-14T18:52:33.000Z
Test/Machine/rbm.py
tvieijra/netket
ef3ff32b242f25b6a6ae0f08db1aada85775a2ea
[ "Apache-2.0" ]
2
2020-03-03T11:12:00.000Z
2020-05-01T17:04:41.000Z
Test/Machine/rbm.py
tvieijra/netket
ef3ff32b242f25b6a6ae0f08db1aada85775a2ea
[ "Apache-2.0" ]
6
2019-12-02T07:29:01.000Z
2021-04-04T21:55:21.000Z
# Copyright 2019 The Simons Foundation, Inc. - All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
33.815642
82
0.587973
import netket import numpy as _np __all__ = ["PyRbm"] class PyRbm(netket.machine.CxxMachine): def __init__( self, hilbert, alpha=None, use_visible_bias=True, use_hidden_bias=True ): super(PyRbm, self).__init__(hilbert) n = hilbert.size if alpha < 0: ...
true
true
f71afb68427e72653aff0696997abed27acca654
2,058
py
Python
aioradio/jira.py
nrccua/aioradio
2437c2a7fcad81c2e410002c685f587df2fcd76c
[ "MIT" ]
9
2021-01-04T13:13:03.000Z
2021-04-30T18:41:08.000Z
aioradio/jira.py
nrccua/aioradio
2437c2a7fcad81c2e410002c685f587df2fcd76c
[ "MIT" ]
null
null
null
aioradio/jira.py
nrccua/aioradio
2437c2a7fcad81c2e410002c685f587df2fcd76c
[ "MIT" ]
null
null
null
"""Generic functions related to Jira.""" from typing import Any, Dict import httpx async def post_jira_issue(url: str, jira_user: str, jira_token: str, payload: Dict[str, Any]) -> Dict[str, Any]: """Post payload to create jira issue. Args: url (str): url jira_user (str): jira username ...
30.264706
112
0.651118
from typing import Any, Dict import httpx async def post_jira_issue(url: str, jira_user: str, jira_token: str, payload: Dict[str, Any]) -> Dict[str, Any]: headers = {'Content-Type': 'application/json'} auth = (jira_user, jira_token) async with httpx.AsyncClient() as client: return await client....
true
true
f71afbd2d238f05fc62377a102459dbebc72d784
2,830
py
Python
rdmo/core/management/commands/make_theme.py
m6121/rdmo
db3990c7525138c6ce9634fc3e5b6b8ee9b915c8
[ "Apache-2.0" ]
77
2016-08-09T11:40:20.000Z
2022-03-06T11:03:26.000Z
rdmo/core/management/commands/make_theme.py
m6121/rdmo
db3990c7525138c6ce9634fc3e5b6b8ee9b915c8
[ "Apache-2.0" ]
377
2016-07-01T13:59:36.000Z
2022-03-30T13:53:19.000Z
rdmo/core/management/commands/make_theme.py
m6121/rdmo
db3990c7525138c6ce9634fc3e5b6b8ee9b915c8
[ "Apache-2.0" ]
47
2016-06-23T11:32:19.000Z
2022-03-01T11:34:37.000Z
from shutil import copyfile from pathlib import Path from django.apps import apps from django.conf import settings from django.core.management.base import BaseCommand class Command(BaseCommand): def setup(self, options): self.theme_name = options['name'] self.theme_path = Path(options['name']) ...
37.733333
127
0.608834
from shutil import copyfile from pathlib import Path from django.apps import apps from django.conf import settings from django.core.management.base import BaseCommand class Command(BaseCommand): def setup(self, options): self.theme_name = options['name'] self.theme_path = Path(options['name']) ...
true
true
f71afbdf559edc30ab16fc96de12394ee0fbf228
1,115
py
Python
boards/tests/test_view_boards.py
pydjdev78/abc-for-app
a7b9852f1e51f2e901fe00092931a1e8a2bca913
[ "MIT" ]
4
2018-12-25T13:56:18.000Z
2019-12-22T16:04:50.000Z
boards/tests/test_view_boards.py
bvermeulen/Django
e4ef21c2f1fb7d026207c25bd443252c6df354bf
[ "MIT" ]
15
2019-12-10T06:22:19.000Z
2022-03-11T23:46:49.000Z
boards/tests/test_view_boards.py
pydjdev78/abc-for-app
a7b9852f1e51f2e901fe00092931a1e8a2bca913
[ "MIT" ]
2
2021-02-16T18:52:19.000Z
2021-03-30T16:40:46.000Z
from django.contrib.auth.models import User from django.urls import reverse, resolve from django.test import TestCase from ..views import BoardListView from ..models import Board class BoardsTests(TestCase): def setUp(self): username = 'joe' password = '123' _ = User.objects.create_user(us...
38.448276
86
0.69148
from django.contrib.auth.models import User from django.urls import reverse, resolve from django.test import TestCase from ..views import BoardListView from ..models import Board class BoardsTests(TestCase): def setUp(self): username = 'joe' password = '123' _ = User.objects.create_user(us...
true
true
f71afc8fa1cfc528ee34eb6345a7ce015abf36d4
10,281
py
Python
test/test_praat.py
hadware/pympi
f7ee43dff7e809395bd097849d2e7bc6e602096b
[ "MIT" ]
1
2019-11-09T20:33:14.000Z
2019-11-09T20:33:14.000Z
test/test_praat.py
git-em/pympi
ad5e52b15979b09ea43df5e25dcf1c5b280e99fb
[ "MIT" ]
null
null
null
test/test_praat.py
git-em/pympi
ad5e52b15979b09ea43df5e25dcf1c5b280e99fb
[ "MIT" ]
null
null
null
#!/bin/env python # -*- coding: utf-8 -*- import unittest import tempfile import os from pympi.Praat import TextGrid class PraatTest(unittest.TestCase): def setUp(self): self.tg = TextGrid(xmax=20) self.maxdiff = None # Test all the Praat.TextGrid functions def test_sort_tiers(self): ...
37.797794
77
0.563661
import unittest import tempfile import os from pympi.Praat import TextGrid class PraatTest(unittest.TestCase): def setUp(self): self.tg = TextGrid(xmax=20) self.maxdiff = None def test_sort_tiers(self): self.tg.add_tier('t2') self.tg.add_tier('t1') self.tg.add_tier...
true
true
f71afce939f7d6088496f8152b5131beafd2e97c
27,561
py
Python
cbre/cbre_net.py
jameszhou-gl/CBRE
53c952e0afc74518fc4223f0f20881336df20f95
[ "Apache-2.0" ]
null
null
null
cbre/cbre_net.py
jameszhou-gl/CBRE
53c952e0afc74518fc4223f0f20881336df20f95
[ "Apache-2.0" ]
null
null
null
cbre/cbre_net.py
jameszhou-gl/CBRE
53c952e0afc74518fc4223f0f20881336df20f95
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf import numpy as np from cbre.util import * class CBRENet(object): """ cbre_net implements the cycly-balanced representation learning for counterfactual inference The network is implemented as a tensorflow graph. The class constructor creates an object containing relevant TF no...
48.43761
128
0.532274
import tensorflow as tf import numpy as np from cbre.util import * class CBRENet(object): def __init__(self, x, t, y_, p_t, z_norm, flags, r_alpha, r_lambda, r_beta, do_in, do_out, data_x_dim): self.variables = {} self.wd_loss = 0 if flags.nonlin.lower() == 'elu': se...
true
true
f71afe637d8afd637eaa9306cb3f27585ad52570
887
py
Python
setup.py
debdutgoswami/sorting-visualizer
e39e805acf22339b8ee06f8c8cd483e9c03ba3a4
[ "MIT" ]
3
2020-01-07T15:47:32.000Z
2020-09-13T14:05:32.000Z
setup.py
debdutgoswami/sorting-visualizer
e39e805acf22339b8ee06f8c8cd483e9c03ba3a4
[ "MIT" ]
3
2020-10-04T18:03:36.000Z
2020-10-08T07:13:40.000Z
setup.py
debdutgoswami/sorting-visualizer
e39e805acf22339b8ee06f8c8cd483e9c03ba3a4
[ "MIT" ]
3
2020-10-04T18:15:54.000Z
2021-01-20T19:43:49.000Z
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="sorting_visualizer", version="1.0", author="Debdut Goswami", author_email="debdutgoswami@gmail.com", description="A package to visualize various sorting algorithms.", long_description=...
32.851852
93
0.67531
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="sorting_visualizer", version="1.0", author="Debdut Goswami", author_email="debdutgoswami@gmail.com", description="A package to visualize various sorting algorithms.", long_description=...
true
true
f71affe80caeb8141a00993c2bdfd94c37876974
383
py
Python
scripts/get_repos.py
Ais105/course_project
a4ea3991756be2d12ae3fef9db6956f9d09c0c07
[ "MIT" ]
null
null
null
scripts/get_repos.py
Ais105/course_project
a4ea3991756be2d12ae3fef9db6956f9d09c0c07
[ "MIT" ]
null
null
null
scripts/get_repos.py
Ais105/course_project
a4ea3991756be2d12ae3fef9db6956f9d09c0c07
[ "MIT" ]
1
2020-02-18T20:56:57.000Z
2020-02-18T20:56:57.000Z
import os from github_client.client import GitHubClient from utils.painter import paint if __name__ == '__main__': user = os.environ['user_name'] password = os.environ['user_password'] client = GitHubClient(user, password) client.connect() repositories = client.get_repositories() user = client....
29.461538
51
0.718016
import os from github_client.client import GitHubClient from utils.painter import paint if __name__ == '__main__': user = os.environ['user_name'] password = os.environ['user_password'] client = GitHubClient(user, password) client.connect() repositories = client.get_repositories() user = client....
true
true
f71b00645a1360df4f8b7496608b98342bb43f7f
8,243
py
Python
gym_acnportal/gym_acnsim/envs/tests/test_action_spaces.py
caltech-netlab/gym-acnportal
cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46
[ "BSD-3-Clause" ]
null
null
null
gym_acnportal/gym_acnsim/envs/tests/test_action_spaces.py
caltech-netlab/gym-acnportal
cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46
[ "BSD-3-Clause" ]
3
2021-04-28T14:43:32.000Z
2021-04-28T14:58:04.000Z
gym_acnportal/gym_acnsim/envs/tests/test_action_spaces.py
sunash/gym-acnportal
cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46
[ "BSD-3-Clause" ]
1
2020-05-12T19:13:51.000Z
2020-05-12T19:13:51.000Z
# coding=utf-8 """ Tests for SimAction and action space functions. """ import unittest from typing import Callable, Dict, List, Any from unittest.mock import create_autospec import numpy as np from gym import Space from ..action_spaces import ( SimAction, single_charging_schedule, zero_centered_single_cha...
37.298643
86
0.626592
import unittest from typing import Callable, Dict, List, Any from unittest.mock import create_autospec import numpy as np from gym import Space from ..action_spaces import ( SimAction, single_charging_schedule, zero_centered_single_charging_schedule, ) from ...interfaces import GymTrainedInterface clas...
true
true
f71b01275c21a9328c6c1e5ce44454451a5dbe4c
8,256
py
Python
docs/conf.py
cic79/django-1.6-fine-uploader
14ed9ca3e01ed9680760368da7c277aedb8dfde2
[ "MIT" ]
36
2017-02-10T18:39:03.000Z
2022-03-23T19:52:38.000Z
docs/conf.py
cic79/django-1.6-fine-uploader
14ed9ca3e01ed9680760368da7c277aedb8dfde2
[ "MIT" ]
9
2017-02-11T20:33:31.000Z
2019-04-12T19:02:19.000Z
docs/conf.py
cic79/django-1.6-fine-uploader
14ed9ca3e01ed9680760368da7c277aedb8dfde2
[ "MIT" ]
19
2017-03-19T23:54:05.000Z
2020-09-02T14:42:57.000Z
# -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
32.376471
82
0.721294
import sys, os cwd = os.getcwd() parent = os.path.dirname(cwd) sys.path.append(parent) import django_fine_uploader extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'django_fine_uploade...
true
true
f71b01c4adc02f98e92a5b0a74684be8020686f2
397
py
Python
diploma/urls.py
taras-ua/diplomawork
c7540d5c674194ec0da965be18bd3becaf69d5f3
[ "Apache-2.0" ]
1
2015-05-08T09:07:06.000Z
2015-05-08T09:07:06.000Z
diploma/urls.py
taras-ua/diplomawork
c7540d5c674194ec0da965be18bd3becaf69d5f3
[ "Apache-2.0" ]
null
null
null
diploma/urls.py
taras-ua/diplomawork
c7540d5c674194ec0da965be18bd3becaf69d5f3
[ "Apache-2.0" ]
null
null
null
from django.conf import settings from django.conf.urls import patterns, url # from django.contrib import admin urlpatterns = patterns('', url(r'^$', 'app.views.home', name='home'), url(r'^graph/$', 'app.views.graph', name='graph'), url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root'...
36.090909
104
0.662469
from django.conf import settings from django.conf.urls import patterns, url urlpatterns = patterns('', url(r'^$', 'app.views.home', name='home'), url(r'^graph/$', 'app.views.graph', name='graph'), url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), )
true
true
f71b01e05fff8dd74f109eed0f8a0d197aea5341
2,498
py
Python
datasets/readers/ccpd.py
ckxy/part-of-hitogata
76402d48a336fcd964d0e64bb01d959e8f07f296
[ "MIT" ]
null
null
null
datasets/readers/ccpd.py
ckxy/part-of-hitogata
76402d48a336fcd964d0e64bb01d959e8f07f296
[ "MIT" ]
null
null
null
datasets/readers/ccpd.py
ckxy/part-of-hitogata
76402d48a336fcd964d0e64bb01d959e8f07f296
[ "MIT" ]
null
null
null
import os import numpy as np from addict import Dict from PIL import Image from .reader import Reader from .builder import READER __all__ = ['CCPD2019FolderReader'] @READER.register_module() class CCPD2019FolderReader(Reader): def __init__(self, root, **kwargs): super(CCPD2019FolderReader, self).__init_...
36.202899
134
0.502002
import os import numpy as np from addict import Dict from PIL import Image from .reader import Reader from .builder import READER __all__ = ['CCPD2019FolderReader'] @READER.register_module() class CCPD2019FolderReader(Reader): def __init__(self, root, **kwargs): super(CCPD2019FolderReader, self).__init_...
true
true
f71b0315edb287f8456c42472f645c6b7bd59cdc
383
py
Python
app/src/asgi.py
swelanauguste/kingship
d5c302b22383eb769d22f41e69e0c48e638aec92
[ "MIT" ]
5
2022-02-04T19:23:26.000Z
2022-02-26T10:15:25.000Z
src/asgi.py
AnvarKhan/django-rest-api
b2f60bbd7ebcf0977dc13ceffd9a3a4f631a03ee
[ "Apache-2.0" ]
1
2022-01-15T16:22:30.000Z
2022-01-15T16:22:30.000Z
src/asgi.py
AnvarKhan/django-rest-api
b2f60bbd7ebcf0977dc13ceffd9a3a4f631a03ee
[ "Apache-2.0" ]
1
2022-03-31T15:02:47.000Z
2022-03-31T15:02:47.000Z
""" ASGI config for src project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_...
22.529412
78
0.780679
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'src.settings') application = get_asgi_application()
true
true
f71b0388863894e2666b6a38ce7c0c7eb1c0da2c
462
py
Python
codemate/exceptions.py
DavidMeu/codemate
fcdc7591c8a1cd5922ddab1a3ec7a0dae37576c3
[ "MIT" ]
null
null
null
codemate/exceptions.py
DavidMeu/codemate
fcdc7591c8a1cd5922ddab1a3ec7a0dae37576c3
[ "MIT" ]
null
null
null
codemate/exceptions.py
DavidMeu/codemate
fcdc7591c8a1cd5922ddab1a3ec7a0dae37576c3
[ "MIT" ]
null
null
null
import black class GenerationError(Exception): """Represents an exception while generating the Python syntax""" class PythonSyntaxError(GenerationError): """Represents an exception in the python syntax""" class InputError(GenerationError, black.InvalidInput): """Raised when the generated Python code i...
25.666667
69
0.757576
import black class GenerationError(Exception): class PythonSyntaxError(GenerationError): class InputError(GenerationError, black.InvalidInput): class SaveFileError(GenerationError, OSError):
true
true
f71b0396126fe3f7506f8a4954c971dd92305753
7,390
py
Python
rlkit/samplers/data_collector/path_collector.py
YeeCY/PASF
95e548d365ea5da482c56408539d9a1514ef246b
[ "MIT" ]
4
2021-12-23T20:55:52.000Z
2022-03-14T04:57:02.000Z
rlkit/samplers/data_collector/path_collector.py
YeeCY/PASF
95e548d365ea5da482c56408539d9a1514ef246b
[ "MIT" ]
null
null
null
rlkit/samplers/data_collector/path_collector.py
YeeCY/PASF
95e548d365ea5da482c56408539d9a1514ef246b
[ "MIT" ]
1
2022-01-14T01:32:04.000Z
2022-01-14T01:32:04.000Z
from collections import deque, OrderedDict from functools import partial import numpy as np from rlkit.core.eval_util import create_stats_ordered_dict from rlkit.samplers.data_collector.base import PathCollector from rlkit.samplers.rollout_functions import rollout class ActionAgent(): def __init__(self): ...
31.446809
85
0.600406
from collections import deque, OrderedDict from functools import partial import numpy as np from rlkit.core.eval_util import create_stats_ordered_dict from rlkit.samplers.data_collector.base import PathCollector from rlkit.samplers.rollout_functions import rollout class ActionAgent(): def __init__(self): ...
true
true
f71b041f1c1924df958e173865289e1f39ee38d2
1,367
py
Python
azure/mgmt/network/v2017_06_01/models/effective_network_security_group_list_result.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2017_06_01/models/effective_network_security_group_list_result.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2017_06_01/models/effective_network_security_group_list_result.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # C...
34.175
80
0.597659
from msrest.serialization import Model class EffectiveNetworkSecurityGroupListResult(Model): _validation = { 'next_link': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[EffectiveNetworkSecurityGroup]'}, 'next_link': {'key': 'ne...
true
true
f71b05b697f301dc72ecb335f3b5caf31b92323a
1,766
py
Python
plaidrl/exploration_strategies/ou_strategy.py
charliec443/plaid-rl
2e8fbf389af9efecd41361df80e40e0bf932056d
[ "MIT" ]
null
null
null
plaidrl/exploration_strategies/ou_strategy.py
charliec443/plaid-rl
2e8fbf389af9efecd41361df80e40e0bf932056d
[ "MIT" ]
null
null
null
plaidrl/exploration_strategies/ou_strategy.py
charliec443/plaid-rl
2e8fbf389af9efecd41361df80e40e0bf932056d
[ "MIT" ]
null
null
null
import numpy as np import numpy.random as nr from plaidrl.exploration_strategies.base import RawExplorationStrategy class OUStrategy(RawExplorationStrategy): """ This strategy implements the Ornstein-Uhlenbeck process, which adds time-correlated noise to the actions taken by the deterministic policy. ...
30.448276
81
0.624575
import numpy as np import numpy.random as nr from plaidrl.exploration_strategies.base import RawExplorationStrategy class OUStrategy(RawExplorationStrategy): def __init__( self, action_space, mu=0, theta=0.15, max_sigma=0.3, min_sigma=None, decay_period=10...
true
true
f71b05f85e4726833080015f2927cdaf291362a9
5,561
py
Python
backend/api/tests/expected_data.py
INSRapperswil/nornir-web
458e6b24bc373197044b4b7b5da74f16f93a9459
[ "MIT" ]
2
2021-06-01T08:33:04.000Z
2021-08-20T04:22:39.000Z
backend/api/tests/expected_data.py
INSRapperswil/nornir-web
458e6b24bc373197044b4b7b5da74f16f93a9459
[ "MIT" ]
null
null
null
backend/api/tests/expected_data.py
INSRapperswil/nornir-web
458e6b24bc373197044b4b7b5da74f16f93a9459
[ "MIT" ]
null
null
null
expected_inventory_list = { 'count': 2, 'results': [{'detail': 'http://testserver/api/inventories/1/', 'groups_file': 'web_nornir/nornir_config/example_config/groups.yaml', 'hosts_file': 'web_nornir/nornir_config/example_config/hosts.yaml', 'id': 1, ...
41.81203
87
0.420428
expected_inventory_list = { 'count': 2, 'results': [{'detail': 'http://testserver/api/inventories/1/', 'groups_file': 'web_nornir/nornir_config/example_config/groups.yaml', 'hosts_file': 'web_nornir/nornir_config/example_config/hosts.yaml', 'id': 1, ...
true
true
f71b0609c2bed09adba0e74d664508aaf13cf106
506
py
Python
data/scripts/templates/object/tangible/item/quest/force_sensitive/shared_fs_craft_puzzle_decryption_chip.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/item/quest/force_sensitive/shared_fs_craft_puzzle_decryption_chip.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/item/quest/force_sensitive/shared_fs_craft_puzzle_decryption_chip.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/item/quest/force_sensitive/shared_fs_craft_puzzle_decryption_chip.if...
29.764706
106
0.754941
true
true
f71b0616df00ef53eb05436aa01e9020ee471bc6
7,155
py
Python
examples/python-guide/advanced_example.py
sdwivedi/LightGBM
f5ec54fbaca8bd5f72cdecbf755216c6278aafe3
[ "MIT" ]
3
2020-04-01T15:31:10.000Z
2020-04-13T12:30:37.000Z
examples/python-guide/advanced_example.py
sdwivedi/LightGBM
f5ec54fbaca8bd5f72cdecbf755216c6278aafe3
[ "MIT" ]
1
2020-09-01T03:42:10.000Z
2020-09-01T03:42:10.000Z
examples/python-guide/advanced_example.py
sdwivedi/LightGBM
f5ec54fbaca8bd5f72cdecbf755216c6278aafe3
[ "MIT" ]
7
2021-04-20T09:27:54.000Z
2022-03-07T11:41:38.000Z
# coding: utf-8 import json import lightgbm as lgb import pandas as pd import numpy as np from sklearn.metrics import mean_squared_error try: import cPickle as pickle except BaseException: import pickle print('Loading data...') # load or create your dataset df_train = pd.read_csv('../binary_classification/bin...
32.821101
103
0.665409
import json import lightgbm as lgb import pandas as pd import numpy as np from sklearn.metrics import mean_squared_error try: import cPickle as pickle except BaseException: import pickle print('Loading data...') df_train = pd.read_csv('../binary_classification/binary.train', header=None, sep='\t') df_test =...
true
true
f71b069e135a883bde77ccb48cb42ece31feb8eb
5,298
py
Python
zerver/management/commands/backup.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
3
2019-02-03T20:46:55.000Z
2019-03-04T15:44:28.000Z
zerver/management/commands/backup.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
10
2018-11-26T23:16:45.000Z
2019-02-18T23:17:03.000Z
zerver/management/commands/backup.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
2
2021-07-02T14:15:24.000Z
2021-08-16T12:31:49.000Z
import os import re import tempfile from argparse import ArgumentParser, RawTextHelpFormatter from typing import Any from django.conf import settings from django.db import connection from django.utils.timezone import now as timezone_now from scripts.lib.zulip_tools import TIMESTAMP_FORMAT, parse_os_release, run from ...
38.391304
94
0.495281
import os import re import tempfile from argparse import ArgumentParser, RawTextHelpFormatter from typing import Any from django.conf import settings from django.db import connection from django.utils.timezone import now as timezone_now from scripts.lib.zulip_tools import TIMESTAMP_FORMAT, parse_os_release, run from ...
true
true
f71b06a727f087f2bc7415f3706874d40d893939
92
py
Python
arvestust/serializers/mixins/__init__.py
lehvitus/arvestust
2d508317b744eaf12a643a398ff95723893a046a
[ "BSD-3-Clause" ]
1
2021-09-17T23:45:27.000Z
2021-09-17T23:45:27.000Z
arvestust/serializers/mixins/__init__.py
lehvitus/arvestust
2d508317b744eaf12a643a398ff95723893a046a
[ "BSD-3-Clause" ]
3
2020-07-25T05:40:54.000Z
2020-08-11T04:01:19.000Z
arvestust/serializers/mixins/__init__.py
lehvitus/arvestust
2d508317b744eaf12a643a398ff95723893a046a
[ "BSD-3-Clause" ]
null
null
null
# arvestust:serializers:mixins from .arvestust_record import ArvestustRecordSerializerMixin
30.666667
60
0.891304
from .arvestust_record import ArvestustRecordSerializerMixin
true
true
f71b08cb676579ac4fac189d7b267ecde83114fa
784
py
Python
secret.py
nora0706/gcp_site
1be5df86f239112e485cb6a089abf14622fd6b55
[ "MIT" ]
null
null
null
secret.py
nora0706/gcp_site
1be5df86f239112e485cb6a089abf14622fd6b55
[ "MIT" ]
null
null
null
secret.py
nora0706/gcp_site
1be5df86f239112e485cb6a089abf14622fd6b55
[ "MIT" ]
null
null
null
import os from google.cloud import secretmanager class Secret: def __init__(self): # Create the Secret Manager client. self.client = secretmanager.SecretManagerServiceClient() self.project_id = os.getenv('GOOGLE_CLOUD_PROJECT') def get_secret(self, secret_id): # Build the pare...
34.086957
80
0.678571
import os from google.cloud import secretmanager class Secret: def __init__(self): self.client = secretmanager.SecretManagerServiceClient() self.project_id = os.getenv('GOOGLE_CLOUD_PROJECT') def get_secret(self, secret_id): name = f"projects/{self.project_id}/secret...
true
true
f71b08ee83709fcec57f27b82915c939fb73d449
1,341
py
Python
tag_generator.py
TREYWANGCQU/blog.reaticle.com
6caa7cdecdb527c8dec0002d0e431632b9823376
[ "CC0-1.0" ]
1
2021-07-24T16:54:05.000Z
2021-07-24T16:54:05.000Z
tag_generator.py
TREYWANGCQU/treywangcqu.github.io
6caa7cdecdb527c8dec0002d0e431632b9823376
[ "CC0-1.0" ]
null
null
null
tag_generator.py
TREYWANGCQU/treywangcqu.github.io
6caa7cdecdb527c8dec0002d0e431632b9823376
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python ''' tag_generator.py Copyright 2017 Long Qian Contact: lqian8@jhu.edu This script creates tags for your Jekyll blog hosted by Github page. No plugins required. ''' import glob import os post_dir = '_posts/' tag_dir = 'tag/' filenames = glob.glob(post_dir + '*md') total_tags = [] for filename ...
23.946429
109
0.56525
import glob import os post_dir = '_posts/' tag_dir = 'tag/' filenames = glob.glob(post_dir + '*md') total_tags = [] for filename in filenames: f = open(filename, 'r', encoding='utf8') crawl = False for line in f: if crawl: current_tags = line.strip().split() ...
true
true
f71b09215d4861e1ba4d13dd94a6b1b30cfd4265
950
py
Python
checkenv.py
SmaleZ/vcl_diayn
b2c47a681675b405d2011bc4a43c3914f3af4ecc
[ "MIT" ]
null
null
null
checkenv.py
SmaleZ/vcl_diayn
b2c47a681675b405d2011bc4a43c3914f3af4ecc
[ "MIT" ]
null
null
null
checkenv.py
SmaleZ/vcl_diayn
b2c47a681675b405d2011bc4a43c3914f3af4ecc
[ "MIT" ]
null
null
null
from env_wrapper import DIAYN_Skill_Wrapper from stable_baselines3 import SAC from stable_baselines3.common.env_checker import check_env import malmoenv import gym from pathlib import Path xml = Path('/home/zilizhang/DIAYN/mobchase_single_agent.xml').read_text() env = malmoenv.make() env.init(xml, 9000) total_timeste...
27.142857
73
0.709474
from env_wrapper import DIAYN_Skill_Wrapper from stable_baselines3 import SAC from stable_baselines3.common.env_checker import check_env import malmoenv import gym from pathlib import Path xml = Path('/home/zilizhang/DIAYN/mobchase_single_agent.xml').read_text() env = malmoenv.make() env.init(xml, 9000) total_timeste...
true
true
f71b0955c31f832ac1f4829e34136ad342dd11b3
11,350
py
Python
hoomd/md/charge.py
PetersResearchGroup/PCND
584768cc683a6df0152ead69b567d05b781aab2b
[ "BSD-3-Clause" ]
null
null
null
hoomd/md/charge.py
PetersResearchGroup/PCND
584768cc683a6df0152ead69b567d05b781aab2b
[ "BSD-3-Clause" ]
null
null
null
hoomd/md/charge.py
PetersResearchGroup/PCND
584768cc683a6df0152ead69b567d05b781aab2b
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2009-2017 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. # Maintainer: joaander / All Developers are free to add commands for new features R""" Electrostatic potentials. Charged interactions are usually long ranged, an...
40.974729
134
0.628458
from hoomd.md import force; from hoomd import _hoomd from hoomd.md import _md from hoomd.md import pair; from hoomd.md import nlist as nl import hoomd; import math; import sys; from math import sqrt class pppm(force._force): def __init__(self, group, nlist): hoomd.util.print_status_line(); ...
true
true
f71b09b86f70b649fd3f792fbe2c687f37f5e62d
3,101
py
Python
predict.py
afonchikk/Audio-Classification
6acc7015ec847a64338f6300dca608a0752ba554
[ "MIT" ]
null
null
null
predict.py
afonchikk/Audio-Classification
6acc7015ec847a64338f6300dca608a0752ba554
[ "MIT" ]
null
null
null
predict.py
afonchikk/Audio-Classification
6acc7015ec847a64338f6300dca608a0752ba554
[ "MIT" ]
null
null
null
from tensorflow.keras.models import load_model from clean import downsample_mono, envelope from kapre.time_frequency import STFT, Magnitude, ApplyFilterbank, MagnitudeToDecibel from sklearn.preprocessing import LabelEncoder import numpy as np from glob import glob import argparse import os import pandas as pd from tqdm...
42.479452
90
0.609158
from tensorflow.keras.models import load_model from clean import downsample_mono, envelope from kapre.time_frequency import STFT, Magnitude, ApplyFilterbank, MagnitudeToDecibel from sklearn.preprocessing import LabelEncoder import numpy as np from glob import glob import argparse import os import pandas as pd from tqdm...
true
true
f71b09c92a4cd91f0806d99eac65622c1baec8ea
9,692
py
Python
simglucose/controller/PaperController.py
electr0de/APControllerProjectGit
141ac08e716d6ac8cebe7b144b744744024d8939
[ "MIT" ]
null
null
null
simglucose/controller/PaperController.py
electr0de/APControllerProjectGit
141ac08e716d6ac8cebe7b144b744744024d8939
[ "MIT" ]
null
null
null
simglucose/controller/PaperController.py
electr0de/APControllerProjectGit
141ac08e716d6ac8cebe7b144b744744024d8939
[ "MIT" ]
null
null
null
from functools import partial from pprint import pprint import matplotlib.pyplot as plt # import test2 from simglucose.controller.base import Controller #from datetime import datetime, timedelta, time import numpy as np import math percent_value = 0.05 sign = lambda x: math.copysign(1, x) normalize_f = lambda x: (x...
35.501832
119
0.596574
from functools import partial from pprint import pprint import matplotlib.pyplot as plt from simglucose.controller.base import Controller import numpy as np import math percent_value = 0.05 sign = lambda x: math.copysign(1, x) normalize_f = lambda x: (x - 39) / (600 - 39) class PaperRLController(Controller): ...
true
true
f71b09cc7eff04c4f945a4c71943c706e084229f
43,925
py
Python
benchmarks/ltl_maxplus/f3/maxplus_20_83.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/ltl_maxplus/f3/maxplus_20_83.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/ltl_maxplus/f3/maxplus_20_83.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from collections import Iterable from mathsat import msat_term, msat_env from mathsat import msat_make_true, msat_make_false from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_rational_type from mathsat import msat_make_and as _msat_make_and from mathsat import msat_make_or as _...
54.02829
305
0.507388
from collections import Iterable from mathsat import msat_term, msat_env from mathsat import msat_make_true, msat_make_false from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_rational_type from mathsat import msat_make_and as _msat_make_and from mathsat import msat_make_or as _...
true
true
f71b0aee44ad99983b9dca55c4966839e2bc48a0
724
py
Python
cogs/meme.py
toxic3918/fiirrd-bot
3005fe4941a24cd5c5e496c67ce90323ccba8d08
[ "MIT" ]
null
null
null
cogs/meme.py
toxic3918/fiirrd-bot
3005fe4941a24cd5c5e496c67ce90323ccba8d08
[ "MIT" ]
null
null
null
cogs/meme.py
toxic3918/fiirrd-bot
3005fe4941a24cd5c5e496c67ce90323ccba8d08
[ "MIT" ]
null
null
null
import discord from discord.ext import commands import aiohttp import random class Meme(commands.Cog): def __init__(self, client): self.client = client @commands.command() async def meme(self, ctx): async with aiohttp.ClientSession() as cs: async with cs.get("https://www.red...
27.846154
100
0.614641
import discord from discord.ext import commands import aiohttp import random class Meme(commands.Cog): def __init__(self, client): self.client = client @commands.command() async def meme(self, ctx): async with aiohttp.ClientSession() as cs: async with cs.get("https://www.red...
true
true
f71b0d762d4dc64602e981f1eb7b945440962f2b
512
py
Python
Client/setup.py
KostasPakas17/RSPET
de4356e40d803a7c224e2c919cac6a2d6c0a330f
[ "MIT" ]
289
2016-03-15T21:48:09.000Z
2022-03-16T23:04:11.000Z
Client/setup.py
crypticterminal/RSPET
de4356e40d803a7c224e2c919cac6a2d6c0a330f
[ "MIT" ]
39
2016-04-30T10:14:29.000Z
2017-10-23T21:08:10.000Z
Client/setup.py
crypticterminal/RSPET
de4356e40d803a7c224e2c919cac6a2d6c0a330f
[ "MIT" ]
115
2016-03-15T20:25:57.000Z
2021-11-08T23:49:31.000Z
''' Written for DigitalOcean's Hacktoberfest! Requires cx_Freeze and must be built on Windows :( Unfortunately, neither cx_Freeze nor py2exe support cross platform compilation thus, this particular solution was set into motion ''' import sys from cx_Freeze import setup, Executable setup( name = "...
28.444444
79
0.701172
import sys from cx_Freeze import setup, Executable setup( name = "RSPET Test", version = "0.1", description = "A Test Executable", executables = [Executable("rspet_client.py", base = "Win32GUI")])
true
true
f71b0e90747b4d9d2219b1202a357213e814bbef
6,923
py
Python
heron/tools/cli/src/python/execute.py
pjfanning/incubator-heron
7db7c24733bd7e66ecfe704ea65f864d1fff4adc
[ "Apache-2.0" ]
3,348
2016-05-25T16:04:31.000Z
2018-03-28T17:46:14.000Z
heron/tools/cli/src/python/execute.py
pjfanning/incubator-heron
7db7c24733bd7e66ecfe704ea65f864d1fff4adc
[ "Apache-2.0" ]
1,542
2016-05-25T16:46:44.000Z
2018-03-29T17:30:23.000Z
heron/tools/cli/src/python/execute.py
pjfanning/incubator-heron
7db7c24733bd7e66ecfe704ea65f864d1fff4adc
[ "Apache-2.0" ]
702
2016-05-25T16:07:43.000Z
2018-03-27T06:31:07.000Z
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- # 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 Apach...
38.675978
99
0.707497
import contextlib import os import subprocess import shlex import tarfile import tempfile import traceback from heron.common.src.python.utils.log import Log from heron.tools.cli.src.python.result import SimpleResult, ProcessResult, Status from heron.common.src.python import pex_loader from heron...
true
true
f71b0f0cae9bc62f10f26544cdf87a9d56fde71e
85,110
py
Python
src/full_node/full_node.py
akubera/chia-blockchain
91f038e2193755e2a6ca22e2160e2c8f547c23fe
[ "Apache-2.0" ]
null
null
null
src/full_node/full_node.py
akubera/chia-blockchain
91f038e2193755e2a6ca22e2160e2c8f547c23fe
[ "Apache-2.0" ]
null
null
null
src/full_node/full_node.py
akubera/chia-blockchain
91f038e2193755e2a6ca22e2160e2c8f547c23fe
[ "Apache-2.0" ]
null
null
null
import asyncio import dataclasses import logging import random import time import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union import aiosqlite from blspy import AugSchemeMPL import src.server.ws_connection as ws # lgtm [py/import-and-import-from] from ...
49.367749
120
0.625814
import asyncio import dataclasses import logging import random import time import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union import aiosqlite from blspy import AugSchemeMPL import src.server.ws_connection as ws from src.consensus.block_creation impor...
true
true
f71b10389f6b985a22b63f8c11ff239efa2dcf22
767
py
Python
venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/__about__.py
realxwx/leetcode-solve
3a7d7d8e92a5fd5fecc347d141a1c532b92e763e
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/__about__.py
realxwx/leetcode-solve
3a7d7d8e92a5fd5fecc347d141a1c532b92e763e
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/__about__.py
realxwx/leetcode-solve
3a7d7d8e92a5fd5fecc347d141a1c532b92e763e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 # Author: xiaoweixiang # This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function __all__ = [ "__title__"...
30.68
79
0.744459
from __future__ import absolute_import, division, print_function __all__ = [ "__title__", "__summary__", "__uri__", "__version__", "__author__", "__email__", "__license__", "__copyright__", ] __title__ = "packaging" __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/pa...
true
true
f71b11050a7b8a94c7408d4babb5e1fedbe1941d
4,418
py
Python
models/rdn.py
0Miquel/LIIF-temporal
b992cb87cb9bdeba6d4c9bc3960b36ba52a1ba75
[ "BSD-3-Clause" ]
1
2021-08-09T22:43:22.000Z
2021-08-09T22:43:22.000Z
models/rdn.py
0Miquel/LIIF-temporal
b992cb87cb9bdeba6d4c9bc3960b36ba52a1ba75
[ "BSD-3-Clause" ]
null
null
null
models/rdn.py
0Miquel/LIIF-temporal
b992cb87cb9bdeba6d4c9bc3960b36ba52a1ba75
[ "BSD-3-Clause" ]
null
null
null
# Residual Dense Network for Image Super-Resolution # https://arxiv.org/abs/1802.08797 # modified from: https://github.com/thstkdgus35/EDSR-PyTorch from argparse import Namespace import torch import torch.nn as nn from models import register class RDB_Conv(nn.Module): def __init__(self, inChannels...
32.725926
92
0.51675
from argparse import Namespace import torch import torch.nn as nn from models import register class RDB_Conv(nn.Module): def __init__(self, inChannels, growRate, kSize=3): super(RDB_Conv, self).__init__() Cin = inChannels G = growRate self.conv = nn.Sequential(...
true
true
f71b1176d7d60f57abf30cc89fa766a5c19610b3
588
py
Python
oauth2/socialapp.py
DemocracyLab/DemocracyLab-CivicTechExchange
eec4715373679259318ff6c384c815acebf0831f
[ "MIT" ]
64
2017-09-30T16:23:43.000Z
2022-03-30T23:26:50.000Z
oauth2/socialapp.py
DemocracyLab/DemocracyLab-CivicTechExchange
eec4715373679259318ff6c384c815acebf0831f
[ "MIT" ]
339
2017-10-26T06:59:14.000Z
2022-03-10T22:34:29.000Z
oauth2/socialapp.py
DemocracyLab/DemocracyLab-CivicTechExchange
eec4715373679259318ff6c384c815acebf0831f
[ "MIT" ]
58
2017-09-16T17:25:10.000Z
2022-03-04T18:14:02.000Z
""" Decouples SocialApp client credentials from the database """ from django.conf import settings class SocialAppMixin: class Meta: abstract = True # Get credentials to be used by OAuth2Client def get_app(self, request): app = settings.SOCIAL_APPS.get(self.id) from allauth.social...
25.565217
58
0.605442
from django.conf import settings class SocialAppMixin: class Meta: abstract = True def get_app(self, request): app = settings.SOCIAL_APPS.get(self.id) from allauth.socialaccount.models import SocialApp return SocialApp( id=app.get('id'), name='Soci...
true
true
f71b12227f1c54ad2eb63c792a779e62f95046dc
1,353
py
Python
ingredients/schema.py
gtg7784/Graphene-Django
77fbbe54ea940f566da561edc492823ae7cc7643
[ "MIT" ]
1
2021-10-14T01:23:31.000Z
2021-10-14T01:23:31.000Z
ingredients/schema.py
gtg7784/Graphene-Django
77fbbe54ea940f566da561edc492823ae7cc7643
[ "MIT" ]
1
2021-09-22T19:41:41.000Z
2021-09-22T19:41:41.000Z
ingredients/schema.py
gtg7784/Graphene-Django
77fbbe54ea940f566da561edc492823ae7cc7643
[ "MIT" ]
null
null
null
import graphene from graphene_django.types import DjangoObjectType from .models import Category, Ingredient class CategoryType(DjangoObjectType): class Meta: model = Category class IngredientType(DjangoObjectType): class Meta: model = Ingredient class Query(object): category = graphene.Fi...
27.612245
90
0.659276
import graphene from graphene_django.types import DjangoObjectType from .models import Category, Ingredient class CategoryType(DjangoObjectType): class Meta: model = Category class IngredientType(DjangoObjectType): class Meta: model = Ingredient class Query(object): category = graphene.Fi...
true
true
f71b132f36f52a58f2c573303fc3826c3fffb90a
6,341
py
Python
holidays/countries/south_africa.py
Drill-D/python-holidays
f669856d9a441324d66ee3477c4d69a04e0a00ce
[ "MIT" ]
48
2016-11-22T09:18:50.000Z
2018-01-14T14:06:49.000Z
holidays/countries/south_africa.py
Drill-D/python-holidays
f669856d9a441324d66ee3477c4d69a04e0a00ce
[ "MIT" ]
59
2016-12-03T15:52:36.000Z
2018-01-16T09:37:15.000Z
holidays/countries/south_africa.py
Drill-D/python-holidays
f669856d9a441324d66ee3477c4d69a04e0a00ce
[ "MIT" ]
51
2016-11-25T14:53:55.000Z
2018-01-16T09:58:56.000Z
# -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Authors: dr-prodigy <maurizio....
33.026042
78
0.543763
from datetime import date, datetime from dateutil.easter import easter from dateutil.relativedelta import relativedelta as rd from holidays.constants import FRI, SUN from holidays.constants import ( JAN, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC, ) from ...
true
true
f71b157abd84e0fcedf83134af5ef10acd81bdb3
1,972
py
Python
tests/test_settings.py
Gilnaa/Hydra
4d24863819bdcdd7c757e2dfb8a8996b009521b6
[ "MIT" ]
5
2019-07-11T09:24:29.000Z
2020-10-07T08:11:29.000Z
tests/test_settings.py
Gilnaa/Hydras
4d24863819bdcdd7c757e2dfb8a8996b009521b6
[ "MIT" ]
3
2019-11-05T11:33:30.000Z
2020-08-20T12:15:29.000Z
tests/test_settings.py
Gilnaa/Hydra
4d24863819bdcdd7c757e2dfb8a8996b009521b6
[ "MIT" ]
2
2018-12-17T12:56:53.000Z
2018-12-24T14:09:50.000Z
#!/usr/bin/env python from .utils import * # This struct's endianness is of the "target" class TargetStruct(Struct): a = u16(0xAABB) # while this struct's endianness is always big. class SpecificStruct(Struct): a = u16_be(0xAABB) class SettingsTests(HydrasTestCase): def test_priority(self): s...
40.244898
116
0.712475
from .utils import * class TargetStruct(Struct): a = u16(0xAABB) # while this struct's endianness is always big. class SpecificStruct(Struct): a = u16_be(0xAABB) class SettingsTests(HydrasTestCase): def test_priority(self): s = SpecificStruct() h = TargetStruct() H...
true
true
f71b1592752b5eb648bd828db7dbdcaf6507e648
2,687
py
Python
legocollector/inventory/migrations/0001_initial.py
ericziethen/legocollector
06aa984a5998979e7aa9c59e94a38633d653de55
[ "MIT" ]
1
2020-12-21T22:23:09.000Z
2020-12-21T22:23:09.000Z
legocollector/inventory/migrations/0001_initial.py
ericziethen/legocollector
06aa984a5998979e7aa9c59e94a38633d653de55
[ "MIT" ]
150
2019-08-28T20:20:01.000Z
2020-07-12T07:09:05.000Z
legocollector/inventory/migrations/0001_initial.py
ericziethen/legocollector
06aa984a5998979e7aa9c59e94a38633d653de55
[ "MIT" ]
null
null
null
# Generated by Django 2.2.4 on 2019-09-01 00:56 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
44.783333
166
0.596576
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
f71b1688f1e13f2ccad8ec2d54fddf589eeb3e82
831
py
Python
src/encoded/tests/test_schema_annotation.py
procha2/encoded
e9f122362b71f3b8641023b8d2d5ad531d3484b7
[ "MIT" ]
102
2015-05-20T01:17:43.000Z
2022-03-07T06:03:55.000Z
src/encoded/tests/test_schema_annotation.py
procha2/encoded
e9f122362b71f3b8641023b8d2d5ad531d3484b7
[ "MIT" ]
901
2015-01-07T23:11:57.000Z
2022-03-18T13:56:12.000Z
src/encoded/tests/test_schema_annotation.py
procha2/encoded
e9f122362b71f3b8641023b8d2d5ad531d3484b7
[ "MIT" ]
65
2015-02-06T23:00:26.000Z
2022-01-22T07:58:44.000Z
import pytest def test_annotation_with_subtype( testapp, submitter_testapp, annotation_dhs, annotation_ccre_2, annotation_dataset ): testapp.patch_json( annotation_dhs['@id'], {'annotation_subtype': 'all'}, status=200) # annotation_subtype can only be submitted with...
29.678571
73
0.649819
import pytest def test_annotation_with_subtype( testapp, submitter_testapp, annotation_dhs, annotation_ccre_2, annotation_dataset ): testapp.patch_json( annotation_dhs['@id'], {'annotation_subtype': 'all'}, status=200) res = testapp.post_json('/annotation', ann...
true
true
f71b16a8b249c28b8c45d7997b87d3e69e8d654b
592
py
Python
server/shserver/Token.py
AsherYang/ThreeLine
351dc8bfd1c0a536ffbf36ce8b1af953cc71f93a
[ "Apache-2.0" ]
1
2017-05-02T10:02:28.000Z
2017-05-02T10:02:28.000Z
server/shserver/Token.py
AsherYang/ThreeLine
351dc8bfd1c0a536ffbf36ce8b1af953cc71f93a
[ "Apache-2.0" ]
null
null
null
server/shserver/Token.py
AsherYang/ThreeLine
351dc8bfd1c0a536ffbf36ce8b1af953cc71f93a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python #-*- coding:utf-8 -*- """ Author: AsherYang Email: 1181830457@qq.com Date: 2017/7/24 """ class Token(): @property def access_token(self): return self.access_token @property def access_token(self, value): self.access_token = value @property def expire_in(...
16.444444
34
0.621622
class Token(): @property def access_token(self): return self.access_token @property def access_token(self, value): self.access_token = value @property def expire_in(self): return self.expire_in @property def expire_in(self, value): self.expire_in =...
true
true
f71b16c4ec2d0b67810f480a086abbd14c87ad42
3,454
py
Python
tempest/api/image/v2/test_images_metadefs_namespaces.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
1
2020-01-14T03:20:44.000Z
2020-01-14T03:20:44.000Z
tempest/api/image/v2/test_images_metadefs_namespaces.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
1
2019-08-08T10:36:44.000Z
2019-08-09T05:58:23.000Z
tempest/api/image/v2/test_images_metadefs_namespaces.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
5
2016-06-24T20:03:52.000Z
2020-02-05T10:14:54.000Z
# Copyright 2015 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
44.857143
78
0.689925
from tempest.api.image import base from tempest.lib.common.utils import data_utils from tempest.lib.common.utils import test_utils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc class MetadataNamespacesTest(base.BaseV2ImageTest): @decorators.idempotent_id('319b765...
true
true
f71b16cbd42077bfe153963de61a031de29f4b72
49,097
py
Python
teuthology/task/kernel.py
sunilangadi2/teuthology
d19730ce070d52d0dd5e71443f02a8d1b7912493
[ "MIT" ]
null
null
null
teuthology/task/kernel.py
sunilangadi2/teuthology
d19730ce070d52d0dd5e71443f02a8d1b7912493
[ "MIT" ]
null
null
null
teuthology/task/kernel.py
sunilangadi2/teuthology
d19730ce070d52d0dd5e71443f02a8d1b7912493
[ "MIT" ]
null
null
null
""" Kernel installation task """ import logging import os import re import shlex from io import StringIO from teuthology.util.compat import urljoin from teuthology import misc as teuthology from teuthology.parallel import parallel from teuthology.config import config as teuth_config from teuthology.orchestra import ...
36.915038
109
0.547508
import logging import os import re import shlex from io import StringIO from teuthology.util.compat import urljoin from teuthology import misc as teuthology from teuthology.parallel import parallel from teuthology.config import config as teuth_config from teuthology.orchestra import run from teuthology.exceptions im...
true
true
f71b18b542139a4c825daebbad8c706309282806
5,588
py
Python
tianshou/policy/modelfree/discrete_sac.py
danagi/tianshou
b364f1a26f1b8528b01a445a488160ce2d910a1c
[ "MIT" ]
1
2020-08-25T07:55:52.000Z
2020-08-25T07:55:52.000Z
tianshou/policy/modelfree/discrete_sac.py
q-learning-trader/tianshou
c97aa4065ee8464bd5897bb86f1f81abd8e2cff9
[ "MIT" ]
null
null
null
tianshou/policy/modelfree/discrete_sac.py
q-learning-trader/tianshou
c97aa4065ee8464bd5897bb86f1f81abd8e2cff9
[ "MIT" ]
1
2020-04-25T13:05:21.000Z
2020-04-25T13:05:21.000Z
import torch import numpy as np from torch.distributions import Categorical from typing import Any, Dict, Tuple, Union, Optional from tianshou.policy import SACPolicy from tianshou.data import Batch, ReplayBuffer, to_torch class DiscreteSACPolicy(SACPolicy): """Implementation of SAC for Discrete Action Settings....
37.503356
79
0.607552
import torch import numpy as np from torch.distributions import Categorical from typing import Any, Dict, Tuple, Union, Optional from tianshou.policy import SACPolicy from tianshou.data import Batch, ReplayBuffer, to_torch class DiscreteSACPolicy(SACPolicy): def __init__( self, actor: torch.nn.M...
true
true
f71b19a1735a916e1c2e81907fdea6d406f03d8f
6,275
py
Python
cis-audit.py
flokoe/cis-benchmarks-audit
85d923cbff9ffe6cede964c3bd2f3ea513944c8d
[ "MIT" ]
null
null
null
cis-audit.py
flokoe/cis-benchmarks-audit
85d923cbff9ffe6cede964c3bd2f3ea513944c8d
[ "MIT" ]
null
null
null
cis-audit.py
flokoe/cis-benchmarks-audit
85d923cbff9ffe6cede964c3bd2f3ea513944c8d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This script runs tests on the system to check for compliance against different CIS Benchmarks. No changes are made to system files by this script. Audit only. License: MIT """ from argparse import ArgumentParser from datetime import datetime from time import sleep imp...
38.734568
282
0.637131
from argparse import ArgumentParser from datetime import datetime from time import sleep import json, subprocess, pathlib __author__ = 'Florian Köhler' __version__ = '0.1.0' __license__ = 'MIT' def parse_cli(): parser = ArgumentParser(description='This script runs tests on the system to check for compliance a...
true
true