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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f75f7373bcded518cfbcc71e060b0adcaf32034f
4,384
py
Python
projections/lidar_camera_projection/lidar_camera_project.py
sondisonda/camera_calibration
92cc1c97c2c2960f1e265342884c3dac8d063708
[ "MIT" ]
null
null
null
projections/lidar_camera_projection/lidar_camera_project.py
sondisonda/camera_calibration
92cc1c97c2c2960f1e265342884c3dac8d063708
[ "MIT" ]
null
null
null
projections/lidar_camera_projection/lidar_camera_project.py
sondisonda/camera_calibration
92cc1c97c2c2960f1e265342884c3dac8d063708
[ "MIT" ]
null
null
null
import os import matplotlib.pyplot as plt import open3d from utils import * def render_image_with_boxes(img, objects, calib): """ Show image with 3D boxes """ # projection matrix P_rect2cam2 = calib['P2'].reshape((3, 4)) img1 = np.copy(img) for obj in objects: if obj.type == 'Do...
33.723077
96
0.614507
import os import matplotlib.pyplot as plt import open3d from utils import * def render_image_with_boxes(img, objects, calib): P_rect2cam2 = calib['P2'].reshape((3, 4)) img1 = np.copy(img) for obj in objects: if obj.type == 'DontCare': continue box3d_pixelcoord = map_box_...
true
true
f75f73feeebbec206a353f9564e13c75db7a4cf7
6,050
py
Python
NAS/AngleNAS/DARTS/shrinking/shrinking.py
naviocean/SimpleCVReproduction
61b43e3583977f42e6f91ef176ec5e1701e98d33
[ "Apache-2.0" ]
923
2020-01-11T06:36:53.000Z
2022-03-31T00:26:57.000Z
NAS/AngleNAS/DARTS/shrinking/shrinking.py
Twenty3hree/SimpleCVReproduction
9939f8340c54dbd69b0017cecad875dccf428f26
[ "Apache-2.0" ]
25
2020-02-27T08:35:46.000Z
2022-01-25T08:54:19.000Z
NAS/AngleNAS/DARTS/shrinking/shrinking.py
Twenty3hree/SimpleCVReproduction
9939f8340c54dbd69b0017cecad875dccf428f26
[ "Apache-2.0" ]
262
2020-01-02T02:19:40.000Z
2022-03-23T04:56:16.000Z
import os import time import numpy as np import pickle import torch import torch.nn as nn from super_model import Network_ImageNet from torch.autograd import Variable from config import config import sys sys.setrecursionlimit(10000) import functools import copy print=functools.partial(print,flush=True) from angle impor...
39.032258
144
0.620992
import os import time import numpy as np import pickle import torch import torch.nn as nn from super_model import Network_ImageNet from torch.autograd import Variable from config import config import sys sys.setrecursionlimit(10000) import functools import copy print=functools.partial(print,flush=True) from angle impor...
true
true
f75f74791aad275df31482dda7eab3f794c22403
10,159
py
Python
server.py
reeebot/myStatus
72159e9772dc46c17391485e5a132a568e6ea8a7
[ "MIT" ]
1
2021-04-28T22:13:38.000Z
2021-04-28T22:13:38.000Z
server.py
reeebot/myStatus
72159e9772dc46c17391485e5a132a568e6ea8a7
[ "MIT" ]
null
null
null
server.py
reeebot/myStatus
72159e9772dc46c17391485e5a132a568e6ea8a7
[ "MIT" ]
null
null
null
#!/usr/bin/env python import json, os, uuid, requests, msal, atexit, blinkt, app_config from datetime import datetime, timedelta from flask import Flask, jsonify, make_response, Response, request, redirect, session, url_for, render_template from flask_apscheduler import APScheduler from pyngrok import ngrok ########...
33.750831
130
0.626833
import json, os, uuid, requests, msal, atexit, blinkt, app_config from datetime import datetime, timedelta from flask import Flask, jsonify, make_response, Response, request, redirect, session, url_for, render_template from flask_apscheduler import APScheduler from pyngrok import ngrok app = Flask(__name__) app.sec...
true
true
f75f74ffcb24d14c00a47485b6eca149fe91fb17
40,780
py
Python
train.py
bnelo12/wavenet_vocoder
68de8b8abf37fb3eec41817704f06c859925f7a5
[ "MIT" ]
null
null
null
train.py
bnelo12/wavenet_vocoder
68de8b8abf37fb3eec41817704f06c859925f7a5
[ "MIT" ]
null
null
null
train.py
bnelo12/wavenet_vocoder
68de8b8abf37fb3eec41817704f06c859925f7a5
[ "MIT" ]
null
null
null
"""Trainining script for WaveNet vocoder usage: train.py [options] options: --dump-root=<dir> Directory contains preprocessed features. --checkpoint-dir=<dir> Directory where to save model checkpoints [default: checkpoints]. --hparams=<parmas> Hyper parameters [default: ]. -...
36.541219
109
0.627415
from docopt import docopt import sys import os from os.path import dirname, join, expanduser, exists from tqdm import tqdm from datetime import datetime import random import json from glob import glob import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import lrschedule impo...
true
true
f75f7644c4edb6851197831d4e8ec6cf9354471d
2,495
py
Python
homeassistant/components/binary_sensor/raincloud.py
jamescurtin/home-assistant
6a9968ccb9b0082f5629e50955549d432aba7d90
[ "Apache-2.0" ]
2
2020-02-20T18:47:55.000Z
2021-11-09T11:33:28.000Z
homeassistant/components/binary_sensor/raincloud.py
moose51789/home-assistant
63c9d59d5455850fd4b37c2475fe6f10effb5245
[ "Apache-2.0" ]
5
2022-03-01T06:31:03.000Z
2022-03-31T07:20:45.000Z
homeassistant/components/binary_sensor/raincloud.py
moose51789/home-assistant
63c9d59d5455850fd4b37c2475fe6f10effb5245
[ "Apache-2.0" ]
3
2018-08-27T10:08:30.000Z
2020-07-04T10:07:03.000Z
""" Support for Melnor RainCloud sprinkler water timer. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.raincloud/ """ import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.componen...
34.178082
74
0.686974
import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.raincloud import ( BINARY_SENSORS, DATA_RAINCLOUD, ICON_MAP, RainCloudEntity) from homeassistant.components.binary_sensor import ( BinarySensorDevice, PLATFORM_SCHEMA) from homeassistant....
true
true
f75f76b71ee1954aa5133363c893621d6be8385e
3,415
py
Python
tests/bin/fwutil_get_job.py
flywheel-apps/all-subject-bids-fmriprep
68d1d3fb058b6bd83331fc0ce59cef2377002b2b
[ "MIT" ]
null
null
null
tests/bin/fwutil_get_job.py
flywheel-apps/all-subject-bids-fmriprep
68d1d3fb058b6bd83331fc0ce59cef2377002b2b
[ "MIT" ]
3
2019-11-18T14:28:08.000Z
2021-05-24T23:53:31.000Z
tests/bin/fwutil_get_job.py
flywheel-apps/all-subject-bids-fmriprep
68d1d3fb058b6bd83331fc0ce59cef2377002b2b
[ "MIT" ]
1
2020-09-07T14:34:15.000Z
2020-09-07T14:34:15.000Z
#! /usr/bin/env python3 # # Given a Flywheel job id, this script will generate a local testing directory # within which you can run the job locally, using Docker, as it ran in Flywheel. # # This code generates a directory structure that mimics exactly what the Gear would # get when running in Flywheel. Importantly, thi...
28.697479
87
0.643338
import json import os import sys import flywheel_gear_toolkit def build_local_test(job, test_path_root): test_path = os.path.join( test_path_root, job.gear_info.name + "-" + job.gear_info.version + "_" + job.id ) input_dir = os.path.join(test_path, "input") output_dir = os.path.join(te...
true
true
f75f76ba6c9417e936f7c84b4647338484628d6d
2,713
py
Python
blog/migrations/0001_initial.py
kuyesu/algocodein_blog
e8d84b863acd994c08e593833854f90db848faef
[ "MIT" ]
null
null
null
blog/migrations/0001_initial.py
kuyesu/algocodein_blog
e8d84b863acd994c08e593833854f90db848faef
[ "MIT" ]
null
null
null
blog/migrations/0001_initial.py
kuyesu/algocodein_blog
e8d84b863acd994c08e593833854f90db848faef
[ "MIT" ]
null
null
null
# Generated by Django 3.1.13 on 2021-08-18 05:33 from django.db import migrations, models import django.db.models.deletion import uuid import wagtail.core.blocks import wagtail.core.fields import wagtail.images.blocks class Migration(migrations.Migration): initial = True dependencies = [ ('wagtaili...
45.216667
318
0.612975
from django.db import migrations, models import django.db.models.deletion import uuid import wagtail.core.blocks import wagtail.core.fields import wagtail.images.blocks class Migration(migrations.Migration): initial = True dependencies = [ ('wagtailimages', '0023_add_choose_permissions'), (...
true
true
f75f77790062058489e13b58d55108df71cdd3d3
10,025
py
Python
src/pre_process.py
lasigeBioTM/REEL
b42d91e6b21085187e9fb4f4306e73072ca7ef1c
[ "Apache-2.0" ]
3
2020-11-20T06:54:49.000Z
2021-12-13T17:54:29.000Z
src/pre_process.py
lasigeBioTM/REEL
b42d91e6b21085187e9fb4f4306e73072ca7ef1c
[ "Apache-2.0" ]
null
null
null
src/pre_process.py
lasigeBioTM/REEL
b42d91e6b21085187e9fb4f4306e73072ca7ef1c
[ "Apache-2.0" ]
2
2020-07-09T18:31:11.000Z
2020-09-24T15:38:28.000Z
import os import sys import time import xml.etree.ElementTree as ET from chebi import load_chebi from medic import load_medic from ctd_chemicals import load_ctd_chemicals from annotations import parse_craft_chebi_annotations, parse_cdr_annotations_pubtator from candidates import write_candidates, generate_candidates_f...
47.511848
163
0.633616
import os import sys import time import xml.etree.ElementTree as ET from chebi import load_chebi from medic import load_medic from ctd_chemicals import load_ctd_chemicals from annotations import parse_craft_chebi_annotations, parse_cdr_annotations_pubtator from candidates import write_candidates, generate_candidates_f...
true
true
f75f777d714e8ecaa6961f747f9624ecd3afdf4a
7,783
py
Python
scripts/SV1/gatherSV_zinfo_alltiles_denali_inpar.py
echaussidon/LSS
205ce48a288acacbd41358e6d0215f4aff355049
[ "BSD-3-Clause" ]
8
2017-04-12T14:52:26.000Z
2022-01-04T08:54:18.000Z
scripts/SV1/gatherSV_zinfo_alltiles_denali_inpar.py
echaussidon/LSS
205ce48a288acacbd41358e6d0215f4aff355049
[ "BSD-3-Clause" ]
13
2017-10-26T22:06:24.000Z
2022-03-31T15:29:06.000Z
scripts/SV1/gatherSV_zinfo_alltiles_denali_inpar.py
echaussidon/LSS
205ce48a288acacbd41358e6d0215f4aff355049
[ "BSD-3-Clause" ]
13
2015-10-26T17:30:10.000Z
2022-02-22T09:24:38.000Z
''' gather redshift info across all observations for a given target type ''' #standard python import sys import os import shutil import unittest from datetime import datetime import json import numpy as np import fitsio import glob import argparse from astropy.table import Table,join,unique,vstack from matplotlib impo...
34.591111
205
0.593601
import sys import os import shutil import unittest from datetime import datetime import json import numpy as np import fitsio import glob import argparse from astropy.table import Table,join,unique,vstack from matplotlib import pyplot as plt import LSS.zcomp.zinfo as zi parser = argparse.ArgumentParser() parser.ad...
true
true
f75f781307cc241d2a5319817bf34fb7c9cf7072
16,919
py
Python
GDSC_Expression/parse.py
danielzlarson/WishBuilder
201bd1ebdb6299fde36e762bb112a8546f15dc00
[ "MIT" ]
null
null
null
GDSC_Expression/parse.py
danielzlarson/WishBuilder
201bd1ebdb6299fde36e762bb112a8546f15dc00
[ "MIT" ]
null
null
null
GDSC_Expression/parse.py
danielzlarson/WishBuilder
201bd1ebdb6299fde36e762bb112a8546f15dc00
[ "MIT" ]
null
null
null
import pandas as pd import sys, re, math, gzip import numpy as np cellLine = sys.argv[1] doseResponse = sys.argv[2] screenedComponents = sys.argv[3] RACS = sys.argv[4] variants = sys.argv[5] expressionIn = sys.argv[6] clinicalOut = sys.argv[7] tmpExpression = sys.argv[8] finalExpression = sys.argv[9] def readSheetT...
54.401929
243
0.590283
import pandas as pd import sys, re, math, gzip import numpy as np cellLine = sys.argv[1] doseResponse = sys.argv[2] screenedComponents = sys.argv[3] RACS = sys.argv[4] variants = sys.argv[5] expressionIn = sys.argv[6] clinicalOut = sys.argv[7] tmpExpression = sys.argv[8] finalExpression = sys.argv[9] def readSheetT...
true
true
f75f78336308b097f6dced354a84bc0a5740ea5e
10,379
py
Python
gui/uis/pages/ui_main_pages.py
shrwh/QtMultiUAVGui
97032707e48c01f25f12ecc9174305f871f6f9ce
[ "MIT" ]
null
null
null
gui/uis/pages/ui_main_pages.py
shrwh/QtMultiUAVGui
97032707e48c01f25f12ecc9174305f871f6f9ce
[ "MIT" ]
null
null
null
gui/uis/pages/ui_main_pages.py
shrwh/QtMultiUAVGui
97032707e48c01f25f12ecc9174305f871f6f9ce
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'main_pagesuUkijK.ui' ## ## Created by: Qt User Interface Compiler version 6.1.3 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ##########...
42.020243
177
0.694865
from qt_core import * class Ui_MainPages(object): def setupUi(self, MainPages): if not MainPages.objectName(): MainPages.setObjectName(u"MainPages") MainPages.resize(960, 720) self.main_pages_layout = QVBoxLayout(MainPages) self.main_pages_layout.setSpacing(0) ...
true
true
f75f7969db0b45c0b925509a972cac7a03bad94b
2,043
py
Python
code/preprocessing/split_data.py
zqirui/MLinPractice
70c054903a5238725e802fa887862c35a8253cc3
[ "MIT" ]
null
null
null
code/preprocessing/split_data.py
zqirui/MLinPractice
70c054903a5238725e802fa887862c35a8253cc3
[ "MIT" ]
null
null
null
code/preprocessing/split_data.py
zqirui/MLinPractice
70c054903a5238725e802fa887862c35a8253cc3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Splits the preprocessed data into training, validation, and test set. Created on Tue Sep 28 16:45:51 2021 @author: lbechberger """ from code.util import COLUMN_LABEL import os, argparse, csv import pandas as pd from sklearn.model_selection import train_test_split #...
51.075
144
0.744983
from code.util import COLUMN_LABEL import os, argparse, csv import pandas as pd from sklearn.model_selection import train_test_split parser = argparse.ArgumentParser(description = "Splitting the data set") parser.add_argument("input_file", help = "path to the input csv file") parser.add_argument("output_folder", help...
true
true
f75f7a66094420a8959773d4596af51fc4973460
316,666
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/_models_py3.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/_models_py3.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/_models_py3.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# 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. # Changes may ...
41.125455
540
0.665604
import datetime from typing import Dict, List, Optional, Union import msrest.serialization from ._network_management_client_enums import * class AddressSpace(msrest.serialization.Model): _attribute_map = { 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, } def __init__( ...
true
true
f75f7ad6b9e7e09c06e4a2a345b35bb1ca9c3177
3,682
py
Python
1_SVG_converter_Copper.py
hirowgit/2B0_python_optmization_course
e1890a41d0daf9a44a4d1e0a6c5d775f8ab7691b
[ "MIT" ]
null
null
null
1_SVG_converter_Copper.py
hirowgit/2B0_python_optmization_course
e1890a41d0daf9a44a4d1e0a6c5d775f8ab7691b
[ "MIT" ]
null
null
null
1_SVG_converter_Copper.py
hirowgit/2B0_python_optmization_course
e1890a41d0daf9a44a4d1e0a6c5d775f8ab7691b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[5]: import numpy as np import matplotlib.pyplot as plt from svg.path import parse_path from svg.path.path import Line from xml.dom import minidom def line_splitter(start, end): return (lambda t: (1-t)*start+t*end) def cubic_bezier_converter(start, control1, control2,...
30.429752
125
0.62629
import numpy as np import matplotlib.pyplot as plt from svg.path import parse_path from svg.path.path import Line from xml.dom import minidom def line_splitter(start, end): return (lambda t: (1-t)*start+t*end) def cubic_bezier_converter(start, control1, control2, end): original_data = np.array([start, con...
true
true
f75f7b0e851456e2e6e2480cec75f19631bee573
2,197
py
Python
src/core/callbacks/feature_loading.py
koukyo1994/atmaCup5
69ee97a3ad6758af27279cc75fcd9f94325eb0e8
[ "MIT" ]
2
2020-06-07T10:01:20.000Z
2020-11-24T02:56:28.000Z
src/core/callbacks/feature_loading.py
koukyo1994/atmaCup5
69ee97a3ad6758af27279cc75fcd9f94325eb0e8
[ "MIT" ]
null
null
null
src/core/callbacks/feature_loading.py
koukyo1994/atmaCup5
69ee97a3ad6758af27279cc75fcd9f94325eb0e8
[ "MIT" ]
null
null
null
import pandas as pd import src.utils as utils from scipy.sparse import hstack, csr_matrix from src.core.callbacks import Callback, CallbackOrder from src.core.states import RunningState class SortColumnsCallback(Callback): signature = "feature_loading" callback_order = CallbackOrder.MIDDLE def on_feat...
34.873016
75
0.553027
import pandas as pd import src.utils as utils from scipy.sparse import hstack, csr_matrix from src.core.callbacks import Callback, CallbackOrder from src.core.states import RunningState class SortColumnsCallback(Callback): signature = "feature_loading" callback_order = CallbackOrder.MIDDLE def on_feat...
true
true
f75f7bee5725cb4a69c7995f3c068660fbd14b13
3,184
py
Python
scripts/distribucion.py
lmc00/tfg_en_desarrollo
30e61f4bb3f060f7468b1bb94930fcbe0d0f92ae
[ "Apache-2.0" ]
null
null
null
scripts/distribucion.py
lmc00/tfg_en_desarrollo
30e61f4bb3f060f7468b1bb94930fcbe0d0f92ae
[ "Apache-2.0" ]
null
null
null
scripts/distribucion.py
lmc00/tfg_en_desarrollo
30e61f4bb3f060f7468b1bb94930fcbe0d0f92ae
[ "Apache-2.0" ]
1
2020-11-25T15:16:36.000Z
2020-11-25T15:16:36.000Z
#Importamos todo lo necesario como en el jupyter 1.0 de Ignacio import os import matplotlib.pylab as plt import numpy as np from tqdm import tqdm import imgclas from imgclas import paths, config from imgclas.data_utils import load_image, load_data_splits, augment, load_class_names #Comenzamos a preparar todos los da...
41.894737
116
0.695352
import os import matplotlib.pylab as plt import numpy as np from tqdm import tqdm import imgclas from imgclas import paths, config from imgclas.data_utils import load_image, load_data_splits, augment, load_class_names CONF = config.get_conf_dict() splits_dir = paths.get_splits_dir() X_train, y_train = load_data_spl...
true
true
f75f7e08d04a2668ea1e11d619f374c8ae6164c1
3,836
py
Python
pgoapi/protos/POGOProtos/Networking/Requests/Messages/FortDeployPokemonMessage_pb2.py
PogoHop/pgoapi-hsvr
b5761159e0240bbb81ef6c257fe2eb1bc1ce2d47
[ "MIT" ]
null
null
null
pgoapi/protos/POGOProtos/Networking/Requests/Messages/FortDeployPokemonMessage_pb2.py
PogoHop/pgoapi-hsvr
b5761159e0240bbb81ef6c257fe2eb1bc1ce2d47
[ "MIT" ]
null
null
null
pgoapi/protos/POGOProtos/Networking/Requests/Messages/FortDeployPokemonMessage_pb2.py
PogoHop/pgoapi-hsvr
b5761159e0240bbb81ef6c257fe2eb1bc1ce2d47
[ "MIT" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Requests/Messages/FortDeployPokemonMessage.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import messa...
42.153846
366
0.762252
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from g...
true
true
f75f7f27c3412eb6136117f824d77b0bda63e8fb
2,254
py
Python
aries_cloudagent/messaging/decorators/tests/test_please_ack_decorator.py
kuraakhilesh8230/aries-cloudagent-python
ee384d1330f6a50ff45a507392ce54f92900f23a
[ "Apache-2.0" ]
247
2019-07-02T21:10:21.000Z
2022-03-30T13:55:33.000Z
aries_cloudagent/messaging/decorators/tests/test_please_ack_decorator.py
kuraakhilesh8230/aries-cloudagent-python
ee384d1330f6a50ff45a507392ce54f92900f23a
[ "Apache-2.0" ]
1,462
2019-07-02T20:57:30.000Z
2022-03-31T23:13:35.000Z
aries_cloudagent/messaging/decorators/tests/test_please_ack_decorator.py
kuraakhilesh8230/aries-cloudagent-python
ee384d1330f6a50ff45a507392ce54f92900f23a
[ "Apache-2.0" ]
377
2019-06-20T21:01:31.000Z
2022-03-30T08:27:53.000Z
import json import pytest import uuid from copy import deepcopy from datetime import datetime, timezone from time import time from unittest import TestCase from ..please_ack_decorator import PleaseAckDecorator MESSAGE_ID = "abc123" ON = ("RECEIPT", "OUTCOME") class TestPleaseAckDecorator(TestCase): def test_i...
33.641791
68
0.664153
import json import pytest import uuid from copy import deepcopy from datetime import datetime, timezone from time import time from unittest import TestCase from ..please_ack_decorator import PleaseAckDecorator MESSAGE_ID = "abc123" ON = ("RECEIPT", "OUTCOME") class TestPleaseAckDecorator(TestCase): def test_i...
true
true
f75f7f649262aff308c4e8dd7445a187fbbc259d
415
py
Python
ExchangeRateApi.py
landicefu/OKExDailyReport
c1a32fe9194a051f02657bfb226ad76c86064d8a
[ "Apache-2.0" ]
1
2018-11-25T17:34:27.000Z
2018-11-25T17:34:27.000Z
ExchangeRateApi.py
landicefu/OKExDailyReport
c1a32fe9194a051f02657bfb226ad76c86064d8a
[ "Apache-2.0" ]
null
null
null
ExchangeRateApi.py
landicefu/OKExDailyReport
c1a32fe9194a051f02657bfb226ad76c86064d8a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import requests # https://www.exchangerate-api.com/ # get 1 currency1 value in currency2 def get_exchange_rate(api_token: str, currency1: str, currency2: str, amount_currency1: int = 1.0): resp = requests.get('https://v3.exchangerate-api.com/bulk/%s/%s' % (api_token, cu...
31.923077
102
0.701205
import requests def get_exchange_rate(api_token: str, currency1: str, currency2: str, amount_currency1: int = 1.0): resp = requests.get('https://v3.exchangerate-api.com/bulk/%s/%s' % (api_token, currency1.upper())) return float(resp.json()['rates'][currency2.upper()]) * amount_currency1
true
true
f75f7f6f54c241c4144d2766e4dd3a936440d390
4,035
py
Python
configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_384x288.py
Jackqu/mmpose
ad8acc5ff5da7993c6befdc4b1ced2c2ecb64533
[ "Apache-2.0" ]
1
2021-02-02T03:08:40.000Z
2021-02-02T03:08:40.000Z
configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_384x288.py
Jackqu/mmpose
ad8acc5ff5da7993c6befdc4b1ced2c2ecb64533
[ "Apache-2.0" ]
null
null
null
configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_384x288.py
Jackqu/mmpose
ad8acc5ff5da7993c6befdc4b1ced2c2ecb64533
[ "Apache-2.0" ]
null
null
null
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...
28.020833
79
0.630731
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
f75f7fa9ef5a0a99860811e01d42cecdf3ea8006
16,569
py
Python
malspy/matrix_factorization.py
sshojiro/malspy
d28932053541f4d2097a1e6feb9fedfe051d5b24
[ "MIT" ]
null
null
null
malspy/matrix_factorization.py
sshojiro/malspy
d28932053541f4d2097a1e6feb9fedfe051d5b24
[ "MIT" ]
null
null
null
malspy/matrix_factorization.py
sshojiro/malspy
d28932053541f4d2097a1e6feb9fedfe051d5b24
[ "MIT" ]
null
null
null
""" Matrix Factorization for Spectrum Imaging Data Analysis """ # Author: Motoki Shiga, Gifu University <shiga_m@gifu-u.ac.jp> # License: MIT # import numpy as np import scipy import matplotlib.pyplot as plt import pandas as pd class RandomMF(object): """Random Matrix Factorization Fractorize a data matri...
35.403846
120
0.568049
import numpy as np import scipy import matplotlib.pyplot as plt import pandas as pd class RandomMF(object): def __init__(self, n_components, random_seed=0): self.n_components = n_components self.random_seed = random_seed def __repr__(self): class_name = self.__class__.__name__ ...
true
true
f75f8110e2a113a3c66452c16607a77fffcea75b
1,641
py
Python
common/utility/augment.py
klo9klo9kloi/win_det_heatmaps
fc427bcd593831d627698455b8917eb37add3f6e
[ "MIT" ]
29
2020-07-27T10:49:09.000Z
2022-03-17T02:15:03.000Z
common/utility/augment.py
klo9klo9kloi/win_det_heatmaps
fc427bcd593831d627698455b8917eb37add3f6e
[ "MIT" ]
6
2020-09-30T01:51:34.000Z
2022-01-02T08:00:22.000Z
common/utility/augment.py
klo9klo9kloi/win_det_heatmaps
fc427bcd593831d627698455b8917eb37add3f6e
[ "MIT" ]
10
2020-07-31T00:43:38.000Z
2022-03-07T02:45:25.000Z
import random import numpy as np from easydict import EasyDict as edict def get_default_augment_config(): config = edict() config.do_aug = True config.scale_factor = 0.25 config.rot_factor = 15 config.center_factor = 0.10 # 15% relative to the patch size config.color_factor = 0.2 config.do...
36.466667
105
0.687386
import random import numpy as np from easydict import EasyDict as edict def get_default_augment_config(): config = edict() config.do_aug = True config.scale_factor = 0.25 config.rot_factor = 15 config.center_factor = 0.10 config.color_factor = 0.2 config.do_flip_aug = True config.rot_...
true
true
f75f818b81c75abc3a2d4c770f7cd83272a7944f
3,126
py
Python
tests/test_pattern_operators.py
rvega/isobar
6b9ead7238e559cdcf83dd4122e2ddcbe2f651ad
[ "MIT" ]
241
2015-01-05T12:32:21.000Z
2022-03-29T20:50:51.000Z
tests/test_pattern_operators.py
rvega/isobar
6b9ead7238e559cdcf83dd4122e2ddcbe2f651ad
[ "MIT" ]
21
2015-01-28T16:57:59.000Z
2022-03-17T22:01:08.000Z
tests/test_pattern_operators.py
rvega/isobar
6b9ead7238e559cdcf83dd4122e2ddcbe2f651ad
[ "MIT" ]
39
2015-01-27T04:29:22.000Z
2022-02-16T13:14:13.000Z
""" Unit tests for iso """ import isobar as iso def test_pattern_add(): p1 = iso.PSequence([1, 2, 3], 1) assert list(p1 + 1.5) == [2.5, 3.5, 4.5] assert list(-1 + p1) == [0, 1, 2] p2 = iso.PSequence([2, 3, 4, 5], 1) assert list(p1 + p2) == [3, 5, 7] def test_pattern_sub(): p1 = iso.PSequence...
26.491525
44
0.50064
import isobar as iso def test_pattern_add(): p1 = iso.PSequence([1, 2, 3], 1) assert list(p1 + 1.5) == [2.5, 3.5, 4.5] assert list(-1 + p1) == [0, 1, 2] p2 = iso.PSequence([2, 3, 4, 5], 1) assert list(p1 + p2) == [3, 5, 7] def test_pattern_sub(): p1 = iso.PSequence([1, 2, 3], 1) assert l...
true
true
f75f81e99db5fdc6d6092d64855fe96831c23df7
34,283
py
Python
meraki/api/sm.py
shiyuechengineer/meraki-dashboard
f00442acf762a94e7e446f80a2485d120e7090d5
[ "MIT" ]
15
2017-10-06T05:13:42.000Z
2020-07-21T00:56:26.000Z
meraki/api/sm.py
shiyuechengineer/meraki-dashboard
f00442acf762a94e7e446f80a2485d120e7090d5
[ "MIT" ]
3
2017-07-27T20:21:55.000Z
2018-03-03T01:27:15.000Z
meraki/api/sm.py
shiyuechengineer/meraki-dashboard
f00442acf762a94e7e446f80a2485d120e7090d5
[ "MIT" ]
5
2017-10-06T05:44:27.000Z
2020-04-28T17:42:30.000Z
class Sm(object): def __init__(self, session): super(Sm, self).__init__() self._session = session def createNetworkSmBypassActivationLockAttempt(self, networkId: str, ids: list): """ **Bypass activation lock attempt** https://developer.cisco.com/meraki/api-v1/#!create-ne...
45.287979
314
0.634046
class Sm(object): def __init__(self, session): super(Sm, self).__init__() self._session = session def createNetworkSmBypassActivationLockAttempt(self, networkId: str, ids: list): kwargs = locals() metadata = { 'tags': ['sm', 'configure', 'bypassActivationLockAttemp...
true
true
f75f822d6ba3bf54d44bf0fde119c3cbedc9bbaf
418
py
Python
majora2/migrations/0007_auto_20200318_1535.py
CLIMB-COVID/majora2
46ea1809a61e4a768f8cbacaf54cba5c4d82e1f2
[ "MIT" ]
29
2019-04-04T18:03:43.000Z
2022-02-09T12:47:30.000Z
majora2/migrations/0007_auto_20200318_1535.py
CLIMB-COVID/majora2
46ea1809a61e4a768f8cbacaf54cba5c4d82e1f2
[ "MIT" ]
66
2019-04-02T16:18:40.000Z
2022-01-25T16:15:42.000Z
majora2/migrations/0007_auto_20200318_1535.py
CLIMB-COVID/majora2
46ea1809a61e4a768f8cbacaf54cba5c4d82e1f2
[ "MIT" ]
6
2020-04-10T14:15:32.000Z
2022-01-18T13:08:35.000Z
# Generated by Django 2.2.10 on 2020-03-18 15:35 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('majora2', '0006_auto_20200318_1535'), ] operations = [ migrations.RenameField( model_name='biosourcesamplingprocess', old_n...
22
50
0.638756
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('majora2', '0006_auto_20200318_1535'), ] operations = [ migrations.RenameField( model_name='biosourcesamplingprocess', old_name='collection_location_adm0', new_n...
true
true
f75f82af57c565864a34be4c59db83483650f722
1,274
py
Python
Wrappers/Python/ccpi/optimisation/functions/__init__.py
rijobro/CCPi-Framework
ff08216d4e6fef84659b43155c5c52484b1dc543
[ "Apache-2.0" ]
null
null
null
Wrappers/Python/ccpi/optimisation/functions/__init__.py
rijobro/CCPi-Framework
ff08216d4e6fef84659b43155c5c52484b1dc543
[ "Apache-2.0" ]
null
null
null
Wrappers/Python/ccpi/optimisation/functions/__init__.py
rijobro/CCPi-Framework
ff08216d4e6fef84659b43155c5c52484b1dc543
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL). # Copyright 2017 UKRI-STFC # Copyright 2017 University of Manchester # 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 ...
39.8125
100
0.796703
from __future__ import absolute_import from .Function import Function, ConstantFunction, ZeroFunction, TranslateFunction, SumFunctionScalar from .Function import ScaledFunction from .L1Norm import L1Norm from .L2NormSquared import L2NormSquared from .LeastSquares import LeastSquares from .BlockFunction import Blo...
true
true
f75f82b1d257cca113dd73c0dfadf0517d8c9512
2,695
py
Python
cogs/fun.py
Smart6502/NextX
18dddf87277fb7832d1d136188b0f9662d4b631c
[ "MIT" ]
1
2021-06-01T08:09:52.000Z
2021-06-01T08:09:52.000Z
cogs/fun.py
Smart6502/NextX
18dddf87277fb7832d1d136188b0f9662d4b631c
[ "MIT" ]
null
null
null
cogs/fun.py
Smart6502/NextX
18dddf87277fb7832d1d136188b0f9662d4b631c
[ "MIT" ]
null
null
null
import discord import os import sys import random import sqlite3 from requests import get from discord.ext.commands import Cog, command from time import sleep class Fun(Cog): def __init__(self, bot): self.bot = bot @command(aliases=['dankmeme']) async def meme(self, ctx): await ctx.send(...
27.5
95
0.531725
import discord import os import sys import random import sqlite3 from requests import get from discord.ext.commands import Cog, command from time import sleep class Fun(Cog): def __init__(self, bot): self.bot = bot @command(aliases=['dankmeme']) async def meme(self, ctx): await ctx.send(...
true
true
f75f841ddc9438aeee4191577f10f537d79c1ae6
2,311
py
Python
journal_venv/lib/python3.9/site-packages/cartopy/tests/mpl/test_web_services.py
ushham/JournalTool
f0ab9b6711b733f3c68a8a94bbb9773ffd3a95fe
[ "MIT" ]
2
2020-07-29T13:23:42.000Z
2020-10-24T08:48:13.000Z
journal_venv/lib/python3.9/site-packages/cartopy/tests/mpl/test_web_services.py
ushham/JournalTool
f0ab9b6711b733f3c68a8a94bbb9773ffd3a95fe
[ "MIT" ]
null
null
null
journal_venv/lib/python3.9/site-packages/cartopy/tests/mpl/test_web_services.py
ushham/JournalTool
f0ab9b6711b733f3c68a8a94bbb9773ffd3a95fe
[ "MIT" ]
1
2022-03-10T16:12:09.000Z
2022-03-10T16:12:09.000Z
# (C) British Crown Copyright 2014 - 2020, Met Office # # This file is part of cartopy. # # cartopy is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option)...
37.274194
76
0.733016
from __future__ import (absolute_import, division, print_function) import matplotlib.pyplot as plt from matplotlib.testing.decorators import cleanup import pytest from cartopy.tests.mpl import MPL_VERSION, ImageTesting import cartopy.crs as ccrs from cartopy.io.ogc_clients import _OWSLIB_AVAILABLE @pytest.mark.net...
true
true
f75f842af4a4d87fe0031d7aadc677b686288033
12,736
py
Python
20211025/shutDownBoth/solveMDP_poorHigh.py
dongxulee/lifeCycleRefine
6ca9670dea50150aabe31f86578323cec0ab018c
[ "MIT" ]
null
null
null
20211025/shutDownBoth/solveMDP_poorHigh.py
dongxulee/lifeCycleRefine
6ca9670dea50150aabe31f86578323cec0ab018c
[ "MIT" ]
null
null
null
20211025/shutDownBoth/solveMDP_poorHigh.py
dongxulee/lifeCycleRefine
6ca9670dea50150aabe31f86578323cec0ab018c
[ "MIT" ]
null
null
null
import numpy as np import jax.numpy as jnp from jax.numpy import interp from jax import jit, partial, random, vmap from tqdm import tqdm import warnings warnings.filterwarnings("ignore") np.printoptions(precision=2) ''' Constants ''' # time line, starts at 20 ends at 80 T_min = 0 T_max = 60 T_R = 45 # discountin...
30.32381
127
0.551429
import numpy as np import jax.numpy as jnp from jax.numpy import interp from jax import jit, partial, random, vmap from tqdm import tqdm import warnings warnings.filterwarnings("ignore") np.printoptions(precision=2) T_min = 0 T_max = 60 T_R = 45 beta = 1/(1+0.02) gamma = 2.0 alpha = 0.7 kappa = 0.3 B = 2 welfare = 20...
true
true
f75f84983ebaa772949f486fc483bd2e6d564047
4,639
py
Python
kashgari/embeddings/abc_embedding.py
SharpKoi/Kashgari
ef8c4b4d17dbd69616b9cc744489181909e313c3
[ "Apache-2.0" ]
2,422
2019-01-25T07:03:07.000Z
2022-03-31T10:29:33.000Z
kashgari/embeddings/abc_embedding.py
SharpKoi/Kashgari
ef8c4b4d17dbd69616b9cc744489181909e313c3
[ "Apache-2.0" ]
397
2019-01-29T08:37:39.000Z
2022-02-17T08:16:09.000Z
kashgari/embeddings/abc_embedding.py
SharpKoi/Kashgari
ef8c4b4d17dbd69616b9cc744489181909e313c3
[ "Apache-2.0" ]
505
2019-01-25T15:34:03.000Z
2022-03-29T17:09:00.000Z
# encoding: utf-8 # author: BrikerMan # contact: eliyar917@gmail.com # blog: https://eliyar.biz # file: abc_embedding.py # time: 2:43 下午 import json from typing import Dict, List, Any, Optional, Union import numpy as np import tensorflow as tf import tqdm import kashgari from kashgari.generators import CorpusGener...
32.440559
117
0.562621
import json from typing import Dict, List, Any, Optional, Union import numpy as np import tensorflow as tf import tqdm import kashgari from kashgari.generators import CorpusGenerator from kashgari.logger import logger from kashgari.processors import ABCProcessor L = tf.keras.layers class ABCEmbedding: def t...
true
true
f75f84a18bb9834fdcfe6b7ed49a248b0b85bb97
5,316
py
Python
likes/services.py
theskumar/django-like-app
f71c3e2db2bf32c86b7f6d63d26c60c9eef1e77d
[ "MIT" ]
null
null
null
likes/services.py
theskumar/django-like-app
f71c3e2db2bf32c86b7f6d63d26c60c9eef1e77d
[ "MIT" ]
1
2018-08-16T19:26:38.000Z
2018-08-16T19:26:38.000Z
likes/services.py
theskumar/django-like-app
f71c3e2db2bf32c86b7f6d63d26c60c9eef1e77d
[ "MIT" ]
null
null
null
# encoding: utf-8 # Third Party Stuff from django.apps import apps from django.contrib.auth import get_user_model from django.core.cache import cache from django.db.models import F from django.db.transaction import atomic from .models import Like, Likes cache_type = { 'object_like': 'ol:%(obj_type)s:%(obj_id)s:%...
30.377143
102
0.653311
from django.apps import apps from django.contrib.auth import get_user_model from django.core.cache import cache from django.db.models import F from django.db.transaction import atomic from .models import Like, Likes cache_type = { 'object_like': 'ol:%(obj_type)s:%(obj_id)s:%(user_id)s', 'object_like_count': ...
true
true
f75f84e6f430f79e4741d83b5f0a083eb5981ea5
913
py
Python
app.py
lmcdo/tradingtester
3945071a2522dad7b88b2e2ae240915a62aa5bce
[ "MIT" ]
null
null
null
app.py
lmcdo/tradingtester
3945071a2522dad7b88b2e2ae240915a62aa5bce
[ "MIT" ]
null
null
null
app.py
lmcdo/tradingtester
3945071a2522dad7b88b2e2ae240915a62aa5bce
[ "MIT" ]
null
null
null
from flask import Flask, request, jsonify from fastai.basic_train import load_learner from fastai.vision import open_image from flask_cors import CORS,cross_origin app = Flask(__name__) CORS(app, support_credentials=True) # load the learner learn = load_learner(path='./models', file='trained_model.pkl') classes = lear...
25.361111
85
0.708653
from flask import Flask, request, jsonify from fastai.basic_train import load_learner from fastai.vision import open_image from flask_cors import CORS,cross_origin app = Flask(__name__) CORS(app, support_credentials=True) learn = load_learner(path='./models', file='trained_model.pkl') classes = learn.data.classes de...
true
true
f75f84f28b079c112395a9467903f2a9dbcf7f77
26,864
py
Python
mapproxy/request/wms/__init__.py
vrsource/mapproxy
7699173f26c933e4ed91750c0b53c0c916138e3f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
mapproxy/request/wms/__init__.py
vrsource/mapproxy
7699173f26c933e4ed91750c0b53c0c916138e3f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
mapproxy/request/wms/__init__.py
vrsource/mapproxy
7699173f26c933e4ed91750c0b53c0c916138e3f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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...
35.208388
99
0.630137
import codecs from mapproxy.request.wms import exception from mapproxy.exception import RequestError from mapproxy.srs import SRS, make_lin_transf from mapproxy.request.base import RequestParams, BaseRequest, split_mime_type from mapproxy.compat import string_type, iteritems import logging log = logging.getLogger(__n...
true
true
f75f852c01f48a56d7e17370e0dba93afff66574
419
py
Python
flowers/migrations/0002_alter_customuser_username.py
Abzed/gardenation
0b6e4f7f046dbc4b6cc35507858f506b465fef81
[ "MIT" ]
null
null
null
flowers/migrations/0002_alter_customuser_username.py
Abzed/gardenation
0b6e4f7f046dbc4b6cc35507858f506b465fef81
[ "MIT" ]
null
null
null
flowers/migrations/0002_alter_customuser_username.py
Abzed/gardenation
0b6e4f7f046dbc4b6cc35507858f506b465fef81
[ "MIT" ]
1
2022-02-28T10:23:27.000Z
2022-02-28T10:23:27.000Z
# Generated by Django 3.2.9 on 2022-01-24 20:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('flowers', '0001_initial'), ] operations = [ migrations.AlterField( model_name='customuser', name='username', ...
22.052632
88
0.610979
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('flowers', '0001_initial'), ] operations = [ migrations.AlterField( model_name='customuser', name='username', field=models.CharField(max_length=70, uniqu...
true
true
f75f852dcb1ae65cacd081dc8d984992981a84d8
1,605
py
Python
core/util.py
dpetz/zettel
a16009ddd2fb6179827dd84350e59d1743d07c7d
[ "BSD-3-Clause" ]
null
null
null
core/util.py
dpetz/zettel
a16009ddd2fb6179827dd84350e59d1743d07c7d
[ "BSD-3-Clause" ]
2
2020-07-29T12:25:43.000Z
2020-07-29T12:26:23.000Z
core/util.py
dpetz/zettel
a16009ddd2fb6179827dd84350e59d1743d07c7d
[ "BSD-3-Clause" ]
null
null
null
from dataclasses import dataclass import commonmark import json import pprint @dataclass class Link: url:str text:str def pretty(json): pp = pprint.PrettyPrinter(indent=4, width=40, compact=False, sort_dicts=False) return pp.pprint(json) def markup_to_json(s): parser = commonmark.Parser() a...
27.20339
87
0.583178
from dataclasses import dataclass import commonmark import json import pprint @dataclass class Link: url:str text:str def pretty(json): pp = pprint.PrettyPrinter(indent=4, width=40, compact=False, sort_dicts=False) return pp.pprint(json) def markup_to_json(s): parser = commonmark.Parser() a...
true
true
f75f8573188a5bb1996041ba6988e129b3efcf78
10,716
py
Python
intake_io/fsspec/flywheel.py
amedyukhina/intake_io
1e14fecd76dfa615c82a18450548f6ac3817392f
[ "MIT" ]
2
2021-04-19T18:13:17.000Z
2021-06-04T10:09:05.000Z
intake_io/fsspec/flywheel.py
amedyukhina/intake_io
1e14fecd76dfa615c82a18450548f6ac3817392f
[ "MIT" ]
9
2020-12-03T00:05:32.000Z
2021-07-20T17:05:09.000Z
intake_io/fsspec/flywheel.py
amedyukhina/intake_io
1e14fecd76dfa615c82a18450548f6ac3817392f
[ "MIT" ]
2
2020-12-02T21:55:49.000Z
2021-03-19T18:30:16.000Z
from fsspec import AbstractFileSystem from fsspec.callbacks import _DEFAULT_CALLBACK import io import natsort import flywheel class FlywheelFileSystem(AbstractFileSystem): cachable = True _cached = False protocol = "flywheel" async_impl = False root_marker = "/" def __init__(self, hostname, a...
33.4875
147
0.525476
from fsspec import AbstractFileSystem from fsspec.callbacks import _DEFAULT_CALLBACK import io import natsort import flywheel class FlywheelFileSystem(AbstractFileSystem): cachable = True _cached = False protocol = "flywheel" async_impl = False root_marker = "/" def __init__(self, hostname, a...
true
true
f75f86a7fc7bbbd6adbe12c04597bb38871efa9a
436
py
Python
livinglots_friendlyowners/views.py
596acres/django-livinglots-friendlyowners
1d96b7e5b82eff063ac17dea9f960fac5a7e8dcd
[ "BSD-3-Clause" ]
null
null
null
livinglots_friendlyowners/views.py
596acres/django-livinglots-friendlyowners
1d96b7e5b82eff063ac17dea9f960fac5a7e8dcd
[ "BSD-3-Clause" ]
null
null
null
livinglots_friendlyowners/views.py
596acres/django-livinglots-friendlyowners
1d96b7e5b82eff063ac17dea9f960fac5a7e8dcd
[ "BSD-3-Clause" ]
null
null
null
from django.views.generic import CreateView, TemplateView from django_monitor.views import MonitorMixin class BaseAddFriendlyOwnerView(MonitorMixin, CreateView): def get_template_names(self): return ['livinglots/friendlyowners/add_friendlyowner.html',] class BaseAddFriendlyOwnerSuccessView(TemplateVie...
27.25
76
0.802752
from django.views.generic import CreateView, TemplateView from django_monitor.views import MonitorMixin class BaseAddFriendlyOwnerView(MonitorMixin, CreateView): def get_template_names(self): return ['livinglots/friendlyowners/add_friendlyowner.html',] class BaseAddFriendlyOwnerSuccessView(TemplateVie...
true
true
f75f86f0cfd7028d311f442ac97993350f9edc12
2,197
py
Python
readers/room_energy.py
dayne/mini-monitor
7d6cc8af8877152a04a6deeb9940101f9dcade56
[ "Apache-2.0" ]
null
null
null
readers/room_energy.py
dayne/mini-monitor
7d6cc8af8877152a04a6deeb9940101f9dcade56
[ "Apache-2.0" ]
null
null
null
readers/room_energy.py
dayne/mini-monitor
7d6cc8af8877152a04a6deeb9940101f9dcade56
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python """Module used with classes to read the sensors on the Room Energy Add-on board: temperature, humidity, light and CO2. """ from __future__ import division # do floating point div even with integers import time import smbus import base_reader import lib.tsl2591 def co2(i2c_bus): i2c_bus.write_i2...
32.791045
96
0.610833
from __future__ import division import time import smbus import base_reader import lib.tsl2591 def co2(i2c_bus): i2c_bus.write_i2c_block_data(0x15, 0x04, [0x13, 0x8B, 0x00, 0x01]) time.sleep(2) data = i2c_bus.read_i2c_block_data(0x15, 0x00, 4) msb = data[2] lsb = data[3] return (((msb & 0x3F)...
true
true
f75f8801de492debd83f9ec768334c08d8ce27dc
285
py
Python
first_missing.py
baduy9x/AlgorithmPractice
9fb956aedf67c0515b66f2af93d8383dba697fec
[ "Apache-2.0" ]
null
null
null
first_missing.py
baduy9x/AlgorithmPractice
9fb956aedf67c0515b66f2af93d8383dba697fec
[ "Apache-2.0" ]
null
null
null
first_missing.py
baduy9x/AlgorithmPractice
9fb956aedf67c0515b66f2af93d8383dba697fec
[ "Apache-2.0" ]
null
null
null
class Solution: def firstMissingPositive(self, nums: List[int]) -> int: first_missing = 1 nums_set = set() for item in nums: nums_set.add(item) while first_missing in nums_set: first_missing += 1 return first_missing
28.5
59
0.589474
class Solution: def firstMissingPositive(self, nums: List[int]) -> int: first_missing = 1 nums_set = set() for item in nums: nums_set.add(item) while first_missing in nums_set: first_missing += 1 return first_missing
true
true
f75f8809d0e38e5c9d39e15a5888f5be7c372bc0
2,947
py
Python
femtoweb/filesystem_views.py
derekenos/femtoweb
8689e08c9c3cf512ad7e7b093a601e0075b15630
[ "MIT" ]
1
2021-10-13T21:11:00.000Z
2021-10-13T21:11:00.000Z
femtoweb/filesystem_views.py
derekenos/femtoweb
8689e08c9c3cf512ad7e7b093a601e0075b15630
[ "MIT" ]
5
2020-12-25T13:23:39.000Z
2021-02-03T19:25:10.000Z
femtoweb/filesystem_views.py
derekenos/femtoweb
8689e08c9c3cf512ad7e7b093a601e0075b15630
[ "MIT" ]
null
null
null
import os from os import path from .lib.htmlephant import ( Anchor, Button, Div, DocumentStream, Script, Span, Style, Textarea, ) ############################################################################### # Text File Editor ########################################################...
30.071429
79
0.538174
import os from os import path from .lib.htmlephant import ( Anchor, Button, Div, DocumentStream, Script, Span, Style, Textarea, ) def TextFileEditor(req_path, text): filename = path.split(req_path)[-1] script = Script( """ document.addEventListener('DOMContentLoaded', () => {...
true
true
f75f88502d6f288d33e67120caafad8e1d677d83
8,770
py
Python
standoff.py
lfurrer/standoff2conll
961cd2aaa9d76426cc47803590b79e442be9ebdf
[ "MIT" ]
1
2019-07-12T11:29:44.000Z
2019-07-12T11:29:44.000Z
standoff.py
lfurrer/standoff2conll
961cd2aaa9d76426cc47803590b79e442be9ebdf
[ "MIT" ]
null
null
null
standoff.py
lfurrer/standoff2conll
961cd2aaa9d76426cc47803590b79e442be9ebdf
[ "MIT" ]
1
2020-04-06T05:17:14.000Z
2020-04-06T05:17:14.000Z
import sys import re from logging import warn from types import StringTypes from common import FormatError TEXTBOUND_LINE_RE = re.compile(r'^T\d+\t') KEEP_LONGER = 'keep-longer' KEEP_SHORTER = 'keep-shorter' OVERLAP_RULES = [KEEP_LONGER, KEEP_SHORTER] FULL_SPAN = 'full-span' FIRST_SPAN = 'first-span' LAST_SPAN = ...
34.801587
85
0.571494
import sys import re from logging import warn from types import StringTypes from common import FormatError TEXTBOUND_LINE_RE = re.compile(r'^T\d+\t') KEEP_LONGER = 'keep-longer' KEEP_SHORTER = 'keep-shorter' OVERLAP_RULES = [KEEP_LONGER, KEEP_SHORTER] FULL_SPAN = 'full-span' FIRST_SPAN = 'first-span' LAST_SPAN = ...
false
true
f75f8917b1430b4d48cff5082636452a43cf3acc
37,500
py
Python
sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# 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. # Changes may ...
49.734748
212
0.663547
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpR...
true
true
f75f895e47a9a580ce187241c7dcc639f2acbaa9
1,899
py
Python
neutron/conf/policies/address_group.py
congnt95/neutron
6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1
[ "Apache-2.0" ]
1,080
2015-01-04T08:35:00.000Z
2022-03-27T09:15:52.000Z
neutron/conf/policies/address_group.py
congnt95/neutron
6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1
[ "Apache-2.0" ]
24
2015-02-21T01:48:28.000Z
2021-11-26T02:38:56.000Z
neutron/conf/policies/address_group.py
congnt95/neutron
6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1
[ "Apache-2.0" ]
1,241
2015-01-02T10:47:10.000Z
2022-03-27T09:42:23.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
31.131148
76
0.641917
from oslo_log import versionutils from oslo_policy import policy from neutron.conf.policies import base AG_COLLECTION_PATH = '/address-groups' AG_RESOURCE_PATH = '/address-groups/{id}' DEPRECATION_REASON = ( "The Address scope API now supports system scope and default roles.") rules = [ policy.RuleDefaul...
true
true
f75f896e1e7af846475e8ce56c79f8ac1e3c3cd9
1,667
py
Python
grains/has_battery.py
beornf/salt-contrib
062355938ad1cced273056e9c23dc344c6a2c858
[ "Apache-2.0" ]
111
2015-01-16T02:48:12.000Z
2022-02-08T10:24:56.000Z
grains/has_battery.py
beornf/salt-contrib
062355938ad1cced273056e9c23dc344c6a2c858
[ "Apache-2.0" ]
60
2015-01-06T12:28:44.000Z
2020-12-01T21:30:38.000Z
grains/has_battery.py
beornf/salt-contrib
062355938ad1cced273056e9c23dc344c6a2c858
[ "Apache-2.0" ]
163
2015-01-06T09:40:31.000Z
2022-02-03T11:41:23.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: Nick Soracco :copyright: © 2014 by Nick Soracco :license: BSD salt.grains.has_battery ~~~~~~~~~~~~~~~~~~~~~~~ Returns a boolean indicating whether (or not) the system has a battery. FIXME: Only works in Linux, requires the acpi binary, which CentOS...
32.057692
84
0.641272
from __future__ import absolute_import import logging import salt.log import salt.utils import salt.modules.cmdmod log = logging.getLogger(__name__) def has_battery(): acpi = salt.utils.which('acpi') if acpi is None or acpi == "": return {} ...
true
true
f75f89a763d019d5805e53e29178fbd92c980903
19,616
py
Python
yt/visualization/tests/test_plotwindow.py
neutrinoceros2/yt
8cabf6091414e4d9a5037c4ff49199adf0ae64d6
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/visualization/tests/test_plotwindow.py
neutrinoceros2/yt
8cabf6091414e4d9a5037c4ff49199adf0ae64d6
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/visualization/tests/test_plotwindow.py
neutrinoceros2/yt
8cabf6091414e4d9a5037c4ff49199adf0ae64d6
[ "BSD-3-Clause-Clear" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import shutil import tempfile import unittest from collections import OrderedDict from distutils.version import LooseVersion import matplotlib import numpy as np from nose.tools import assert_true from yt.frontends.stream.api import load_uniform_grid from yt.tes...
29.190476
88
0.562602
import os import shutil import tempfile import unittest from collections import OrderedDict from distutils.version import LooseVersion import matplotlib import numpy as np from nose.tools import assert_true from yt.frontends.stream.api import load_uniform_grid from yt.testing import ( assert_array_almost_equal, ...
true
true
f75f8a3a2508a153e888ca3956cff65dfa7e4a57
2,102
py
Python
average_extractor.py
iyezhiyu/3D_Reconstruction_from_Commodity_RGB-D_Cameras
d84c000cbe8ec6b437c117cd04da604334858867
[ "MIT" ]
2
2020-01-20T08:20:07.000Z
2020-03-18T06:25:22.000Z
average_extractor.py
iyezhiyu/3D_Reconstruction_from_Commodity_RGB-D_Cameras
d84c000cbe8ec6b437c117cd04da604334858867
[ "MIT" ]
null
null
null
average_extractor.py
iyezhiyu/3D_Reconstruction_from_Commodity_RGB-D_Cameras
d84c000cbe8ec6b437c117cd04da604334858867
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jul 8 16:18:07 2019 @author: Zhiyu Ye Email: yezhiyu@hotmail.com In London, the United Kingdom """ import os import shutil if __name__ == "__main__": #path of the YCB Video Dataset videopath = '/Users/zhiyu/Desktop/YCB_Video_Dataset/data' ...
40.423077
133
0.551855
import os import shutil if __name__ == "__main__": videopath = '/Users/zhiyu/Desktop/YCB_Video_Dataset/data' videos = ["0048", "0049", "0050", "0051", "0052", "0053", \ "0054", "0055", "0056", "0057", "0058", "0059"] out_dir = '/Users/zhiyu/Desktop/extract_result_2' frames_p...
true
true
f75f8aca748fafabc13707bd9af8ed2aa6b3a8f9
1,653
py
Python
setup.py
moonshadow/flask-swagger-plus
04daf478fe8e28830fb8f7b266012dbdb923d5eb
[ "MIT" ]
2
2017-01-09T11:00:54.000Z
2017-01-10T10:43:30.000Z
setup.py
moonshadow/flask-swagger-plus
04daf478fe8e28830fb8f7b266012dbdb923d5eb
[ "MIT" ]
null
null
null
setup.py
moonshadow/flask-swagger-plus
04daf478fe8e28830fb8f7b266012dbdb923d5eb
[ "MIT" ]
null
null
null
import os from setuptools import setup from flask_swagger_plus import __version__ readme = open('README.md').read() CLASSIFIERS = [ 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming L...
28.016949
86
0.637024
import os from setuptools import setup from flask_swagger_plus import __version__ readme = open('README.md').read() CLASSIFIERS = [ 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming L...
true
true
f75f8b858845e0c7d0f39df7cd8db9902e0b16b3
3,145
py
Python
app/migrations/0001_initial.py
jhgan00/mirae-dashboard
5cced8c65d3af9dbca548bfe921d0e7100b9cc72
[ "MIT" ]
3
2021-11-12T05:09:00.000Z
2021-11-13T09:50:26.000Z
app/migrations/0001_initial.py
jhgan00/mirae-dashboard
5cced8c65d3af9dbca548bfe921d0e7100b9cc72
[ "MIT" ]
null
null
null
app/migrations/0001_initial.py
jhgan00/mirae-dashboard
5cced8c65d3af9dbca548bfe921d0e7100b9cc72
[ "MIT" ]
1
2021-11-12T05:10:35.000Z
2021-11-12T05:10:35.000Z
# Generated by Django 2.2.14 on 2020-10-29 23:43 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='InsuranceClaim', fields=[ ('ID', models.In...
44.295775
84
0.536725
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='InsuranceClaim', fields=[ ('ID', models.IntegerField(primary_key=True, serialize=False)), ...
true
true
f75f8c0f5009ef042ca7fa8a369f688af6c74836
5,048
py
Python
test/test_dangling_references.py
stephankn/pyosmium
c0aa7e410ccfa177c6ce9ccae9f532a050d2cc55
[ "BSD-2-Clause" ]
199
2015-04-08T15:33:32.000Z
2022-03-02T17:30:31.000Z
test/test_dangling_references.py
stephankn/pyosmium
c0aa7e410ccfa177c6ce9ccae9f532a050d2cc55
[ "BSD-2-Clause" ]
161
2015-01-21T18:13:41.000Z
2022-03-30T07:16:17.000Z
test/test_dangling_references.py
stephankn/pyosmium
c0aa7e410ccfa177c6ce9ccae9f532a050d2cc55
[ "BSD-2-Clause" ]
58
2015-01-21T17:15:46.000Z
2022-02-04T09:07:59.000Z
# vim: set fileencoding=utf-8 : from nose.tools import * import unittest from sys import version_info as python_version from helpers import create_osm_file import osmium as o class DanglingReferenceBase(object): """ Base class for tests that try to keep a reference to the object that was handed into the ...
26.708995
83
0.668185
from nose.tools import * import unittest from sys import version_info as python_version from helpers import create_osm_file import osmium as o class DanglingReferenceBase(object): node = None way = None relation = None area = None refkeeper = [] def keep(self, obj): self.refkeeper....
true
true
f75f8fadd0d19a1c5c92d88af9b4693987270000
37
py
Python
venv/lib/python3.6/encodings/cp852.py
JamesMusyoka/Blog
fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5
[ "Unlicense" ]
2
2019-04-17T13:35:50.000Z
2021-12-21T00:11:36.000Z
venv/lib/python3.6/encodings/cp852.py
JamesMusyoka/Blog
fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5
[ "Unlicense" ]
2
2021-03-31T19:51:24.000Z
2021-06-10T23:05:09.000Z
venv/lib/python3.6/encodings/cp852.py
JamesMusyoka/Blog
fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5
[ "Unlicense" ]
2
2019-10-01T08:47:35.000Z
2020-07-11T06:32:16.000Z
/usr/lib/python3.6/encodings/cp852.py
37
37
0.810811
/usr/lib/python3.6/encodings/cp852.py
false
true
f75f90ed64a66707d050a124d144b32dd3cfbf9d
4,706
py
Python
sdk/python/pulumi_kubernetes/certificates/v1beta1/CertificateSigningRequest.py
MatheusMiranda/pulumi-kubernetes
eecebd55fe96f63365194182a69d99eda625bb96
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/certificates/v1beta1/CertificateSigningRequest.py
MatheusMiranda/pulumi-kubernetes
eecebd55fe96f63365194182a69d99eda625bb96
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/certificates/v1beta1/CertificateSigningRequest.py
MatheusMiranda/pulumi-kubernetes
eecebd55fe96f63365194182a69d99eda625bb96
[ "Apache-2.0" ]
null
null
null
# *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings from typing import Optional import pulumi import pulumi.runtime from pulumi import Input, ResourceOptions from ... import tables, version ...
39.546218
107
0.68317
import warnings from typing import Optional import pulumi import pulumi.runtime from pulumi import Input, ResourceOptions from ... import tables, version class CertificateSigningRequest(pulumi.CustomResource): apiVersion: pulumi.Output[str] kind: pulumi.Output[str] metadata: pulumi.Output[dict] ...
true
true
f75f91a5a6fada82c5b73ff32689323389d7a401
2,301
py
Python
packages/bootstrap/extra/dcos_internal_utils/bootstrap.py
sergiimatus/dcos
801b28dbeee83d615dbad08eed2ee1b80ef3b6e8
[ "Apache-2.0" ]
2
2019-11-27T13:10:26.000Z
2019-12-03T10:35:56.000Z
packages/bootstrap/extra/dcos_internal_utils/bootstrap.py
sergiimatus/dcos
801b28dbeee83d615dbad08eed2ee1b80ef3b6e8
[ "Apache-2.0" ]
5
2019-12-02T21:00:37.000Z
2019-12-05T07:47:42.000Z
packages/bootstrap/extra/dcos_internal_utils/bootstrap.py
sergiimatus/dcos
801b28dbeee83d615dbad08eed2ee1b80ef3b6e8
[ "Apache-2.0" ]
3
2019-10-21T11:31:25.000Z
2019-11-20T06:54:47.000Z
import logging import sys import uuid import kazoo.exceptions from kazoo.client import KazooClient from kazoo.retry import KazooRetry from kazoo.security import ACL, ANYONE_ID_UNSAFE, Permissions from dcos_internal_utils import utils if not utils.is_windows: assert 'pwd' in sys.modules log = logging.getLogger(_...
31.094595
114
0.639722
import logging import sys import uuid import kazoo.exceptions from kazoo.client import KazooClient from kazoo.retry import KazooRetry from kazoo.security import ACL, ANYONE_ID_UNSAFE, Permissions from dcos_internal_utils import utils if not utils.is_windows: assert 'pwd' in sys.modules log = logging.getLogger(_...
true
true
f75f922db64532803a70ad927404d620a51c9ae2
1,601
py
Python
sync_scheduler.py
hegge/tapiriik
9d89d2d06625c92a9ec06093ea8c924e1a033677
[ "Apache-2.0" ]
null
null
null
sync_scheduler.py
hegge/tapiriik
9d89d2d06625c92a9ec06093ea8c924e1a033677
[ "Apache-2.0" ]
null
null
null
sync_scheduler.py
hegge/tapiriik
9d89d2d06625c92a9ec06093ea8c924e1a033677
[ "Apache-2.0" ]
null
null
null
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time import uuid from tapiriik.settings import MONGO_FULL_WRITE_CONCERN Sync.InitializeWorkerBindings() producer = ...
43.27027
228
0.66396
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time import uuid from tapiriik.settings import MONGO_FULL_WRITE_CONCERN Sync.InitializeWorkerBindings() producer = ...
true
true
f75f9253dcb828482a68549abe7043381109876b
2,173
py
Python
services/users/alembic/env.py
Open-EO/openeo-openshift-driver
822dbd3ccee25180cc48efd2f891504b6b5edc14
[ "Apache-2.0" ]
6
2018-10-02T15:04:11.000Z
2019-12-13T11:36:49.000Z
services/users/alembic/env.py
Open-EO/openeo-openshift-driver
822dbd3ccee25180cc48efd2f891504b6b5edc14
[ "Apache-2.0" ]
54
2019-01-09T17:14:29.000Z
2020-10-02T11:39:38.000Z
services/users/alembic/env.py
Open-EO/openeo-openshift-driver
822dbd3ccee25180cc48efd2f891504b6b5edc14
[ "Apache-2.0" ]
6
2018-07-03T15:58:05.000Z
2019-07-03T07:20:46.000Z
"""Alembic generated code to run database migrations.""" from logging.config import fileConfig from os import environ from alembic import context from sqlalchemy import engine_from_config, pool # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.co...
29.767123
118
0.682467
from logging.config import fileConfig from os import environ from alembic import context from sqlalchemy import engine_from_config, pool config = context.config config.set_main_option("sqlalchemy.url", f"postgresql://{environ.get('OEO_DB_USER')}:{environ.get('OEO_DB_PASSWORD')}" ...
true
true
f75f92cde8cbe8f59cd1eb446692ec7dda60ed18
188
py
Python
lambdata_ethanmjansen/__init__.py
ekoly/lambdata-1
55e0238cf06ff09c5f4d246c5d96b8d446c5237f
[ "MIT" ]
null
null
null
lambdata_ethanmjansen/__init__.py
ekoly/lambdata-1
55e0238cf06ff09c5f4d246c5d96b8d446c5237f
[ "MIT" ]
4
2020-03-24T18:23:52.000Z
2021-06-02T01:16:54.000Z
lambdata_ethanmjansen/__init__.py
ekoly/lambdata-1
55e0238cf06ff09c5f4d246c5d96b8d446c5237f
[ "MIT" ]
1
2020-01-14T21:32:13.000Z
2020-01-14T21:32:13.000Z
''' lambdata - a collection of data science helper functions ''' import numpy as np import pandas as pd # sample code ONES = pd.DataFrame(np.ones(10)) ZEROS = pd.DataFrame(np.zeros(50))
17.090909
56
0.723404
import numpy as np import pandas as pd ONES = pd.DataFrame(np.ones(10)) ZEROS = pd.DataFrame(np.zeros(50))
true
true
f75f954640f24742e03483325bad90a3c558615c
44
py
Python
functions_files/lambda.py
yangyangv2/py-get-started
190564923832f583ea8d689e61377a7434d530a2
[ "Apache-2.0" ]
null
null
null
functions_files/lambda.py
yangyangv2/py-get-started
190564923832f583ea8d689e61377a7434d530a2
[ "Apache-2.0" ]
null
null
null
functions_files/lambda.py
yangyangv2/py-get-started
190564923832f583ea8d689e61377a7434d530a2
[ "Apache-2.0" ]
null
null
null
double = lambda x: x * 2 print(double(100))
14.666667
24
0.659091
double = lambda x: x * 2 print(double(100))
true
true
f75f95b67567c25a10882445285372a93f41515e
3,456
py
Python
src/python/importer.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
765
2015-01-14T16:17:04.000Z
2022-03-28T07:46:28.000Z
src/python/importer.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
30
2015-01-01T21:49:38.000Z
2021-04-20T19:01:54.000Z
src/python/importer.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
807
2015-01-06T09:55:38.000Z
2022-03-30T10:23:36.000Z
# Copyright (c) 2008 The Hewlett-Packard Development Company # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list of...
40.186047
74
0.722801
import importlib import importlib.abc import importlib.util import os class ByteCodeLoader(importlib.abc.Loader): def __init__(self, code): super().__init__() self.code = code def exec_module(self, module): exec(self.code, module.__dict__) class CodeImporter(object): def __init__...
true
true
f75f95c9f9c47dfdd26081182bb45386337f94c7
1,023
py
Python
test.py
PiperLiu/AliProducts
f51884c4dae035a879dbaca2c1575797f30ee7d3
[ "MIT" ]
1
2022-03-21T06:36:15.000Z
2022-03-21T06:36:15.000Z
test.py
adamas-v/AliProducts
2633f780c2e7bd66b722a1727227a6e4e8f6529d
[ "MIT" ]
null
null
null
test.py
adamas-v/AliProducts
2633f780c2e7bd66b722a1727227a6e4e8f6529d
[ "MIT" ]
2
2021-05-19T16:31:34.000Z
2021-08-24T05:35:21.000Z
# encoding=utf-8 """ python3 test.py --tag complex_256 --dataset complex --load checkpoints/complex --which-epoch 499 """ import os, sys import pdb # from dataloader.image_folder import get_data_loader_folder from torch_template.dataloader.tta import OverlapTTA import dataloader as dl from network import get_mode...
21.765957
98
0.742913
import os, sys import pdb from torch_template.dataloader.tta import OverlapTTA import dataloader as dl from network import get_model from options import opt from misc_utils import get_file_name sys.path.insert(1, '../') import torch import torchvision import numpy as np from PIL import Image import misc_utils as u...
true
true
f75f97dc49e5cdbb6c8b37e90edae34bf4b5f02a
16,086
py
Python
huaweicloud-sdk-vod/huaweicloudsdkvod/v1/model/publish_asset_from_obs_req.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-vod/huaweicloudsdkvod/v1/model/publish_asset_from_obs_req.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-vod/huaweicloudsdkvod/v1/model/publish_asset_from_obs_req.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class PublishAssetFromObsReq: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The...
31.479452
300
0.628248
import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class PublishAssetFromObsReq: sensitive_list = [] openapi_types = { 'video_type': 'str', 'title': 'str', 'description': 'str', 'category_id': 'int', 'tags': 'str', ...
true
true
f75f980495e6c2c62826cb61dc153342324ff746
1,045
py
Python
core/admin.py
zeestack/storefront3
3ba87aae61a4877f4e51bc80442fe5954bbda76d
[ "MIT" ]
null
null
null
core/admin.py
zeestack/storefront3
3ba87aae61a4877f4e51bc80442fe5954bbda76d
[ "MIT" ]
null
null
null
core/admin.py
zeestack/storefront3
3ba87aae61a4877f4e51bc80442fe5954bbda76d
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.contenttypes.admin import GenericTabularInline from store.admin import ProductImageInline, ProdutAdmin from store.models import Product from tags.models import TaggedItem from . import models # Regis...
24.302326
66
0.602871
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.contenttypes.admin import GenericTabularInline from store.admin import ProductImageInline, ProdutAdmin from store.models import Product from tags.models import TaggedItem from . import models @admin....
true
true
f75f98477c9240f0a7e7a888bb994709084f6e5f
1,342
py
Python
rns/util.py
matwilso/relation-networks
66c67b342a90ae3699e576dcec883c329905b2e0
[ "MIT" ]
null
null
null
rns/util.py
matwilso/relation-networks
66c67b342a90ae3699e576dcec883c329905b2e0
[ "MIT" ]
null
null
null
rns/util.py
matwilso/relation-networks
66c67b342a90ae3699e576dcec883c329905b2e0
[ "MIT" ]
null
null
null
import tensorflow as tf def merge_summaries(sd, id): summaries = [] for key in sd.keys(): summaries.append(tf.summary.scalar(key, sd[key])) for key in id.keys(): summaries.append(tf.summary.image(key, id[key])) return tf.summary.merge(summaries) def pack_images(images, rows, cols): ...
36.27027
76
0.638599
import tensorflow as tf def merge_summaries(sd, id): summaries = [] for key in sd.keys(): summaries.append(tf.summary.scalar(key, sd[key])) for key in id.keys(): summaries.append(tf.summary.image(key, id[key])) return tf.summary.merge(summaries) def pack_images(images, rows, cols): ...
true
true
f75f99899edf3189df79a8713f49dc7dec7c912e
8,759
py
Python
anytask/courses/migrations/0020_auto__add_field_course_full_transcript.py
AnnaSvalova/anytask
f814b43c496f67a2efe2a150873a1ae32ad97449
[ "MIT" ]
1
2018-12-03T05:48:43.000Z
2018-12-03T05:48:43.000Z
anytask/courses/migrations/0020_auto__add_field_course_full_transcript.py
AnnaSvalova/anytask
f814b43c496f67a2efe2a150873a1ae32ad97449
[ "MIT" ]
null
null
null
anytask/courses/migrations/0020_auto__add_field_course_full_transcript.py
AnnaSvalova/anytask
f814b43c496f67a2efe2a150873a1ae32ad97449
[ "MIT" ]
1
2021-09-18T22:38:20.000Z
2021-09-18T22:38:20.000Z
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Course.full_transcript' db.add_column('courses_course', 'full_transcript', ...
77.513274
206
0.57655
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column('courses_course', 'full_transcript', self.gf('django.db.models.fields.BooleanField')(default=Tru...
true
true
f75f9a417c581335f121c97e779288924f35f8f7
4,314
py
Python
tests/test_raster_area_stats.py
mmacata/actinia_statistic_plugin
6c64e8b7b97cb7fdda7c775cca5f21359c44a536
[ "MIT" ]
3
2018-10-16T14:32:07.000Z
2020-03-24T18:07:02.000Z
tests/test_raster_area_stats.py
mmacata/actinia_statistic_plugin
6c64e8b7b97cb7fdda7c775cca5f21359c44a536
[ "MIT" ]
7
2019-10-01T07:46:52.000Z
2022-03-24T09:26:53.000Z
tests/test_raster_area_stats.py
mmacata/actinia_statistic_plugin
6c64e8b7b97cb7fdda7c775cca5f21359c44a536
[ "MIT" ]
4
2018-10-26T11:52:09.000Z
2020-03-24T18:07:03.000Z
# -*- coding: utf-8 -*- import unittest import time from pprint import pprint from flask.json import loads as json_load from flask.json import dumps as json_dump try: from .test_resource_base import ActiniaResourceTestCaseBase, URL_PREFIX except: from test_resource_base import ActiniaResourceTestCaseBase, URL_...
43.14
115
0.606398
import unittest import time from pprint import pprint from flask.json import loads as json_load from flask.json import dumps as json_dump try: from .test_resource_base import ActiniaResourceTestCaseBase, URL_PREFIX except: from test_resource_base import ActiniaResourceTestCaseBase, URL_PREFIX __license__ = "G...
true
true
f75f9d3f6d502644f2273972190bf3d5011cf7ad
1,510
py
Python
poetcli/controllers/exportController.py
jkerola/poetcli
e307513fa073beaddd7247d944fcef7092ee95dd
[ "MIT" ]
null
null
null
poetcli/controllers/exportController.py
jkerola/poetcli
e307513fa073beaddd7247d944fcef7092ee95dd
[ "MIT" ]
null
null
null
poetcli/controllers/exportController.py
jkerola/poetcli
e307513fa073beaddd7247d944fcef7092ee95dd
[ "MIT" ]
null
null
null
from cement import Controller, ex from ..utils import controllerUtils class ExportController(Controller): class Meta: label = 'export controls' @ex( help='export active collection as a file', arguments=[ ( ['-p', '--path'], { ...
33.555556
76
0.454967
from cement import Controller, ex from ..utils import controllerUtils class ExportController(Controller): class Meta: label = 'export controls' @ex( help='export active collection as a file', arguments=[ ( ['-p', '--path'], { ...
true
true
f75f9dd79aa0f656e37cb4802b579a7074bf8a10
537
py
Python
hackerrank/10 Days of Statistics/Day 7 - Spearman's Rank Correlation Coefficient/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
4
2020-07-24T01:59:50.000Z
2021-07-24T15:14:08.000Z
hackerrank/10 Days of Statistics/Day 7 - Spearman's Rank Correlation Coefficient/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
hackerrank/10 Days of Statistics/Day 7 - Spearman's Rank Correlation Coefficient/test.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
import io import unittest from contextlib import redirect_stdout from unittest.mock import patch class TestQ(unittest.TestCase): @patch('builtins.input', side_effect=[ '10', '10 9.8 8 7.8 7.7 1.7 6 5 1.4 2 ', '200 44 32 24 22 17 15 12 8 4', ]) def test_case_0(self, input_mock=None)...
24.409091
62
0.625698
import io import unittest from contextlib import redirect_stdout from unittest.mock import patch class TestQ(unittest.TestCase): @patch('builtins.input', side_effect=[ '10', '10 9.8 8 7.8 7.7 1.7 6 5 1.4 2 ', '200 44 32 24 22 17 15 12 8 4', ]) def test_case_0(self, input_mock=None)...
true
true
f75f9df45a76adaf82bf697c53e9aaf882e06fa1
21,201
py
Python
trac/admin/console.py
exocad/exotrac
c8207efff78d4736745e975abaa359e8bb21ffdb
[ "BSD-3-Clause" ]
null
null
null
trac/admin/console.py
exocad/exotrac
c8207efff78d4736745e975abaa359e8bb21ffdb
[ "BSD-3-Clause" ]
null
null
null
trac/admin/console.py
exocad/exotrac
c8207efff78d4736745e975abaa359e8bb21ffdb
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2003-2010 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. #...
35.276206
79
0.554785
from __future__ import with_statement import cmd import os.path import pkg_resources from shlex import shlex import StringIO import sys import traceback from trac import __version__ as VERSION from trac.admin.api import AdminCommandError, AdminCommandManager, \ get_console_locale from trac...
false
true
f75f9dff813e5a99b9f1ab87e5632bbd3245ce6f
19,733
py
Python
sa/profiles/Generic/get_metrics.py
xUndero/noc
9fb34627721149fcf7064860bd63887e38849131
[ "BSD-3-Clause" ]
1
2019-09-20T09:36:48.000Z
2019-09-20T09:36:48.000Z
sa/profiles/Generic/get_metrics.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
sa/profiles/Generic/get_metrics.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Generic.get_metrics # --------------------------------------------------------------------- # Copyright (C) 2007-2018 The NOC Project # See LICENSE for details # ------------------------------------------------------------...
33.905498
100
0.544519
import time import os import re import itertools import operator from collections import defaultdict import six import ujson from noc.core.script.base import BaseScript, BaseScriptMetaclass from noc.sa.interfaces.igetmetrics import IGetMetrics from noc.core.script.oidrules.oid import OIDRule from noc.core.script.oid...
true
true
f75f9e1a84fb1952a0ef182a35374132cbae3978
4,078
py
Python
osm-adaptor/swagger_server/models/inline_response2001.py
kant/osslm-OpenSourceMANO-adaptor
191673aa1935be4f986b1c5edc642622a38fcc65
[ "Apache-2.0" ]
3
2017-11-17T08:12:14.000Z
2021-04-08T20:12:07.000Z
osm-adaptor/swagger_server/models/inline_response2001.py
kant/osslm-OpenSourceMANO-adaptor
191673aa1935be4f986b1c5edc642622a38fcc65
[ "Apache-2.0" ]
1
2017-11-16T14:42:08.000Z
2017-11-16T14:42:08.000Z
osm-adaptor/swagger_server/models/inline_response2001.py
kant/osslm-OpenSourceMANO-adaptor
191673aa1935be4f986b1c5edc642622a38fcc65
[ "Apache-2.0" ]
4
2018-01-18T02:36:09.000Z
2020-06-29T13:54:43.000Z
# coding: utf-8 from __future__ import absolute_import from .base_model_ import Model from datetime import date, datetime from typing import List, Dict from ..util import deserialize_model class InlineResponse2001(Model): """ NOTE: This class is auto generated by the swagger code generator program. Do no...
27.369128
108
0.603727
from __future__ import absolute_import from .base_model_ import Model from datetime import date, datetime from typing import List, Dict from ..util import deserialize_model class InlineResponse2001(Model): def __init__(self, name: str=None, state: str=None, created_at: date=None, last_modified_at: date=None): ...
true
true
f75f9ea80dc62773132e2b1a3f9da7839bc5624b
8,999
py
Python
app/views.py
kripajoshi/mobishop
0c5532fa0a9e9fe1ec5b1532b14ba59eb9527f57
[ "MIT" ]
1
2022-01-13T03:08:11.000Z
2022-01-13T03:08:11.000Z
app/views.py
kripajoshi/mobishop
0c5532fa0a9e9fe1ec5b1532b14ba59eb9527f57
[ "MIT" ]
null
null
null
app/views.py
kripajoshi/mobishop
0c5532fa0a9e9fe1ec5b1532b14ba59eb9527f57
[ "MIT" ]
null
null
null
""" Definition of views. """ from datetime import datetime from django.shortcuts import render, redirect from django.http import HttpRequest from app.models import Product, Cart, CartItem, Address, Order, OrderItem from django.db.models import Sum from django.contrib.auth.forms import UserCreationForm, AuthenticationF...
33.830827
138
0.61129
from datetime import datetime from django.shortcuts import render, redirect from django.http import HttpRequest from app.models import Product, Cart, CartItem, Address, Order, OrderItem from django.db.models import Sum from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from django.contrib.auth ...
true
true
f75f9f2dce2d5e2b804ef876c06ad802a99b8afe
695
py
Python
example/visualizer_test.py
chencgln/glimg
747c04966c256e913dcee4098b0d8502378d6085
[ "Apache-2.0" ]
null
null
null
example/visualizer_test.py
chencgln/glimg
747c04966c256e913dcee4098b0d8502378d6085
[ "Apache-2.0" ]
null
null
null
example/visualizer_test.py
chencgln/glimg
747c04966c256e913dcee4098b0d8502378d6085
[ "Apache-2.0" ]
null
null
null
import cv2 import sys sys.path.append(".") from glimg import detbbox as glbbox from glimg import visualizer as glvis image_path = "example/images/img1.jpg" def test_draw_bbox(): img = cv2.imread(image_path) bbox1 = [100, 100, 200, 200] bbox2 = [150, 150, 25, 25] img = glvis.draw_bbox(img, bbox1, wid...
24.821429
61
0.67482
import cv2 import sys sys.path.append(".") from glimg import detbbox as glbbox from glimg import visualizer as glvis image_path = "example/images/img1.jpg" def test_draw_bbox(): img = cv2.imread(image_path) bbox1 = [100, 100, 200, 200] bbox2 = [150, 150, 25, 25] img = glvis.draw_bbox(img, bbox1, wid...
true
true
f75f9f5335c8a1d40260c30e3a2b0ca91722e7d7
453
py
Python
data/scripts/templates/object/draft_schematic/item/shared_item_ten_sided_dice.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/draft_schematic/item/shared_item_ten_sided_dice.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/draft_schematic/item/shared_item_ten_sided_dice.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 = Intangible() result.template = "object/draft_schematic/item/shared_item_ten_sided_dice.iff" result.attribute_temp...
26.647059
79
0.730684
from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/item/shared_item_ten_sided_dice.iff" result.attribute_template_id = -1 result.stfName("string_id_table","") return result
true
true
f75f9fa98c8cb8731f33f327ca15c8e8841deb37
199
py
Python
train_model.py
nevertheless-ui/vehicles-visual-signals-processing
1fa087155d231d8422ead1654f45c3b9514aa8e7
[ "MIT" ]
null
null
null
train_model.py
nevertheless-ui/vehicles-visual-signals-processing
1fa087155d231d8422ead1654f45c3b9514aa8e7
[ "MIT" ]
null
null
null
train_model.py
nevertheless-ui/vehicles-visual-signals-processing
1fa087155d231d8422ead1654f45c3b9514aa8e7
[ "MIT" ]
null
null
null
""" Training module for the project of vehicle signals recognition Author: Filippenko Artyom, 2021-2022 MISIS Master Degree Project """ def main(): pass if __name__ == '__main__': main()
14.214286
62
0.708543
def main(): pass if __name__ == '__main__': main()
true
true
f75f9ff65e5153de2e0101361f4fb59830bab0ee
3,235
py
Python
src/newsfeed/handlers/subscriptions.py
ets-labs/newsfeed
9f59f94e1cd5f24d4b4121929050fc8b304173af
[ "BSD-3-Clause" ]
10
2019-11-07T15:04:02.000Z
2022-02-19T11:47:40.000Z
src/newsfeed/handlers/subscriptions.py
ets-labs/newsfeed
9f59f94e1cd5f24d4b4121929050fc8b304173af
[ "BSD-3-Clause" ]
27
2019-10-31T16:31:27.000Z
2020-01-14T15:21:29.000Z
src/newsfeed/handlers/subscriptions.py
ets-labs/newsfeed
9f59f94e1cd5f24d4b4121929050fc8b304173af
[ "BSD-3-Clause" ]
10
2019-11-07T15:08:43.000Z
2021-12-03T22:31:49.000Z
"""Subscription API handlers.""" from typing import Dict, Union from aiohttp import web from dependency_injector.wiring import Provide from newsfeed.domain.subscription import ( Subscription, SubscriptionService, ) from newsfeed.domain.error import DomainError from newsfeed.containers import Container Seri...
28.377193
85
0.657496
from typing import Dict, Union from aiohttp import web from dependency_injector.wiring import Provide from newsfeed.domain.subscription import ( Subscription, SubscriptionService, ) from newsfeed.domain.error import DomainError from newsfeed.containers import Container SerializedSubscription = Dict[ st...
true
true
f75fa1eed9d1578ffe9f5b149049cab499bc0657
1,110
py
Python
elasticapm/contrib/pylons/__init__.py
lyrixderaven/apm-agent-python
e21b306da70995ca1582666378b7059495ff1bee
[ "BSD-3-Clause" ]
2
2019-02-15T20:23:39.000Z
2019-02-15T20:26:06.000Z
elasticapm/contrib/pylons/__init__.py
lyrixderaven/apm-agent-python
e21b306da70995ca1582666378b7059495ff1bee
[ "BSD-3-Clause" ]
null
null
null
elasticapm/contrib/pylons/__init__.py
lyrixderaven/apm-agent-python
e21b306da70995ca1582666378b7059495ff1bee
[ "BSD-3-Clause" ]
null
null
null
""" elasticapm.contrib.pylons ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2011-2017 Elasticsearch Large portions are :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from elasticapm.base import Client from elasticapm.middleware import ElasticAPM as Middl...
32.647059
80
0.687387
from elasticapm.base import Client from elasticapm.middleware import ElasticAPM as Middleware def list_from_setting(config, setting): value = config.get(setting) if not value: return None return value.split() class ElasticAPM(Middleware): def __init__(self, app, config, client_cls=Client): ...
true
true
f75fa2464fe43969ec76c557c43344c0f2ae877f
4,567
py
Python
paddlex/interpret/core/_session_preparation.py
Channingss/PaddleX
06fe9552472f0379ff1a16c339c9784c973b5a04
[ "Apache-2.0" ]
3
2020-05-12T03:09:13.000Z
2020-06-18T02:50:34.000Z
paddlex/interpret/core/_session_preparation.py
wyc880622/PaddleX
f001960b7359f3a88b7dd96e1f34500b90566ceb
[ "Apache-2.0" ]
null
null
null
paddlex/interpret/core/_session_preparation.py
wyc880622/PaddleX
f001960b7359f3a88b7dd96e1f34500b90566ceb
[ "Apache-2.0" ]
1
2020-05-18T07:06:28.000Z
2020-05-18T07:06:28.000Z
#copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # #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 l...
36.246032
99
0.606306
import os import os.path as osp import paddle.fluid as fluid import paddlex as pdx import numpy as np from paddle.fluid.param_attr import ParamAttr from paddlex.interpret.as_data_reader.readers import preprocess_image def gen_user_home(): if "HOME" in os.environ: home_path = os.environ["HOME"] if ...
true
true
f75fa34d1848d4f21690ce3311983df37836960d
227
py
Python
restaurants/urls.py
CaioTeixeira95/dojo_django
6897c7f1fd4be7d1e165d3aacec499e4cbc3b245
[ "MIT" ]
1
2021-08-12T15:03:50.000Z
2021-08-12T15:03:50.000Z
restaurants/urls.py
CaioTeixeira95/dojo_django
6897c7f1fd4be7d1e165d3aacec499e4cbc3b245
[ "MIT" ]
null
null
null
restaurants/urls.py
CaioTeixeira95/dojo_django
6897c7f1fd4be7d1e165d3aacec499e4cbc3b245
[ "MIT" ]
null
null
null
from rest_framework.routers import DefaultRouter from restaurants import views router = DefaultRouter() router.register( r"restaurants", views.RestaurantViewSet, basename="restaurant", ) urlpatterns = router.urls
18.916667
48
0.77533
from rest_framework.routers import DefaultRouter from restaurants import views router = DefaultRouter() router.register( r"restaurants", views.RestaurantViewSet, basename="restaurant", ) urlpatterns = router.urls
true
true
f75fa3644dbca7f59a137ebe04e7888d3f3170d0
91,888
py
Python
python/ray/tests/test_basic.py
tonymackinnon/ray
14a1419682bdba40d2c8bf226e1727cf44abcaa4
[ "Apache-2.0" ]
1
2020-09-27T08:48:11.000Z
2020-09-27T08:48:11.000Z
python/ray/tests/test_basic.py
tonymackinnon/ray
14a1419682bdba40d2c8bf226e1727cf44abcaa4
[ "Apache-2.0" ]
4
2019-03-04T13:03:24.000Z
2019-06-06T11:25:07.000Z
python/ray/tests/test_basic.py
tonymackinnon/ray
14a1419682bdba40d2c8bf226e1727cf44abcaa4
[ "Apache-2.0" ]
1
2020-01-13T07:58:05.000Z
2020-01-13T07:58:05.000Z
# coding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections from concurrent.futures import ThreadPoolExecutor import json import logging from multiprocessing import Process import os import random import re import setproctitle import s...
29.882276
79
0.606652
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections from concurrent.futures import ThreadPoolExecutor import json import logging from multiprocessing import Process import os import random import re import setproctitle import shutil import six...
true
true
f75fa38051abb3044017fd3b4921e128d3dd2174
17,075
py
Python
iotbx/cif/__init__.py
jbeilstenedmands/cctbx_project
c228fb15ab10377f664c39553d866281358195aa
[ "BSD-3-Clause-LBNL" ]
null
null
null
iotbx/cif/__init__.py
jbeilstenedmands/cctbx_project
c228fb15ab10377f664c39553d866281358195aa
[ "BSD-3-Clause-LBNL" ]
null
null
null
iotbx/cif/__init__.py
jbeilstenedmands/cctbx_project
c228fb15ab10377f664c39553d866281358195aa
[ "BSD-3-Clause-LBNL" ]
null
null
null
""" R. J. Gildea, L. J. Bourhis, O. V. Dolomanov, R. W. Grosse-Kunstleve, H. Puschmann, P. D. Adams and J. A. K. Howard: iotbx.cif: a comprehensive CIF toolbox. J. Appl. Cryst. (2011). 44, 1259-1263. https://doi.org/10.1107/S0021889811041161 http://cctbx.sourceforge.net/iotbx_cif """ from __future__ import division ...
38.806818
90
0.673441
""" R. J. Gildea, L. J. Bourhis, O. V. Dolomanov, R. W. Grosse-Kunstleve, H. Puschmann, P. D. Adams and J. A. K. Howard: iotbx.cif: a comprehensive CIF toolbox. J. Appl. Cryst. (2011). 44, 1259-1263. https://doi.org/10.1107/S0021889811041161 http://cctbx.sourceforge.net/iotbx_cif """ from __future__ import division ...
false
true
f75fa408a975454783ea79397f0447b47f6de2ef
2,725
py
Python
nn/two_layer_net_nn.py
rosequ/pytorch-examples
659a73cc68fc9d2d68d0c43fb33ff446a2b86c06
[ "MIT" ]
1
2019-04-04T03:21:40.000Z
2019-04-04T03:21:40.000Z
nn/two_layer_net_nn.py
sojvai/pytorch-examples
659a73cc68fc9d2d68d0c43fb33ff446a2b86c06
[ "MIT" ]
null
null
null
nn/two_layer_net_nn.py
sojvai/pytorch-examples
659a73cc68fc9d2d68d0c43fb33ff446a2b86c06
[ "MIT" ]
1
2020-08-29T18:16:27.000Z
2020-08-29T18:16:27.000Z
import torch from torch.autograd import Variable """ A fully-connected ReLU network with one hidden layer, trained to predict y from x by minimizing squared Euclidean distance. This implementation uses the nn package from PyTorch to build the network. PyTorch autograd makes it easy to define computational graphs and ...
42.578125
81
0.751193
import torch from torch.autograd import Variable N, D_in, H, D_out = 64, 1000, 100, 10 x = Variable(torch.randn(N, D_in)) y = Variable(torch.randn(N, D_out), requires_grad=False) model = torch.nn.Sequential( torch.nn.Linear(D_in, H), torch.nn.ReLU(), torch.nn.Linear(H, D_out), ...
true
true
f75fa6c39c363d3440d893269a09f7b6f67c5cae
3,019
py
Python
docs/conf.py
VolodymyrChapman/cellpose
4a4e78cda44a0728b5bfd27b389e418679ec2b0e
[ "BSD-3-Clause" ]
504
2020-02-04T06:42:53.000Z
2022-03-31T06:13:11.000Z
docs/conf.py
VolodymyrChapman/cellpose
4a4e78cda44a0728b5bfd27b389e418679ec2b0e
[ "BSD-3-Clause" ]
457
2020-02-04T20:53:06.000Z
2022-03-30T07:30:32.000Z
docs/conf.py
VolodymyrChapman/cellpose
4a4e78cda44a0728b5bfd27b389e418679ec2b0e
[ "BSD-3-Clause" ]
208
2020-02-04T15:50:20.000Z
2022-03-31T14:57:48.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
32.462366
79
0.654521
project = 'cellpose' copyright = '2020, Carsen Stringer & Marius Pachitariu' author = 'Carsen Stringer & Marius Pachitariu' release = '0.7.2' extensions = [ "sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.mathjax", "sphinx.ext.viewcode", 'sphinx.ext.napoleon'] autoapi_dirs = [...
true
true
f75fa7f265cd4d919c557ffc1b728c0242c2790d
4,662
py
Python
tests/test_end_to_end.py
DD-DeCaF/iloop-to-model
1ab5bdfd452b2c14abca5128c302fed0819e375b
[ "Apache-2.0" ]
null
null
null
tests/test_end_to_end.py
DD-DeCaF/iloop-to-model
1ab5bdfd452b2c14abca5128c302fed0819e375b
[ "Apache-2.0" ]
21
2017-03-17T13:38:31.000Z
2018-06-17T15:00:42.000Z
tests/test_end_to_end.py
DD-DeCaF/iloop-to-model
1ab5bdfd452b2c14abca5128c302fed0819e375b
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Novo Nordisk Foundation Center for Biosustainability, DTU. # # 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 requir...
40.189655
94
0.604033
from aiohttp.test_utils import AioHTTPTestCase, unittest_run_loop from iloop_to_model import iloop_client from iloop_to_model.app import get_app from iloop_to_model.iloop_to_model import ILOOP_SPECIES_TO_TAXON from iloop_to_model.settings import Default class EndToEndTestCase(AioHTTPTestCase): def setup(self): ...
true
true
f75fa85cae36f3529223784b816a03ea930e63c0
6,285
py
Python
docs/scripts/defaultsdoc.py
Acidburn0zzz/cord
21e4fe4aa5591b9581769cfeaa052749446a41ce
[ "Apache-2.0" ]
null
null
null
docs/scripts/defaultsdoc.py
Acidburn0zzz/cord
21e4fe4aa5591b9581769cfeaa052749446a41ce
[ "Apache-2.0" ]
null
null
null
docs/scripts/defaultsdoc.py
Acidburn0zzz/cord
21e4fe4aa5591b9581769cfeaa052749446a41ce
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # defaultsdoc.py - documentation for ansible default vaules # Copyright 2017-present Open Networking Foundation # # 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...
32.734375
115
0.637709
import argparse import fnmatch import jinja2 import logging import os import pprint import re import sys import xml.etree.ElementTree as ET import yaml import markedyaml sh = logging.StreamHandler(sys.stderr) sh.setFormatter(logging.Formatter(logging.BASIC_FORMAT)) LOG = logging.getLogger("defaultsdoc.py") LOG.addH...
true
true
f75fa88564336ad43a02005b762795c1c3d7a4aa
6,816
py
Python
pygmt/src/coast.py
tawandamoyo/pygmt
4ef90382bfd84dfa47ce2422d2937a9b803de214
[ "BSD-3-Clause" ]
null
null
null
pygmt/src/coast.py
tawandamoyo/pygmt
4ef90382bfd84dfa47ce2422d2937a9b803de214
[ "BSD-3-Clause" ]
24
2021-02-12T08:12:30.000Z
2022-02-08T13:04:23.000Z
pygmt/src/coast.py
tawandamoyo/pygmt
4ef90382bfd84dfa47ce2422d2937a9b803de214
[ "BSD-3-Clause" ]
null
null
null
""" coast - Plot land and water. """ from pygmt.clib import Session from pygmt.exceptions import GMTInvalidInput from pygmt.helpers import ( args_in_kwargs, build_arg_string, fmt_docstring, kwargs_to_strings, use_alias, ) @fmt_docstring @use_alias( R="region", J="projection", A="area_...
34.598985
88
0.600205
from pygmt.clib import Session from pygmt.exceptions import GMTInvalidInput from pygmt.helpers import ( args_in_kwargs, build_arg_string, fmt_docstring, kwargs_to_strings, use_alias, ) @fmt_docstring @use_alias( R="region", J="projection", A="area_thresh", C="lakes", B="frame"...
true
true
f75fa91922dc4e630aeb219758e3e459b8cab923
6,143
py
Python
models/StereoCNN/Resnet_module.py
daili0015/ModelFeast
0689ced4d0f37be438d3a91908e5e4cc5b7d54b8
[ "MIT" ]
247
2019-03-05T07:12:29.000Z
2022-03-29T01:51:17.000Z
models/StereoCNN/Resnet_module.py
jungerschwarz/ModelFeast
03afca0b129532135910ee2ac72a3b85be795289
[ "MIT" ]
8
2019-05-21T03:05:27.000Z
2021-12-09T03:22:51.000Z
models/StereoCNN/Resnet_module.py
jungerschwarz/ModelFeast
03afca0b129532135910ee2ac72a3b85be795289
[ "MIT" ]
47
2019-03-05T07:14:13.000Z
2021-11-11T01:04:28.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: zcy # @Date: 2019-02-14 19:29:27 # @Last Modified by: zcy # @Last Modified time: 2019-02-15 15:06:31 import torch import torch.nn as nn import torch.nn.functional as F import math from functools import partial __all__ = ['ResNet', 'BasicBlock', 'Bottleneck']...
29.252381
87
0.562917
import torch import torch.nn as nn import torch.nn.functional as F import math from functools import partial __all__ = ['ResNet', 'BasicBlock', 'Bottleneck'] def conv3x3x3(in_planes, out_planes, stride=1): return nn.Conv3d( in_planes, out_planes, kernel_size=3, stride=stride, ...
true
true
f75fa95ffae14923649579532de7316b7a6fa0dd
524
py
Python
plotly/validators/parcoords/_dimensiondefaults.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/parcoords/_dimensiondefaults.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/validators/parcoords/_dimensiondefaults.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class DimensionValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name='dimensiondefaults', parent_name='parcoords', **kwargs ): super(DimensionValidator, self).__init__( plotly_name=plo...
26.2
73
0.624046
import _plotly_utils.basevalidators class DimensionValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name='dimensiondefaults', parent_name='parcoords', **kwargs ): super(DimensionValidator, self).__init__( plotly_name=plo...
true
true
f75fa9c401abd02db28ecd812f3b8cf35f9752d3
1,715
py
Python
python_modules/libraries/dagster-aws/dagster_aws_tests/ecs_tests/launcher_tests/test_termination.py
asamoal/dagster
08fad28e4b608608ce090ce2e8a52c2cf9dd1b64
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-aws/dagster_aws_tests/ecs_tests/launcher_tests/test_termination.py
asamoal/dagster
08fad28e4b608608ce090ce2e8a52c2cf9dd1b64
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-aws/dagster_aws_tests/ecs_tests/launcher_tests/test_termination.py
asamoal/dagster
08fad28e4b608608ce090ce2e8a52c2cf9dd1b64
[ "Apache-2.0" ]
null
null
null
def test_termination(instance, workspace, run): instance.launch_run(run.run_id, workspace) assert instance.run_launcher.terminate(run.run_id) assert not instance.run_launcher.terminate(run.run_id) def test_missing_run(instance, workspace, run, monkeypatch): instance.launch_run(run.run_id, workspace) ...
33.627451
78
0.756851
def test_termination(instance, workspace, run): instance.launch_run(run.run_id, workspace) assert instance.run_launcher.terminate(run.run_id) assert not instance.run_launcher.terminate(run.run_id) def test_missing_run(instance, workspace, run, monkeypatch): instance.launch_run(run.run_id, workspace) ...
true
true
f75fab9af5993267bfec3f91775a8d1062835c4f
307
py
Python
src/moz_books/exception/__init__.py
yukkun007/mmbooks
4a05951ee30e33295b1b4c0b578f02ad6a4a20a5
[ "MIT" ]
null
null
null
src/moz_books/exception/__init__.py
yukkun007/mmbooks
4a05951ee30e33295b1b4c0b578f02ad6a4a20a5
[ "MIT" ]
41
2021-10-08T05:55:21.000Z
2022-03-28T23:14:22.000Z
src/moz_books/exception/__init__.py
mozkzki/moz-books
75fd44041ea8cb4cfe283fa5452443dbaaa4d732
[ "MIT" ]
null
null
null
from moz_books.exception.invalid_response_error import ( # noqa F401 InvalidResponseError, ) from moz_books.exception.invalid_search_params_error import ( # noqa F401 InvalidSearchParamsError, ) from moz_books.exception.not_found_env_value_error import ( # noqa F401 NotFoundEnvValueError, )
30.7
74
0.80456
from moz_books.exception.invalid_response_error import ( InvalidResponseError, ) from moz_books.exception.invalid_search_params_error import ( InvalidSearchParamsError, ) from moz_books.exception.not_found_env_value_error import ( NotFoundEnvValueError, )
true
true
f75faba9ba62835ff41beb7d83f4d1037318e196
6,662
py
Python
bindings/python/ensmallen_graph/datasets/string/mycoplasmabovis.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/mycoplasmabovis.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/mycoplasmabovis.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Mycoplasma bovis. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021-02-02...
34.879581
223
0.702192
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def MycoplasmaBovis( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: return ...
true
true
f75fac34a1246aa0c2e4c2797f89a723899b89e9
160
py
Python
rmrb/manage.py
Ayeaaa/socialnet
d5363dc4b081ef192c7897bed0689aacf6e00162
[ "MIT" ]
null
null
null
rmrb/manage.py
Ayeaaa/socialnet
d5363dc4b081ef192c7897bed0689aacf6e00162
[ "MIT" ]
null
null
null
rmrb/manage.py
Ayeaaa/socialnet
d5363dc4b081ef192c7897bed0689aacf6e00162
[ "MIT" ]
null
null
null
from app import create_app app = create_app() if __name__ == '__main__': # app.run(host='0.0.0.0', port=5000, debug="True") app.run(port=5000)
20
55
0.61875
from app import create_app app = create_app() if __name__ == '__main__': app.run(port=5000)
true
true
f75fac8d42fc0b1f7619e905d3eb9f6c5e89d79d
7,859
py
Python
benchmarks/f3_wrong_hints_permutations/scaling_nonlinear_software/10-19_16.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints_permutations/scaling_nonlinear_software/10-19_16.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints_permutations/scaling_nonlinear_software/10-19_16.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import FrozenSet, Tuple import pysmt.typing as types from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
34.169565
81
0.529457
from typing import FrozenSet, Tuple import pysmt.typing as types from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
true
true
f75faca0bb67da741648769b11320056a8c8ac7e
64
py
Python
tests/conftest.py
brianbruggeman/rl
6dd8a53da07697ffc87e62aa397be7b3b08f0aa0
[ "MIT" ]
3
2018-01-31T19:55:28.000Z
2019-05-30T20:21:18.000Z
tests/conftest.py
brianbruggeman/rl
6dd8a53da07697ffc87e62aa397be7b3b08f0aa0
[ "MIT" ]
12
2019-01-18T16:16:19.000Z
2019-06-14T03:26:34.000Z
tests/conftest.py
brianbruggeman/rl
6dd8a53da07697ffc87e62aa397be7b3b08f0aa0
[ "MIT" ]
1
2019-01-18T16:20:15.000Z
2019-01-18T16:20:15.000Z
from decorators import * # noqa from fixtures import * # noqa
21.333333
32
0.71875
from decorators import * from fixtures import *
true
true
f75faf0324cceaeb0b0bf36689f520969fff2813
468
py
Python
signals/signals.py
davidcrawford/chronic
6118abb69b4b0feb9f811a8e224bfda186890896
[ "MIT" ]
19
2015-01-31T10:22:18.000Z
2022-02-17T22:49:26.000Z
signals/signals.py
davidcrawford/chronic
6118abb69b4b0feb9f811a8e224bfda186890896
[ "MIT" ]
null
null
null
signals/signals.py
davidcrawford/chronic
6118abb69b4b0feb9f811a8e224bfda186890896
[ "MIT" ]
3
2015-09-15T09:47:27.000Z
2020-11-25T20:28:43.000Z
class Signal: def __init__(self, name): self.name = name self.callbacks = [] def connect(self, callback): self.callbacks.append(callback) def disconnect(self, callback): for index, cb in enumerate(self.callbacks): if callback == cb: del self.call...
26
51
0.555556
class Signal: def __init__(self, name): self.name = name self.callbacks = [] def connect(self, callback): self.callbacks.append(callback) def disconnect(self, callback): for index, cb in enumerate(self.callbacks): if callback == cb: del self.call...
true
true
f75faf607ed7eed059504ebc57d3eb1bf3b43e70
85
py
Python
sol/sol_centered_average.py
igamberdievhasan/codingbat-notebooks
b0a41f22b9064efc7f7f7da55e8c99fc21ce364d
[ "Apache-2.0" ]
null
null
null
sol/sol_centered_average.py
igamberdievhasan/codingbat-notebooks
b0a41f22b9064efc7f7f7da55e8c99fc21ce364d
[ "Apache-2.0" ]
6
2020-03-02T20:59:43.000Z
2020-03-18T01:20:30.000Z
sol/sol_centered_average.py
igamberdievhasan/codingbat-notebooks
b0a41f22b9064efc7f7f7da55e8c99fc21ce364d
[ "Apache-2.0" ]
1
2020-03-13T02:48:04.000Z
2020-03-13T02:48:04.000Z
def centered_average(nums): nums.sort() return sum(nums[1:-1]) / (len(nums) - 2)
21.25
42
0.635294
def centered_average(nums): nums.sort() return sum(nums[1:-1]) / (len(nums) - 2)
true
true
f75faf6322df5433373a9f8ee2e900a8b5e551a7
575
py
Python
Python/easy/0053_maximum_subarray.py
CalmScout/LeetCode
62720934b5906e6b255c7e91d3a6fa1d713e4391
[ "MIT" ]
null
null
null
Python/easy/0053_maximum_subarray.py
CalmScout/LeetCode
62720934b5906e6b255c7e91d3a6fa1d713e4391
[ "MIT" ]
null
null
null
Python/easy/0053_maximum_subarray.py
CalmScout/LeetCode
62720934b5906e6b255c7e91d3a6fa1d713e4391
[ "MIT" ]
null
null
null
""" Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. """ class Solution: def maxSubArray(self, nums): dp = [0] * len(nums) dp[0] = nums[0] for i in range(1, len(nums)): dp[i] = max(nums[i], dp...
30.263158
90
0.575652
class Solution: def maxSubArray(self, nums): dp = [0] * len(nums) dp[0] = nums[0] for i in range(1, len(nums)): dp[i] = max(nums[i], dp[i-1] + nums[i]) return max(dp) if __name__ == "__main__": inp = [-2, 1, -3, 4, -1, 2, 1, -5, 4] out = 6 actual = Solution(...
true
true
f75fafd59eeb9a7fa1ce9e42ccd46269f07c0a39
2,624
py
Python
test/chemistry/test_driver_methods_pyquante.py
Sahar2/qiskit-aqua
a228fbe6b9613cff43e47796a7e4843deba2b051
[ "Apache-2.0" ]
null
null
null
test/chemistry/test_driver_methods_pyquante.py
Sahar2/qiskit-aqua
a228fbe6b9613cff43e47796a7e4843deba2b051
[ "Apache-2.0" ]
null
null
null
test/chemistry/test_driver_methods_pyquante.py
Sahar2/qiskit-aqua
a228fbe6b9613cff43e47796a7e4843deba2b051
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
41.650794
87
0.640625
from qiskit.chemistry import QiskitChemistryError from qiskit.chemistry.drivers import PyQuanteDriver, UnitsType, BasisType, HFMethodType from test.chemistry.test_driver_methods import TestDriverMethods class TestDriverMethodsPyquante(TestDriverMethods): def setUp(self): super().setup() try: ...
true
true
f75fb0a49846f8f31b74d5c9c213391e94f795ce
1,683
py
Python
examples/example_1.py
medram/Pool_Workers
15d95a29de27a786cbfb7e38e7030cefcd50c906
[ "MIT" ]
4
2020-11-08T01:37:24.000Z
2021-08-30T05:56:20.000Z
examples/example_1.py
medram/Pool_Workers
15d95a29de27a786cbfb7e38e7030cefcd50c906
[ "MIT" ]
null
null
null
examples/example_1.py
medram/Pool_Workers
15d95a29de27a786cbfb7e38e7030cefcd50c906
[ "MIT" ]
3
2021-01-14T13:50:52.000Z
2022-01-29T08:49:18.000Z
import time import threading import random from queue import Queue from pool_workers import Pool # Our logic to be performed Asynchronously. def our_process(a): t = threading.current_thread() # just to semulate how mush time this logic is going to take to be done. time.sleep(random.uniform(0, 3)) print(f'{t.getN...
28.525424
102
0.748663
import time import threading import random from queue import Queue from pool_workers import Pool def our_process(a): t = threading.current_thread() time.sleep(random.uniform(0, 3)) print(f'{t.getName()} is finished the task {a} ...') def execption_handler(thread_name, exception): print(f'{thread_name}: {exc...
true
true
f75fb1960f361780d69ad53ac22edfeb1883e62b
495
py
Python
Getter_Api/app/app.py
ChanceDurr/forest-fire-watch-ds
a1662d75cc735e9c3bedbe9944a5b0b410e3219d
[ "MIT" ]
1
2019-11-06T22:27:22.000Z
2019-11-06T22:27:22.000Z
Getter_Api/app/app.py
ewuerfel66/forest-fire-watch-ds
1ad018e02d7eb205b3e57162fd09e09c83b92f8d
[ "MIT" ]
null
null
null
Getter_Api/app/app.py
ewuerfel66/forest-fire-watch-ds
1ad018e02d7eb205b3e57162fd09e09c83b92f8d
[ "MIT" ]
null
null
null
#Flask Imports from flask import Flask from flask_restful import Api # DS Logic imports import pandas as pd import numpy as np from math import radians, cos, sin, asin, sqrt def create_app(): """ Creates and configures an instance of our Flask API """ app = Flask(__name__) app.run(debug=True) ...
19.8
55
0.666667
from flask import Flask from flask_restful import Api import pandas as pd import numpy as np from math import radians, cos, sin, asin, sqrt def create_app(): app = Flask(__name__) app.run(debug=True) api = Api(app) @app.route("/running", methods=["GET"]) def running(): return 'Its u...
true
true
f75fb23d82a52351d2f8e2805783df5a90cd225a
24,187
py
Python
openpype/settings/entities/dict_mutable_keys_entity.py
yosuperdope/OpenPype
0c90df97ddb8cda291a4f66d35da58b3deb94a71
[ "MIT" ]
44
2019-03-19T04:56:35.000Z
2021-04-23T12:05:08.000Z
openpype/settings/entities/dict_mutable_keys_entity.py
jrsndl/pype
f9d80ef2c0663921291c5f47d24bea51fc43bac7
[ "MIT" ]
655
2020-03-17T15:10:21.000Z
2021-04-23T18:22:52.000Z
openpype/settings/entities/dict_mutable_keys_entity.py
jrsndl/pype
f9d80ef2c0663921291c5f47d24bea51fc43bac7
[ "MIT" ]
21
2019-03-19T04:56:38.000Z
2021-04-23T09:10:59.000Z
import re import copy from .lib import ( NOT_SET, OverrideState ) from . import EndpointEntity from .exceptions import ( DefaultsNotDefined, InvalidKeySymbols, StudioDefaultsNotDefined, RequiredKeyModified, EntitySchemaError ) from openpype.settings.constants import ( METADATA_KEYS, ...
33.269601
79
0.623972
import re import copy from .lib import ( NOT_SET, OverrideState ) from . import EndpointEntity from .exceptions import ( DefaultsNotDefined, InvalidKeySymbols, StudioDefaultsNotDefined, RequiredKeyModified, EntitySchemaError ) from openpype.settings.constants import ( METADATA_KEYS, ...
true
true
f75fb3119bdc5151061430aaf524f851940f630c
645
py
Python
home/migrations/0001_initial.py
jesuispaulbonnet/technic-alu
697b948108bdda3c2f538f88d747b5cd50e21254
[ "Unlicense" ]
3
2019-09-03T16:25:13.000Z
2021-10-15T03:19:28.000Z
home/migrations/0001_initial.py
jesuispaulbonnet/technic-alu
697b948108bdda3c2f538f88d747b5cd50e21254
[ "Unlicense" ]
9
2020-02-12T01:03:46.000Z
2022-03-11T23:24:45.000Z
home/migrations/0001_initial.py
jesuispaulbonnet/technic-alu
697b948108bdda3c2f538f88d747b5cd50e21254
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ] operations = [ migrations.CreateModel( name='HomePage', fi...
25.8
172
0.576744
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ] operations = [ migrations.CreateModel( name='HomePage', fields=[ (...
true
true
f75fb3fb0f42aff15d42f5b242baceeb30ddb552
233
py
Python
app/main.py
SuperOrca/Notes
2c4906447c86f29bc2d8b068c5e7f83e1f09ccde
[ "MIT" ]
null
null
null
app/main.py
SuperOrca/Notes
2c4906447c86f29bc2d8b068c5e7f83e1f09ccde
[ "MIT" ]
null
null
null
app/main.py
SuperOrca/Notes
2c4906447c86f29bc2d8b068c5e7f83e1f09ccde
[ "MIT" ]
null
null
null
from flask import Blueprint, render_template main = Blueprint("main", __name__) @main.route("/") def index(): return render_template("index.html") @main.route("/about") def about(): return render_template("about.html")
15.533333
44
0.699571
from flask import Blueprint, render_template main = Blueprint("main", __name__) @main.route("/") def index(): return render_template("index.html") @main.route("/about") def about(): return render_template("about.html")
true
true