hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2ead693b4ceac5233b951d6a460c650fcf8714f8 | 4,061 | py | Python | osx/devkit/plug-ins/scripted/multiPlugInfoCmd.py | leegoonz/Maya-devkit | b81fe799b58e854e4ef16435426d60446e975871 | [
"ADSL"
] | 10 | 2018-03-30T16:09:02.000Z | 2021-12-07T07:29:19.000Z | osx/devkit/plug-ins/scripted/multiPlugInfoCmd.py | leegoonz/Maya-devkit | b81fe799b58e854e4ef16435426d60446e975871 | [
"ADSL"
] | null | null | null | osx/devkit/plug-ins/scripted/multiPlugInfoCmd.py | leegoonz/Maya-devkit | b81fe799b58e854e4ef16435426d60446e975871 | [
"ADSL"
] | 9 | 2018-06-02T09:18:49.000Z | 2021-12-20T09:24:35.000Z | #-
# ==========================================================================
# Copyright 2010 Autodesk, Inc. All rights reserved.
#
# Use of this software is subject to the terms of the Autodesk
# license agreement provided at the time of installation or download,
# or which otherwise accompanies this software in ei... | 29.215827 | 92 | 0.704014 |
b166664dbd66c7683d54a4b630cdbf81d4d4945d | 752 | py | Python | python/day-01/solve.py | jrrickerson/adventofcode2021 | 496482a72e49a18c738e69e28a62ff6b940e592c | [
"MIT"
] | null | null | null | python/day-01/solve.py | jrrickerson/adventofcode2021 | 496482a72e49a18c738e69e28a62ff6b940e592c | [
"MIT"
] | null | null | null | python/day-01/solve.py | jrrickerson/adventofcode2021 | 496482a72e49a18c738e69e28a62ff6b940e592c | [
"MIT"
] | null | null | null | from utils import load_depth_list, count_increases, sliding_windows
def part_1(input_file):
depth_list = load_depth_list(open(input_file))
increases = count_increases(depth_list)
return increases
def part_2(input_file):
depth_list = load_depth_list(open(input_file))
windows = sliding_windows(dep... | 24.258065 | 77 | 0.711436 |
ac4c56b3c44a6c5ebcad33320343397e6787a57f | 5,240 | py | Python | photo.py | gnfrazier/twonl | 7c6a22951f130837e60276c93b84e5f6c2da053b | [
"MIT"
] | null | null | null | photo.py | gnfrazier/twonl | 7c6a22951f130837e60276c93b84e5f6c2da053b | [
"MIT"
] | 1 | 2019-04-30T01:21:28.000Z | 2019-04-30T01:21:28.000Z | photo.py | gnfrazier/twonl | 7c6a22951f130837e60276c93b84e5f6c2da053b | [
"MIT"
] | null | null | null | from io import BytesIO
from PIL import Image
import shutil
import arrow
from bs4 import BeautifulSoup
import requests
def get_stream_url(flickr_link):
'''Processes a long flickr link to the main stream page'''
parsed = flickr_link.replace('https://', '').split('/')
url = '/'.join(parsed[:parsed.index('n... | 26.464646 | 78 | 0.586069 |
cc00e148a99d53164d3cea16a28457a945df5e8e | 1,101 | py | Python | data_maps.py | VolkerGast/GraphPynt | e053c03da7088dbbb736b1e928be6e7ccf72df49 | [
"MIT"
] | null | null | null | data_maps.py | VolkerGast/GraphPynt | e053c03da7088dbbb736b1e928be6e7ccf72df49 | [
"MIT"
] | null | null | null | data_maps.py | VolkerGast/GraphPynt | e053c03da7088dbbb736b1e928be6e7ccf72df49 | [
"MIT"
] | null | null | null |
node_types = {
'a',
'p',
's',
'sp',
't'}
node_type_map = {
'p': 'paragraph',
's': 'segment',
'a': 'anno',
't': 'token',
'sp': 'speaker'}
edge_type_map_file = {
'a': 'anno',
'o': 'order'}
edge_type_map_edge = {
'a': 'anno',
'o': 'order'}
edge_type_map_dict = {... | 14.878378 | 37 | 0.502271 |
f7b58dcb3da499fd8eb811e9fef3684098f2646d | 7,317 | py | Python | projects/perception/slam/full_map_posterior_gmapping/src/fmp_slam_eval/src/fmp_slam_eval/ros_launcher.py | ad-daniel/opendr | cc71138ae22ec39b186960ff98c74bc2cdca3623 | [
"Apache-2.0"
] | 217 | 2020-04-10T16:39:36.000Z | 2022-03-30T15:39:04.000Z | projects/perception/slam/full_map_posterior_gmapping/src/fmp_slam_eval/src/fmp_slam_eval/ros_launcher.py | ad-daniel/opendr | cc71138ae22ec39b186960ff98c74bc2cdca3623 | [
"Apache-2.0"
] | 46 | 2021-12-16T13:23:04.000Z | 2022-03-30T11:36:29.000Z | projects/perception/slam/full_map_posterior_gmapping/src/fmp_slam_eval/src/fmp_slam_eval/ros_launcher.py | ad-daniel/opendr | cc71138ae22ec39b186960ff98c74bc2cdca3623 | [
"Apache-2.0"
] | 29 | 2021-12-16T09:26:13.000Z | 2022-03-29T15:19:18.000Z | # Copyright 2020-2022 OpenDR European Project
#
# 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 agree... | 38.308901 | 119 | 0.597649 |
01e85eb15a9aaecdf577a81df786dac84b239392 | 448 | py | Python | EfficientGCNv1/src/generator.py | myatthukyaw/res_efficient_gcns | 89280d10f1d4864dfa0a5c3813db11e074dcb2f2 | [
"MIT"
] | 67 | 2021-06-29T13:28:57.000Z | 2022-03-28T06:36:33.000Z | EfficientGCNv1/src/generator.py | myatthukyaw/res_efficient_gcns | 89280d10f1d4864dfa0a5c3813db11e074dcb2f2 | [
"MIT"
] | 8 | 2021-08-31T13:21:29.000Z | 2022-02-22T09:58:39.000Z | EfficientGCNv1/src/generator.py | myatthukyaw/res_efficient_gcns | 89280d10f1d4864dfa0a5c3813db11e074dcb2f2 | [
"MIT"
] | 15 | 2021-06-30T04:20:48.000Z | 2022-02-25T07:14:47.000Z | import logging
from . import utils as U
from . import reader
class Generator():
def __init__(self, args):
U.set_logging(args)
self.dataset = args.dataset
self.generator = reader.create(args)
def start(self):
logging.info('')
logging.info('Starting generating ...')
... | 23.578947 | 56 | 0.622768 |
77300d8a6316c74cd3d0c7654432e4c3b4777c18 | 1,571 | py | Python | tronn/nets/nets.py | kundajelab/tronn | 59654a958f6debb5be150e383e96997f1982359d | [
"MIT"
] | 5 | 2020-10-18T21:17:44.000Z | 2021-11-30T06:25:09.000Z | tronn/nets/nets.py | kundajelab/tronn | 59654a958f6debb5be150e383e96997f1982359d | [
"MIT"
] | 1 | 2021-11-18T13:03:48.000Z | 2021-11-18T13:03:48.000Z | tronn/nets/nets.py | kundajelab/tronn | 59654a958f6debb5be150e383e96997f1982359d | [
"MIT"
] | null | null | null | """Access point for all nets
"""
from tronn.nets.deep_nets import basset
from tronn.nets.deep_nets import fbasset
from tronn.nets.deep_nets import basset_plus
from tronn.nets.deep_nets import danq
from tronn.nets.deep_nets import deepsea
from tronn.nets.deep_nets import resnet
from tronn.nets.deep_nets import tfslim_i... | 31.42 | 73 | 0.811585 |
7abbc9918c5dfd32d3ce3fa3a0be4b060c75ea09 | 36,738 | py | Python | tests/python/unittest/test_random.py | Sotskin/incubator-mxnet | 0dbba84c72f85e5db90161bd6282763472ce5f4f | [
"Apache-2.0"
] | null | null | null | tests/python/unittest/test_random.py | Sotskin/incubator-mxnet | 0dbba84c72f85e5db90161bd6282763472ce5f4f | [
"Apache-2.0"
] | 23 | 2018-06-11T20:03:54.000Z | 2018-08-10T03:17:49.000Z | tests/python/unittest/test_random.py | Sotskin/incubator-mxnet | 0dbba84c72f85e5db90161bd6282763472ce5f4f | [
"Apache-2.0"
] | 1 | 2018-06-11T19:13:21.000Z | 2018-06-11T19:13:21.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 49.915761 | 143 | 0.587702 |
09ed25a046a2624efd62154479d1d73bf5ab5456 | 2,109 | py | Python | aliyun-python-sdk-hbr/aliyunsdkhbr/request/v20170908/DescribeResourcePackagesRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-hbr/aliyunsdkhbr/request/v20170908/DescribeResourcePackagesRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-hbr/aliyunsdkhbr/request/v20170908/DescribeResourcePackagesRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.47619 | 83 | 0.757705 |
8411846daa5c88af371cc28c79cc62aa3db3615e | 7,300 | py | Python | Mask_Detection_github.py | PrathameshDeshpande/Mask_Detector_Covid_19 | a691e91f599affb4e7e6d611c0d9be70b15e2f98 | [
"Apache-2.0"
] | null | null | null | Mask_Detection_github.py | PrathameshDeshpande/Mask_Detector_Covid_19 | a691e91f599affb4e7e6d611c0d9be70b15e2f98 | [
"Apache-2.0"
] | null | null | null | Mask_Detection_github.py | PrathameshDeshpande/Mask_Detector_Covid_19 | a691e91f599affb4e7e6d611c0d9be70b15e2f98 | [
"Apache-2.0"
] | null | null | null | import os
import random
import shutil
import tensorflow as tf
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from shutil import copyfile
from os import getcwd
import cv2
from tensorflow.keras.layers import Conv2D, Input, ZeroPadding2D, BatchNormalization, Activation, MaxPooling2D, Flatten, ... | 37.628866 | 139 | 0.657808 |
10454b24211f6b821edf883985c77b7a142bae54 | 2,865 | py | Python | tests/refapi.py | wilddog64/jenkins-webapi | 57bfe301cf435a7cb2d08f1352785dd63aa39b18 | [
"BSD-3-Clause"
] | null | null | null | tests/refapi.py | wilddog64/jenkins-webapi | 57bfe301cf435a7cb2d08f1352785dd63aa39b18 | [
"BSD-3-Clause"
] | null | null | null | tests/refapi.py | wilddog64/jenkins-webapi | 57bfe301cf435a7cb2d08f1352785dd63aa39b18 | [
"BSD-3-Clause"
] | 1 | 2021-04-11T13:35:08.000Z | 2021-04-11T13:35:08.000Z | # -*- coding: utf-8; -*-
from subprocess import STDOUT, PIPE, Popen, CalledProcessError
from functools import partial
from . utils import *
#-----------------------------------------------------------------------------
class JenkinsCLI:
def __init__(self, url, jar):
self.cmd = ['java', '-jar', jar, '-s'... | 33.313953 | 80 | 0.565794 |
2742bfe315d59cd57677c4b48b7e9b4dd34076bc | 5,274 | py | Python | mkt/detail/tests/test_views.py | acidburn0zzz/zamboni | 780fbeb99e240a569a72a1c15410f49b76b3807c | [
"BSD-3-Clause"
] | 1 | 2017-07-14T19:22:39.000Z | 2017-07-14T19:22:39.000Z | mkt/detail/tests/test_views.py | Acidburn0zzz/zamboni | 780fbeb99e240a569a72a1c15410f49b76b3807c | [
"BSD-3-Clause"
] | 6 | 2021-02-02T23:08:48.000Z | 2021-09-08T02:47:17.000Z | mkt/detail/tests/test_views.py | Acidburn0zzz/zamboni | 780fbeb99e240a569a72a1c15410f49b76b3807c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import hashlib
import json
import zipfile
from django.core.files.storage import default_storage as storage
import mock
from nose.tools import eq_
import amo
import amo.tests
from mkt.webapps.models import Webapp
from mkt.site.fixtures import fixture
class TestPackagedManifest(amo.tests.Tes... | 34.470588 | 74 | 0.633864 |
fdae64f61d85750b535429dfdd1970334eb45710 | 66 | py | Python | hypernet/apps/fitRates/__init__.py | christian-jacobsen/hypernet | 9f62e1531eb152cc08af0b0c6b09d6fde8d42400 | [
"Apache-2.0"
] | null | null | null | hypernet/apps/fitRates/__init__.py | christian-jacobsen/hypernet | 9f62e1531eb152cc08af0b0c6b09d6fde8d42400 | [
"Apache-2.0"
] | null | null | null | hypernet/apps/fitRates/__init__.py | christian-jacobsen/hypernet | 9f62e1531eb152cc08af0b0c6b09d6fde8d42400 | [
"Apache-2.0"
] | null | null | null | from hypernet.apps.fitRates import main
__all__ = [
"main"
]
| 11 | 39 | 0.681818 |
02f26a26c07899aeea60b2eeca0c89e9da70cfc5 | 8,072 | py | Python | lib/datasets/mini_imagenet.py | YiteWang/TENAS | 98c9cf1db1246cf4d43e51218e8cf273a175ef9f | [
"MIT"
] | null | null | null | lib/datasets/mini_imagenet.py | YiteWang/TENAS | 98c9cf1db1246cf4d43e51218e8cf273a175ef9f | [
"MIT"
] | null | null | null | lib/datasets/mini_imagenet.py | YiteWang/TENAS | 98c9cf1db1246cf4d43e51218e8cf273a175ef9f | [
"MIT"
] | null | null | null | import os
import pickle
from PIL import Image
import numpy as np
import torch
from torch.utils.data import Dataset
import torchvision.transforms as transforms
class ImageNet(Dataset):
def __init__(self, args, partition='train', pretrain=True, is_sample=False, k=4096,
transform=None):
supe... | 41.823834 | 106 | 0.594524 |
ad7f9aa005a59eecbbd9b606a366d987347a5a1c | 858 | py | Python | Stefan/day3/solutions.py | kevin-ci/advent-of-code-2020 | 697dd3d2639e30e59b228fa417ca5a76cd94f9e5 | [
"MIT"
] | null | null | null | Stefan/day3/solutions.py | kevin-ci/advent-of-code-2020 | 697dd3d2639e30e59b228fa417ca5a76cd94f9e5 | [
"MIT"
] | null | null | null | Stefan/day3/solutions.py | kevin-ci/advent-of-code-2020 | 697dd3d2639e30e59b228fa417ca5a76cd94f9e5 | [
"MIT"
] | null | null | null | def load_input(filename):
with open(filename, 'r') as f:
return f.read().split('\n')
def traverse(input_file, x_hat, y_hat):
num_trees = 0
x, y = 0, 0
limit = len(input_file[0])
y_limit = len(input_file)
tree_rows = [list(tree_row) for tree_row in input_file]
while y < y_limit:
... | 26 | 59 | 0.552448 |
a8e3b8d3290150a0ff8c9bb79c64419fbc05cae4 | 1,036 | py | Python | defoe/alto/queries/total_pages.py | kallewesterling/defoe | d72af2f748fd4363a4718c93bb0b0284b8cb1f3e | [
"MIT"
] | 2 | 2022-02-14T12:10:54.000Z | 2022-02-14T12:35:44.000Z | defoe/alto/queries/total_pages.py | kallewesterling/defoe | d72af2f748fd4363a4718c93bb0b0284b8cb1f3e | [
"MIT"
] | 17 | 2022-02-09T21:46:14.000Z | 2022-02-25T14:55:09.000Z | defoe/alto/queries/total_pages.py | kallewesterling/defoe | d72af2f748fd4363a4718c93bb0b0284b8cb1f3e | [
"MIT"
] | 1 | 2022-02-14T13:19:08.000Z | 2022-02-14T13:19:08.000Z | """
Counts total number of pages.
"""
from operator import add
def do_query(archives, config_file=None, logger=None, context=None):
"""
Iterate through archives and count total number of documents
and total number of pages.
Returns result of form:
{
"num_documents": num_documents,... | 26.564103 | 68 | 0.673745 |
f886f3d6a7ee6c2af58b131b8aa4314596f0c471 | 31,907 | py | Python | lib/galaxy/webapps/tool_shed/api/repositories.py | hidelab/galaxy-central-hpc | 75539db90abe90377db95718f83cafa7cfa43301 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/webapps/tool_shed/api/repositories.py | hidelab/galaxy-central-hpc | 75539db90abe90377db95718f83cafa7cfa43301 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/webapps/tool_shed/api/repositories.py | hidelab/galaxy-central-hpc | 75539db90abe90377db95718f83cafa7cfa43301 | [
"CC-BY-3.0"
] | null | null | null | import json
import logging
import os
import tarfile
import tempfile
from time import strftime
from galaxy import util
from galaxy import web
from galaxy.model.orm import and_
from galaxy.web.base.controller import BaseAPIController
from galaxy.web.base.controller import HTTPBadRequest
from galaxy.web.framework.helpers... | 56.774021 | 136 | 0.600871 |
5a85cbaf744d6fbfa04710a4f667c55605d42088 | 2,141 | py | Python | docs/source/conf.py | Steefano/transfer | 1ed557411a0ea464ab3279bd6413c9fe9e276291 | [
"MIT"
] | 2 | 2020-12-10T20:14:16.000Z | 2020-12-10T21:27:00.000Z | docs/source/conf.py | Steefano/transfer | 1ed557411a0ea464ab3279bd6413c9fe9e276291 | [
"MIT"
] | null | null | null | docs/source/conf.py | Steefano/transfer | 1ed557411a0ea464ab3279bd6413c9fe9e276291 | [
"MIT"
] | null | null | null | # 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 --------------------------------------------------------------
... | 33.984127 | 80 | 0.651565 |
e0cf0b81d1cbe5b9159551526ac7828cc5926901 | 658 | py | Python | src/magnetSusc/python/klist_generate.py | chanul13/EDMFTF | 967d85d898924991b31861b4e1f45129e3eff180 | [
"BSD-3-Clause"
] | 7 | 2018-04-03T06:37:42.000Z | 2021-11-08T11:44:06.000Z | src/magnetSusc/python/klist_generate.py | chanul13/EDMFTF | 967d85d898924991b31861b4e1f45129e3eff180 | [
"BSD-3-Clause"
] | null | null | null | src/magnetSusc/python/klist_generate.py | chanul13/EDMFTF | 967d85d898924991b31861b4e1f45129e3eff180 | [
"BSD-3-Clause"
] | 3 | 2016-10-27T20:23:34.000Z | 2019-12-13T13:54:11.000Z | #!/usr/bin/env python
from scipy import *
BS=[[1,1,0], [-1,1,0], [0,0,2]]
Ni = [16,16,16]
BS = array(BS,dtype=float)
toSCALE=1./min(filter(lambda x: x>1e-6, abs(BS.flatten())))
SCALE = int(round(max(Ni)*toSCALE))
l=0
for i in range(Ni[0]):
for j in range(Ni[1]):
for n in range(Ni[2]):
l+=... | 21.933333 | 90 | 0.5 |
6e52eae7908e49c553b9a924975bcd190c2e1a57 | 2,883 | py | Python | matplotlib/gallery_python/ticks_and_spines/spine_placement_demo.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 13 | 2020-01-04T07:37:38.000Z | 2021-08-31T05:19:58.000Z | matplotlib/gallery_python/ticks_and_spines/spine_placement_demo.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 3 | 2020-06-05T22:42:53.000Z | 2020-08-24T07:18:54.000Z | matplotlib/gallery_python/ticks_and_spines/spine_placement_demo.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 9 | 2020-10-19T04:53:06.000Z | 2021-08-31T05:20:01.000Z | """
====================
Spine Placement Demo
====================
Adjusting the location and appearance of axis spines.
"""
import numpy as np
import matplotlib.pyplot as plt
###############################################################################
fig = plt.figure()
x = np.linspace(-np.pi, np.pi, 100)
y = 2... | 26.694444 | 79 | 0.605272 |
4d11c58eb661aab8b4583828168ea5b6f651d579 | 281 | py | Python | start.py | BorysekOndrej/bakalarka3 | 01529a694eb6f5859f5da8bf471050b7b98a1eef | [
"MIT"
] | 1 | 2020-04-21T17:45:31.000Z | 2020-04-21T17:45:31.000Z | start.py | BorysekOndrej/bakalarka3 | 01529a694eb6f5859f5da8bf471050b7b98a1eef | [
"MIT"
] | null | null | null | start.py | BorysekOndrej/bakalarka3 | 01529a694eb6f5859f5da8bf471050b7b98a1eef | [
"MIT"
] | null | null | null | import config
from app import create_app
app = create_app()
if __name__ == "__main__":
if config.FlaskConfig.START_FLASK:
app.run(host=config.ServerLocation.address, port=config.ServerLocation.port)
else:
print("START_FLASK env variable not set to True")
| 25.545455 | 84 | 0.725979 |
19a7237c3dff7808d9e2d11a252649d789416eb3 | 1,170 | py | Python | tests/storage/cases/test_KT1Wer24gKPTsFRkAuYgDMycQnfCjvrY38Cc_babylon.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2021-05-20T16:52:08.000Z | 2021-05-20T16:52:08.000Z | tests/storage/cases/test_KT1Wer24gKPTsFRkAuYgDMycQnfCjvrY38Cc_babylon.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2020-12-30T16:44:56.000Z | 2020-12-30T16:44:56.000Z | tests/storage/cases/test_KT1Wer24gKPTsFRkAuYgDMycQnfCjvrY38Cc_babylon.py | tqtezos/pytezos | a4ac0b022d35d4c9f3062609d8ce09d584b5faa8 | [
"MIT"
] | 1 | 2022-03-20T19:01:00.000Z | 2022-03-20T19:01:00.000Z | from unittest import TestCase
from tests import get_data
from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson
class StorageTestKT1Wer24gKPTsFRkAuYgDMycQnfCjvrY38Cc_babylon(TestCase):
@classmethod
def setUpClass(cls):
cls.maxDiff = None
... | 41.785714 | 112 | 0.757265 |
d28a6356fd84e40905bb220870483462a559340a | 13,570 | py | Python | ansible/my_env/lib/python2.7/site-packages/ansible/modules/network/aci/aci_interface_policy_ospf.py | otus-devops-2019-02/yyashkin_infra | 0cd0c003884155ac922e3e301305ac202de7028c | [
"MIT"
] | 1 | 2019-04-16T21:23:15.000Z | 2019-04-16T21:23:15.000Z | ansible/my_env/lib/python2.7/site-packages/ansible/modules/network/aci/aci_interface_policy_ospf.py | otus-devops-2019-02/yyashkin_infra | 0cd0c003884155ac922e3e301305ac202de7028c | [
"MIT"
] | 5 | 2020-02-26T20:10:50.000Z | 2021-09-23T23:23:18.000Z | ansible/my_env/lib/python2.7/site-packages/ansible/modules/network/aci/aci_interface_policy_ospf.py | otus-devops-2019-02/yyashkin_infra | 0cd0c003884155ac922e3e301305ac202de7028c | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_ver... | 34.617347 | 141 | 0.659175 |
986ee94a37355edc5e5bf729d228a010c79dee0e | 12,539 | py | Python | code/utils/trainer.py | weinajin/evaluate_multimodal_medical_image_heatmap_explanation | c022613ea05818c842e0760c44a0a2cb9cc0c424 | [
"MIT"
] | 1 | 2022-03-02T12:23:46.000Z | 2022-03-02T12:23:46.000Z | code/utils/trainer.py | weinajin/evaluate_multimodal_medical_image_heatmap_explanation | c022613ea05818c842e0760c44a0a2cb9cc0c424 | [
"MIT"
] | null | null | null | code/utils/trainer.py | weinajin/evaluate_multimodal_medical_image_heatmap_explanation | c022613ea05818c842e0760c44a0a2cb9cc0c424 | [
"MIT"
] | 1 | 2022-02-05T11:56:19.000Z | 2022-02-05T11:56:19.000Z | # Ref: https://github.com/victoresque/pytorch-template/blob/master/trainer/trainer.py
import numpy as np
from numpy import inf
import torch
from torchvision.utils import make_grid
from abc import abstractmethod
from .visualization import TensorboardWriter #import TensorboardWriter
from .util import inf_loop, Metri... | 42.077181 | 237 | 0.583779 |
9d79dab591e48a2957873b1ed70df458ccd8bfcb | 14,972 | py | Python | compressor/base.py | gregmccoy/django-compressor | 8255b350a811f96fb7a004e784e9ee2340f532bc | [
"Apache-2.0"
] | 17 | 2019-11-06T21:15:14.000Z | 2022-03-27T17:50:34.000Z | compressor/base.py | eadwinCode/django-compressor | ccd7fb8410d5e94d34132a8c790b8ec8e434172e | [
"Apache-2.0"
] | 6 | 2021-01-02T22:59:17.000Z | 2021-11-04T09:13:35.000Z | compressor/base.py | eadwinCode/django-compressor | ccd7fb8410d5e94d34132a8c790b8ec8e434172e | [
"Apache-2.0"
] | 3 | 2020-09-29T20:46:57.000Z | 2021-03-08T06:01:24.000Z | from __future__ import with_statement, unicode_literals
import os
import codecs
from importlib import import_module
import six
from django.core.files.base import ContentFile
from django.utils.safestring import mark_safe
from django.template.loader import render_to_string
from django.utils.functional import cached_prop... | 39.193717 | 86 | 0.609939 |
58170e0dd199afcd0bdb865325da3d7da13984b2 | 5,762 | py | Python | src/layers.py | helenaandres/adversarial-generation-of-gene-expression-data | 9a10f0c364b7daa789ae75ab5b51ed5c7cbcbeb1 | [
"MIT"
] | null | null | null | src/layers.py | helenaandres/adversarial-generation-of-gene-expression-data | 9a10f0c364b7daa789ae75ab5b51ed5c7cbcbeb1 | [
"MIT"
] | null | null | null | src/layers.py | helenaandres/adversarial-generation-of-gene-expression-data | 9a10f0c364b7daa789ae75ab5b51ed5c7cbcbeb1 | [
"MIT"
] | 1 | 2020-12-15T16:37:07.000Z | 2020-12-15T16:37:07.000Z | from keras.engine.topology import Layer
import keras.backend as K
from keras.initializers import RandomUniform
class GRI(Layer):
# NOTE: Not used
def __init__(self, root_node, nodes, edges, **kwargs):
"""
:param root_node: node on top of the hierarchy
:param nodes: list of nodes (gene ... | 36.935897 | 116 | 0.576015 |
87398d94295f57048dafcf7277dc27c5c0ccd009 | 1,126 | py | Python | setup.py | aldryn/aldryn-social-sharing | 474baa3d29d68c0125c01f7b15450dfa52818207 | [
"BSD-3-Clause"
] | null | null | null | setup.py | aldryn/aldryn-social-sharing | 474baa3d29d68c0125c01f7b15450dfa52818207 | [
"BSD-3-Clause"
] | null | null | null | setup.py | aldryn/aldryn-social-sharing | 474baa3d29d68c0125c01f7b15450dfa52818207 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup
from aldryn_social_sharing import __version__
REQUIREMENTS = [
'django-filer',
'django-social-tags',
'pillow',
'django-cms>=3.0',
]
CLASSIFIERS = [
'Development Status :: 2 - Pre-Alpha',
'Environment :: Web Environment',
'Framework :: Dj... | 28.15 | 75 | 0.671403 |
85b9d9519b7f81d16fe6b4ed27f7b7118a2394fb | 3,515 | py | Python | experiments/ashvin/icml2020/hand/pen/gaussian2/sparse_bc_arch1.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/gaussian2/sparse_bc_arch1.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/gaussian2/sparse_bc_arch1.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from railrl.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from railrl.demos.source.mdp_path_loader import MDPPathLoader
from railrl.launchers.experiments.ashvin.awr_sac_rl import experiment
import railrl.misc.hyperparameter as hyp
from railrl.launchers.arglaunc... | 29.537815 | 75 | 0.569559 |
72c7fbf5e3e35ea8ff61d38ab4047d00463311a0 | 1,642 | py | Python | setup.py | LinaNouh/nbdiff | d40ee81c74bfcbab34261fb385d6277caf9969c1 | [
"MIT"
] | 1 | 2017-09-22T13:01:27.000Z | 2017-09-22T13:01:27.000Z | setup.py | LinaNouh/nbdiff | d40ee81c74bfcbab34261fb385d6277caf9969c1 | [
"MIT"
] | null | null | null | setup.py | LinaNouh/nbdiff | d40ee81c74bfcbab34261fb385d6277caf9969c1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = open('HISTORY.rst... | 26.063492 | 72 | 0.590743 |
045e36606d475e5e4b5c7b348c63d96473055774 | 6,125 | py | Python | nova_solaris/solariszones/zone_config.py | guillermomolina/nova-solaris | 2195f506b20e7f4a157fe9dcc9cd7a556d32a68c | [
"Apache-1.1"
] | null | null | null | nova_solaris/solariszones/zone_config.py | guillermomolina/nova-solaris | 2195f506b20e7f4a157fe9dcc9cd7a556d32a68c | [
"Apache-1.1"
] | null | null | null | nova_solaris/solariszones/zone_config.py | guillermomolina/nova-solaris | 2195f506b20e7f4a157fe9dcc9cd7a556d32a68c | [
"Apache-1.1"
] | null | null | null | # Copyright 2021, Guillermo Adrian Molina.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the Lic... | 39.012739 | 79 | 0.576327 |
963cc81f884676455216579eb2c16860aaedab42 | 9,714 | py | Python | python/deltalake/table.py | viirya/delta-rs | 3d16de918a4b373413afae95ecedc7fe36b25ecd | [
"Apache-2.0"
] | null | null | null | python/deltalake/table.py | viirya/delta-rs | 3d16de918a4b373413afae95ecedc7fe36b25ecd | [
"Apache-2.0"
] | null | null | null | python/deltalake/table.py | viirya/delta-rs | 3d16de918a4b373413afae95ecedc7fe36b25ecd | [
"Apache-2.0"
] | null | null | null | import os
import warnings
from dataclasses import dataclass
from typing import Any, List, Optional, Tuple
from urllib.parse import urlparse
import pyarrow
from pyarrow.dataset import dataset, partitioning
from .deltalake import RawDeltaTable, RawDeltaTableMetaData
from .schema import Schema, pyarrow_schema_from_json
... | 38.094118 | 156 | 0.633004 |
56af3c6b474660a6935cad2aff0cacdbfb3dc9a8 | 33,568 | py | Python | pymake/parserdata.py | myint/pymake | 1135cc413128c12f5bada3d84b3261834a5ac003 | [
"MIT"
] | null | null | null | pymake/parserdata.py | myint/pymake | 1135cc413128c12f5bada3d84b3261834a5ac003 | [
"MIT"
] | null | null | null | pymake/parserdata.py | myint/pymake | 1135cc413128c12f5bada3d84b3261834a5ac003 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
import logging, re, os
from . import data, parser, util
from pymake.globrelative import hasglob, glob
from pymake import errors
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
_log = logging.getLogge... | 33.006883 | 146 | 0.607305 |
d9dbe1e79ad1d770e03a8914e2b0c529dcd7d30b | 3,355 | py | Python | setup.py | tcdude/foolysh | dedd6eb655b9eab1d1ac90c6624b0ca92f54486f | [
"MIT"
] | 2 | 2019-05-04T01:22:55.000Z | 2019-10-04T10:48:05.000Z | setup.py | tcdude/foolysh | dedd6eb655b9eab1d1ac90c6624b0ca92f54486f | [
"MIT"
] | 5 | 2020-03-09T16:15:13.000Z | 2022-01-13T02:02:27.000Z | setup.py | tcdude/foolysh | dedd6eb655b9eab1d1ac90c6624b0ca92f54486f | [
"MIT"
] | null | null | null | """Setup for foolysh."""
import os
import sys
import glob
import platform
from setuptools import setup
from setuptools import find_namespace_packages
from distutils.extension import Extension # pylint: disable=wrong-import-order
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
... | 32.572816 | 79 | 0.688823 |
88302e7d26642ad648a161756ac1c4900d42336d | 9,839 | py | Python | schemas/polyaxon_schemas/config_reader/spec.py | polyaxon/schemas | e0742a80a0e6c5d1439d15ceb03de1e149331594 | [
"Apache-2.0"
] | 7 | 2017-09-24T15:34:17.000Z | 2020-02-14T19:54:08.000Z | schemas/polyaxon_schemas/config_reader/spec.py | polyaxon/schemas | e0742a80a0e6c5d1439d15ceb03de1e149331594 | [
"Apache-2.0"
] | 53 | 2017-10-16T14:43:15.000Z | 2020-07-01T18:11:11.000Z | schemas/polyaxon_schemas/config_reader/spec.py | polyaxon/schemas | e0742a80a0e6c5d1439d15ceb03de1e149331594 | [
"Apache-2.0"
] | 15 | 2017-10-03T22:03:38.000Z | 2021-12-03T07:11:45.000Z | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 33.352542 | 88 | 0.643968 |
7590a59b27bd0d89eec2fd070abacb0154fdcbad | 1,412 | py | Python | res_mods/mods/packages/xvm_sounds/python/ammoBay.py | peterbartha/ImmunoMod | cbf8cd49893d7082a347c1f72c0e39480869318a | [
"MIT"
] | null | null | null | res_mods/mods/packages/xvm_sounds/python/ammoBay.py | peterbartha/ImmunoMod | cbf8cd49893d7082a347c1f72c0e39480869318a | [
"MIT"
] | 1 | 2016-04-03T13:31:39.000Z | 2016-04-03T16:48:26.000Z | res_mods/mods/packages/xvm_sounds/python/ammoBay.py | peterbartha/ImmunoMod | cbf8cd49893d7082a347c1f72c0e39480869318a | [
"MIT"
] | null | null | null | """ XVM (c) www.modxvm.com 2013-2017 """
#####################################################################
# imports
import SoundGroups
from helpers import dependency
from skeletons.gui.battle_session import IBattleSessionProvider
from gui.Scaleform.daapi.view.battle.shared.damage_panel import DamagePanel
from x... | 34.439024 | 84 | 0.568697 |
10f7736824fb58cf9e7ffa62a7347b7ae382bd0a | 2,535 | py | Python | 2018/quals/re-basics/src/extract_vars.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/quals/re-basics/src/extract_vars.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/quals/re-basics/src/extract_vars.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/python
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 17.363014 | 77 | 0.537278 |
83311eb0b7e6d7aacdd07e55d89c2463020ac3d6 | 3,358 | py | Python | tools/scons/scons-local-3.0.5/SCons/Tool/clang.py | arcilat-adsk/arnold-usd | 34f1b091221f81d027a0c9fceec10f3cfa3ba141 | [
"Apache-2.0"
] | 2 | 2020-12-01T03:34:51.000Z | 2021-03-06T01:49:44.000Z | tools/scons/scons-local-3.0.5/SCons/Tool/clang.py | arcilat-adsk/arnold-usd | 34f1b091221f81d027a0c9fceec10f3cfa3ba141 | [
"Apache-2.0"
] | null | null | null | tools/scons/scons-local-3.0.5/SCons/Tool/clang.py | arcilat-adsk/arnold-usd | 34f1b091221f81d027a0c9fceec10f3cfa3ba141 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8; -*-
"""SCons.Tool.clang
Tool-specific initialization for clang.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is here... | 35.347368 | 118 | 0.669446 |
b7fbeb8e70543da313d150a972248fb73b1ef7d4 | 190 | py | Python | helloPython.py | flaskOnLine/flasklearn | b03f7b455ffd402c0b43e61e073f221067de90a4 | [
"Apache-2.0"
] | null | null | null | helloPython.py | flaskOnLine/flasklearn | b03f7b455ffd402c0b43e61e073f221067de90a4 | [
"Apache-2.0"
] | null | null | null | helloPython.py | flaskOnLine/flasklearn | b03f7b455ffd402c0b43e61e073f221067de90a4 | [
"Apache-2.0"
] | null | null | null | print("helloPython")
print("努力学习,天天向上")
print("TPP")
b = "hello"
print(b)
print("branch")
a = "harvey"
print(a, "came from China")
c = "world is nice"
c = "world is beautiful"
print(c)
| 11.176471 | 27 | 0.636842 |
73dcb0304d6716a86fe2ff3b3d2c4faff47b48b5 | 8,914 | py | Python | themes/default/base16-sagelight.config.py | pltanton/base16-qutebrowser | dff61f51e10906491034e15f6b78440ce06dbc1a | [
"MIT"
] | null | null | null | themes/default/base16-sagelight.config.py | pltanton/base16-qutebrowser | dff61f51e10906491034e15f6b78440ce06dbc1a | [
"MIT"
] | null | null | null | themes/default/base16-sagelight.config.py | pltanton/base16-qutebrowser | dff61f51e10906491034e15f6b78440ce06dbc1a | [
"MIT"
] | null | null | null | # base16-qutebrowser (https://github.com/theova/base16-qutebrowser)
# Base16 qutebrowser template by theova
# Sagelight scheme by Carter Veldhuizen
base00 = "#f8f8f8"
base01 = "#e8e8e8"
base02 = "#d8d8d8"
base03 = "#b8b8b8"
base04 = "#585858"
base05 = "#383838"
base06 = "#282828"
base07 = "#181818"
base08 = "#fa8480"
... | 29.912752 | 95 | 0.771595 |
a7a729371739d6669bda15cecd5e5d83bdc2b374 | 1,034 | py | Python | flightdeck/person/models.py | majacQ/FlightDeck | 4ed2e630024374e1ac9f4a8ced8acd0ed7883d76 | [
"MIT"
] | 1 | 2019-12-29T05:58:53.000Z | 2019-12-29T05:58:53.000Z | flightdeck/person/models.py | majacQ/FlightDeck | 4ed2e630024374e1ac9f4a8ced8acd0ed7883d76 | [
"MIT"
] | null | null | null | flightdeck/person/models.py | majacQ/FlightDeck | 4ed2e630024374e1ac9f4a8ced8acd0ed7883d76 | [
"MIT"
] | 2 | 2016-01-16T13:59:52.000Z | 2021-04-25T15:38:26.000Z | from django.db import models
from django.contrib.auth.models import User
class Limit(models.Model):
email = models.CharField(max_length=255)
class Profile(models.Model):
user = models.ForeignKey(User, unique=True)
nickname = models.CharField(max_length=255, blank=True, null=True)
location = models.CharField(max... | 30.411765 | 80 | 0.755319 |
99bee56bc26f9c4d7493fee12d61f799e5ae78cc | 2,608 | py | Python | tests/texture/test_workflow.py | ornlneutronimaging/braggedgemodeling | 6bf49b008cae5707f3c950e4a4d574211f201976 | [
"MIT"
] | 1 | 2019-03-27T13:38:24.000Z | 2019-03-27T13:38:24.000Z | tests/texture/test_workflow.py | ornlneutronimaging/braggedgemodeling | 6bf49b008cae5707f3c950e4a4d574211f201976 | [
"MIT"
] | 32 | 2018-02-15T18:03:34.000Z | 2022-02-09T14:59:55.000Z | tests/texture/test_workflow.py | ornlneutronimaging/braggedgemodeling | 6bf49b008cae5707f3c950e4a4d574211f201976 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import pytest
pytest.importorskip("matlab")
import os, numpy as np
here = os.path.dirname(__file__)
infile = os.path.join(here, '..', 'data', 'vdrive_filename.txt')
interm = 'vulcan.intermediate'
rpffile = 'vulcan.rpf'
vpscfile = 'vpsc.txt'
hkls = [[1,1,1], [2,0,0], [2,2,0], [2,2,2]]
Rsamples_... | 28.043011 | 81 | 0.66411 |
fadb5e420bdbcb12edb695186017bd30880cd672 | 1,873 | py | Python | app/api/admin/admin_users.py | n0nvme/yatb | 3d2e7d7e3b2c694e4ae8a662becbe0984cf03210 | [
"Apache-2.0"
] | 15 | 2021-01-13T12:47:17.000Z | 2022-02-14T13:24:51.000Z | app/api/admin/admin_users.py | n0nvme/yatb | 3d2e7d7e3b2c694e4ae8a662becbe0984cf03210 | [
"Apache-2.0"
] | null | null | null | app/api/admin/admin_users.py | n0nvme/yatb | 3d2e7d7e3b2c694e4ae8a662becbe0984cf03210 | [
"Apache-2.0"
] | 1 | 2021-09-28T03:05:46.000Z | 2021-09-28T03:05:46.000Z | import uuid
from typing import List, Dict
from fastapi import FastAPI, Cookie, Request, Response, HTTPException, status, Depends
from . import admin_checker, router, logger
from ... import schema, auth, config, db
async def api_admin_users_internal() -> Dict[uuid.UUID, schema.User]:
all_users = await db.get_all_... | 31.216667 | 117 | 0.760812 |
31c09c25fa2cfedc72d59dbbd7be6edf62deb20c | 12,172 | py | Python | ai_lit/input/gutenberg_dataset/gb_input.py | LincLabUCCS/Genre_Identification | adb9aec97372a360e9de5f822f3faefc65db5997 | [
"MIT"
] | 5 | 2018-07-14T05:01:38.000Z | 2020-05-29T23:38:01.000Z | ai_lit/input/gutenberg_dataset/gb_input.py | LincLabUCCS/Genre_Identification | adb9aec97372a360e9de5f822f3faefc65db5997 | [
"MIT"
] | 1 | 2020-11-05T10:12:45.000Z | 2020-11-05T10:41:24.000Z | ai_lit/input/gutenberg_dataset/gb_input.py | joeworsh/ai-lit | adb9aec97372a360e9de5f822f3faefc65db5997 | [
"MIT"
] | null | null | null | """
The input reader to read the Gutenberg Project structured Gutenberg dataset.
This dataset can be downloaded from the Gutenberg Project website.
"""
from ai_lit.input import input_util
from glob2 import glob
from zipfile import ZipFile
import collections
import json
import nltk
import os
import random
import sys
i... | 38.888179 | 119 | 0.683454 |
889d7b131950f02bc18e2df0cda81e2b60a0773f | 227 | py | Python | Ex3.py | jpsampaio/ExEcommIT | fabf3287aa86dafae00709341c776e446d4e2968 | [
"MIT"
] | null | null | null | Ex3.py | jpsampaio/ExEcommIT | fabf3287aa86dafae00709341c776e446d4e2968 | [
"MIT"
] | null | null | null | Ex3.py | jpsampaio/ExEcommIT | fabf3287aa86dafae00709341c776e446d4e2968 | [
"MIT"
] | null | null | null | n1 = int(input('Digite um valor, por favor: '))
n2 = int(input('Digite outro valor para obter uma soma, por favor: '))
s = n1 + n2
print('Obrigado por ter chegado até aqui, a soma entre {} e {} é igual a {}'.format(n1, n2, s))
| 45.4 | 95 | 0.651982 |
42cd340f62590b2d4b307942b23964ea3e9c6713 | 804 | py | Python | whatshouldwewatch/urls.py | genderquery/what-should-we-watch-django | 2c712bf4e3d4587fb946bf19a9d45669577148c6 | [
"MIT"
] | null | null | null | whatshouldwewatch/urls.py | genderquery/what-should-we-watch-django | 2c712bf4e3d4587fb946bf19a9d45669577148c6 | [
"MIT"
] | null | null | null | whatshouldwewatch/urls.py | genderquery/what-should-we-watch-django | 2c712bf4e3d4587fb946bf19a9d45669577148c6 | [
"MIT"
] | null | null | null | """whatshouldwewatch URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
C... | 34.956522 | 77 | 0.705224 |
a626c5badf4ab1859263bb7f98b903661f9c830e | 369 | py | Python | example_pso.py | matteo27695/PSO-Python | 863a08dcfd9304628a65ed5b3f37c165b8299fd6 | [
"MIT"
] | null | null | null | example_pso.py | matteo27695/PSO-Python | 863a08dcfd9304628a65ed5b3f37c165b8299fd6 | [
"MIT"
] | null | null | null | example_pso.py | matteo27695/PSO-Python | 863a08dcfd9304628a65ed5b3f37c165b8299fd6 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import pso
def example_fun(pos):
x = pos[0]
y = pos[1]
z = pos[2]
return x ** 2 + y ** 2 + z ** 2
swarm = pso.Swarm(obj_fun=example_fun, num_particles=20, dimspace=3, n_iterations=100)
swarm.run()
plt.plot(swarm.gbest_val)
plt.xlabel('Number of Iterations')
plt.ylabe... | 18.45 | 86 | 0.672087 |
d927fe6d391694bfb66d54dbec0612c4619a0e3c | 2,764 | py | Python | rl/make_game.py | ReHoss/test_alphazero | 7a4a7be8a31b3f78b4a13eeb5aca491834f625c1 | [
"MIT"
] | null | null | null | rl/make_game.py | ReHoss/test_alphazero | 7a4a7be8a31b3f78b4a13eeb5aca491834f625c1 | [
"MIT"
] | null | null | null | rl/make_game.py | ReHoss/test_alphazero | 7a4a7be8a31b3f78b4a13eeb5aca491834f625c1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Custom game generation function
@author: thomas
"""
import gym
import numpy as np
from .wrappers import NormalizeWrapper, ReparametrizeWrapper, PILCOWrapper, \
ScaleRewardWrapper, ClipRewardWrapper, ScaledObservationWrapper
# Register deterministic FrozenLakes
from gym.envs.registration... | 29.094737 | 80 | 0.625904 |
f38819738bc09fd3734b53cd8497cc218e030b61 | 8,620 | py | Python | image_generators.py | sangxia/nips-2017-adversarial | 6b766bb019a82189912236860b1850a25aad1737 | [
"MIT"
] | 47 | 2018-04-03T17:40:59.000Z | 2022-03-15T06:18:39.000Z | image_generators.py | Sunshine352/nips-2017-adversarial | 6b766bb019a82189912236860b1850a25aad1737 | [
"MIT"
] | 2 | 2017-10-21T20:04:57.000Z | 2019-12-16T10:49:48.000Z | image_generators.py | Sunshine352/nips-2017-adversarial | 6b766bb019a82189912236860b1850a25aad1737 | [
"MIT"
] | 13 | 2018-05-31T13:20:21.000Z | 2020-09-09T04:07:56.000Z | import os
import multiprocessing as mp
import ctypes as c
import glob
import numpy as np
from PIL import Image
from multiprocessing import Pool
def save_image_from_uint8_array(img, fname):
Image.fromarray(img).save(fname)
def save_images(images, filenames, output_dir):
"""Saves images to the output directory.... | 38.828829 | 118 | 0.643039 |
86b96615b946b83428d52da41e6cac7976ebaf58 | 142 | py | Python | __init__.py | TaintTrap/darm | f42b509adabbb3a0fbb87937db33d14c2d213bee | [
"BSD-3-Clause"
] | 104 | 2015-01-01T06:14:40.000Z | 2021-12-11T08:05:03.000Z | __init__.py | z4ziggy/darm | f42b509adabbb3a0fbb87937db33d14c2d213bee | [
"BSD-3-Clause"
] | 5 | 2015-02-09T10:16:50.000Z | 2016-04-07T12:58:10.000Z | __init__.py | z4ziggy/darm | f42b509adabbb3a0fbb87937db33d14c2d213bee | [
"BSD-3-Clause"
] | 18 | 2015-02-09T02:36:19.000Z | 2019-07-19T15:29:20.000Z | """Simple Python init script to allow inclusion of this entire directory."""
from darm import Darm, disasm_armv7, disasm_thumb, disasm_thumb2
| 47.333333 | 76 | 0.802817 |
e9c4dd651cd0e03eab8cddebefb4d0fb423f022e | 13,885 | py | Python | flypy/eandk/ResponseTools.py | ikestar99/flypy | 1c0c189e5c6a3606d97972438ac60493ad3ef0f1 | [
"MIT"
] | null | null | null | flypy/eandk/ResponseTools.py | ikestar99/flypy | 1c0c189e5c6a3606d97972438ac60493ad3ef0f1 | [
"MIT"
] | null | null | null | flypy/eandk/ResponseTools.py | ikestar99/flypy | 1c0c189e5c6a3606d97972438ac60493ad3ef0f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 11 10:00:35 2021
@author: katherinedelgado and Erin Barnhart
"""
import scipy.stats as scs
import scipy.ndimage as scn
import scipy.integrate as sci
import numpy as np
import scipy.ndimage as ndimage
from pylab import *
import ResponseClassSimpl... | 35.420918 | 130 | 0.621678 |
a3e5ed622df2c4a40418ab1d5be3bc7a0b39e007 | 681 | py | Python | scheduler/migrations/0003_auto_20181108_1124.py | gijzelaerr/buis | 9878919fe58f600634306da78ce3c5ddba8388c1 | [
"Apache-2.0"
] | null | null | null | scheduler/migrations/0003_auto_20181108_1124.py | gijzelaerr/buis | 9878919fe58f600634306da78ce3c5ddba8388c1 | [
"Apache-2.0"
] | 18 | 2018-09-28T15:42:15.000Z | 2019-12-17T08:56:28.000Z | scheduler/migrations/0003_auto_20181108_1124.py | gijzelaerr/buis | 9878919fe58f600634306da78ce3c5ddba8388c1 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.1 on 2018-11-08 11:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('scheduler', '0002_auto_20181024_1535'),
]
operations = [
migrations.AlterField(
model_name='repositorystatechange',
... | 28.375 | 164 | 0.577093 |
694ae1a98acfb1596fb45e954cfb00005105416f | 36,968 | py | Python | r2r_src/train.py | YzyLmc/AC-GG_0.2 | ddedbbe4062f6646041e24c16593b087d3cf0095 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | r2r_src/train.py | YzyLmc/AC-GG_0.2 | ddedbbe4062f6646041e24c16593b087d3cf0095 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | r2r_src/train.py | YzyLmc/AC-GG_0.2 | ddedbbe4062f6646041e24c16593b087d3cf0095 | [
"BSD-2-Clause",
"MIT"
] | null | null | null |
import torch
import os
import time
import json
import random
import sys
import numpy as np
from collections import defaultdict
from speaker import Speaker
from arbiter import Arbiter
from utils import read_vocab,write_vocab,build_vocab,Tokenizer,padding_idx,timeSince, read_img_features
import utils
from env import R... | 44.70133 | 142 | 0.628598 |
04a08c7481158d8f17c20dd5356551ed93e4bad0 | 2,382 | py | Python | src/plugins/WRD_WHO/fetcher.py | bitsbytenibbles/fetchers-python | 6bb2e5b16994f7f9dc63e857a4418441cbff14b1 | [
"Apache-2.0"
] | null | null | null | src/plugins/WRD_WHO/fetcher.py | bitsbytenibbles/fetchers-python | 6bb2e5b16994f7f9dc63e857a4418441cbff14b1 | [
"Apache-2.0"
] | null | null | null | src/plugins/WRD_WHO/fetcher.py | bitsbytenibbles/fetchers-python | 6bb2e5b16994f7f9dc63e857a4418441cbff14b1 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020 University of Oxford
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 32.630137 | 88 | 0.626364 |
06f97831d4038f33b238bbc99a6ffb2bdc7d0b22 | 1,360 | py | Python | orders/migrations/0002_auto_20170318_1137.py | pauljherrera/avantiweb | 40b87e754e68a0e2adcf5e1640d5e2e0c8637d0a | [
"MIT"
] | null | null | null | orders/migrations/0002_auto_20170318_1137.py | pauljherrera/avantiweb | 40b87e754e68a0e2adcf5e1640d5e2e0c8637d0a | [
"MIT"
] | null | null | null | orders/migrations/0002_auto_20170318_1137.py | pauljherrera/avantiweb | 40b87e754e68a0e2adcf5e1640d5e2e0c8637d0a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-18 14:37
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orders', '0001_initial'),
]
operations = [
migrations.AlterField(
... | 29.565217 | 78 | 0.572794 |
dffd293a3cdcbbf09b333394c98234503275fbc1 | 4,998 | py | Python | tests/install/test_preflight_checks.py | ssalaues/metalk8s | cca4a4c64fe9cd4d7b87717aa3fda1642144da4b | [
"Apache-2.0"
] | null | null | null | tests/install/test_preflight_checks.py | ssalaues/metalk8s | cca4a4c64fe9cd4d7b87717aa3fda1642144da4b | [
"Apache-2.0"
] | null | null | null | tests/install/test_preflight_checks.py | ssalaues/metalk8s | cca4a4c64fe9cd4d7b87717aa3fda1642144da4b | [
"Apache-2.0"
] | null | null | null | import os
import pytest
import re
from pytest_bdd import given
from pytest_bdd import parsers
from pytest_bdd import scenario
from pytest_bdd import then
from pytest_bdd import when
from utils.ansible import AnsibleHelper
from utils.ansible import CallbackTestMetalK8s
@pytest.fixture
def pytestbdd_strict_gherkin():... | 31.632911 | 77 | 0.657463 |
a5a7086859d742096308900efd90695cab6c3bfb | 3,144 | py | Python | env/lib/python3.5/site-packages/tenacity/_utils.py | creekhead/RPI_google_asst | 65dc7b08bb8333f8977488f37f7d3ec652489a44 | [
"Apache-2.0"
] | 224 | 2020-01-02T10:46:37.000Z | 2022-03-02T13:54:08.000Z | env/lib/python3.5/site-packages/tenacity/_utils.py | creekhead/RPI_google_asst | 65dc7b08bb8333f8977488f37f7d3ec652489a44 | [
"Apache-2.0"
] | 16 | 2020-03-11T09:37:58.000Z | 2022-01-26T10:22:08.000Z | env/lib/python3.5/site-packages/tenacity/_utils.py | creekhead/RPI_google_asst | 65dc7b08bb8333f8977488f37f7d3ec652489a44 | [
"Apache-2.0"
] | 24 | 2020-03-24T13:53:50.000Z | 2022-03-22T11:55:18.000Z | # Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013-2014 Ray Holder
#
# 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
#... | 27.578947 | 75 | 0.627545 |
1417134cbce918404fafc895334216479c3226b1 | 2,197 | py | Python | app.py | BenjMy/ERT_SWC_board | 89da352088d2fde545af33ee3e69315d07e0a368 | [
"MIT"
] | 1 | 2021-07-19T06:23:28.000Z | 2021-07-19T06:23:28.000Z | app.py | BenjMy/ERT_SWC_board | 89da352088d2fde545af33ee3e69315d07e0a368 | [
"MIT"
] | null | null | null | app.py | BenjMy/ERT_SWC_board | 89da352088d2fde545af33ee3e69315d07e0a368 | [
"MIT"
] | null | null | null | import streamlit as st
from PIL import Image
import pandas as pd
import numpy as np
import visualisation
import contribute
import tryit
import pybtex
from pybtex.database import parse_file
import io
import six
import pybtex.database.input.bibtex
import pybtex.plugin
def bib_refs(bibfile='modelsrefs.bib', author='... | 23.37234 | 239 | 0.7401 |
1aa38a14c5fb5695fac32772c4544b63ad64e2f3 | 407,449 | py | Python | pysnmp/SITEBOSS-570-STD-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/SITEBOSS-570-STD-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/SITEBOSS-570-STD-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module SITEBOSS-570-STD-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SITEBOSS-570-STD-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:56:38 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (defau... | 150.405685 | 9,244 | 0.739356 |
27715740ed48dcd0480448f05278c377410f121d | 6,073 | py | Python | findtext/__init__.py | williamfzc/findtext | a92910c4a03106ec4cf03b332d27a62c942d47de | [
"MIT"
] | 1 | 2019-08-16T09:14:56.000Z | 2019-08-16T09:14:56.000Z | findtext/__init__.py | williamfzc/findtext | a92910c4a03106ec4cf03b332d27a62c942d47de | [
"MIT"
] | 1 | 2019-07-06T16:35:43.000Z | 2019-07-06T16:35:43.000Z | findtext/__init__.py | williamfzc/findtext | a92910c4a03106ec4cf03b332d27a62c942d47de | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import typing
import locale
from tesserocr import PyTessBaseAPI, RIL
import tesserocr
from PIL import Image
locale.setlocale(locale.LC_ALL, "C")
class WordBlock(object):
def __init__(self, box: dict, content: str):
# reused by other calculations
self.box = box
... | 33.927374 | 95 | 0.556726 |
57bc431675ac40992d41b15b92b6461679550584 | 2,395 | py | Python | saleor/registration/forms.py | imran1234567/saleor | fb915b8f3f5f165c1f4672a10a5dff94b5707024 | [
"BSD-3-Clause"
] | null | null | null | saleor/registration/forms.py | imran1234567/saleor | fb915b8f3f5f165c1f4672a10a5dff94b5707024 | [
"BSD-3-Clause"
] | null | null | null | saleor/registration/forms.py | imran1234567/saleor | fb915b8f3f5f165c1f4672a10a5dff94b5707024 | [
"BSD-3-Clause"
] | 1 | 2018-10-12T13:46:40.000Z | 2018-10-12T13:46:40.000Z | from django import forms
from django.contrib.auth import forms as django_forms
from django.core.urlresolvers import reverse
from django.http.request import HttpRequest
from django.utils.translation import pgettext
from templated_email import send_templated_mail
from saleor.userprofile.models import User
class Login... | 34.710145 | 79 | 0.665553 |
12a091a7369d5410d82493a14cf0f1f99c3d55c9 | 31,766 | py | Python | IPython/frontend/html/notebook/handlers.py | mdboom/ipython | 840d0eaab5c7ef0c07d7a8a3fa30a2466a71ac3c | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/frontend/html/notebook/handlers.py | mdboom/ipython | 840d0eaab5c7ef0c07d7a8a3fa30a2466a71ac3c | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/frontend/html/notebook/handlers.py | mdboom/ipython | 840d0eaab5c7ef0c07d7a8a3fa30a2466a71ac3c | [
"BSD-3-Clause-Clear"
] | null | null | null | """Tornado handlers for the notebook.
Authors:
* Brian Granger
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as p... | 35.732283 | 114 | 0.6008 |
7a0dd0cdb370a9315dbc0b40716cfcffb5b7e6a3 | 461 | py | Python | linked_list/0206_reverse_linked_list/0206_reverse_linked_list.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | 6 | 2019-09-16T01:50:44.000Z | 2020-09-17T08:52:25.000Z | linked_list/0206_reverse_linked_list/0206_reverse_linked_list.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | null | null | null | linked_list/0206_reverse_linked_list/0206_reverse_linked_list.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | 4 | 2020-02-07T12:43:16.000Z | 2021-04-11T06:38:55.000Z | class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
class Solution(object):
def reverseList(self, head):
prev = None
while head:
curr = head
head = head.next
curr.next = prev
prev = curr
return pre... | 20.954545 | 37 | 0.574837 |
b62b492cb56ed37c484fb177027e9732fc4d729e | 258 | py | Python | deepscratch/models/initializers/random_initialization.py | mari-linhares/deep-python-scratch | b447ed20c981db5ffef810b6f80d1638cf7d2ccd | [
"MIT"
] | 9 | 2018-09-18T00:29:10.000Z | 2021-02-20T17:58:30.000Z | deepscratch/models/initializers/random_initialization.py | Jagannathrk2020/deeplearning-from-scratch | b447ed20c981db5ffef810b6f80d1638cf7d2ccd | [
"MIT"
] | null | null | null | deepscratch/models/initializers/random_initialization.py | Jagannathrk2020/deeplearning-from-scratch | b447ed20c981db5ffef810b6f80d1638cf7d2ccd | [
"MIT"
] | 3 | 2018-09-18T15:47:59.000Z | 2020-08-09T03:10:34.000Z | import numpy as np
from deepscratch.models.initializers.initialization import Initialization
class RandomInitialization(object):
@staticmethod
def init(shape, delta=0.01, **kwargs):
data = np.random.randn(*shape) * delta
return data | 28.666667 | 73 | 0.728682 |
2b447c26d55fd7c02868cdd7265fef5f5476cf92 | 251 | py | Python | deepleaps/dataloader/Transform.py | Longseabear/deep-leaps-pytorch | abcb87f3079c0612bde4a4f94c75d7c05d5aee3a | [
"MIT"
] | 1 | 2021-02-27T18:00:39.000Z | 2021-02-27T18:00:39.000Z | deepleaps/dataloader/Transform.py | Longseabear/deep-leaps-pytorch | abcb87f3079c0612bde4a4f94c75d7c05d5aee3a | [
"MIT"
] | null | null | null | deepleaps/dataloader/Transform.py | Longseabear/deep-leaps-pytorch | abcb87f3079c0612bde4a4f94c75d7c05d5aee3a | [
"MIT"
] | null | null | null | from deepleaps.dataloader.transforms import *
"""
All transform methods are registered here. If the default transform method path is here, import the transform method.
"""
TRANSFORM = {}
TRANSFORM['ToTensor'] = ToTensor
TRANSFORM['ToNumpy'] = ToNumpy | 31.375 | 117 | 0.768924 |
e75fde0c17b5c0c554e9be6903f3a9157979686b | 115,514 | py | Python | src/v100.py | numb3r33/Kaggle_Home_Credit | f8f56a0514b928d7ed4b8f38c6edc53b67bab32d | [
"MIT"
] | null | null | null | src/v100.py | numb3r33/Kaggle_Home_Credit | f8f56a0514b928d7ed4b8f38c6edc53b67bab32d | [
"MIT"
] | 14 | 2020-01-28T22:02:01.000Z | 2022-03-11T23:33:08.000Z | src/v100.py | numb3r33/Kaggle_Home_Credit | f8f56a0514b928d7ed4b8f38c6edc53b67bab32d | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import scipy as sp
import argparse
import os
import gc
import time
from base import *
from features import *
from datetime import datetime
from sklearn.externals import joblib
from sklearn.model_selection import cross_val_score, StratifiedKFold
basepath = os.path.expanduser('.... | 54.668244 | 178 | 0.631949 |
8f70b64f65b70d69603389bc1d6b3aa34b6d0b41 | 4,148 | py | Python | pyod/test/test_vae.py | DrewNow/pyod | 4439904ce05e95c31dbeed22d34526f729eaad2b | [
"BSD-2-Clause"
] | 1 | 2020-11-18T01:51:20.000Z | 2020-11-18T01:51:20.000Z | pyod/test/test_vae.py | DrewNow/pyod | 4439904ce05e95c31dbeed22d34526f729eaad2b | [
"BSD-2-Clause"
] | null | null | null | pyod/test/test_vae.py | DrewNow/pyod | 4439904ce05e95c31dbeed22d34526f729eaad2b | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
import os
import sys
import unittest
# noinspection PyProtectedMember
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_greater
from sklearn.utils.testing import assert_greater_equal
fro... | 37.369369 | 79 | 0.681292 |
932c68f3bfdd0fa4f25517ebea01555ab01db520 | 17,968 | py | Python | txml.py | jdelgit/txml | 07c28962a34397b546d56c1adb60c0ef20f71c22 | [
"MIT"
] | null | null | null | txml.py | jdelgit/txml | 07c28962a34397b546d56c1adb60c0ef20f71c22 | [
"MIT"
] | null | null | null | txml.py | jdelgit/txml | 07c28962a34397b546d56c1adb60c0ef20f71c22 | [
"MIT"
] | null | null | null | from xml.etree.ElementTree import iterparse, ParseError
from io import StringIO
from os.path import isfile
from re import findall
class XmlParser:
def __init__(self, source=""):
self.source = source
self.proces_file = False
self.use_io = False
self.encoding = 'UTF-8'
self.... | 37.668763 | 105 | 0.509016 |
bd0953bd144e2ab62779cf33849dcd0782aebd28 | 12,175 | py | Python | data/template.py | Tymec/yt2mp3 | d1486c133268347f73c5e1211e9e0b1514e62b2d | [
"MIT"
] | null | null | null | data/template.py | Tymec/yt2mp3 | d1486c133268347f73c5e1211e9e0b1514e62b2d | [
"MIT"
] | null | null | null | data/template.py | Tymec/yt2mp3 | d1486c133268347f73c5e1211e9e0b1514e62b2d | [
"MIT"
] | 1 | 2019-02-19T09:00:20.000Z | 2019-02-19T09:00:20.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'template.ui'
#
# Created by: PyQt5 UI code generator 5.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_App(object):
def setupUi(self, App):
App.setObjectName("A... | 54.352679 | 116 | 0.717454 |
6296022d6c95331b1efc77959936a95cb1e33722 | 272 | py | Python | projects/baby_driver/scripts/gpio_port.py | Citrusboa/firmware_xiv | 4379cefae900fd67bd14d930da6b8acfce625176 | [
"MIT"
] | 14 | 2019-11-12T00:11:29.000Z | 2021-12-13T05:32:41.000Z | projects/baby_driver/scripts/gpio_port.py | 123Logan321/firmware_xiv | 14468d55753ad62f8a63a9289511e72131443042 | [
"MIT"
] | 191 | 2019-11-12T05:36:58.000Z | 2022-03-21T19:54:46.000Z | projects/baby_driver/scripts/gpio_port.py | 123Logan321/firmware_xiv | 14468d55753ad62f8a63a9289511e72131443042 | [
"MIT"
] | 14 | 2020-06-06T14:43:14.000Z | 2022-03-08T00:48:11.000Z | """Constants for GpioPort"""
class GpioPort:
# pylint: disable=too-few-public-methods
"""
An enumeration to specify GPIO ports by name (e.g. GpioPort.A instead of 0).
"""
A = 0
B = 1
C = 2
D = 3
E = 4
F = 5
NUM_GPIO_PORTS = 6
| 17 | 80 | 0.551471 |
031ef528a4ede2e25461522d043f8f994ffcb835 | 7,288 | py | Python | rls/algorithms/multi/vdn.py | StepNeverStop/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 371 | 2019-04-26T00:37:33.000Z | 2022-03-31T07:33:12.000Z | rls/algorithms/multi/vdn.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 47 | 2019-07-21T11:51:57.000Z | 2021-08-31T08:45:22.000Z | rls/algorithms/multi/vdn.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 102 | 2019-06-29T13:11:15.000Z | 2022-03-28T13:51:04.000Z | #!/usr/bin/env python3
# encoding: utf-8
import numpy as np
import torch as th
import torch.nn.functional as F
from rls.algorithms.base.marl_off_policy import MultiAgentOffPolicy
from rls.common.data import Data
from rls.common.decorator import iton
from rls.nn.mixers import Mixer_REGISTER
from rls.nn.models import C... | 45.55 | 125 | 0.534303 |
f3d24b14d13b1a25b29675dde3b92f164d254e95 | 516 | py | Python | data/scripts/templates/object/tangible/ship/components/reactor/shared_rct_kessel_imperial_kdy_powermaster.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/ship/components/reactor/shared_rct_kessel_imperial_kdy_powermaster.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/ship/components/reactor/shared_rct_kessel_imperial_kdy_powermaster.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/ship/components/reactor/shared_rct_kessel_imperial_kdy_powermaster.i... | 30.352941 | 107 | 0.75969 |
92e22f4fbd38cc1df3394c8af4a4f2edc8ba6e83 | 3,134 | py | Python | tensorflow_federated/python/core/backends/xla/execution_contexts_test.py | Tensorflow-Devs/federated | 5df96d42d72fa43a050df6465271a38175a5fd7a | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/core/backends/xla/execution_contexts_test.py | Tensorflow-Devs/federated | 5df96d42d72fa43a050df6465271a38175a5fd7a | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/core/backends/xla/execution_contexts_test.py | Tensorflow-Devs/federated | 5df96d42d72fa43a050df6465271a38175a5fd7a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 41.236842 | 91 | 0.798979 |
9453b77063fe18d887a13a86c4d0c6ea099a1d59 | 1,348 | py | Python | aldryn_events/migrations/0008_app_config_fields_changed_to_not_null.py | katlings/aldryn-events | 9a0a4c90c787a56c88f91cdd72d4d929b196f8fd | [
"BSD-3-Clause"
] | null | null | null | aldryn_events/migrations/0008_app_config_fields_changed_to_not_null.py | katlings/aldryn-events | 9a0a4c90c787a56c88f91cdd72d4d929b196f8fd | [
"BSD-3-Clause"
] | null | null | null | aldryn_events/migrations/0008_app_config_fields_changed_to_not_null.py | katlings/aldryn-events | 9a0a4c90c787a56c88f91cdd72d4d929b196f8fd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('aldryn_events', '0007_set_default_namespaces'),
]
operations = [
migrations.AlterField(
model_name='event',
... | 34.564103 | 122 | 0.635015 |
e75926d25ebcbd4855e103731d808267062ba1fb | 540 | py | Python | big_screen/apps/whiteList/migrations/0014_auto_20210720_1050.py | 15653391491/black-broadcast-back-end | 58cd797f3f8c59316178bcfb27508278c7cb4622 | [
"AFL-3.0"
] | null | null | null | big_screen/apps/whiteList/migrations/0014_auto_20210720_1050.py | 15653391491/black-broadcast-back-end | 58cd797f3f8c59316178bcfb27508278c7cb4622 | [
"AFL-3.0"
] | null | null | null | big_screen/apps/whiteList/migrations/0014_auto_20210720_1050.py | 15653391491/black-broadcast-back-end | 58cd797f3f8c59316178bcfb27508278c7cb4622 | [
"AFL-3.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-07-20 10:50
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('whiteList', '0013_auto_20210715_1610'),
]
operations = [
m... | 24.545455 | 119 | 0.638889 |
a978de975e69fb9c58685fbf3410e38ec8a11a0d | 7,986 | py | Python | src/server/master/master_api/master_api/billing_api.py | dpaola2/djangy | 4b10e681cb49e5c16aba4429dfbfadfd9b512463 | [
"NCSA"
] | 15 | 2015-02-14T02:39:04.000Z | 2021-12-13T14:17:15.000Z | src/server/master/master_api/master_api/billing_api.py | ojengwa/djangy | 4b10e681cb49e5c16aba4429dfbfadfd9b512463 | [
"NCSA"
] | null | null | null | src/server/master/master_api/master_api/billing_api.py | ojengwa/djangy | 4b10e681cb49e5c16aba4429dfbfadfd9b512463 | [
"NCSA"
] | 11 | 2015-08-07T11:47:02.000Z | 2021-04-29T08:08:24.000Z | # Standard Python libraries
import datetime
# Djangy libraries installed in our virtualenv
from djangy_server_shared import * # referenced?
from management_database.models import User, AllocationChange, Chargable, BillingEvent, Subscription
# Libraries within this package
from devpayments import DevPayException
import ... | 36.633028 | 149 | 0.567493 |
641cf12e4b9bdd9b70b73d4e2db9c4eba5148846 | 827 | py | Python | neighbour/migrations/0012_auto_20191030_1748.py | BeatriceWambui/my-neighbourhood | 77b9713baf6f41eba72b11016effe01493e7eea4 | [
"MIT"
] | null | null | null | neighbour/migrations/0012_auto_20191030_1748.py | BeatriceWambui/my-neighbourhood | 77b9713baf6f41eba72b11016effe01493e7eea4 | [
"MIT"
] | 4 | 2020-06-05T23:57:39.000Z | 2021-09-08T01:25:21.000Z | neighbour/migrations/0012_auto_20191030_1748.py | BeatriceWambui/my-neighbourhood | 77b9713baf6f41eba72b11016effe01493e7eea4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2019-10-30 14:48
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('neighbour', '0011_auto_20191030_1459'),
]
operations... | 30.62963 | 136 | 0.654172 |
eafd4c859f0729b3b2bb8432ba90490daca598bf | 4,182 | py | Python | scripts/multiplots/main_scatter_price_production.py | cre-os/pub-data-visualization | e5ec45e6397258646290836fc1a3b39ad69bf266 | [
"MIT"
] | 10 | 2020-10-08T11:35:49.000Z | 2021-01-22T16:47:59.000Z | scripts/multiplots/main_scatter_price_production.py | cre-os/pub-data-visualization | e5ec45e6397258646290836fc1a3b39ad69bf266 | [
"MIT"
] | null | null | null | scripts/multiplots/main_scatter_price_production.py | cre-os/pub-data-visualization | e5ec45e6397258646290836fc1a3b39ad69bf266 | [
"MIT"
] | 1 | 2021-01-22T16:47:10.000Z | 2021-01-22T16:47:10.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
The script allows the user to draw
a scatterplot of national production and day-ahead prices.
"""
import os
import numpy as np
import pandas as pd
from scipy.stats import kde
#
from pub_data_visualization import global_var, global_tools, production, auctions, multi... | 44.021053 | 126 | 0.554519 |
866ee54610c4d18c4f7e269c3326d9943634830e | 5,875 | py | Python | test/functional/p2p_fingerprint.py | doriancoins/doriancoin | 1ff8a0324b642c030825d08bcc298fcde04dd7ec | [
"MIT"
] | null | null | null | test/functional/p2p_fingerprint.py | doriancoins/doriancoin | 1ff8a0324b642c030825d08bcc298fcde04dd7ec | [
"MIT"
] | null | null | null | test/functional/p2p_fingerprint.py | doriancoins/doriancoin | 1ff8a0324b642c030825d08bcc298fcde04dd7ec | [
"MIT"
] | 1 | 2017-12-04T07:18:09.000Z | 2017-12-04T07:18:09.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 The Doriancoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test various fingerprinting protections.
If an stale block more than a month old or its header are reque... | 38.149351 | 79 | 0.685787 |
2bb19ec8ddb1bb8755573b5820b2d005aa77d250 | 11,288 | py | Python | bokeh/server/django/consumers.py | jensencl/bokeh_composite_formatter | fe497342779fe3d78a4710bd4dd6b48f2ffeb9a9 | [
"BSD-3-Clause"
] | 1 | 2020-02-07T16:57:56.000Z | 2020-02-07T16:57:56.000Z | bokeh/server/django/consumers.py | jakubwro/bokeh | 950f133f033df349d6f63b9750a909d5e64de21d | [
"BSD-3-Clause"
] | null | null | null | bokeh/server/django/consumers.py | jakubwro/bokeh | 950f133f033df349d6f63b9750a909d5e64de21d | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 39.33101 | 117 | 0.592931 |
b4e367ac1598bf1cae795b85e638c2e8f67e03a7 | 26,699 | py | Python | pandas/stats/moments.py | thouis/pandas | f014b01af7bd2d03266697e672c2d41daded3fca | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/stats/moments.py | thouis/pandas | f014b01af7bd2d03266697e672c2d41daded3fca | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/stats/moments.py | thouis/pandas | f014b01af7bd2d03266697e672c2d41daded3fca | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2020-06-24T06:38:04.000Z | 2020-06-24T06:38:04.000Z | """
Provides rolling statistical moments and related descriptive
statistics implemented in Cython
"""
from __future__ import division
from functools import wraps
from numpy import NaN
import numpy as np
from pandas.core.api import DataFrame, Series, Panel, notnull
import pandas.algos as algos
import pandas.core.comm... | 32.679315 | 80 | 0.637814 |
8af2a3fbefbb510ab40bcc2a00b6da4d2dfab5c6 | 3,021 | py | Python | aliyun-python-sdk-bssopenapi/aliyunsdkbssopenapi/request/v20171214/QueryOrdersRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-bssopenapi/aliyunsdkbssopenapi/request/v20171214/QueryOrdersRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-bssopenapi/aliyunsdkbssopenapi/request/v20171214/QueryOrdersRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.197802 | 74 | 0.768289 |
318cbcffbdd5e555badd115d9e77cc3ad9f475bf | 1,802 | py | Python | products/process.py | charnset/CSCI662-final-project | c77462b9d64334fe708c7766cdf406327d3e4833 | [
"MIT"
] | null | null | null | products/process.py | charnset/CSCI662-final-project | c77462b9d64334fe708c7766cdf406327d3e4833 | [
"MIT"
] | null | null | null | products/process.py | charnset/CSCI662-final-project | c77462b9d64334fe708c7766cdf406327d3e4833 | [
"MIT"
] | null | null | null | import string
import math
from operator import methodcaller
import pandas as pd
from statistics import mean
import random
random.seed(11)
products_label_id = { 'pos': 1,
'neg': 0
}
def read_data(data_file):
with open(data_file) as file:
data = file.read().spl... | 26.115942 | 98 | 0.648724 |
8af7b46c19a62926d3311ea361a0d09ffe192a23 | 1,157 | py | Python | Uncuffed/nodes/KeyFactory.py | WckdAwe/Uncuffed | c86c2ef33c689d7895ff45e9ba6108a9f7831c2d | [
"MIT"
] | 2 | 2021-09-16T09:17:34.000Z | 2021-11-18T12:44:34.000Z | Uncuffed/nodes/KeyFactory.py | WckdAwe/Uncuffed | c86c2ef33c689d7895ff45e9ba6108a9f7831c2d | [
"MIT"
] | null | null | null | Uncuffed/nodes/KeyFactory.py | WckdAwe/Uncuffed | c86c2ef33c689d7895ff45e9ba6108a9f7831c2d | [
"MIT"
] | null | null | null | import os
import uuid
from typing import Optional
import Crypto
from Crypto.PublicKey import RSA
from Crypto.PublicKey.RSA import RsaKey
from ..helpers import paths
class KeyFactory:
@staticmethod
def create_key() -> RsaKey:
random = Crypto.Random.new().read
return RSA.generate(1024, random)... | 24.617021 | 65 | 0.621435 |
80aa9ea94fe573ebc3644d99272fbb7007d183e8 | 1,540 | py | Python | configs_hsi/swin-spectral/upernet_swinspectral_small_patch4_window7_token_4kwd_hsi.py | dkswxd/nnUnet-HSI | 9053bfeece43eda2be9ef679153e600906802548 | [
"Apache-2.0"
] | 1 | 2021-11-14T05:25:00.000Z | 2021-11-14T05:25:00.000Z | configs_hsi/swin-spectral/upernet_swinspectral_small_patch4_window7_token_4kwd_hsi.py | dkswxd/nnUnet-HSI | 9053bfeece43eda2be9ef679153e600906802548 | [
"Apache-2.0"
] | null | null | null | configs_hsi/swin-spectral/upernet_swinspectral_small_patch4_window7_token_4kwd_hsi.py | dkswxd/nnUnet-HSI | 9053bfeece43eda2be9ef679153e600906802548 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/models/upernet_swinspectral.py', '../_base_/datasets/hsix.py',
'../_base_/default_runtime.py', '../_base_/schedules/schedule_4k.py'
]
norm_cfg = dict(type='BN', requires_grad=True)
model = dict(
backbone=dict(
embed_dims=96,
depths=[2, 2, 18, 2],
num_heads=[3, 6... | 26.551724 | 77 | 0.597403 |
857bbf8a5dbb80676d0e6a50f280ae77c8cb4af2 | 6,588 | py | Python | net/embedding_space_evaluator.py | UttaranB127/speech2affective_gestures | 0ee5d1d88aed67e1203d168b9edde4605c1a2892 | [
"MIT"
] | 12 | 2021-08-04T08:53:25.000Z | 2022-03-29T11:23:28.000Z | net/embedding_space_evaluator.py | UttaranB127/speech2affective_gestures | 0ee5d1d88aed67e1203d168b9edde4605c1a2892 | [
"MIT"
] | 16 | 2021-09-22T07:26:20.000Z | 2022-03-29T22:12:28.000Z | net/embedding_space_evaluator.py | UttaranB127/speech2affective_gestures | 0ee5d1d88aed67e1203d168b9edde4605c1a2892 | [
"MIT"
] | 3 | 2021-07-19T07:32:20.000Z | 2022-02-16T02:11:59.000Z | import numpy as np
import torch
import torch.nn.functional as F
import umap
import warnings
from os.path import join as jn
from scipy import linalg
from net.embedding_net import EmbeddingNet
warnings.filterwarnings("ignore", category=RuntimeWarning) # ignore warnings
# base_path = os.path.dirname(os.path.realpath... | 40.919255 | 117 | 0.615665 |
2e27fdb272b50ddd3c03005c496d42653386dc8a | 1,578 | py | Python | ldh/models.py | blurks/ldh | 36532c122c6904d9ca952d9027c03cdba0f85ed5 | [
"Apache-2.0"
] | 3 | 2019-10-16T14:44:19.000Z | 2021-11-30T16:45:11.000Z | ldh/models.py | blurks/ldh | 36532c122c6904d9ca952d9027c03cdba0f85ed5 | [
"Apache-2.0"
] | 3 | 2019-07-26T06:59:59.000Z | 2021-01-15T10:16:22.000Z | ldh/models.py | blurks/ldh | 36532c122c6904d9ca952d9027c03cdba0f85ed5 | [
"Apache-2.0"
] | 1 | 2021-12-07T01:35:59.000Z | 2021-12-07T01:35:59.000Z | from zope.interface import implementer
from sqlalchemy import (
Column,
String,
Unicode,
Integer,
Boolean,
ForeignKey,
UniqueConstraint,
)
from sqlalchemy.orm import relationship, backref
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.ext.hybrid import hybrid_property
... | 32.875 | 78 | 0.654626 |
a6105403141fff6b4f05494fb0b8544f52529ef6 | 69,672 | py | Python | pandas/core/dtypes/cast.py | alifarhid/pandas | 70e4c5b10569e88f607a5466b0faa7b2eb4ecdbb | [
"BSD-3-Clause"
] | null | null | null | pandas/core/dtypes/cast.py | alifarhid/pandas | 70e4c5b10569e88f607a5466b0faa7b2eb4ecdbb | [
"BSD-3-Clause"
] | null | null | null | pandas/core/dtypes/cast.py | alifarhid/pandas | 70e4c5b10569e88f607a5466b0faa7b2eb4ecdbb | [
"BSD-3-Clause"
] | 1 | 2022-02-10T15:06:23.000Z | 2022-02-10T15:06:23.000Z | """
Routines for casting.
"""
from __future__ import annotations
from datetime import (
date,
datetime,
timedelta,
)
import functools
from typing import (
TYPE_CHECKING,
Any,
Sized,
TypeVar,
cast,
overload,
)
import warnings
from dateutil.parser import ParserError
import numpy as ... | 32.941844 | 88 | 0.606183 |
f9ca507bbff921b1c05d6d799dbb9a4f54e321ab | 5,068 | py | Python | ddtrace/contrib/django/utils.py | twosigmajab/dd-trace-py | 6c582ae7d606a7c102a14731dff05560ebed7831 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ddtrace/contrib/django/utils.py | twosigmajab/dd-trace-py | 6c582ae7d606a7c102a14731dff05560ebed7831 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ddtrace/contrib/django/utils.py | twosigmajab/dd-trace-py | 6c582ae7d606a7c102a14731dff05560ebed7831 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | from django.utils.functional import SimpleLazyObject
from ...compat import PY3
from ...compat import binary_type
from ...compat import parse
from ...compat import to_unicode
from ...internal.logger import get_logger
log = get_logger(__name__)
def resource_from_cache_prefix(resource, cache):
"""
Combine the... | 36.992701 | 124 | 0.633583 |
e4d61b1fbb63506ed2ac68d2fb609754cee7ca52 | 117 | py | Python | debuginfo-tests/win_cdb-tests/lit.local.cfg.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 2,338 | 2018-06-19T17:34:51.000Z | 2022-03-31T11:00:37.000Z | debuginfo-tests/win_cdb-tests/lit.local.cfg.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 3,740 | 2019-01-23T15:36:48.000Z | 2022-03-31T22:01:13.000Z | debuginfo-tests/win_cdb-tests/lit.local.cfg.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 500 | 2019-01-23T07:49:22.000Z | 2022-03-30T02:59:37.000Z | # The win_cdb tests are supported when cmake was run in an MSVC environment.
config.unsupported = not config.is_msvc
| 39 | 76 | 0.803419 |
6beb53dbb42bd2c5ae012641f671c262c3fc4bd8 | 521 | py | Python | build/shape_drone_drawer/catkin_generated/pkg.installspace.context.pc.py | Gamma-Software/ros_ws | bf887839ed0d8ee65349ccee1db30570f03ebf32 | [
"Apache-2.0"
] | null | null | null | build/shape_drone_drawer/catkin_generated/pkg.installspace.context.pc.py | Gamma-Software/ros_ws | bf887839ed0d8ee65349ccee1db30570f03ebf32 | [
"Apache-2.0"
] | null | null | null | build/shape_drone_drawer/catkin_generated/pkg.installspace.context.pc.py | Gamma-Software/ros_ws | bf887839ed0d8ee65349ccee1db30570f03ebf32 | [
"Apache-2.0"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/valentinrudloff/ros_ws/install/include".split(';') if "/home/valentinrudloff/ros_ws/install/include" != "" else []
PROJECT_CATKIN_DEPENDS = "roscpp;std_msgs;mavros_msgs".replace(';', ' ')
PKG_CON... | 57.888889 | 155 | 0.761996 |
a2aacc4feda333eaff912d30b183a58db7aa86b3 | 8,324 | py | Python | packnet_sfm/loggers/wandb_logger.py | asmith9455/packnet-sfm | 60a034ac42d2e72314d002b27efcdfc769dbc3fc | [
"MIT"
] | 982 | 2020-02-27T02:48:29.000Z | 2022-03-31T12:33:50.000Z | packnet_sfm/loggers/wandb_logger.py | asmith9455/packnet-sfm | 60a034ac42d2e72314d002b27efcdfc769dbc3fc | [
"MIT"
] | 205 | 2020-03-24T06:44:30.000Z | 2022-03-30T09:13:14.000Z | packnet_sfm/loggers/wandb_logger.py | asmith9455/packnet-sfm | 60a034ac42d2e72314d002b27efcdfc769dbc3fc | [
"MIT"
] | 253 | 2020-01-25T16:14:45.000Z | 2022-03-30T05:57:40.000Z | # Copyright 2020 Toyota Research Institute. All rights reserved.
# Adapted from Pytorch-Lightning
# https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pytorch_lightning/loggers/wandb.py
from argparse import Namespace
from collections import OrderedDict
import numpy as np
import torch.nn as nn
import w... | 30.379562 | 102 | 0.608602 |
ff482d21335cf1f88dbe7846269b796f7ae055d0 | 210 | py | Python | setup.py | jake3991/StereoFLS | 2eeeed40b5a498915c856ab2ba537462fe6380b6 | [
"MIT"
] | 3 | 2021-12-26T10:56:22.000Z | 2022-03-28T03:19:41.000Z | setup.py | jake3991/StereoFLS | 2eeeed40b5a498915c856ab2ba537462fe6380b6 | [
"MIT"
] | null | null | null | setup.py | jake3991/StereoFLS | 2eeeed40b5a498915c856ab2ba537462fe6380b6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(packages=["stereo_sonar"], package_dir={"": "src"})
setup(**d)
| 26.25 | 80 | 0.780952 |
a16b6dccd41556ea40b0f3ffe9b3174e765c8982 | 68,832 | py | Python | python/pyarrow/tests/test_dataset.py | jglaser/arrow | c547f4d44997a73feb11ed85c195b22f557b42b7 | [
"Apache-2.0"
] | null | null | null | python/pyarrow/tests/test_dataset.py | jglaser/arrow | c547f4d44997a73feb11ed85c195b22f557b42b7 | [
"Apache-2.0"
] | null | null | null | python/pyarrow/tests/test_dataset.py | jglaser/arrow | c547f4d44997a73feb11ed85c195b22f557b42b7 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.176763 | 79 | 0.650076 |
02e22a855f345de8b98c0c994902fc869cf0f437 | 7,534 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20200601/get_custom_ip_prefix.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/network/v20200601/get_custom_ip_prefix.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/network/v20200601/get_custom_ip_prefix.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 35.370892 | 213 | 0.639103 |
4d4a57191668bb45ee41401133a2c6470d808f24 | 11,833 | py | Python | myenv/lib/python3.7/site-packages/google/protobuf/unittest_mset_pb2.py | theCydonian/AudioEyes | 3dece4529b31e6c63771c4358457962999bda3b4 | [
"MIT"
] | 4,768 | 2015-01-08T04:45:33.000Z | 2022-03-28T07:32:59.000Z | myenv/lib/python3.7/site-packages/google/protobuf/unittest_mset_pb2.py | theCydonian/AudioEyes | 3dece4529b31e6c63771c4358457962999bda3b4 | [
"MIT"
] | 2,599 | 2015-01-06T21:51:28.000Z | 2022-03-30T12:40:09.000Z | venv/Lib/site-packages/google/protobuf/unittest_mset_pb2.py | Ammar-Raneez/Craigslist_Scraper | 4d8ef7d65f6cb4bbc7a461828ab02ec9e3006f71 | [
"MIT"
] | 878 | 2015-01-10T00:03:30.000Z | 2022-03-31T22:54:15.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/unittest_mset.proto
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... | 42.718412 | 1,042 | 0.790332 |
9c100fe36de27a7dea05ad87580618bfe62b7a6c | 8,681 | py | Python | redmail/email/body.py | rveachkc/red-mail | 97a9e89e8a04e67c2824a79ce45489931b4d1b82 | [
"MIT"
] | null | null | null | redmail/email/body.py | rveachkc/red-mail | 97a9e89e8a04e67c2824a79ce45489931b4d1b82 | [
"MIT"
] | null | null | null | redmail/email/body.py | rveachkc/red-mail | 97a9e89e8a04e67c2824a79ce45489931b4d1b82 | [
"MIT"
] | null | null | null | from email.message import EmailMessage
import mimetypes
from io import BytesIO
from pathlib import Path
from typing import TYPE_CHECKING, Dict, Union, ByteString
from pathlib import Path
from redmail.utils import is_bytes
from redmail.utils import import_from_string
from email.utils import make_msgid
from jinja2.en... | 35.145749 | 153 | 0.552471 |
a5b2e9aef071814a7b5e8a16a75f5cdef0369280 | 4,461 | py | Python | pipenv/patched/prettytoml/tokens/__init__.py | Enzime/pipenv | d4f710be4a39e09a82a5133b7b3a277ee9bfb13a | [
"MIT"
] | 11 | 2016-04-15T10:02:20.000Z | 2022-03-25T13:39:53.000Z | pipenv/patched/prettytoml/tokens/__init__.py | Enzime/pipenv | d4f710be4a39e09a82a5133b7b3a277ee9bfb13a | [
"MIT"
] | 4 | 2020-03-24T16:06:51.000Z | 2021-06-10T20:48:41.000Z | pipenv/patched/prettytoml/tokens/__init__.py | Enzime/pipenv | d4f710be4a39e09a82a5133b7b3a277ee9bfb13a | [
"MIT"
] | 6 | 2017-10-09T21:45:28.000Z | 2022-02-16T15:09:42.000Z |
"""
TOML lexical tokens.
"""
class TokenType:
"""
A TokenType is a concrete type of a source token along with a defined priority and a higher-order kind.
The priority will be used in determining the tokenization behaviour of the lexer in the following manner:
whenever more than one token is recogniza... | 32.562044 | 112 | 0.699171 |
808f3c7ef7c2175b5385205d7c95d293efa495b6 | 5,478 | py | Python | tests/test_testing_stub.py | Thermondo/closeio | 724f0dcf5c91d2b4abf7fd4c558ed1c9a24e1790 | [
"Apache-2.0"
] | 3 | 2015-02-10T17:37:02.000Z | 2019-05-10T08:22:51.000Z | tests/test_testing_stub.py | Thermondo/closeio | 724f0dcf5c91d2b4abf7fd4c558ed1c9a24e1790 | [
"Apache-2.0"
] | 65 | 2015-02-10T16:56:07.000Z | 2020-02-24T10:30:56.000Z | tests/test_testing_stub.py | Thermondo/closeio | 724f0dcf5c91d2b4abf7fd4c558ed1c9a24e1790 | [
"Apache-2.0"
] | 2 | 2018-10-23T18:44:14.000Z | 2020-02-24T18:08:05.000Z | import datetime
import pytest
from closeio import CloseIOError
from closeio.contrib.testing_stub import CloseIOStub
class TestEventLogs:
def test_record_and_retrieve_event_logs(self):
client = CloseIOStub()
task1 = client.create_task(lead_id='x1', assigned_to='y1', text='z1')
client.del... | 30.775281 | 91 | 0.543447 |
a4344fe848b96c3e9ed4ddd17149b41d8f9ded58 | 1,496 | py | Python | ipandas/extension.py | omerbenamram/ipandas | 433ff8cb122f0ade7f0aac733a19dee23299338e | [
"BSD-3-Clause"
] | null | null | null | ipandas/extension.py | omerbenamram/ipandas | 433ff8cb122f0ade7f0aac733a19dee23299338e | [
"BSD-3-Clause"
] | null | null | null | ipandas/extension.py | omerbenamram/ipandas | 433ff8cb122f0ade7f0aac733a19dee23299338e | [
"BSD-3-Clause"
] | null | null | null | import types
from IPython import InteractiveShell
from ipandas.ipandas import ipandas_completer
# global we use to restore ipython state if unloading our extension
original_merge_completions = None
def load_ipython_extension(ip: InteractiveShell) -> None:
"""
Creates a method for our matcher and loads it i... | 37.4 | 93 | 0.764706 |
7574fd3bbf8a1298ee84cefd9a797f2fd2eadfbb | 1,758 | py | Python | src/hpccm_containers/biogrinder/biogrinder.py | 0luhancheng0/hpccm-containers | 3a9aa6e966515dafcb56e104d99958c584539397 | [
"MIT"
] | null | null | null | src/hpccm_containers/biogrinder/biogrinder.py | 0luhancheng0/hpccm-containers | 3a9aa6e966515dafcb56e104d99958c584539397 | [
"MIT"
] | null | null | null | src/hpccm_containers/biogrinder/biogrinder.py | 0luhancheng0/hpccm-containers | 3a9aa6e966515dafcb56e104d99958c584539397 | [
"MIT"
] | null | null | null |
import os
from hpccm import config, Stage
from hpccm.building_blocks import gnu, openmpi, packages
from hpccm.primitives import label, baseimage, comment, runscript, shell, environment
from fire import Fire
from hpccm_containers.utils import add_include_path, add_library_path, from_prefix, shell_with_log
def build(c... | 35.16 | 170 | 0.651877 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.