hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f37f063ffa0cd66c554790bd5c044be104ee8f35 | 190 | py | Python | Windows/WaitingRoom/waiting_room.py | SuperSecretPryncyMafia/PKN | 3de43c3cd2f63d29098adb92b563bbc4bd79bbf8 | [
"MIT"
] | null | null | null | Windows/WaitingRoom/waiting_room.py | SuperSecretPryncyMafia/PKN | 3de43c3cd2f63d29098adb92b563bbc4bd79bbf8 | [
"MIT"
] | null | null | null | Windows/WaitingRoom/waiting_room.py | SuperSecretPryncyMafia/PKN | 3de43c3cd2f63d29098adb92b563bbc4bd79bbf8 | [
"MIT"
] | null | null | null | from abc import ABC
from .view import View
from .model import Model
from .controller import Controller
| 19 | 34 | 0.742105 |
f37f5b44b527c47327e13e3adfceadc8d8345966 | 20,795 | py | Python | lambda/lambda_function.py | ulyssesBML/Viva-a-Revolu-o-AlexaGame | f11414cd6a2c8c214f6ded3d44779f6a396a8a54 | [
"MIT"
] | null | null | null | lambda/lambda_function.py | ulyssesBML/Viva-a-Revolu-o-AlexaGame | f11414cd6a2c8c214f6ded3d44779f6a396a8a54 | [
"MIT"
] | 1 | 2020-02-17T21:56:55.000Z | 2020-02-18T17:07:43.000Z | lambda/lambda_function.py | ulyssesBML/Viva-a-Revolu-o-AlexaGame | f11414cd6a2c8c214f6ded3d44779f6a396a8a54 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# This sample demonstrates handling intents from an Alexa skill using the Alexa Skills Kit SDK for Python.
# Please visit https://alexa.design/cookbook for additional examples on implementing slots, dialog management,
# session persistence, api calls, and more.
# This sample is built using the ... | 44.72043 | 350 | 0.660688 |
f381bd0ed659abf2b17d985bc390fcf1f738ae82 | 134 | py | Python | comment/urls.py | shunpochang/connect_love_demo | 2d556399b50eae3d991b1ed8ea58f48396aec4db | [
"BSD-3-Clause"
] | 8 | 2016-07-03T01:18:46.000Z | 2019-12-14T21:02:41.000Z | comment/urls.py | shunpochang/connect_love_demo | 2d556399b50eae3d991b1ed8ea58f48396aec4db | [
"BSD-3-Clause"
] | null | null | null | comment/urls.py | shunpochang/connect_love_demo | 2d556399b50eae3d991b1ed8ea58f48396aec4db | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^list/$', views.comment_list, name='comment_list'),
]
| 19.142857 | 61 | 0.701493 |
f38641f22cf2208a475873a6c210809242c7f833 | 7,960 | py | Python | notebooks/construct-network/construct_network.py | YuzhongHuangCS/journal-citation-cartels | 7b82d9e081555f5b40eb6cc6f44f65ce1c3c1a0f | [
"BSD-2-Clause"
] | 2 | 2020-09-22T09:59:56.000Z | 2022-01-31T20:00:49.000Z | notebooks/construct-network/construct_network.py | YuzhongHuangCS/journal-citation-cartels | 7b82d9e081555f5b40eb6cc6f44f65ce1c3c1a0f | [
"BSD-2-Clause"
] | 1 | 2021-07-20T20:01:46.000Z | 2021-07-20T21:21:03.000Z | notebooks/construct-network/construct_network.py | YuzhongHuangCS/journal-citation-cartels | 7b82d9e081555f5b40eb6cc6f44f65ce1c3c1a0f | [
"BSD-2-Clause"
] | 3 | 2021-03-09T04:38:56.000Z | 2021-07-13T04:49:15.000Z | import numpy as np
import pandas as pd
import py2neo
import pickle
import os,sys
from scipy import sparse
if __name__ == "__main__":
PCOUNT_FILE = sys.argv[1]
YEAR = int(sys.argv[2])
OUTPUT_FILE = sys.argv[3]
# Parameters
window_length = 2
ys = YEAR - window_length
yf = YEAR
pcoun... | 34.912281 | 121 | 0.56495 |
f3879f7e2508d44d6784798a2cca8db2145fd810 | 2,830 | py | Python | tests/proxy/test_traversable.py | fjarri/pykka | d1b33b32ba60c6a3e83576ea746b780775e8ff3e | [
"Apache-2.0"
] | null | null | null | tests/proxy/test_traversable.py | fjarri/pykka | d1b33b32ba60c6a3e83576ea746b780775e8ff3e | [
"Apache-2.0"
] | null | null | null | tests/proxy/test_traversable.py | fjarri/pykka | d1b33b32ba60c6a3e83576ea746b780775e8ff3e | [
"Apache-2.0"
] | null | null | null | import pytest
import pykka
def test_attr_without_marker_cannot_be_traversed(proxy):
with pytest.raises(AttributeError) as exc_info:
proxy.nested_with_no_marker.inner.get()
assert "object has no attribute 'inner'" in str(exc_info.value)
| 28.3 | 80 | 0.731449 |
f388486ab8a72d376eb7fb102005c629b0cdd106 | 822 | py | Python | app/test/task/task_manager_test.py | SummaLabs/DLS | 2adba47430b456ad0f324e4c8883a896a23b3fbf | [
"MIT"
] | 32 | 2017-09-04T17:40:39.000Z | 2021-02-16T23:08:34.000Z | app/test/task/task_manager_test.py | AymanNabih/DLS | 2adba47430b456ad0f324e4c8883a896a23b3fbf | [
"MIT"
] | 3 | 2017-10-09T12:52:54.000Z | 2020-06-29T02:48:38.000Z | app/test/task/task_manager_test.py | AymanNabih/DLS | 2adba47430b456ad0f324e4c8883a896a23b3fbf | [
"MIT"
] | 20 | 2017-10-07T17:29:50.000Z | 2021-01-23T22:01:54.000Z | import pytest
from app.backend.task.task_manager import TaskManager
from app.backend.task.default_task import Task, DefaultTask
if __name__ == '__main__':
pytest.main([__file__])
| 21.631579 | 59 | 0.738443 |
f38a78cfd7991b1a1d0b33a7701551b5ead6e428 | 8,007 | py | Python | tests/test_compiler/test_analyzer.py | gmantelet/python-lyth | 80d467066c578308ecb5c3f274ae0da63e09693c | [
"BSD-2-Clause"
] | null | null | null | tests/test_compiler/test_analyzer.py | gmantelet/python-lyth | 80d467066c578308ecb5c3f274ae0da63e09693c | [
"BSD-2-Clause"
] | null | null | null | tests/test_compiler/test_analyzer.py | gmantelet/python-lyth | 80d467066c578308ecb5c3f274ae0da63e09693c | [
"BSD-2-Clause"
] | null | null | null | import pytest
from lyth.compiler.analyzer import Analyzer
from lyth.compiler.error import LythError
from lyth.compiler.error import LythSyntaxError
from lyth.compiler.lexer import Lexer
from lyth.compiler.parser import Parser
from lyth.compiler.scanner import Scanner
from lyth.compiler.symbol import Field
from lyth.co... | 35.118421 | 87 | 0.665043 |
f38eac733fcd5d71a21affa2365e744b5adc7633 | 1,418 | py | Python | src/user_management/user_login/app.py | patrickceg/rhok-bad-date-serverless | 8b6d23da9c9c10a1bef41193cb4f9ee0535506a1 | [
"MIT"
] | 1 | 2018-04-14T15:37:02.000Z | 2018-04-14T15:37:02.000Z | src/user_management/user_login/app.py | patrickceg/rhok-bad-date-serverless | 8b6d23da9c9c10a1bef41193cb4f9ee0535506a1 | [
"MIT"
] | 7 | 2018-04-15T14:47:57.000Z | 2018-04-29T03:55:28.000Z | src/user_management/user_login/app.py | patrickceg/rhok-bad-date-serverless | 8b6d23da9c9c10a1bef41193cb4f9ee0535506a1 | [
"MIT"
] | 5 | 2018-04-14T16:04:28.000Z | 2018-04-14T21:57:38.000Z | import boto3
import os
import hashlib
import uuid
import calendar
import time
from decimal import Decimal
from boto3.dynamodb.conditions import Key
# testing hook
if __name__ == '__main__':
os.environ['MINUTES_TO_LIVE'] = '0.5'
os.environ['DEBUG'] = '1'
lambda_handler({'name' : 'jacob-test', 'password' : '123456... | 27.269231 | 95 | 0.641749 |
f38eb28dc30d81aaf90ad337ef669d71ae24e45a | 307 | py | Python | twrap/__init__.py | itsnarsi/twrap | cc3128428e37fe0a363e5b18fd7fa0039a963365 | [
"MIT"
] | null | null | null | twrap/__init__.py | itsnarsi/twrap | cc3128428e37fe0a363e5b18fd7fa0039a963365 | [
"MIT"
] | null | null | null | twrap/__init__.py | itsnarsi/twrap | cc3128428e37fe0a363e5b18fd7fa0039a963365 | [
"MIT"
] | null | null | null | # @Author: Narsi Reddy <cibitaw1>
# @Date: 2018-09-19T11:53:44-05:00
# @Email: sainarsireddy@outlook.com
# @Last modified by: narsi
# @Last modified time: 2019-01-03T21:57:01-06:00
# import torch
# if '0.4.' not in torch.__version__:
# raise Exception('Only works currently with PyTorch ver0.4.x')
| 34.111111 | 67 | 0.697068 |
f38f101b5462e5a48038cb051787c9579a047624 | 432 | py | Python | setup.py | Observatory-Sciences/dls-pmac-lib | e6cde02d6ecef57963ae128f8967413b2752c024 | [
"Apache-2.0"
] | 1 | 2021-12-01T23:35:21.000Z | 2021-12-01T23:35:21.000Z | setup.py | Observatory-Sciences/dls-pmac-lib | e6cde02d6ecef57963ae128f8967413b2752c024 | [
"Apache-2.0"
] | null | null | null | setup.py | Observatory-Sciences/dls-pmac-lib | e6cde02d6ecef57963ae128f8967413b2752c024 | [
"Apache-2.0"
] | 1 | 2021-05-26T11:27:21.000Z | 2021-05-26T11:27:21.000Z | from setuptools import setup
# these lines allow the version to be specified in Makefile.private
import os
version = os.environ.get("MODULEVER", "0.0")
setup(
name = 'dls_pmaclib',
version = version,
description = 'Module',
author = 'fgz73762',
author_email = 'fgz73762@rl.ac.uk', ... | 25.411765 | 67 | 0.618056 |
f390722a9b7bcdeb7da50b02a843069961e64cc1 | 188 | py | Python | First_Week/Sum/SumPow.py | IngeniariusSoftware/Itmo-course-apsd | 34de904fd85a6fe4b32e422524d6d7993891bb7d | [
"MIT"
] | null | null | null | First_Week/Sum/SumPow.py | IngeniariusSoftware/Itmo-course-apsd | 34de904fd85a6fe4b32e422524d6d7993891bb7d | [
"MIT"
] | null | null | null | First_Week/Sum/SumPow.py | IngeniariusSoftware/Itmo-course-apsd | 34de904fd85a6fe4b32e422524d6d7993891bb7d | [
"MIT"
] | null | null | null | input = open('input.txt');
output = open('output.txt' , 'w');
tokens = input.readline().split(' ');
input.close();
output.write(str(int(tokens[0]) + int(tokens[1]) ** 2));
output.close();
| 26.857143 | 56 | 0.62234 |
f3908d26c53625ed2af166f41829d096ab0818d7 | 776 | py | Python | molecule/default/tests/test_default.py | Turgon37/ansible-sssd | f9b653495ed9a908de660dab5f311782633a5e02 | [
"MIT"
] | null | null | null | molecule/default/tests/test_default.py | Turgon37/ansible-sssd | f9b653495ed9a908de660dab5f311782633a5e02 | [
"MIT"
] | null | null | null | molecule/default/tests/test_default.py | Turgon37/ansible-sssd | f9b653495ed9a908de660dab5f311782633a5e02 | [
"MIT"
] | 2 | 2019-10-17T17:17:23.000Z | 2020-03-31T13:13:29.000Z | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
| 24.25 | 63 | 0.649485 |
f3916073cb9f5943d221666b69347f763fcb2bb3 | 2,029 | py | Python | libros/migrations/0002_auto_20191026_1023.py | dkwelffer/rocbook | 87c92f26e8bd2139cc57d11f65c3fb82ebbc5223 | [
"Apache-2.0"
] | null | null | null | libros/migrations/0002_auto_20191026_1023.py | dkwelffer/rocbook | 87c92f26e8bd2139cc57d11f65c3fb82ebbc5223 | [
"Apache-2.0"
] | null | null | null | libros/migrations/0002_auto_20191026_1023.py | dkwelffer/rocbook | 87c92f26e8bd2139cc57d11f65c3fb82ebbc5223 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.5 on 2019-10-26 14:23
from django.db import migrations, models
import django.db.models.deletion
| 30.742424 | 114 | 0.538196 |
f39250c381454b0933a185c13c313dd67e368700 | 24,886 | py | Python | plugins/Operations/Parsing/parsing_ops.py | nmantani/FileInsight-plugins | a6b036672e4c72ed06678729a86293212b7213db | [
"BSD-2-Clause",
"CC0-1.0",
"MIT"
] | 120 | 2015-02-28T14:49:12.000Z | 2022-03-27T07:13:24.000Z | plugins/Operations/Parsing/parsing_ops.py | nmantani/FileInsight-plugins | a6b036672e4c72ed06678729a86293212b7213db | [
"BSD-2-Clause",
"CC0-1.0",
"MIT"
] | null | null | null | plugins/Operations/Parsing/parsing_ops.py | nmantani/FileInsight-plugins | a6b036672e4c72ed06678729a86293212b7213db | [
"BSD-2-Clause",
"CC0-1.0",
"MIT"
] | 17 | 2016-04-04T15:53:03.000Z | 2021-12-10T18:07:59.000Z | #
# Parsing operations - Operations such as file type detection and embedded file
# detection
#
# Copyright (c) 2019, Nobutaka Mantani
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#... | 36.119013 | 213 | 0.577031 |
f3925a2de46ce94e111a0a40f4a796420e5a3f57 | 5,582 | py | Python | argo/networks/pbtxt.py | rist-ro/argo | a10c33346803239db8a64c104db7f22ec4e05bef | [
"MIT"
] | 4 | 2020-12-07T19:13:13.000Z | 2022-01-30T18:52:18.000Z | argo/networks/pbtxt.py | rist-ro/argo | a10c33346803239db8a64c104db7f22ec4e05bef | [
"MIT"
] | 12 | 2020-09-25T22:41:28.000Z | 2022-02-09T23:46:34.000Z | argo/networks/pbtxt.py | rist-ro/argo | a10c33346803239db8a64c104db7f22ec4e05bef | [
"MIT"
] | 2 | 2021-03-02T18:31:04.000Z | 2021-03-02T21:56:43.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import tensorflow as tf
import imagenet
from tensorflow.python.platform import gfile
from inception_v4 import inception_v4
from inception_v4 import inception_v4_arg_scope
from inception_v4 import ince... | 39.034965 | 93 | 0.692404 |
f393988e6740fc6e08ace33d77422c2bdfde8d04 | 2,037 | py | Python | hw3/3.py | joebobs0n/EE631 | 9b88e2ad255098afbc45cb7eda6018cb24c10fc3 | [
"MIT"
] | null | null | null | hw3/3.py | joebobs0n/EE631 | 9b88e2ad255098afbc45cb7eda6018cb24c10fc3 | [
"MIT"
] | null | null | null | hw3/3.py | joebobs0n/EE631 | 9b88e2ad255098afbc45cb7eda6018cb24c10fc3 | [
"MIT"
] | null | null | null | import cv2 as cv
import numpy as np
chessboard = [10, 7]
stereo_params = np.load('stereo_params.npz')
F = stereo_params['F']
left_params = np.load('left_params.npz')
left_intr = left_params['intr']
left_dist = left_params['dist']
right_params = np.load('right_params.npz')
right_intr = right_params['intr']
right_dis... | 29.955882 | 104 | 0.670594 |
f3947f91f3507fcdc9f9745149284d48e0294133 | 2,775 | py | Python | test/geocoders/arcgis.py | gongso1st/geopy | 9252f4b12197ff3c5e3fae50d9bae74974d5d20f | [
"MIT"
] | 1 | 2019-07-17T14:38:52.000Z | 2019-07-17T14:38:52.000Z | test/geocoders/arcgis.py | gongso1st/geopy | 9252f4b12197ff3c5e3fae50d9bae74974d5d20f | [
"MIT"
] | null | null | null | test/geocoders/arcgis.py | gongso1st/geopy | 9252f4b12197ff3c5e3fae50d9bae74974d5d20f | [
"MIT"
] | 1 | 2019-03-28T10:26:41.000Z | 2019-03-28T10:26:41.000Z |
import unittest
from geopy import exc
from geopy.compat import u
from geopy.point import Point
from geopy.geocoders import ArcGIS
from test.geocoders.util import GeocoderTestBase, env
| 27.475248 | 78 | 0.594234 |
f3966a99b7bc35ad766f8817a1afff4948982ad6 | 26 | py | Python | app/views/tracks/__init__.py | DaniFriasSolsona/DigitalMediaStore-RESTful | 30388680eb9c10b4c609ca9a273ba69c09e61dbd | [
"MIT"
] | null | null | null | app/views/tracks/__init__.py | DaniFriasSolsona/DigitalMediaStore-RESTful | 30388680eb9c10b4c609ca9a273ba69c09e61dbd | [
"MIT"
] | null | null | null | app/views/tracks/__init__.py | DaniFriasSolsona/DigitalMediaStore-RESTful | 30388680eb9c10b4c609ca9a273ba69c09e61dbd | [
"MIT"
] | null | null | null | from .resources import blp | 26 | 26 | 0.846154 |
f397433f97deecbcce038323eff26064f64a88ad | 466 | py | Python | Python/leetcode_challenges/leetcode_median-of-two-sorted-arrays.py | liv335/public | 04e1940060e2ec88a1d0d1c91603afff8ecdaea2 | [
"Apache-2.0"
] | null | null | null | Python/leetcode_challenges/leetcode_median-of-two-sorted-arrays.py | liv335/public | 04e1940060e2ec88a1d0d1c91603afff8ecdaea2 | [
"Apache-2.0"
] | null | null | null | Python/leetcode_challenges/leetcode_median-of-two-sorted-arrays.py | liv335/public | 04e1940060e2ec88a1d0d1c91603afff8ecdaea2 | [
"Apache-2.0"
] | null | null | null |
if __name__ == '__main__':
array1 = [1,3,5,6,7,8,12,19]
array2 = [2,5,10,12,17,20]
(Solution().findMedianSortedArrays(array1,array2)) | 31.066667 | 54 | 0.56867 |
f397645eaf119065b33f1012173ea4db786f6334 | 370 | py | Python | sourced/ml/tests/source/example.py | chubbymaggie/ast2vec | b9058681fdd30ad0a7f4fa90a24594b615340a90 | [
"Apache-2.0"
] | null | null | null | sourced/ml/tests/source/example.py | chubbymaggie/ast2vec | b9058681fdd30ad0a7f4fa90a24594b615340a90 | [
"Apache-2.0"
] | null | null | null | sourced/ml/tests/source/example.py | chubbymaggie/ast2vec | b9058681fdd30ad0a7f4fa90a24594b615340a90 | [
"Apache-2.0"
] | null | null | null | import sys
from modelforge.logs import setup_logging
utmain = sys.modules['__main__']
if utmain.__package__ == "unittest" and utmain.__spec__ is None:
from collections import namedtuple
ModuleSpec = namedtuple("ModuleSpec", ["name"])
utmain.__spec__ = ModuleSpec("unittest.__main__")
del ModuleSpec
de... | 21.764706 | 64 | 0.735135 |
f39aec0bebcbd7d89dc7e0ce8356f06dc7c60a5a | 6,735 | py | Python | train_parking.py | bayesianGirl/Parking-Spot-Detection-by-Opencv | b1ceb01a5eea1cba228c88113f6dcfb62c13618e | [
"MIT"
] | 3 | 2020-12-07T21:13:44.000Z | 2021-11-27T05:12:05.000Z | train_parking.py | bayesianGirl/Parking-Spot-Detection-by-Opencv | b1ceb01a5eea1cba228c88113f6dcfb62c13618e | [
"MIT"
] | null | null | null | train_parking.py | bayesianGirl/Parking-Spot-Detection-by-Opencv | b1ceb01a5eea1cba228c88113f6dcfb62c13618e | [
"MIT"
] | 6 | 2018-07-09T18:23:18.000Z | 2019-05-21T13:49:59.000Z | import tensorflow as tf
import cv2
import numpy as np
import os
import tensorflow.contrib.slim as slim # TensorFlow-Slim
# Number of classes=3(right, left,up)
# Defining training examples and labels
empty=[]
occupied=[]
examples=[]
error= 'error.txt'
error_file= open(error, 'w')
#Reading images
os.chdir('/home/ruchik... | 39.156977 | 110 | 0.705122 |
f39c0547113dfeeb7a9ee6287a14d65c76ea8bf5 | 7,308 | py | Python | matchengine/plugins/DFCIQueryNodeTransformer.py | AveraSD/matchengine-V2 | d6039dc5d6737f90f53d6decc3b60e062e65b165 | [
"Apache-2.0"
] | 18 | 2019-09-21T20:08:19.000Z | 2021-07-06T03:23:11.000Z | matchengine/plugins/DFCIQueryNodeTransformer.py | AveraSD/matchengine-V2 | d6039dc5d6737f90f53d6decc3b60e062e65b165 | [
"Apache-2.0"
] | 1 | 2020-04-06T17:13:17.000Z | 2020-09-10T13:41:45.000Z | matchengine/plugins/DFCIQueryNodeTransformer.py | AveraSD/matchengine-V2 | d6039dc5d6737f90f53d6decc3b60e062e65b165 | [
"Apache-2.0"
] | 12 | 2019-09-16T14:22:19.000Z | 2022-01-13T20:32:52.000Z | from __future__ import annotations
import datetime
import re
from typing import TYPE_CHECKING, Tuple, List, Union, Dict
from matchengine.internals.plugin_helpers.plugin_stub import (
QueryNodeTransformer,
QueryNodeClinicalIDsSubsetter
)
from matchengine.internals.typing.matchengine_types import (
QueryPar... | 44.560976 | 119 | 0.604543 |
f39e1c520696b1bcc8ef32a0537c82d74974fb1c | 6,028 | py | Python | ssbj_idf_mda.py | OneraHub/SSBJ-OpenMDAO-Example | 5d10e9f8483f5e7ce803f0bc36ff78d3323227d9 | [
"Apache-2.0"
] | 7 | 2019-02-07T17:05:50.000Z | 2022-01-20T16:29:31.000Z | ssbj_idf_mda.py | OneraHub/SSBJ-OpenMDAO-Example | 5d10e9f8483f5e7ce803f0bc36ff78d3323227d9 | [
"Apache-2.0"
] | 3 | 2018-06-19T12:41:48.000Z | 2019-01-16T17:13:24.000Z | ssbj_idf_mda.py | OneraHub/SSBJ-OpenMDAO-Example | 5d10e9f8483f5e7ce803f0bc36ff78d3323227d9 | [
"Apache-2.0"
] | 2 | 2018-06-04T13:53:15.000Z | 2018-11-29T18:46:14.000Z | """
SSBJ test case - http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19980234657.pdf
Python implementation and OpenMDAO integration developed by
Sylvain Dubreuil and Remi Lafage of ONERA, the French Aerospace Lab.
"""
import numpy as np
from openmdao.api import Group, ExecComp, IndepVarComp
from ssbj_disciplines.... | 43.366906 | 100 | 0.607001 |
f39f9dafd3986b4592613b9a6d345bb5a1bd8d41 | 3,098 | py | Python | tag2env/cli.py | ravenac95/tag2env | 5651e93d57898d6edd73a1a7b01032989acb8e4b | [
"MIT"
] | 1 | 2018-11-23T04:31:28.000Z | 2018-11-23T04:31:28.000Z | tag2env/cli.py | ravenac95/tag2env | 5651e93d57898d6edd73a1a7b01032989acb8e4b | [
"MIT"
] | null | null | null | tag2env/cli.py | ravenac95/tag2env | 5651e93d57898d6edd73a1a7b01032989acb8e4b | [
"MIT"
] | null | null | null | import os
import re
import requests
import boto3
import click
AWS_INSTANCE_DOC_URL = 'http://169.254.169.254/latest/dynamic/instance-identity/document'
def load_instances_tags(instance_id=None):
"""Loads all of the tags for an instance"""
loader = TagLoader(override_instance_id=instance_id)
return load... | 29.226415 | 89 | 0.617172 |
f3a053275fcc5ad53f6d37ac237ac4dcff7bfa12 | 5,313 | py | Python | ramjet/photometric_database/derived/self_lensing_binary_synthetic_signals_light_curve_collection.py | golmschenk/ramjet | 77fb4481a15088923308fda09804d80455d1a9cf | [
"Apache-2.0"
] | 3 | 2020-11-23T18:47:37.000Z | 2021-08-05T17:45:51.000Z | ramjet/photometric_database/derived/self_lensing_binary_synthetic_signals_light_curve_collection.py | golmschenk/ramjet | 77fb4481a15088923308fda09804d80455d1a9cf | [
"Apache-2.0"
] | 5 | 2021-08-19T00:54:57.000Z | 2022-02-10T00:15:40.000Z | ramjet/photometric_database/derived/self_lensing_binary_synthetic_signals_light_curve_collection.py | golmschenk/ramjet | 77fb4481a15088923308fda09804d80455d1a9cf | [
"Apache-2.0"
] | 3 | 2019-07-12T21:00:57.000Z | 2020-06-03T22:18:13.000Z | """
Code for a light curve collection of Agnieszka Cieplak's synthetic signals.
"""
import re
import tarfile
import urllib.request
import numpy as np
import pandas as pd
from pathlib import Path
from typing import Iterable
from ramjet.photometric_database.light_curve_collection import LightCurveCollection
if __nam... | 44.647059 | 118 | 0.710521 |
f3a1a5ad8c12e43533c8520008c3118e79bfded9 | 2,661 | py | Python | eval_sampled_config.py | gatech-sysml/CompOFA | baf561f14a561547ff51933e45f90ddf00cbb3cf | [
"Apache-2.0"
] | 20 | 2021-04-18T09:13:06.000Z | 2022-03-29T03:54:23.000Z | eval_sampled_config.py | compofa-blind-review/compofa-iclr21 | a97b726f17519e666c6fcdb4ec0b90cfa64d8d9f | [
"Apache-2.0"
] | 2 | 2021-07-02T16:08:17.000Z | 2022-02-16T09:20:47.000Z | eval_sampled_config.py | compofa-blind-review/compofa-iclr21 | a97b726f17519e666c6fcdb4ec0b90cfa64d8d9f | [
"Apache-2.0"
] | 2 | 2021-09-06T06:48:20.000Z | 2021-12-02T12:11:30.000Z | # CompOFA Compound Once-For-All Networks for Faster Multi-Platform Deployment
# Under blind review at ICLR 2021: https://openreview.net/forum?id=IgIk8RRT-Z
#
# Implementation based on:
# Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song H... | 27.43299 | 85 | 0.698985 |
f3a3102984d588e2abc373267f16845fca67864a | 17,427 | py | Python | import_models.py | CHREC/nn_benching-1 | 3b2e21e244edc20a226930104f9eb82f097296b0 | [
"MIT"
] | 3 | 2020-01-07T17:51:10.000Z | 2021-03-27T02:03:53.000Z | import_models.py | CHREC/nn_benching-1 | 3b2e21e244edc20a226930104f9eb82f097296b0 | [
"MIT"
] | null | null | null | import_models.py | CHREC/nn_benching-1 | 3b2e21e244edc20a226930104f9eb82f097296b0 | [
"MIT"
] | 1 | 2021-07-13T16:30:04.000Z | 2021-07-13T16:30:04.000Z | import torchvision.models as models
import torchvision.transforms as transforms
import torchvision.datasets as datasets
from torch.utils.data import DataLoader
import torch
#from models_dir.p_s_s.models import duc_hdc, fcn8s, fcn16s, fcn32s, gcn, psp_net, seg_net, u_net
from efficientnet_pytorch import Efficien... | 48.008264 | 189 | 0.650485 |
f3a4868d252daf86c64cbc325202072ca5b3c08e | 4,548 | py | Python | app/user/tests/test_user_api.py | Pkawa/DRF-portfolio-project | a9029957ca551eeabc442d09195c603fcf7681fb | [
"MIT"
] | 1 | 2021-07-07T00:27:35.000Z | 2021-07-07T00:27:35.000Z | app/user/tests/test_user_api.py | Pkawa/DRF-portfolio-project | a9029957ca551eeabc442d09195c603fcf7681fb | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | Pkawa/DRF-portfolio-project | a9029957ca551eeabc442d09195c603fcf7681fb | [
"MIT"
] | 1 | 2020-05-21T17:42:27.000Z | 2020-05-21T17:42:27.000Z | from django.test import TestCase
from django.contrib.auth import get_user_model
from django.urls import reverse
from rest_framework.test import APIClient
from rest_framework import status
CREATE_USER_URL = reverse('user:create')
TOKEN_URL = reverse('user:token')
ME_URL = reverse('user:me')
# endpoints that do not ... | 34.195489 | 86 | 0.649736 |
f3a4cd8ed608d821130f28fbb04623bfe8e9ecb1 | 488 | py | Python | students/k33402/Sholomov_Dan/lab34/lab3/order/views.py | heidamn/ITMO_ICT_WebDevelopment_2020-2021 | 47eb0cdf7c7dbe8d071bc4fd3f1ac94848475e7b | [
"MIT"
] | null | null | null | students/k33402/Sholomov_Dan/lab34/lab3/order/views.py | heidamn/ITMO_ICT_WebDevelopment_2020-2021 | 47eb0cdf7c7dbe8d071bc4fd3f1ac94848475e7b | [
"MIT"
] | null | null | null | students/k33402/Sholomov_Dan/lab34/lab3/order/views.py | heidamn/ITMO_ICT_WebDevelopment_2020-2021 | 47eb0cdf7c7dbe8d071bc4fd3f1ac94848475e7b | [
"MIT"
] | null | null | null | from rest_framework import viewsets
from .serializers import OrdersSerializer, OrderedItemsSerializer
from .models import Order, OrderedItem
| 30.5 | 66 | 0.776639 |
f3a6c053f2f12cb3261718563ed3380060f834ad | 462 | py | Python | initialize_countstats.py | handrews/gcd-django-vagrant-install | 9eae6baab82f5a9a88b674a7773cfd6bb69760d1 | [
"MIT"
] | 5 | 2015-05-18T13:37:52.000Z | 2021-06-11T10:46:15.000Z | initialize_countstats.py | handrews/gcd-django-vagrant-install | 9eae6baab82f5a9a88b674a7773cfd6bb69760d1 | [
"MIT"
] | 11 | 2015-09-23T19:44:42.000Z | 2018-04-22T13:26:37.000Z | initialize_countstats.py | handrews/gcd-django-vagrant-install | 9eae6baab82f5a9a88b674a7773cfd6bb69760d1 | [
"MIT"
] | 6 | 2015-10-08T19:40:37.000Z | 2017-08-11T00:50:58.000Z | import django
from apps.stats.models import CountStats
from apps.stddata.models import Language, Country
django.setup()
if CountStats.objects.filter(language__isnull=False).count() == 0:
for i in Language.objects.all():
CountStats.objects.init_stats(language=i)
if CountStats.objects.filter(country__isnu... | 27.176471 | 66 | 0.753247 |
f3a888a84714f5db60233909ea5ac36a7608dd7d | 1,538 | py | Python | tests/test_connection.py | rfishy1/luno_streams | 8bf9ad78ee1483730a38a3d8647c2484680a3553 | [
"MIT"
] | 11 | 2018-03-19T10:40:25.000Z | 2022-01-27T18:30:46.000Z | tests/test_connection.py | rfishy1/luno_streams | 8bf9ad78ee1483730a38a3d8647c2484680a3553 | [
"MIT"
] | 6 | 2018-11-01T13:55:04.000Z | 2021-04-13T11:09:41.000Z | tests/test_connection.py | rfishy1/luno_streams | 8bf9ad78ee1483730a38a3d8647c2484680a3553 | [
"MIT"
] | 6 | 2020-01-31T10:10:19.000Z | 2021-07-11T09:16:15.000Z | import asyncio
from unittest import TestCase
from luno_streams import Updater
from websockets.protocol import State
import logging
from concurrent import futures
logging.getLogger('luno_streams').addHandler(logging.StreamHandler())
| 31.387755 | 83 | 0.655397 |
f3ac54e5baaf1fbb9f3af5df5b163c7b09e17f38 | 580 | py | Python | Data Structure and Algorithm/queue.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | Data Structure and Algorithm/queue.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | Data Structure and Algorithm/queue.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null |
#FIFO - first -> first
queue = Queue()
queue.enqueue(10)
queue.enqueue(20)
queue.enqueue(30)
print(queue.sizeQueue())
print("Dequeue: ", queue.dequeue())
print("Dequeue: ", queue.dequeue())
print(queue.sizeQueue()) | 17.575758 | 36 | 0.627586 |
f3aeaee761e5174922d3c62a36e43e71ad747d28 | 376 | py | Python | pj1.py | Ziggareto/project_euler_solns | e52066b9ffec97005bad0f26a3f0e08760d5c5cb | [
"MIT"
] | null | null | null | pj1.py | Ziggareto/project_euler_solns | e52066b9ffec97005bad0f26a3f0e08760d5c5cb | [
"MIT"
] | null | null | null | pj1.py | Ziggareto/project_euler_solns | e52066b9ffec97005bad0f26a3f0e08760d5c5cb | [
"MIT"
] | null | null | null | #pj1
threelist = []
fivelist = []
togetherlist = []
sum = 0
for num in range(1000):
if num % 3 == 0:
threelist.append(num)
if num % 5 == 0:
fivelist.append(num)
togetherlist = threelist
for num in fivelist:
if not num in togetherlist:
togetherlist.append(num)
fo... | 15.666667 | 33 | 0.574468 |
f3aed62ff00dcc3fee815525f8a541aac8018c0c | 3,925 | py | Python | tests/test_multisample_module_offline.py | robertopreste/HmtNote | 0f2c0f684a45c0087cabc3cb15f61803fac7daf1 | [
"MIT"
] | 11 | 2019-04-11T07:06:41.000Z | 2021-03-22T09:13:40.000Z | tests/test_multisample_module_offline.py | robertopreste/HmtNote | 0f2c0f684a45c0087cabc3cb15f61803fac7daf1 | [
"MIT"
] | 64 | 2019-03-04T11:18:25.000Z | 2022-03-31T23:03:01.000Z | tests/test_multisample_module_offline.py | robertopreste/HmtNote | 0f2c0f684a45c0087cabc3cb15f61803fac7daf1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Created by Roberto Preste
import os
import pytest
from hmtnote import annotate, dump
DATADIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "data")
MULTISAMPLE_VCF = os.path.join(DATADIR, "multisample.vcf")
TEST_VCF = os.path.join(DATADIR, "test.vcf")
TEST_... | 50.974026 | 98 | 0.61707 |
f3afe60bdf21be63f21daf63e4394b2a9a29e766 | 42 | py | Python | birbcam/exposureadjust/__init__.py | jdpdev/birbcam | b44c95744d81d063f12dfb2521019ff89787c45a | [
"MIT"
] | 11 | 2021-03-19T18:58:19.000Z | 2022-03-23T16:57:06.000Z | birbcam/exposureadjust/__init__.py | jdpdev/birbcam | b44c95744d81d063f12dfb2521019ff89787c45a | [
"MIT"
] | 13 | 2021-03-16T00:44:52.000Z | 2021-08-31T01:44:30.000Z | birbcam/exposureadjust/__init__.py | jdpdev/birbcam | b44c95744d81d063f12dfb2521019ff89787c45a | [
"MIT"
] | 3 | 2021-03-12T15:56:14.000Z | 2022-01-03T19:41:17.000Z | from .exposureadjust import ExposureAdjust | 42 | 42 | 0.904762 |
f3b02ec223e1a94f2363cc2fc7c80af0fbe1f7bc | 2,752 | py | Python | Homework_2/problem3.py | aefernandez/DS501 | 15799c8690c2f934d8e710db060e2b9e1b6afc8a | [
"MIT"
] | null | null | null | Homework_2/problem3.py | aefernandez/DS501 | 15799c8690c2f934d8e710db060e2b9e1b6afc8a | [
"MIT"
] | null | null | null | Homework_2/problem3.py | aefernandez/DS501 | 15799c8690c2f934d8e710db060e2b9e1b6afc8a | [
"MIT"
] | null | null | null | from mrjob.job import MRJob
#-------------------------------------------------------------------------
'''
Problem 3:
In this problem, you will get familiar with the mapreduce framework.
In this problem, please install the following python package:
* mrjob
Numpy is the library for writing Pyt... | 50.962963 | 144 | 0.52798 |
f3b056833e024a4ac70e915a922751195443e601 | 870 | py | Python | micropython/examples/badger2040/info.py | SatoW04ld/pimoroni-pico | b1c0468c6c080d293593b58b7906000080732043 | [
"MIT"
] | null | null | null | micropython/examples/badger2040/info.py | SatoW04ld/pimoroni-pico | b1c0468c6c080d293593b58b7906000080732043 | [
"MIT"
] | null | null | null | micropython/examples/badger2040/info.py | SatoW04ld/pimoroni-pico | b1c0468c6c080d293593b58b7906000080732043 | [
"MIT"
] | null | null | null | import badger2040
from badger2040 import WIDTH
TEXT_SIZE = 0.45
LINE_HEIGHT = 16
display = badger2040.Badger2040()
display.led(128)
display.pen(0)
display.rectangle(0, 0, WIDTH, 16)
display.thickness(1)
display.pen(15)
display.text("badgerOS", 3, 8, 0.4)
display.pen(0)
y = 16 + int(LINE_HEIGHT / 2)
display.text("... | 22.894737 | 73 | 0.727586 |
f3b2520a47606ae32dff2f865c6832ee18bf5c86 | 8,047 | py | Python | Game.py | shmily1012/Math_learning_for_lucas | 8f6c5f9534c6a1ab1ec3dd433ffa7d6d10e55d7a | [
"MIT"
] | null | null | null | Game.py | shmily1012/Math_learning_for_lucas | 8f6c5f9534c6a1ab1ec3dd433ffa7d6d10e55d7a | [
"MIT"
] | null | null | null | Game.py | shmily1012/Math_learning_for_lucas | 8f6c5f9534c6a1ab1ec3dd433ffa7d6d10e55d7a | [
"MIT"
] | null | null | null | from os import path, terminal_size
import json
import random
import time
from ErrorBook import ErrorBook
if __name__ == '__main__':
game = Game()
print(game.getErrorFromBook())
| 40.847716 | 131 | 0.545545 |
f3b270fa36a7114f7f969027d53ba5f20b35319b | 2,729 | py | Python | covid.py | aizukanne/CovidDashboard | 55a072a3c65e21792474c5d824fff92be4a04071 | [
"MIT"
] | null | null | null | covid.py | aizukanne/CovidDashboard | 55a072a3c65e21792474c5d824fff92be4a04071 | [
"MIT"
] | null | null | null | covid.py | aizukanne/CovidDashboard | 55a072a3c65e21792474c5d824fff92be4a04071 | [
"MIT"
] | null | null | null |
# def getLastData(totalCases, country):
# import requests
# import json
# from datetime import date, timedelta
# yesterday = date.today() - timedelta(1)
# url = "https://covid-193.p.rapidapi.com/history"
# querystring = {"day":yesterday,"country":country}
# headers = {
# 'x-rapidapi-host': "covid-193.p.rap... | 36.878378 | 81 | 0.675339 |
f3b44bdff1ca02bf28255b4fffea8cfa25a95921 | 2,026 | py | Python | Utilities/DataIndexer.py | chrisbvt/ML-MalwareDetection | e00d0a0026a7c28886c3d2ab8ca9933e60f049cc | [
"MIT"
] | null | null | null | Utilities/DataIndexer.py | chrisbvt/ML-MalwareDetection | e00d0a0026a7c28886c3d2ab8ca9933e60f049cc | [
"MIT"
] | 2 | 2021-02-08T20:36:58.000Z | 2022-03-29T21:58:35.000Z | Utilities/DataIndexer.py | chrisbvt/ML-MalwareDetection | e00d0a0026a7c28886c3d2ab8ca9933e60f049cc | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import argparse
from IPython.display import display
if __name__ == "__main__":
main()
| 34.338983 | 117 | 0.580454 |
f3b4672feda15bcb49c3a672ad5426fda451079a | 1,063 | py | Python | examples/example_throttlers_aiohttp.py | uburuntu/throttler | 9172f0f5fca8efd51376452747f1526f275b7c87 | [
"MIT"
] | 77 | 2020-03-26T08:53:41.000Z | 2022-03-26T17:27:29.000Z | examples/example_throttlers_aiohttp.py | uburuntu/throttler | 9172f0f5fca8efd51376452747f1526f275b7c87 | [
"MIT"
] | 1 | 2020-06-28T20:28:49.000Z | 2020-09-08T15:35:06.000Z | examples/example_throttlers_aiohttp.py | uburuntu/throttler | 9172f0f5fca8efd51376452747f1526f275b7c87 | [
"MIT"
] | 3 | 2020-03-25T23:15:08.000Z | 2022-03-08T16:05:49.000Z | import asyncio
import time
import aiohttp
from throttler import Throttler, ThrottlerSimultaneous
| 25.309524 | 72 | 0.639699 |
f3b501afed1a214552df9374d1257b1e7c0902d4 | 393 | py | Python | web/image_path/utils.py | xinliy/pyWeb | 929dd3a03540a57eac6a98f05f43b9f5f925ee98 | [
"BSD-3-Clause"
] | 1 | 2021-01-10T09:14:30.000Z | 2021-01-10T09:14:30.000Z | web/image_path/utils.py | xinliy/pyWeb | 929dd3a03540a57eac6a98f05f43b9f5f925ee98 | [
"BSD-3-Clause"
] | 12 | 2019-12-05T01:09:41.000Z | 2022-03-12T00:07:50.000Z | web/image_path/utils.py | xinliy/pyWeb | 929dd3a03540a57eac6a98f05f43b9f5f925ee98 | [
"BSD-3-Clause"
] | 1 | 2020-11-20T13:42:39.000Z | 2020-11-20T13:42:39.000Z | import os
| 26.2 | 71 | 0.676845 |
f3b5b95387e18813475d997bc320132a781e6217 | 1,014 | py | Python | raw_generator.py | QiXi9409/Simultaneous_ECG_Heartbeat | 8b61b6434c5c505c0d55a46db08e627d275fc045 | [
"MIT"
] | 1 | 2022-01-21T06:29:19.000Z | 2022-01-21T06:29:19.000Z | raw_generator.py | sliang11/ECG-FasterRCNN | 8984084d570a0e45bf3508a1a23d562ba147ca84 | [
"MIT"
] | null | null | null | raw_generator.py | sliang11/ECG-FasterRCNN | 8984084d570a0e45bf3508a1a23d562ba147ca84 | [
"MIT"
] | 2 | 2020-06-02T01:31:29.000Z | 2021-12-30T12:58:52.000Z | from raw_type import raw_type
| 28.971429 | 101 | 0.515779 |
f3b6466e43523aad7a8ce9c32e8fafea37f077b6 | 981 | py | Python | utils.py | PenPow/PythonScripts | 408316a00f4e011be2d9d93c121e8d33dcd63e1e | [
"MIT"
] | null | null | null | utils.py | PenPow/PythonScripts | 408316a00f4e011be2d9d93c121e8d33dcd63e1e | [
"MIT"
] | null | null | null | utils.py | PenPow/PythonScripts | 408316a00f4e011be2d9d93c121e8d33dcd63e1e | [
"MIT"
] | null | null | null | isDatabaseEnabled = True
try:
from replit import db
except ModuleNotFoundError:
isDatabaseEnabled = False
import os
def clear():
os.system('cls' if os.name=='nt' else 'clear')
def getDatabase(key):
try:
return db[key]
except KeyError:
return False
def setDatabase(key, value):
... | 17.836364 | 50 | 0.620795 |
f3b8b7244931f92cdb96f69aea1e3b6369a33087 | 2,054 | py | Python | pipeline/icd9_lstm_att_model.py | letslego/W266-ProjectMIMIC | a64f16bb472931c01324f64ec358923c4a30b08e | [
"Apache-2.0"
] | null | null | null | pipeline/icd9_lstm_att_model.py | letslego/W266-ProjectMIMIC | a64f16bb472931c01324f64ec358923c4a30b08e | [
"Apache-2.0"
] | null | null | null | pipeline/icd9_lstm_att_model.py | letslego/W266-ProjectMIMIC | a64f16bb472931c01324f64ec358923c4a30b08e | [
"Apache-2.0"
] | null | null | null | from keras.models import Model
from keras.layers import Dense, Dropout, Flatten, Input, Embedding,Bidirectional
from keras.layers.merge import Concatenate
from keras.layers import LSTM
from keras.layers import MaxPooling1D, Embedding, Merge, Dropout, LSTM, Bidirectional
from keras.layers.merge import Concatenate
fro... | 40.27451 | 135 | 0.670886 |
f3bb46de77f1ede9821e16aeb0dc39aaf5af4feb | 2,041 | py | Python | dwarfgen/src/codegen.py | claybrooks/dwarfgen | 921d195b4f0aa375103839418eb72b143166b4c0 | [
"Unlicense"
] | null | null | null | dwarfgen/src/codegen.py | claybrooks/dwarfgen | 921d195b4f0aa375103839418eb72b143166b4c0 | [
"Unlicense"
] | null | null | null | dwarfgen/src/codegen.py | claybrooks/dwarfgen | 921d195b4f0aa375103839418eb72b143166b4c0 | [
"Unlicense"
] | null | null | null | import os
import importlib
import logging
from . import lang_generators
KNOWN_GENERATORS = {}
| 28.746479 | 88 | 0.700637 |
f3bcdf1ad279384376d48ed25c37d5fbb8f3c8c5 | 1,269 | py | Python | app/intent_education/__init__.py | drabekj/OttoBotServer | 76a4e5d9d1ac22eb171545c8b9ce558bb95e269f | [
"MIT"
] | 2 | 2018-07-13T20:50:35.000Z | 2018-07-13T20:50:38.000Z | app/intent_education/__init__.py | drabekj/OttoBotServer | 76a4e5d9d1ac22eb171545c8b9ce558bb95e269f | [
"MIT"
] | null | null | null | app/intent_education/__init__.py | drabekj/OttoBotServer | 76a4e5d9d1ac22eb171545c8b9ce558bb95e269f | [
"MIT"
] | null | null | null | import static.strings as strings
import static.strings_edu as strings_edu
from app import ResponseBuilder, AlexaRequest
def handle_education(request):
"""
Generate response to intent type EducateIntent with explanation of the asked investing term.
:type request AlexaRequest
:return: JSON response incl... | 38.454545 | 96 | 0.72104 |
f3bd10908fc7d151b3144866d0111689d41a1476 | 652 | py | Python | remote_works/skill/migrations/0005_auto_20190409_1249.py | tetyanaloskutova/saleor | b3bb51e9c0c4c2febf4aa1e2a7d893e77c331e89 | [
"BSD-3-Clause"
] | 7 | 2019-05-17T14:27:13.000Z | 2021-12-17T22:52:40.000Z | remote_works/skill/migrations/0005_auto_20190409_1249.py | tetyanaloskutova/saleor | b3bb51e9c0c4c2febf4aa1e2a7d893e77c331e89 | [
"BSD-3-Clause"
] | 9 | 2019-04-13T09:24:28.000Z | 2019-09-09T15:35:05.000Z | remote_works/skill/migrations/0005_auto_20190409_1249.py | tetyanaloskutova/remote-works | b3bb51e9c0c4c2febf4aa1e2a7d893e77c331e89 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.1.5 on 2019-04-09 10:49
from django.db import migrations, models
import django.db.models.deletion
| 26.08 | 137 | 0.618098 |
f3bd4c69ff3ae0a25e53c9c83810f5632db1899b | 3,116 | py | Python | animalcourier/profile/psopen.py | btrspg/Animal-Courier | 59be3b3cf53f42a1101635eec61904a0be20957f | [
"MIT"
] | null | null | null | animalcourier/profile/psopen.py | btrspg/Animal-Courier | 59be3b3cf53f42a1101635eec61904a0be20957f | [
"MIT"
] | null | null | null | animalcourier/profile/psopen.py | btrspg/Animal-Courier | 59be3b3cf53f42a1101635eec61904a0be20957f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @License : Copyright(c) 2018 MIT License
# @Time : 2019-01-09 15:01
# @Author : YUELONG.CHEN
# @Mail : yuelong_chen@yahoo.com
# @File : psopen.py
# @Software: PyCharm
from __future__ import absolute_import, unicode_literals
import logging
import os
import sys... | 33.869565 | 127 | 0.626765 |
f3bdd237e7a92835cd9c312fe1cb570edab1eefa | 130 | py | Python | src/treepath/path/typing/json_types.py | monkeydevtools/treepath-python | 56f6cbf662f8a4c13f0c9e753a839fc9f6323dba | [
"Apache-2.0"
] | 2 | 2021-05-26T08:26:25.000Z | 2021-09-24T21:26:01.000Z | src/treepath/path/typing/json_types.py | monkeydevtools/treepath-python | 56f6cbf662f8a4c13f0c9e753a839fc9f6323dba | [
"Apache-2.0"
] | null | null | null | src/treepath/path/typing/json_types.py | monkeydevtools/treepath-python | 56f6cbf662f8a4c13f0c9e753a839fc9f6323dba | [
"Apache-2.0"
] | null | null | null | from typing import Union, Dict, List
JsonTypes = Union[Dict[str, 'JsonTypes'], List['JsonTypes'], str, int, float, bool, None]
| 21.666667 | 89 | 0.7 |
f3bfecbefdaa435ba979c1b054ab9fcdffb415fc | 977 | py | Python | s.py | overfly2014/test | 5aa250616b656a786d3082453f8e6e39601d3266 | [
"MIT"
] | null | null | null | s.py | overfly2014/test | 5aa250616b656a786d3082453f8e6e39601d3266 | [
"MIT"
] | null | null | null | s.py | overfly2014/test | 5aa250616b656a786d3082453f8e6e39601d3266 | [
"MIT"
] | null | null | null | import requests
import time
import json
url = "https://www.okex.com/api/v5/market/ticker?instId=SHIB-USDT"
proxies = {
'https': 'http://127.0.0.1:10809',
}
headers = { 'Connection': 'close',}
requests.packages.urllib3.disable_warnings()
requests.adapters.DEFAULT_RETRIES = 1
if __name__ == "__main__":
... | 33.689655 | 97 | 0.566018 |
f3c0ba1d7c1622f11a69dff876458d345fa9a9ee | 968 | py | Python | setup.py | orwell-int/proxy-robots-python | 76e23eff0e3b2c55b4b865533a9db7e49e444f20 | [
"BSD-3-Clause"
] | null | null | null | setup.py | orwell-int/proxy-robots-python | 76e23eff0e3b2c55b4b865533a9db7e49e444f20 | [
"BSD-3-Clause"
] | 3 | 2020-08-13T17:46:07.000Z | 2020-10-23T18:52:08.000Z | setup.py | orwell-int/proxy-robots-python | 76e23eff0e3b2c55b4b865533a9db7e49e444f20 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
# Hack to prevent stupid TypeError: 'NoneType' object is not callable error on
# exit of python setup.py test # in multiprocessing/util.py _exit_function when
# running python setup.py test (see
# http://www.eby-sarna.com/pipermail/peak/2010-May... | 29.333333 | 80 | 0.665289 |
f3c346cdf4f4544b7c90fef31d6f459b1e99ddac | 1,606 | py | Python | panoptes_aggregation/extractors/__init__.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | panoptes_aggregation/extractors/__init__.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | panoptes_aggregation/extractors/__init__.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | from .point_extractor import point_extractor
from .point_extractor_by_frame import point_extractor_by_frame
from .rectangle_extractor import rectangle_extractor
from .question_extractor import question_extractor
from .survey_extractor import survey_extractor
from .poly_line_text_extractor import poly_line_text_extracto... | 42.263158 | 76 | 0.83873 |
f3c3b3e2cee3141736cd9c221213692993fdc803 | 2,869 | py | Python | suricata-4.1.4/suricata-update/tests/test_signaturemap.py | runtest007/dpdk_surcata_4.1.1 | 5abf91f483b418b5d9c2dd410b5c850d6ed95c5f | [
"MIT"
] | 77 | 2019-06-17T07:05:07.000Z | 2022-03-07T03:26:27.000Z | suricata-4.1.4/suricata-update/tests/test_signaturemap.py | clockdad/DPDK_SURICATA-4_1_1 | 974cc9eb54b0b1ab90eff12a95617e3e293b77d3 | [
"MIT"
] | 22 | 2019-07-18T02:32:10.000Z | 2022-03-24T03:39:11.000Z | suricata-4.1.4/suricata-update/tests/test_signaturemap.py | clockdad/DPDK_SURICATA-4_1_1 | 974cc9eb54b0b1ab90eff12a95617e3e293b77d3 | [
"MIT"
] | 49 | 2019-06-18T03:31:56.000Z | 2022-03-13T05:23:10.000Z | # Copyright (C) 2017 Open Information Security Foundation
#
# You can copy, redistribute or modify this Program under the terms of
# the GNU General Public License version 2 as published by the Free
# Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; wi... | 34.987805 | 78 | 0.649007 |
f3c3dc1e5c41c6163046ac553b2189e018536414 | 198 | py | Python | Python/now.py | jgstew/tools | 977361bc1410ebda7199ab3ca2020b53d24d270c | [
"MIT"
] | 17 | 2016-11-24T20:46:37.000Z | 2021-06-09T05:48:02.000Z | Python/now.py | jgstew/tools | 977361bc1410ebda7199ab3ca2020b53d24d270c | [
"MIT"
] | 22 | 2016-05-11T18:09:25.000Z | 2018-07-19T17:20:32.000Z | Python/now.py | jgstew/tools | 977361bc1410ebda7199ab3ca2020b53d24d270c | [
"MIT"
] | 10 | 2016-10-13T21:45:00.000Z | 2022-03-11T15:18:44.000Z | """
Return the current time in the same format is BigFix Relevance.
"""
import datetime
time_now = datetime.datetime.now(datetime.timezone.utc)
print(time_now.strftime("%a, %d %b %Y %H:%M:%S %z"))
| 24.75 | 63 | 0.712121 |
f3c45f7c70e73a743a700dfb086cc73a291cc487 | 1,751 | py | Python | chaospy/distributions/collection/gompertz.py | utsekaj42/chaospy | 0fb23cbb58eb987c3ca912e2a20b83ebab0514d0 | [
"MIT"
] | 333 | 2016-10-25T12:00:48.000Z | 2022-03-30T07:50:33.000Z | chaospy/distributions/collection/gompertz.py | utsekaj42/chaospy | 0fb23cbb58eb987c3ca912e2a20b83ebab0514d0 | [
"MIT"
] | 327 | 2016-09-25T16:29:41.000Z | 2022-03-30T03:26:27.000Z | chaospy/distributions/collection/gompertz.py | utsekaj42/chaospy | 0fb23cbb58eb987c3ca912e2a20b83ebab0514d0 | [
"MIT"
] | 74 | 2016-10-17T11:14:13.000Z | 2021-12-09T10:55:59.000Z | """Gompertz distribution."""
import numpy
from scipy import special
from ..baseclass import SimpleDistribution, ShiftScaleDistribution
| 25.376812 | 66 | 0.5494 |
f3c481b46a46b8966c695a026cbd5751fb9011cb | 1,433 | py | Python | h1st/trust/describable.py | TheVinhLuong102/H1st | 0c6f56d3a078817c36b208ae4f4c519cb35d5c18 | [
"Apache-2.0"
] | null | null | null | h1st/trust/describable.py | TheVinhLuong102/H1st | 0c6f56d3a078817c36b208ae4f4c519cb35d5c18 | [
"Apache-2.0"
] | null | null | null | h1st/trust/describable.py | TheVinhLuong102/H1st | 0c6f56d3a078817c36b208ae4f4c519cb35d5c18 | [
"Apache-2.0"
] | null | null | null | from .shap_model_describer import SHAPModelDescriber # TODO: fix
from .enums import Constituency, Aspect
from .describer import Describer
| 38.72973 | 104 | 0.680391 |
f3c6b9f173f2065ac674f49398aa32fdb0f113b2 | 6,839 | py | Python | tests/test_examples.py | kjosib/booze-tools | ed3333643e0df99231202c024da8c86a9bb5b2bc | [
"MIT"
] | 10 | 2019-01-24T04:45:56.000Z | 2020-09-16T14:27:29.000Z | tests/test_examples.py | kjosib/booze-tools | ed3333643e0df99231202c024da8c86a9bb5b2bc | [
"MIT"
] | 40 | 2019-04-10T21:54:38.000Z | 2021-10-04T02:49:11.000Z | tests/test_examples.py | kjosib/booze-tools | ed3333643e0df99231202c024da8c86a9bb5b2bc | [
"MIT"
] | 1 | 2020-05-22T16:28:02.000Z | 2020-05-22T16:28:02.000Z | import unittest
import os
import json as standard_json
import example.mini_json, example.macro_json, example.calculator
from boozetools.macroparse import compiler
from boozetools.parsing import shift_reduce
from boozetools.parsing.general import brute_force, gss
from boozetools.support import runtime, interfaces, expa... | 36.185185 | 127 | 0.705805 |
f3c6d009080d335af89d5a6496d1ce1cf9a3e716 | 488 | py | Python | backend/autobets/apimb/migrations/0011_runner_event.py | slarkjm0803/autobets | f92a5d999acaf5d7c83ca2768a260c2282eabbee | [
"MIT"
] | 1 | 2020-03-06T14:29:12.000Z | 2020-03-06T14:29:12.000Z | backend/autobets/apimb/migrations/0011_runner_event.py | slarkjm0803/autobets | f92a5d999acaf5d7c83ca2768a260c2282eabbee | [
"MIT"
] | null | null | null | backend/autobets/apimb/migrations/0011_runner_event.py | slarkjm0803/autobets | f92a5d999acaf5d7c83ca2768a260c2282eabbee | [
"MIT"
] | null | null | null | # Generated by Django 2.0.6 on 2019-11-21 13:23
from django.db import migrations, models
import django.db.models.deletion
| 24.4 | 124 | 0.639344 |
f3c918a21077a8c8e26290bd9e7b95a2abb697db | 1,668 | py | Python | Server/app/views/v1/admin/account/account_control.py | moreal/DMS-Backend | c0a3b28972739c58049a296570bb873f32c03eec | [
"MIT"
] | 27 | 2018-01-14T08:07:18.000Z | 2020-01-20T14:21:17.000Z | Server/app/views/v1/admin/account/account_control.py | moreal/DMS-Backend | c0a3b28972739c58049a296570bb873f32c03eec | [
"MIT"
] | 50 | 2018-02-12T12:51:33.000Z | 2018-08-28T00:48:31.000Z | Server/app/views/v1/admin/account/account_control.py | moreal/DMS-Backend | c0a3b28972739c58049a296570bb873f32c03eec | [
"MIT"
] | 10 | 2018-03-31T16:30:32.000Z | 2021-03-02T10:30:31.000Z | from binascii import hexlify
from hashlib import pbkdf2_hmac
from flask import Blueprint, Response, request, current_app
from flask_restful import Api
from app.views.v1 import BaseResource
from app.views.v1 import admin_only
from app.models.account import SignupWaitingModel, StudentModel, AdminModel
api = Api(Blu... | 23.166667 | 75 | 0.610312 |
f3c95fb934cfd2b0fe4d7578795bc7c600fa9619 | 2,103 | py | Python | mmdet/models/necks/__init__.py | HenryOsborne/xViewDetection | 28bbeb263b05c4c892eae87713e34c62cbe606d5 | [
"Apache-2.0"
] | null | null | null | mmdet/models/necks/__init__.py | HenryOsborne/xViewDetection | 28bbeb263b05c4c892eae87713e34c62cbe606d5 | [
"Apache-2.0"
] | null | null | null | mmdet/models/necks/__init__.py | HenryOsborne/xViewDetection | 28bbeb263b05c4c892eae87713e34c62cbe606d5 | [
"Apache-2.0"
] | null | null | null | from .bfp import BFP
from .channel_mapper import ChannelMapper
from .fpg import FPG
from .fpn import FPN
from .fpn_carafe import FPN_CARAFE
from .hrfpn import HRFPN
from .nas_fpn import NASFPN
from .nasfcos_fpn import NASFCOS_FPN
from .pafpn import PAFPN
from .rfp import RFP
from .yolo_neck import YOLOV3Neck
from .glne... | 44.744681 | 120 | 0.785069 |
45e774721006510df771e653de8130abe3dba891 | 2,713 | py | Python | mapillary_tools/commands/extract_import_meta_data.py | pesak/mapillary_tools | d433b0cf3986a5c9cbc56b216b38f36dd7e8391d | [
"BSD-2-Clause"
] | null | null | null | mapillary_tools/commands/extract_import_meta_data.py | pesak/mapillary_tools | d433b0cf3986a5c9cbc56b216b38f36dd7e8391d | [
"BSD-2-Clause"
] | null | null | null | mapillary_tools/commands/extract_import_meta_data.py | pesak/mapillary_tools | d433b0cf3986a5c9cbc56b216b38f36dd7e8391d | [
"BSD-2-Clause"
] | null | null | null |
from mapillary_tools.process_import_meta_properties import process_import_meta_properties
| 66.170732 | 402 | 0.708441 |
45e7b7e3cc8d8a217a777ade6c459dbb00a0cc8d | 831 | py | Python | LeetCode/MoveZeros.py | yashbhatt99/HackerRank-Problems | 1c35bb20a662a917ab8657035f3a672001211a8c | [
"MIT"
] | 10 | 2019-04-13T16:27:25.000Z | 2019-10-31T10:46:25.000Z | LeetCode/MoveZeros.py | yashbhatt99/HackerRank-Problems | 1c35bb20a662a917ab8657035f3a672001211a8c | [
"MIT"
] | 1 | 2020-10-21T15:39:15.000Z | 2020-10-21T15:39:15.000Z | LeetCode/MoveZeros.py | yashbhatt99/HackerRank-Problems | 1c35bb20a662a917ab8657035f3a672001211a8c | [
"MIT"
] | 3 | 2020-10-01T10:00:54.000Z | 2020-10-20T16:57:18.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 15 12:05:04 2020
@author: ravi
"""
arr = list(map(int,input().split()))
TwoPointer(arr) | 21.868421 | 49 | 0.392298 |
45e8212ceb66541400595949467bd4df8574dbc1 | 1,064 | py | Python | leetcode-34.py | comst007/myLeetCode | 2596f207f686a1601ea32d263cba4a9a1e2f3630 | [
"Apache-2.0"
] | null | null | null | leetcode-34.py | comst007/myLeetCode | 2596f207f686a1601ea32d263cba4a9a1e2f3630 | [
"Apache-2.0"
] | null | null | null | leetcode-34.py | comst007/myLeetCode | 2596f207f686a1601ea32d263cba4a9a1e2f3630 | [
"Apache-2.0"
] | null | null | null |
arr = [5,7,7,8,8,10]
target = 8
sl = Solution()
res = sl.searchRange(arr, target)
print(res) | 21.714286 | 49 | 0.409774 |
45e8b077d24016e229eefe1622723fb85ab70504 | 766 | py | Python | config/config.example.py | Der-Eddy/discord_bot | bc2511e6d030ee2e099410bd846ea871fe3f109d | [
"MIT"
] | 122 | 2016-08-05T02:27:31.000Z | 2022-03-21T07:53:10.000Z | config/config.example.py | Der-Eddy/discord_bot | bc2511e6d030ee2e099410bd846ea871fe3f109d | [
"MIT"
] | 15 | 2017-12-07T14:28:20.000Z | 2021-11-19T13:03:37.000Z | config/config.example.py | Der-Eddy/discord_bot | bc2511e6d030ee2e099410bd846ea871fe3f109d | [
"MIT"
] | 100 | 2016-08-21T18:12:29.000Z | 2022-02-19T11:21:23.000Z | __token__ = 'INSERT BOT TOKEN HERE'
__prefix__ = ':' #OPTIONAL Prefix for all commands, defaults to colon
__timezone__ = 'Europe/Berlin' #OPTIONAL
__botserverid__ = 102817255661772800 #OPTIONAL Specifies the main serverid from which the server-/modlog should be taken + some other nito features
__kawaiichannel__ = 2... | 95.75 | 148 | 0.795039 |
45e94553d7262708a9d8b0c6857461c9dd9b8f64 | 186 | py | Python | catch/utils/tests/input/test_module.py | broadinstitute/catch | 2fedca15f921116f580de8b2ae7ac9972932e59e | [
"MIT"
] | 58 | 2018-01-24T16:31:37.000Z | 2022-02-25T07:46:35.000Z | catch/utils/tests/input/test_module.py | broadinstitute/catch | 2fedca15f921116f580de8b2ae7ac9972932e59e | [
"MIT"
] | 29 | 2018-04-17T17:36:06.000Z | 2022-02-25T11:48:58.000Z | catch/utils/tests/input/test_module.py | broadinstitute/catch | 2fedca15f921116f580de8b2ae7ac9972932e59e | [
"MIT"
] | 16 | 2018-05-23T12:19:41.000Z | 2021-08-09T04:16:00.000Z | """Module to test dynamic loading."""
# Define a variable to check its value
testvar = 'testval'
# Define a function to check its loading and execution
| 20.666667 | 54 | 0.698925 |
45e9e05a20d518349e1d0b2f460fca1b795a82e9 | 9,890 | py | Python | inmoov/scripts/Structures_new.py | mish3albaiz/Robotics_ECE579 | efb654040015671a0656eaee4c78ec085d862996 | [
"BSD-3-Clause"
] | 1 | 2020-02-13T21:13:08.000Z | 2020-02-13T21:13:08.000Z | inmoov/scripts/Structures_new.py | mish3albaiz/Robotics_ECE579 | efb654040015671a0656eaee4c78ec085d862996 | [
"BSD-3-Clause"
] | null | null | null | inmoov/scripts/Structures_new.py | mish3albaiz/Robotics_ECE579 | efb654040015671a0656eaee4c78ec085d862996 | [
"BSD-3-Clause"
] | null | null | null | import time
from Servo import Servo
# members of each class:
# finger: bend, bend_max, straighten_max
# hand: straighten_all_fingers, make_fist, move_all_fingers
# wrist: rotate
# forearm:
# shoulder: flex/extend, abduction_up/abduction_down, rotation_internal/rotation_external, rotation_up/rotation_down,
# arm:
# to... | 29.522388 | 138 | 0.617796 |
45eb2e9def0eec980e1f174eed2f97baceb70fae | 17,158 | py | Python | agent.py | drmeerkat/IQN-and-Extensions | 1cc024c0eedd6cbad62e6db0aae21157847a7e85 | [
"MIT"
] | null | null | null | agent.py | drmeerkat/IQN-and-Extensions | 1cc024c0eedd6cbad62e6db0aae21157847a7e85 | [
"MIT"
] | null | null | null | agent.py | drmeerkat/IQN-and-Extensions | 1cc024c0eedd6cbad62e6db0aae21157847a7e85 | [
"MIT"
] | null | null | null | import torch
import numpy as np
import torch.optim as optim
from torch.nn.utils import clip_grad_norm_
import torch.nn.functional as F
import random
import math
from ReplayBuffers import ReplayBuffer, PrioritizedReplay
from model import IQN
def calculate_huber_loss(td_errors, k=1.0):
"""
Calculate huber loss ... | 48.468927 | 154 | 0.583285 |
45ebb08783030746a08c4d5ffbb075711c0bdad9 | 5,162 | py | Python | exposan/bwaise/_cfs.py | stetsonrowles/EXPOsan | 5baeb30a6c85f923aa33b2a8b21e0e508ad8b2dc | [
"IJG"
] | null | null | null | exposan/bwaise/_cfs.py | stetsonrowles/EXPOsan | 5baeb30a6c85f923aa33b2a8b21e0e508ad8b2dc | [
"IJG"
] | null | null | null | exposan/bwaise/_cfs.py | stetsonrowles/EXPOsan | 5baeb30a6c85f923aa33b2a8b21e0e508ad8b2dc | [
"IJG"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
EXPOsan: Exposition of sanitation and resource recovery systems
This module is developed by:
Yalin Li <zoe.yalin.li@gmail.com>
This module is under the University of Illinois/NCSA Open Source License.
Please refer to https://github.com/QSD-Group/EXPOsan/blob/mai... | 38.81203 | 144 | 0.700697 |
45ec3f719508d9939ef62b84c92349a7b3b7bef5 | 1,849 | py | Python | apprise_api/gunicorn.conf.py | scyto/apprise-api | 6376580243885d3987ae2b61de5e8e1806244148 | [
"MIT"
] | null | null | null | apprise_api/gunicorn.conf.py | scyto/apprise-api | 6376580243885d3987ae2b61de5e8e1806244148 | [
"MIT"
] | null | null | null | apprise_api/gunicorn.conf.py | scyto/apprise-api | 6376580243885d3987ae2b61de5e8e1806244148 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Chris Caron <lead2gold@gmail.com>
# All rights reserved.
#
# This code is licensed under the MIT License.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files(the "Software"), to deal
# in th... | 33.618182 | 79 | 0.74689 |
45ec9f4df0d9cce52ff3d6ee0ce296c09f1b6beb | 265 | py | Python | pyqt/svg/viewer1.py | smartnova/samples | c665cbaa07d05191323cea206cf73f630cf58b74 | [
"BSD-3-Clause"
] | null | null | null | pyqt/svg/viewer1.py | smartnova/samples | c665cbaa07d05191323cea206cf73f630cf58b74 | [
"BSD-3-Clause"
] | 7 | 2019-03-09T07:02:55.000Z | 2022-03-12T00:44:21.000Z | pyqt/svg/viewer1.py | smartnova/samples | c665cbaa07d05191323cea206cf73f630cf58b74 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import sys
from PyQt5 import QtGui, QtSvg
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
svgWidget = QtSvg.QSvgWidget('Android_sample.svg')
svgWidget.setGeometry(50,50,759,668)
svgWidget.show()
sys.exit(app.exec_())
| 20.384615 | 50 | 0.777358 |
45ecf51be5f3324a292bcdaa524e9833a24b4c28 | 8,559 | py | Python | Assignment2/expression_tree_from_robdd.py | khushhallchandra/EE677-VLSI-CAD | c40fbe3bd0c07cd1f3b18d477917c85702607e51 | [
"MIT"
] | 4 | 2016-12-05T12:43:58.000Z | 2020-02-21T00:29:42.000Z | Assignment2/expression_tree_from_robdd.py | khushhallchandra/EE677-VLSI-CAD | c40fbe3bd0c07cd1f3b18d477917c85702607e51 | [
"MIT"
] | null | null | null | Assignment2/expression_tree_from_robdd.py | khushhallchandra/EE677-VLSI-CAD | c40fbe3bd0c07cd1f3b18d477917c85702607e51 | [
"MIT"
] | null | null | null | # file : prog_assign_2_ee677_2016_expression_tree_from_robdd_Wed_26_Oct.py
# The following code contains the simple classes to model following
# types of logic node objects
# Binary Boolean Operation node, Not Operation node, Input node, Constant node
# Using these classes and the utility function "robdd_to_expr_t... | 33.303502 | 92 | 0.562332 |
45ed3d2b1968312b1cd85eba95274d42195b1be0 | 24,340 | py | Python | tests/mongothon/model_test.py | geoffroth/mongothon | 5305bdae8e38d09bfe7881f1edc99ac0a2e6b96b | [
"MIT"
] | 69 | 2015-01-03T13:27:45.000Z | 2022-03-26T03:50:20.000Z | tests/mongothon/model_test.py | geoffroth/mongothon | 5305bdae8e38d09bfe7881f1edc99ac0a2e6b96b | [
"MIT"
] | 15 | 2015-01-22T16:56:44.000Z | 2021-05-05T20:17:21.000Z | tests/mongothon/model_test.py | geoffroth/mongothon | 5305bdae8e38d09bfe7881f1edc99ac0a2e6b96b | [
"MIT"
] | 23 | 2015-01-03T07:55:36.000Z | 2022-03-19T06:42:49.000Z | from mongothon import create_model, create_model_offline
from pickle import dumps, loads
from unittest import TestCase
from mock import Mock, ANY, call, NonCallableMock
from mongothon import Document, Schema, NotFoundException, Array
from mongothon.validators import one_of
from mongothon.scopes import STANDARD_SCOPES
f... | 36.546547 | 112 | 0.634059 |
45edbcbe6bec4ac4034940c704c1c7a0048c7589 | 10,729 | py | Python | examples/jericho/run_cross.py | kohilin/lgat | ba9fe6b4edd22c33c1c96f3139833cca9d149022 | [
"Apache-1.1"
] | null | null | null | examples/jericho/run_cross.py | kohilin/lgat | ba9fe6b4edd22c33c1c96f3139833cca9d149022 | [
"Apache-1.1"
] | null | null | null | examples/jericho/run_cross.py | kohilin/lgat | ba9fe6b4edd22c33c1c96f3139833cca9d149022 | [
"Apache-1.1"
] | null | null | null | import logging
import glob
import sys
import os
import tqdm
import torch
import numpy as np
from torch.utils.tensorboard import SummaryWriter
from argparse import ArgumentParser
from pfrl.replay_buffers import ReplayBuffer, PrioritizedReplayBuffer
from exp import create_md_table_from_dic
sys.path.append('../../')
f... | 38.046099 | 133 | 0.622146 |
45ee4bb5dcccd9711bd92935d343e2b0fa38d9a3 | 13,863 | py | Python | test/functional/abc-sigops-deactivation.py | danhper/bitcoin-abc | d2b4bfc4d42d054cfebb5d951d23bbe96115f262 | [
"MIT"
] | 1 | 2021-09-08T14:26:46.000Z | 2021-09-08T14:26:46.000Z | test/functional/abc-sigops-deactivation.py | danhper/bitcoin-abc | d2b4bfc4d42d054cfebb5d951d23bbe96115f262 | [
"MIT"
] | 1 | 2020-02-19T10:28:45.000Z | 2020-02-19T10:28:45.000Z | test/functional/abc-sigops-deactivation.py | danhper/bitcoin-abc | d2b4bfc4d42d054cfebb5d951d23bbe96115f262 | [
"MIT"
] | 1 | 2017-06-30T20:58:07.000Z | 2017-06-30T20:58:07.000Z | #!/usr/bin/env python3
# Copyright (c) 2020 The Bitcoin Developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test deactivation of sigops counting
based on abc-schnorrmultisig-activation.py (D3736).
"""
from test_framewo... | 38.508333 | 100 | 0.674385 |
45f334b5d1edf1cb5b58b58ff7b64e41b4db5ab0 | 2,912 | py | Python | src/peter_sslers/web/models/__init__.py | jvanasco/pyramid_letsencrypt_admin | 6db37d30ef8028ff978bf6083cdf978fc88a4782 | [
"MIT"
] | 1 | 2016-03-31T22:19:19.000Z | 2016-03-31T22:19:19.000Z | src/peter_sslers/web/models/__init__.py | jvanasco/pyramid_letsencrypt_admin | 6db37d30ef8028ff978bf6083cdf978fc88a4782 | [
"MIT"
] | null | null | null | src/peter_sslers/web/models/__init__.py | jvanasco/pyramid_letsencrypt_admin | 6db37d30ef8028ff978bf6083cdf978fc88a4782 | [
"MIT"
] | null | null | null | from __future__ import print_function
# pypi
from sqlalchemy import engine_from_config
from sqlalchemy.orm import sessionmaker
import zope.sqlalchemy
# from sqlalchemy import event
# local
# import the SqlAlchemy model, which will call `sqlalchemy.orm.configure_mappers`
from ... import model # noqa: F401
# ======... | 30.333333 | 133 | 0.710852 |
45f38769527ae3a0d774c20200bfcf7272226d31 | 82 | py | Python | DeepSaki/initializer/helper/__init__.py | sascha-kirch/DeepSaki | cfe6bd6537a2b0793d4db4041f2efb37d480cb4c | [
"MIT"
] | null | null | null | DeepSaki/initializer/helper/__init__.py | sascha-kirch/DeepSaki | cfe6bd6537a2b0793d4db4041f2efb37d480cb4c | [
"MIT"
] | null | null | null | DeepSaki/initializer/helper/__init__.py | sascha-kirch/DeepSaki | cfe6bd6537a2b0793d4db4041f2efb37d480cb4c | [
"MIT"
] | null | null | null | from DeepSaki.initializer.helper.initializer_helper import MakeInitializerComplex
| 41 | 81 | 0.914634 |
45f3e76c13b00e8eab45af5098e18d50c1acb793 | 436 | py | Python | hsv_dot_beer/permissions.py | austinprog/hsvdotbeer | 2979a2b0b105b85d0865c6771bfcb7debb98b3e8 | [
"Apache-2.0"
] | 18 | 2018-12-06T01:46:37.000Z | 2021-10-17T10:37:17.000Z | hsv_dot_beer/permissions.py | austinprog/hsvdotbeer | 2979a2b0b105b85d0865c6771bfcb7debb98b3e8 | [
"Apache-2.0"
] | 194 | 2018-11-04T12:50:49.000Z | 2022-01-06T22:43:43.000Z | hsv_dot_beer/permissions.py | austinprog/hsvdotbeer | 2979a2b0b105b85d0865c6771bfcb7debb98b3e8 | [
"Apache-2.0"
] | 7 | 2019-03-18T05:36:06.000Z | 2020-12-25T03:27:29.000Z | from rest_framework.permissions import BasePermission, SAFE_METHODS
| 39.636364 | 73 | 0.706422 |
45f420ab6e1abe94bc0e796084a2bcc846cf45f8 | 3,279 | py | Python | TFQ/barren_plateaus/bp_tfq.py | Project-Fare/quantum_computation | fc182007d0cf7cca170efdbcb442576fde5927ff | [
"MIT"
] | 27 | 2020-04-15T18:45:43.000Z | 2022-03-29T10:28:42.000Z | TFQ/barren_plateaus/bp_tfq.py | Project-Fare/quantum_computation | fc182007d0cf7cca170efdbcb442576fde5927ff | [
"MIT"
] | 1 | 2021-08-23T01:59:34.000Z | 2021-08-24T05:22:08.000Z | TFQ/barren_plateaus/bp_tfq.py | Project-Fare/quantum_computation | fc182007d0cf7cca170efdbcb442576fde5927ff | [
"MIT"
] | 10 | 2021-01-30T15:20:36.000Z | 2022-03-29T10:28:51.000Z | import tensorflow as tf
import tensorflow_quantum as tfq
import cirq
import sympy
import numpy as np
import matplotlib.pyplot as plt
# https://www.tensorflow.org/quantum/tutorials/barren_plateaus#2_generating_random_circuits
n_cir = 100
qs = 16
d = 100
results_all = q_loop(qs, d, n_cir, 1000, "all")
results_paper = q... | 33.804124 | 137 | 0.643794 |
45f440231923aed73dba16db99e48ddfd83961b9 | 4,160 | py | Python | sast_git_leaks/__init__.py | leboncoin/sast-git-leaks | 51cb1719a978c354bf2b974071e23977e5b33ad4 | [
"Apache-2.0"
] | 2 | 2020-09-07T17:44:05.000Z | 2020-11-12T16:25:04.000Z | sast_git_leaks/__init__.py | leboncoin/sast-git-leaks | 51cb1719a978c354bf2b974071e23977e5b33ad4 | [
"Apache-2.0"
] | null | null | null | sast_git_leaks/__init__.py | leboncoin/sast-git-leaks | 51cb1719a978c354bf2b974071e23977e5b33ad4 | [
"Apache-2.0"
] | 2 | 2020-11-04T04:51:01.000Z | 2020-11-12T16:25:18.000Z | '''
Sast Git Leaks
Copyright 2020 Leboncoin
Licensed under the Apache License
Written by Fabien Martinez <fabien.martinez+github@adevinta.com>
'''
from importlib import import_module
from pathlib import Path
import logging
from . import utils
LOGGER = logging.getLogger(__name__)
def load_tool(variables, tool: dic... | 34.380165 | 110 | 0.607933 |
45f5e7d4cd9a3a5298fc43ed2dff22d7f1fc8381 | 1,726 | py | Python | solution/array/no_29_print_array_clockwise.py | LibertyDream/algorithm_data_structure | 5d143d04d001a9b8aef30334881d0af56d8c9850 | [
"MIT"
] | null | null | null | solution/array/no_29_print_array_clockwise.py | LibertyDream/algorithm_data_structure | 5d143d04d001a9b8aef30334881d0af56d8c9850 | [
"MIT"
] | null | null | null | solution/array/no_29_print_array_clockwise.py | LibertyDream/algorithm_data_structure | 5d143d04d001a9b8aef30334881d0af56d8c9850 | [
"MIT"
] | null | null | null | '''29
--------------
Example:
input:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
output:1,2,3,4,8,12,16,15,14,13,9,5,6,7,11,10
'''
if __name__ == '__main__':
matrix = __get_matrix(1,1)
__print_matrix(matrix)
print_array_clockwise(matrix) | 20.795181 | 51 | 0.504635 |
45f68050d4948d7d2cc4601a50e36e261ccdf689 | 3,679 | py | Python | users/admin.py | AlbertoZerbinati/sentag | 542c10e68372352cf1dcca056452220532ad81ed | [
"MIT"
] | 3 | 2021-12-11T12:20:07.000Z | 2022-01-15T14:34:07.000Z | users/admin.py | AlbertoZerbinati/sentag | 542c10e68372352cf1dcca056452220532ad81ed | [
"MIT"
] | 1 | 2021-11-28T22:34:58.000Z | 2021-11-28T22:35:43.000Z | users/admin.py | AlbertoZerbinati/sentag | 542c10e68372352cf1dcca056452220532ad81ed | [
"MIT"
] | 1 | 2022-01-26T16:41:12.000Z | 2022-01-26T16:41:12.000Z | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.models import User
from django.contrib.admin.widgets import FilteredSelectMultiple
from django.utils.text import format_lazy
from tag_sentenze.models import Judgment
from users.models im... | 40.877778 | 117 | 0.651536 |
45f776e9532d54844e073e21417dafd35670fca1 | 104 | py | Python | dash-user-guide-components/dash_user_guide_components/_imports_.py | joelostblom/dash-docs | 7be5aed7795f61ac32375ce33a18046b8f2f5254 | [
"MIT"
] | 379 | 2017-06-21T14:35:52.000Z | 2022-03-20T01:47:14.000Z | dash-user-guide-components/dash_user_guide_components/_imports_.py | joelostblom/dash-docs | 7be5aed7795f61ac32375ce33a18046b8f2f5254 | [
"MIT"
] | 746 | 2017-06-21T19:58:17.000Z | 2022-03-23T14:51:24.000Z | dash-user-guide-components/dash_user_guide_components/_imports_.py | joelostblom/dash-docs | 7be5aed7795f61ac32375ce33a18046b8f2f5254 | [
"MIT"
] | 201 | 2017-06-21T21:53:19.000Z | 2022-03-17T13:23:55.000Z | from .PageMenu import PageMenu
from .Sidebar import Sidebar
__all__ = [
"PageMenu",
"Sidebar"
] | 14.857143 | 30 | 0.692308 |
45f7bf6f91ad8c5d361da4852af998cb0b3aec8b | 6,175 | py | Python | Phase_1/O-19-MarianneTouchie.py | yapanliu/ashrae-ob-database | 8c23e3ab5e8ed5589962e067a50c8940d2d31521 | [
"MIT"
] | null | null | null | Phase_1/O-19-MarianneTouchie.py | yapanliu/ashrae-ob-database | 8c23e3ab5e8ed5589962e067a50c8940d2d31521 | [
"MIT"
] | null | null | null | Phase_1/O-19-MarianneTouchie.py | yapanliu/ashrae-ob-database | 8c23e3ab5e8ed5589962e067a50c8940d2d31521 | [
"MIT"
] | null | null | null | # O-19-Marianne Touchie
'''
This code will clean the OB datasets and combine all the cleaned data into one
Dataset name: O-19-Marianne Touchie
1. one office building
2. Xuezheng processed outdoor and indoor data
3. use the same room ids as Xuezheng used for window and door status data
'''
import os
import glob
impor... | 42.006803 | 148 | 0.699757 |
45fa6a638f1c5138615a97898d251e2a81508de1 | 1,018 | py | Python | mundo02/exe056.py | victor-nog/python3-exercicios | 3996a41ee6cb8125573bf6f8997a69c9764fabae | [
"MIT"
] | null | null | null | mundo02/exe056.py | victor-nog/python3-exercicios | 3996a41ee6cb8125573bf6f8997a69c9764fabae | [
"MIT"
] | null | null | null | mundo02/exe056.py | victor-nog/python3-exercicios | 3996a41ee6cb8125573bf6f8997a69c9764fabae | [
"MIT"
] | null | null | null | # Desenvolva um programa que leia o nome, idade e sexo de 4 pessoas. No final do programa, mostre: a mdia de idade do grupo, qual o nome do homem mais velho e quantas mulheres tm menos de 20 anos.
soma_idade = 0
maior_idade_homem = 0
nome_homem_velho = ''
total_mulheres = 0
for a in range(1, 5):
nome = str(input(... | 42.416667 | 200 | 0.659136 |
45faab4a49b00e86a1aee2eec9ab825b2e80ded9 | 8,333 | py | Python | baselines/rainbow.py | shreyaspadhy/minerl | bf7d58663a05f67f1d0cffdffe270e71c29d6bc2 | [
"MIT"
] | 2 | 2019-08-27T20:23:13.000Z | 2020-09-23T16:42:41.000Z | baselines/rainbow.py | shreyaspadhy/minerl | bf7d58663a05f67f1d0cffdffe270e71c29d6bc2 | [
"MIT"
] | null | null | null | baselines/rainbow.py | shreyaspadhy/minerl | bf7d58663a05f67f1d0cffdffe270e71c29d6bc2 | [
"MIT"
] | 3 | 2019-08-27T20:23:18.000Z | 2020-06-02T19:47:26.000Z | import os
import gym
import ray
from ray.rllib.agents import dqn
from gym.spaces import Discrete, Box
from collections import OrderedDict
import pdb
import numpy as np
import copy
from gym.wrappers import Monitor
from gym.wrappers.monitoring.stats_recorder import StatsRecorder
import numpy as np
import minerl
if __... | 34.433884 | 104 | 0.572423 |
45fd0e973ce23ef7e7b115de87ea88023dfb1f04 | 2,765 | py | Python | rawdns/conn.py | warsocket/RawDNS | 0ba9af96568d356dc769ca17c78308f0cfa13121 | [
"Unlicense"
] | null | null | null | rawdns/conn.py | warsocket/RawDNS | 0ba9af96568d356dc769ca17c78308f0cfa13121 | [
"Unlicense"
] | null | null | null | rawdns/conn.py | warsocket/RawDNS | 0ba9af96568d356dc769ca17c78308f0cfa13121 | [
"Unlicense"
] | null | null | null | import socket
import ssl
#RFC 7858
#RFC 8484
#POST is shorter, so doing that
#TODO: content-length & chunking
| 26.084906 | 146 | 0.724051 |
45fd730850b8a6b4ec310867313c9107cd5544f0 | 179 | py | Python | src/phl_budget_data/etl/qcmr/cash/__init__.py | PhiladelphiaController/phl-budget-data | 438999017b8659de5bfb223a038f49fe6fd4a83a | [
"MIT"
] | null | null | null | src/phl_budget_data/etl/qcmr/cash/__init__.py | PhiladelphiaController/phl-budget-data | 438999017b8659de5bfb223a038f49fe6fd4a83a | [
"MIT"
] | null | null | null | src/phl_budget_data/etl/qcmr/cash/__init__.py | PhiladelphiaController/phl-budget-data | 438999017b8659de5bfb223a038f49fe6fd4a83a | [
"MIT"
] | null | null | null | from .fund_balances import CashReportFundBalances
from .net_cash_flow import CashReportNetCashFlow
from .revenue import CashReportRevenue
from .spending import CashReportSpending
| 35.8 | 49 | 0.888268 |
45fd8472320d9f428688cc4b303bffd379a6cde3 | 3,756 | py | Python | hubspot3/lines.py | BureauxLocaux/hubspot3 | d260d47f2e7f17459cab8000e6007c20588b00cc | [
"MIT"
] | null | null | null | hubspot3/lines.py | BureauxLocaux/hubspot3 | d260d47f2e7f17459cab8000e6007c20588b00cc | [
"MIT"
] | null | null | null | hubspot3/lines.py | BureauxLocaux/hubspot3 | d260d47f2e7f17459cab8000e6007c20588b00cc | [
"MIT"
] | null | null | null | """
hubspot lines api
"""
from typing import Dict, Union
from hubspot3.base import BaseClient
from hubspot3.crm_associations import CRMAssociationsClient
from hubspot3.utils import get_log, prettify, ordered_dict
LINES_API_VERSION = "1"
| 35.102804 | 98 | 0.600373 |
45fdf357b954c9f769d2d5c5156d6f1a9043f455 | 6,115 | py | Python | member.py | glennfeys/Federal-Parliament-Scraper | 3d70ffdea502e1d2718833f9207d8c7bea9bf99a | [
"MIT"
] | null | null | null | member.py | glennfeys/Federal-Parliament-Scraper | 3d70ffdea502e1d2718833f9207d8c7bea9bf99a | [
"MIT"
] | null | null | null | member.py | glennfeys/Federal-Parliament-Scraper | 3d70ffdea502e1d2718833f9207d8c7bea9bf99a | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
from util import normalize_str
import json
import uuid
from os import path, makedirs
import hashlib
from typing import List
from activity import Activity
from collections import defaultdict
| 38.949045 | 212 | 0.615536 |
45fe02038159d803cb70321ec0c3d65602e5a6f5 | 1,496 | py | Python | quart_restplus/apidoc.py | zihen/quart-restplus | 57f5b800803084ec0857d895e123414524de0d76 | [
"BSD-3-Clause"
] | 1 | 2018-11-21T21:15:20.000Z | 2018-11-21T21:15:20.000Z | quart_restplus/apidoc.py | zihen/quart-restplus | 57f5b800803084ec0857d895e123414524de0d76 | [
"BSD-3-Clause"
] | null | null | null | quart_restplus/apidoc.py | zihen/quart-restplus | 57f5b800803084ec0857d895e123414524de0d76 | [
"BSD-3-Clause"
] | 1 | 2019-12-18T09:19:46.000Z | 2019-12-18T09:19:46.000Z | # -*- coding: utf-8 -*-
from quart import url_for, Blueprint, render_template
from quart.blueprints import BlueprintSetupState
apidoc = Apidoc(
'restplus_doc', __name__,
template_folder='templates',
static_folder='static/swagger-ui',
static_url_path='/static/swagger-ui',
)
async def ui_for(api):
... | 30.530612 | 93 | 0.670455 |
45fe34a873777b10ba086961e0f5ee495277a01f | 128 | py | Python | setup.py | tamuhey/catalogue | 346c7e9baf06e01e6161171a4ab6f5bff6cfa24c | [
"MIT"
] | null | null | null | setup.py | tamuhey/catalogue | 346c7e9baf06e01e6161171a4ab6f5bff6cfa24c | [
"MIT"
] | null | null | null | setup.py | tamuhey/catalogue | 346c7e9baf06e01e6161171a4ab6f5bff6cfa24c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
if __name__ == "__main__":
from setuptools import setup
setup(name="catalogue")
| 16 | 32 | 0.671875 |
45feee9c2b4b0812ede7de9a5e89646b87aea79e | 4,329 | py | Python | ModelTrainerScripts/TransferLearning/sensor_80_to_flowfrontnet_transferlearning.py | isse-augsburg/PermeabilityNets | b4d1346f9934f2fda2f5d671983c822f4f8365f1 | [
"MIT"
] | 1 | 2021-09-10T14:57:27.000Z | 2021-09-10T14:57:27.000Z | ModelTrainerScripts/TransferLearning/sensor_80_to_flowfrontnet_transferlearning.py | isse-augsburg/PermeabilityNets | b4d1346f9934f2fda2f5d671983c822f4f8365f1 | [
"MIT"
] | null | null | null | ModelTrainerScripts/TransferLearning/sensor_80_to_flowfrontnet_transferlearning.py | isse-augsburg/PermeabilityNets | b4d1346f9934f2fda2f5d671983c822f4f8365f1 | [
"MIT"
] | null | null | null | from pathlib import Path
import torch
from torch.optim.lr_scheduler import ExponentialLR
import Resources.training as r
from Models.erfh5_ConvModel import S80Deconv2ToDrySpotTransferLearning
from Pipeline.data_gather import get_filelist_within_folder_blacklisted, \
get_filelist_within_folder
from Pipeline.data_loa... | 36.686441 | 111 | 0.631093 |
45ff300f11b4fe22aea3a3eaea1feb2730e8fe8a | 897 | py | Python | src/studying/tests/shipping_factory/tests_shipping_factory_unship.py | denkasyanov/education-backend | c796b6f2f1cc1cd09f83cab2ca0cc45344906ef5 | [
"MIT"
] | 151 | 2020-04-21T09:58:57.000Z | 2021-09-12T09:01:21.000Z | src/studying/tests/shipping_factory/tests_shipping_factory_unship.py | denkasyanov/education-backend | c796b6f2f1cc1cd09f83cab2ca0cc45344906ef5 | [
"MIT"
] | 163 | 2020-05-29T20:52:00.000Z | 2021-09-11T12:44:56.000Z | src/studying/tests/shipping_factory/tests_shipping_factory_unship.py | boochamoocha/education-backend | c6ffb0c00bc066c8f1e0a8c0ffe4d0215c7c416a | [
"MIT"
] | 39 | 2020-04-21T12:28:16.000Z | 2021-09-12T15:33:47.000Z | import pytest
from studying import shipment_factory
pytestmark = [pytest.mark.django_db]
def test_record(record, unship_record, factory):
order = factory.order(item=record)
shipment_factory.unship(order)
unship_record.assert_called_once()
def test_course(course, unship_course, factory):
order ... | 23.605263 | 71 | 0.781494 |
45ff4542a60f1d0fcbbb9e2a5df1371b2b3fa8d9 | 1,518 | py | Python | module4-acid-and-database-scalability-tradeoffs/titanic_mongo.py | TAVAU/DS-Unit-3-Sprint-2-SQL-and-Databases | 0620f7970e77bc6b47698ccf3279bb35a0472fe0 | [
"MIT"
] | null | null | null | module4-acid-and-database-scalability-tradeoffs/titanic_mongo.py | TAVAU/DS-Unit-3-Sprint-2-SQL-and-Databases | 0620f7970e77bc6b47698ccf3279bb35a0472fe0 | [
"MIT"
] | null | null | null | module4-acid-and-database-scalability-tradeoffs/titanic_mongo.py | TAVAU/DS-Unit-3-Sprint-2-SQL-and-Databases | 0620f7970e77bc6b47698ccf3279bb35a0472fe0 | [
"MIT"
] | 1 | 2021-12-17T19:23:43.000Z | 2021-12-17T19:23:43.000Z | import pymongo
import os
from dotenv import load_dotenv
import sqlite3
from pprint import pprint
load_dotenv()
DB_USER = os.getenv("MONGO_USER", default="OOPS")
DB_PASSWORD = os.getenv("MONGO_PASSWORD", default="OOPS")
CLUSTER_NAME = os.getenv("MONGO_CLUSTER_NAME", default="OOPS")
connection_uri = f"mongodb://{DB_US... | 35.302326 | 301 | 0.691041 |
45ff858490c4564913c4727fd7b20f7fcb42c54b | 2,666 | py | Python | setup.py | p768lwy3/torecsys | 2251366268b4fbe6f8c3ab1628fa72a0db043dcd | [
"MIT"
] | 92 | 2019-08-15T11:03:50.000Z | 2022-03-12T01:21:05.000Z | setup.py | p768lwy3/torecsys | 2251366268b4fbe6f8c3ab1628fa72a0db043dcd | [
"MIT"
] | 3 | 2020-03-11T08:57:50.000Z | 2021-01-06T01:39:47.000Z | setup.py | p768lwy3/torecsys | 2251366268b4fbe6f8c3ab1628fa72a0db043dcd | [
"MIT"
] | 16 | 2019-10-12T11:28:53.000Z | 2022-03-28T14:04:12.000Z | import os
from io import open
from os import path
from typing import AnyStr, List
from setuptools import setup, find_packages
package_dir = path.abspath(path.dirname(__file__))
setup(
name='torecsys',
version='0.0.1.dev2',
license='MIT',
description=(
'ToR[e]cSys is a PyTorch Framework to ... | 36.027027 | 120 | 0.654539 |
34011fd4e30dfaf36527556e6d5af2b43e50dd7d | 921 | py | Python | kyhg/kyhg/spiders/trans.py | asusfgg/python_study_2022 | d119664febf0070761df20bb557d025497f0c9e3 | [
"BSD-3-Clause"
] | 1 | 2022-02-23T12:54:49.000Z | 2022-02-23T12:54:49.000Z | kyhg/kyhg/spiders/trans.py | asusfgg/python_study_2022 | d119664febf0070761df20bb557d025497f0c9e3 | [
"BSD-3-Clause"
] | null | null | null | kyhg/kyhg/spiders/trans.py | asusfgg/python_study_2022 | d119664febf0070761df20bb557d025497f0c9e3 | [
"BSD-3-Clause"
] | null | null | null | '''
Author: fgg
Date: 2022-05-26 16:16:45
LastEditors: fgg
LastEditTime: 2022-05-26 16:45:45
FilePath: \python_study_2022\kyhg\kyhg\spiders\trans.py
Description:
Copyright (c) 2022 by fgg/Mechanical Design Studio, All Rights Reserved.
'''
import json
import tablib
import csv
# json
with open('kyhg\kyhg\spiders\shuzh... | 23.615385 | 92 | 0.710098 |
3402879f5b9078557c31d85789cfebc6acfb8b66 | 738 | py | Python | procedures.py | MagiMas/ArpesBandmass | 98785fabcb7977e110532a984d40971b915f09b3 | [
"MIT"
] | null | null | null | procedures.py | MagiMas/ArpesBandmass | 98785fabcb7977e110532a984d40971b915f09b3 | [
"MIT"
] | null | null | null | procedures.py | MagiMas/ArpesBandmass | 98785fabcb7977e110532a984d40971b915f09b3 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
if __name__ == "__main__":
dict_example = {
'function' : "a0 * x + a1",
'start-values' : [1., 1.]
}
build_fitfunction_from_dict(dict_example) | 30.75 | 79 | 0.627371 |
3402e87f95b35b11be128d5a5a798677b41963c8 | 4,314 | py | Python | utils.py | c-lai/3D-ResNets-PyTorch | 488d0d7c4760e60ead4db80fe6f017a8778318ff | [
"MIT"
] | 1 | 2022-03-10T03:42:10.000Z | 2022-03-10T03:42:10.000Z | utils.py | c-lai/3D-ResNets-PyTorch | 488d0d7c4760e60ead4db80fe6f017a8778318ff | [
"MIT"
] | null | null | null | utils.py | c-lai/3D-ResNets-PyTorch | 488d0d7c4760e60ead4db80fe6f017a8778318ff | [
"MIT"
] | null | null | null | import csv
import random
from functools import partialmethod
import torch
import numpy as np
from sklearn.metrics import precision_recall_fscore_support, \
precision_recall_curve, roc_auc_score, \
balanced_accuracy_score, accuracy_score
def calculate_accuracy(outputs, targets):
with torch.no_grad()... | 27.132075 | 77 | 0.617293 |
3403a6cc7750699b54ba0bd28fa928661cb61dd3 | 2,226 | py | Python | server/test_app.py | holdenmatt/ExpenseLog | f5ff5a5421a58a827bc9033c0992774be4eda1a8 | [
"MIT"
] | null | null | null | server/test_app.py | holdenmatt/ExpenseLog | f5ff5a5421a58a827bc9033c0992774be4eda1a8 | [
"MIT"
] | null | null | null | server/test_app.py | holdenmatt/ExpenseLog | f5ff5a5421a58a827bc9033c0992774be4eda1a8 | [
"MIT"
] | null | null | null | import json
import unittest
from nose.tools import *
from app import app
| 28.177215 | 61 | 0.561995 |