hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1e1bbe7cdaf4c0f82311fc2983215d16948afb65 | 1,890 | py | Python | reviews/amazon.py | BraunPhilipp/sentiment-analyzer | de1528c924b7015bafda56196b264523b64dc7c1 | [
"MIT"
] | 4 | 2016-09-24T22:09:49.000Z | 2017-05-17T12:51:48.000Z | reviews/amazon.py | BraunPhilipp/sentiment-analyzer | de1528c924b7015bafda56196b264523b64dc7c1 | [
"MIT"
] | 2 | 2016-11-29T05:50:01.000Z | 2021-02-13T18:07:20.000Z | reviews/amazon.py | BraunPhilipp/sentiment-analyzer | de1528c924b7015bafda56196b264523b64dc7c1 | [
"MIT"
] | null | null | null | import string
import numpy as np
import re
import urllib.request
from bs4 import BeautifulSoup
import time
import random
import string
from logger import logger
class amazon:
def __init__(self, query=""):
self.query = query
self.data = []
# Internal Function
self.search()
def... | 33.157895 | 123 | 0.560847 |
feae2655faa2254ebae1bce6c1630ce9e8579405 | 7,333 | py | Python | tests.py | cyberdelia/perlinpinpin | 7793ea283165108156586047ef18231f424357f3 | [
"BSD-3-Clause"
] | 4 | 2015-12-24T11:51:29.000Z | 2019-02-20T02:35:10.000Z | tests.py | cyberdelia/perlinpinpin | 7793ea283165108156586047ef18231f424357f3 | [
"BSD-3-Clause"
] | null | null | null | tests.py | cyberdelia/perlinpinpin | 7793ea283165108156586047ef18231f424357f3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
import unittest
import perlinpinpin
class TestPerlinpinpin(unittest.TestCase):
def _make_date(self):
class MockDate(datetime.date):
@classmethod
def today(cls):
return datetime.date(2009, 3, 6)
return MockDate
def... | 51.640845 | 103 | 0.68444 |
c304b0c1a84c70d076717c44c4207b22882a670a | 3,422 | py | Python | Teste03-linux.py | nata27junior/Brincando_com_lotofacil | d56dc1c19f77c6c24dd6bb763a622249ebdb39c4 | [
"Apache-2.0"
] | null | null | null | Teste03-linux.py | nata27junior/Brincando_com_lotofacil | d56dc1c19f77c6c24dd6bb763a622249ebdb39c4 | [
"Apache-2.0"
] | null | null | null | Teste03-linux.py | nata27junior/Brincando_com_lotofacil | d56dc1c19f77c6c24dd6bb763a622249ebdb39c4 | [
"Apache-2.0"
] | null | null | null |
# coding: utf-8
# windows
# In[1]:
#cd D:\Natanael\Fatec\Curso R\Lotofacil 25-05-18
# linux
# cd /media/natanael/Arquivos/Natanael/Fatec/Curso R/Lotofacil 20-05-18
# In[2]:
import sys
# sys.path.insert (0, \users\natanael\anaconda3\lib\site-packages)
sys.path.insert(0, 'c:/users/natanael/anaconda3/lib/site-pa... | 13.910569 | 262 | 0.661894 |
02e6ef99f9c6953b8f94d8427a1719eae987e489 | 797 | py | Python | driver/call.py | nitinkaveriappa/downward | 5c9a1b5111d667bb96f94da61ca2a45b1b70bb83 | [
"MIT"
] | 4 | 2019-04-23T10:41:35.000Z | 2019-10-27T05:14:42.000Z | driver/call.py | nitinkaveriappa/downward | 5c9a1b5111d667bb96f94da61ca2a45b1b70bb83 | [
"MIT"
] | null | null | null | driver/call.py | nitinkaveriappa/downward | 5c9a1b5111d667bb96f94da61ca2a45b1b70bb83 | [
"MIT"
] | 4 | 2018-01-16T00:00:22.000Z | 2019-11-01T23:35:01.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function
"""Make subprocess calls with time and memory limits."""
from . import limits
import subprocess
import sys
def check_call(cmd, stdin=None, time_limit=None, memory_limit=None):
def set_limits():
limits.set_time_limit(time_limit)
limi... | 25.709677 | 73 | 0.672522 |
d4604dabf227abe6ba81553657af741db2303b2a | 13,218 | py | Python | examples/sparser.py | pexip/os-pyparsing | e7230e6d9dbd50defeb1c1f1f74296c0d4c8db42 | [
"MIT"
] | 1 | 2019-01-06T21:51:21.000Z | 2019-01-06T21:51:21.000Z | examples/sparser.py | pexip/os-pyparsing | e7230e6d9dbd50defeb1c1f1f74296c0d4c8db42 | [
"MIT"
] | 1 | 2019-08-24T21:25:49.000Z | 2019-08-26T22:44:40.000Z | examples/sparser.py | pexip/os-pyparsing | e7230e6d9dbd50defeb1c1f1f74296c0d4c8db42 | [
"MIT"
] | 2 | 2019-03-21T03:47:03.000Z | 2019-09-30T23:59:22.000Z | #!/usr/bin/env python
"""
NAME:
sparser.py
SYNOPSIS:
sparser.py [options] filename
DESCRIPTION:
The sparser.py script is a Specified PARSER. It is unique (as far as I can
tell) because it doesn't care about the delimiter(s). The user specifies
what is expected, and the order, for ea... | 36.313187 | 80 | 0.524663 |
f00b26aa6642670b7edceb46806b44c4b9e641ee | 1,597 | py | Python | bikesanity/io_utils/throttled.py | JohnHenrySplitMyHeart/bikesanity | bf27f162017fdc919534e16ac12b940e1b873e93 | [
"Apache-2.0"
] | 4 | 2021-01-22T14:13:25.000Z | 2021-05-04T16:59:35.000Z | bikesanity/io_utils/throttled.py | JohnHenrySplitMyHeart/bikesanity | bf27f162017fdc919534e16ac12b940e1b873e93 | [
"Apache-2.0"
] | null | null | null | bikesanity/io_utils/throttled.py | JohnHenrySplitMyHeart/bikesanity | bf27f162017fdc919534e16ac12b940e1b873e93 | [
"Apache-2.0"
] | null | null | null | import datetime
import random
import time
from bikesanity.io_utils import log_handler as log_handler
from .base_session import BaseSession
class ThrottledSession(BaseSession):
STANDARD_REQUEST_RATE_LIMITER = 25
STANDARD_REQUEST_RATE_LIMITER_MIN = 25
STANDARD_REQUEST_RATE_LIMITER_MAX = 30
FAILED_REQU... | 33.978723 | 111 | 0.703193 |
8e0876907c0dc7a07d86e4f4a67e96e528dcbca2 | 1,311 | py | Python | simul/plots/failing_network.py | ConsenSys/handel | bc3f6f8194db140a1067ab157fc6bb1fb53a0144 | [
"Apache-2.0"
] | 48 | 2018-11-06T16:52:27.000Z | 2021-05-25T07:50:52.000Z | simul/plots/failing_network.py | ConsenSys/handel | bc3f6f8194db140a1067ab157fc6bb1fb53a0144 | [
"Apache-2.0"
] | 39 | 2018-11-27T10:40:26.000Z | 2019-08-04T17:27:45.000Z | simul/plots/failing_network.py | ConsenSys/handel | bc3f6f8194db140a1067ab157fc6bb1fb53a0144 | [
"Apache-2.0"
] | 4 | 2018-12-20T15:07:56.000Z | 2021-08-08T09:11:33.000Z | #!/usr/bin/env python
## This script generate the graphs that compares handel signature
## generation with different number of failing nodes for a fixed
## number of total nodes, and a fixed threshold 51%
##
import sys
from lib import *
import pandas as pd
import matplotlib.pyplot as plt
netColumn = "net_sentBytes... | 28.5 | 88 | 0.688024 |
2fc5064fea580ec5dcd69d7b9a3297f9ef4554b0 | 272 | py | Python | csf_tz/clearing_and_forwarding/doctype/container_issue_detail/container_issue_detail.py | Craftint/CSF_TZ | b5cb2d59d8f4e958ad7d4cb89421cfbec992abc5 | [
"MIT"
] | null | null | null | csf_tz/clearing_and_forwarding/doctype/container_issue_detail/container_issue_detail.py | Craftint/CSF_TZ | b5cb2d59d8f4e958ad7d4cb89421cfbec992abc5 | [
"MIT"
] | null | null | null | csf_tz/clearing_and_forwarding/doctype/container_issue_detail/container_issue_detail.py | Craftint/CSF_TZ | b5cb2d59d8f4e958ad7d4cb89421cfbec992abc5 | [
"MIT"
] | 1 | 2022-03-17T22:49:40.000Z | 2022-03-17T22:49:40.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Bravo Logisitcs and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class ContainerIssueDetail(Document):
pass
| 24.727273 | 54 | 0.790441 |
7957787f8415e186326ba6f325359195d25e97ac | 3,688 | py | Python | source/setup.py | ph4s3r/webhook-shims | 077ab606800612d1cfd048731264ad4cf91bfba6 | [
"Apache-2.0"
] | null | null | null | source/setup.py | ph4s3r/webhook-shims | 077ab606800612d1cfd048731264ad4cf91bfba6 | [
"Apache-2.0"
] | null | null | null | source/setup.py | ph4s3r/webhook-shims | 077ab606800612d1cfd048731264ad4cf91bfba6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os, sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
#from pip.req import parse_requirements
from pip._internal.req import parse_requirements
def parse_requirements(filename):
""" load requirements from a pip requirements file """... | 32.928571 | 137 | 0.667299 |
f9c113305758a373d61855feacd8e1162b98cac4 | 2,300 | py | Python | vendor/bundle/ruby/2.0.0/gems/pygments.rb-1.1.2/vendor/pygments-main/pygments/lexers/capnproto.py | apaigesh/apaigesh.github.io | c79e576c8fb620c9b5cb3cc812e76d1f897a1c37 | [
"MIT"
] | null | null | null | vendor/bundle/ruby/2.0.0/gems/pygments.rb-1.1.2/vendor/pygments-main/pygments/lexers/capnproto.py | apaigesh/apaigesh.github.io | c79e576c8fb620c9b5cb3cc812e76d1f897a1c37 | [
"MIT"
] | null | null | null | vendor/bundle/ruby/2.0.0/gems/pygments.rb-1.1.2/vendor/pygments-main/pygments/lexers/capnproto.py | apaigesh/apaigesh.github.io | c79e576c8fb620c9b5cb3cc812e76d1f897a1c37 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pygments.lexers.capnproto
~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for the Cap'n Proto schema language.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, bygroups, wo... | 28.75 | 114 | 0.433043 |
d2a9517f04bbf59326d0404e2215b38ce9e4dc68 | 197 | py | Python | HousePassword.py | formeo/checkio_tasks | 54ab77821e797238379afe483f6f6358cfba39a6 | [
"MIT"
] | null | null | null | HousePassword.py | formeo/checkio_tasks | 54ab77821e797238379afe483f6f6358cfba39a6 | [
"MIT"
] | null | null | null | HousePassword.py | formeo/checkio_tasks | 54ab77821e797238379afe483f6f6358cfba39a6 | [
"MIT"
] | null | null | null | def checkio(data):
x=False
if len(data) >= 10:
if not data.isalpha() and not data.isdigit():
if not data.islower() and not data.isupper():
x=True
return x
| 24.625 | 55 | 0.553299 |
5bb4fdcf12275a33956776447831ed6bb16a6458 | 6,535 | py | Python | SearchScrapper.py | prakhar21/News-Crawler | 39430ddb276d130a41793a9ba78ef55edaa48848 | [
"Apache-2.0"
] | 3 | 2019-04-19T00:20:58.000Z | 2021-05-08T15:52:46.000Z | SearchScrapper.py | prakhar21/News-Crawler | 39430ddb276d130a41793a9ba78ef55edaa48848 | [
"Apache-2.0"
] | null | null | null | SearchScrapper.py | prakhar21/News-Crawler | 39430ddb276d130a41793a9ba78ef55edaa48848 | [
"Apache-2.0"
] | 2 | 2019-04-19T00:20:59.000Z | 2021-05-08T15:59:25.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Sep 18 16:56:47 2015
@author: prakhar
"""
from urllib2 import urlopen
from bs4 import BeautifulSoup
import requests
import urlparse
import sqlite3
import re
import tweepy
import subprocess
import datetime
#mainURL
url = 'http://www.news18.com/search-result.php'
poll_url =... | 25.134615 | 122 | 0.57368 |
88d041ce046c283207a1cf153bc7730bdfa86b41 | 1,093 | py | Python | var/spack/repos/builtin/packages/conserver/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/conserver/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/conserver/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 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 Conserver(AutotoolsPackage):
"""Conserver is an application that allows multiple users to
... | 45.541667 | 103 | 0.772187 |
0d75af2e5d2e1cfd81e31d52ba74a9f2b30b9720 | 2,424 | py | Python | utils/python-rpc/console.py | honzapatCZ/NejCoin | 2b28d790bc9137af2c8f4a0db44ca7613c120733 | [
"MIT"
] | 1 | 2019-07-30T19:28:52.000Z | 2019-07-30T19:28:52.000Z | utils/python-rpc/console.py | honzapatCZ/NejCoin | 2b28d790bc9137af2c8f4a0db44ca7613c120733 | [
"MIT"
] | 1 | 2019-11-21T21:46:09.000Z | 2019-11-21T21:46:09.000Z | utils/python-rpc/console.py | honzapatCZ/NejCoin | 2b28d790bc9137af2c8f4a0db44ca7613c120733 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import sys
import subprocess
import socket
import urlparse
import framework.rpc
import framework.daemon
import framework.wallet
USAGE = 'usage: python -i console.py [[[scheme]<host>:]<port> [[[scheme]<host>:]<port>...]]'
daemons = []
wallets = []
rpcs = []
f... | 27.235955 | 147 | 0.646865 |
bacb69615414e75902c91d21eefb2bb540343f29 | 2,161 | py | Python | share/qt/extract_strings_qt.py | mongercoin/Mongercoin | fd1567993fd54415b7d5cf26418d843f0ca18f24 | [
"MIT"
] | null | null | null | share/qt/extract_strings_qt.py | mongercoin/Mongercoin | fd1567993fd54415b7d5cf26418d843f0ca18f24 | [
"MIT"
] | null | null | null | share/qt/extract_strings_qt.py | mongercoin/Mongercoin | fd1567993fd54415b7d5cf26418d843f0ca18f24 | [
"MIT"
] | null | null | null | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt stringdefs so that
they can be picked up by Qt linguist.
'''
from __future__ import division,print_function,unicode_literals
from subprocess import Popen, PIPE
import glob
import operator
import os
import sys
OUT_CPP="qt/Mongerstrings.cpp... | 25.72619 | 105 | 0.619158 |
66a479ad41c646daf1e99042d4d228118ea873f2 | 856 | py | Python | server/domain/cyclic_data.py | wazatoki/IotLogger | 9baec9bff7762fbc0d279207fabf8902d9650a2d | [
"MIT"
] | null | null | null | server/domain/cyclic_data.py | wazatoki/IotLogger | 9baec9bff7762fbc0d279207fabf8902d9650a2d | [
"MIT"
] | 7 | 2021-03-11T00:57:20.000Z | 2022-02-27T07:53:56.000Z | server/domain/cyclic_data.py | wazatoki/IotLogger | 9baec9bff7762fbc0d279207fabf8902d9650a2d | [
"MIT"
] | null | null | null | from datetime import datetime
class Log_data:
version = 0
dt = datetime.strptime('1900/1/1 0:0:0', '%Y/%m/%d %H:%M:%S')
device_id = '0000'
item0 = -32000
item1 = -32000
item2 = -32000
item3 = -32000
item4 = -32000
item5 = -32000
item6 = -32000
item7 = -32000
item8 = -320... | 23.777778 | 65 | 0.475467 |
3eb2eda0591d6e503734390ae900454bcd165d96 | 265 | py | Python | simple_rest_client/models.py | rfrp/python-simple-rest-client | f7d6b337849954c99861b81b5eb5e535eff06549 | [
"MIT"
] | null | null | null | simple_rest_client/models.py | rfrp/python-simple-rest-client | f7d6b337849954c99861b81b5eb5e535eff06549 | [
"MIT"
] | null | null | null | simple_rest_client/models.py | rfrp/python-simple-rest-client | f7d6b337849954c99861b81b5eb5e535eff06549 | [
"MIT"
] | null | null | null | from collections import namedtuple
Request = namedtuple(
'Request', ['url', 'method', 'params', 'body', 'headers', 'timeout', 'verify', 'kwargs']
)
Response = namedtuple(
'Response', ['url', 'method', 'body', 'headers', 'status_code', 'client_response']
)
| 29.444444 | 92 | 0.649057 |
57c6b07e01bc03c81603c2d848b9fd73b041ccaa | 35 | py | Python | test_pref/__init__.py | jamesabel/pref | 3e3c0933349e94cb10daaff9476398f6133d6e29 | [
"MIT"
] | null | null | null | test_pref/__init__.py | jamesabel/pref | 3e3c0933349e94cb10daaff9476398f6133d6e29 | [
"MIT"
] | null | null | null | test_pref/__init__.py | jamesabel/pref | 3e3c0933349e94cb10daaff9476398f6133d6e29 | [
"MIT"
] | null | null | null | __application_name__ = "test_pref"
| 17.5 | 34 | 0.828571 |
3d53c3a4bfba051f2f304d7c3a16fab13cc07480 | 185 | py | Python | BOJ_Solved/BOJ-24356.py | CodingLeeSeungHoon/Python_Algorithm_TeamNote | 1e92986999b45aa9951e12e67b23062e410e9b36 | [
"MIT"
] | 7 | 2021-11-19T14:50:59.000Z | 2022-02-25T20:00:20.000Z | BOJ_Solved/BOJ-24356.py | CodingLeeSeungHoon/Python_Algorithm_TeamNote | 1e92986999b45aa9951e12e67b23062e410e9b36 | [
"MIT"
] | null | null | null | BOJ_Solved/BOJ-24356.py | CodingLeeSeungHoon/Python_Algorithm_TeamNote | 1e92986999b45aa9951e12e67b23062e410e9b36 | [
"MIT"
] | null | null | null | """
백준 24356번 : ЧАСОВНИК
"""
t1, m1, t2, m2 = map(int, input().split())
start = t1 * 60 + m1
end = t2 * 60 + m2
if start > end:
end += 24 * 60
print(end-start, (end-start) // 30) | 15.416667 | 42 | 0.540541 |
ad1acbbd185b853a2069aa80ad94dacbbbebecd8 | 3,931 | py | Python | label_studio/users/forms.py | xhuaustc/label-studio | b787824a9e16f488a9b4cd2cef83e1ac526a64f3 | [
"Apache-2.0"
] | 1 | 2021-06-23T19:47:46.000Z | 2021-06-23T19:47:46.000Z | label_studio/users/forms.py | xhuaustc/label-studio | b787824a9e16f488a9b4cd2cef83e1ac526a64f3 | [
"Apache-2.0"
] | 1 | 2021-04-02T14:58:03.000Z | 2021-04-02T14:59:54.000Z | label_studio/users/forms.py | xhuaustc/label-studio | b787824a9e16f488a9b4cd2cef83e1ac526a64f3 | [
"Apache-2.0"
] | 1 | 2021-05-24T15:46:08.000Z | 2021-05-24T15:46:08.000Z | """This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license.
"""
import os
import logging
from datetime import datetime
from django import forms
from django.contrib import auth
from django.conf import settings
... | 33.033613 | 168 | 0.673111 |
d3024e0044803c0cbabecacec28318750c866e8f | 6,244 | py | Python | newspaper/outputformatters.py | keeeb/newspaper | 39c5600a24ab5fb6ef6269faf5a6f78c3337704a | [
"Apache-2.0",
"MIT"
] | 10 | 2020-05-01T09:09:14.000Z | 2020-05-01T15:33:14.000Z | newspaper/outputformatters.py | enlivensystems/newspaper | 6454283c052405e2d0203b7e4163d7d3190e7501 | [
"Apache-2.0",
"MIT"
] | null | null | null | newspaper/outputformatters.py | enlivensystems/newspaper | 6454283c052405e2d0203b7e4163d7d3190e7501 | [
"Apache-2.0",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Output formatting to text via lxml xpath nodes abstracted in this file.
"""
__title__ = 'newspaper'
__author__ = 'Lucas Ou-Yang'
__license__ = 'MIT'
__copyright__ = 'Copyright 2014, Lucas Ou-Yang'
from html import unescape
import logging
from .text import innerTrim
log = logging.getLogge... | 34.882682 | 75 | 0.581839 |
3364c3f5423ce1207fa261d9ec7b95ca117a7683 | 602 | py | Python | flatline/migrations/0005_auto_20150801_2211.py | flatline-sot/backend | 2551fcc23bbd8d7c7ae49123af3b5e09e0fd49c6 | [
"MIT"
] | null | null | null | flatline/migrations/0005_auto_20150801_2211.py | flatline-sot/backend | 2551fcc23bbd8d7c7ae49123af3b5e09e0fd49c6 | [
"MIT"
] | null | null | null | flatline/migrations/0005_auto_20150801_2211.py | flatline-sot/backend | 2551fcc23bbd8d7c7ae49123af3b5e09e0fd49c6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('flatline', '0004_auto_20150801_0442'),
]
operations = [
migrations.AddField(
model_name='bill',
name... | 24.08 | 79 | 0.581395 |
91f45538afa3b794621cc7c469da195bbca2956a | 627 | py | Python | samples/cordic/cordic_golden.py | hj424/heterocl | e51b8f7f65ae6ad55c0c2426ab7192c3d8f6702b | [
"Apache-2.0"
] | 236 | 2019-05-19T01:48:11.000Z | 2022-03-31T09:03:54.000Z | samples/cordic/cordic_golden.py | hj424/heterocl | e51b8f7f65ae6ad55c0c2426ab7192c3d8f6702b | [
"Apache-2.0"
] | 248 | 2019-05-17T19:18:36.000Z | 2022-03-30T21:25:47.000Z | samples/cordic/cordic_golden.py | hj424/heterocl | e51b8f7f65ae6ad55c0c2426ab7192c3d8f6702b | [
"Apache-2.0"
] | 85 | 2019-05-17T20:09:27.000Z | 2022-02-28T20:19:00.000Z | import numpy as np
golden = np.array([
[100.0, 100.0],
[206.226840616, 179.610387213],
[1190.25124092, 1197.15702025],
[1250.76639667, 1250.3933971],
[1261.76760093, 1250.17718583],
[1237.4846285, 1237.56490579],
[1273.56730356, 1266.82141705],
[1272.899992, 1259.92589118],
[1.17000308922e-06, ... | 31.35 | 41 | 0.700159 |
67500c946c0f3c8515c3f51853da872b0fda5f7c | 9,812 | py | Python | roam_to_git/scrapping.py | bjornrud/roam-to-git | 92555cf9d5185a42cfa90a9e7e6b7bf0fd8bddb0 | [
"MIT"
] | 1 | 2020-10-15T05:59:07.000Z | 2020-10-15T05:59:07.000Z | roam_to_git/scrapping.py | bjornrud/roam-to-git | 92555cf9d5185a42cfa90a9e7e6b7bf0fd8bddb0 | [
"MIT"
] | null | null | null | roam_to_git/scrapping.py | bjornrud/roam-to-git | 92555cf9d5185a42cfa90a9e7e6b7bf0fd8bddb0 | [
"MIT"
] | 1 | 2020-10-23T20:17:04.000Z | 2020-10-23T20:17:04.000Z | import asyncio
import atexit
import os
import sys
from pathlib import Path
from typing import Optional
import psutil
import pyppeteer.connection
from loguru import logger
from pyppeteer.page import Page
def patch_pyppeteer():
"""Fix https://github.com/miyakogi/pyppeteer/issues/178"""
import pyppeteer.connect... | 38.629921 | 99 | 0.64523 |
97851323a01ce3f175239da2a945be28cd5c3116 | 532 | py | Python | source/DSM/struct.py | Leosocy/StructSlender | 9a25d53c9ac5924e683d9cc76a8a6326d64a4667 | [
"MIT"
] | 2 | 2017-10-25T15:16:33.000Z | 2017-11-08T14:41:48.000Z | source/DSM/struct.py | Leosocy/StructSlender | 9a25d53c9ac5924e683d9cc76a8a6326d64a4667 | [
"MIT"
] | null | null | null | source/DSM/struct.py | Leosocy/StructSlender | 9a25d53c9ac5924e683d9cc76a8a6326d64a4667 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
struct
"""
import sys
from StructType import *
class Struct(object):
"""
A class that corresponds to the properties of a structure.
"""
def __init__(self, header, body, tail):
self.orig_struct_str = ""
self.struct_... | 21.28 | 120 | 0.595865 |
c619910ace1c2e4f0e7abb7065bb44304f9b1e3e | 570 | py | Python | src/utils/aws.py | ResearchHub/ResearchHub-Backend-Open | d36dca33afae2d442690694bb2ab17180d84bcd3 | [
"MIT"
] | 18 | 2021-05-20T13:20:16.000Z | 2022-02-11T02:40:18.000Z | src/utils/aws.py | ResearchHub/ResearchHub-Backend-Open | d36dca33afae2d442690694bb2ab17180d84bcd3 | [
"MIT"
] | 109 | 2021-05-21T20:14:23.000Z | 2022-03-31T20:56:10.000Z | src/utils/aws.py | ResearchHub/ResearchHub-Backend-Open | d36dca33afae2d442690694bb2ab17180d84bcd3 | [
"MIT"
] | 4 | 2021-05-17T13:47:53.000Z | 2022-02-12T10:48:21.000Z | from urllib.parse import urlparse
from researchhub.settings import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
def get_s3_url(bucket, key, with_credentials=False):
s3 = 's3://'
if with_credentials is True:
return (
f'{s3}{AWS_ACCESS_KEY_ID}:{AWS_SECRET_ACCESS_KEY}@{bucket}{key}'
)
... | 27.142857 | 76 | 0.698246 |
94db455fe5f1a54071b4cc01fa0d6aa5c3880d7b | 2,370 | py | Python | nonebot/plugin.py | SDchao/nonebot | 145d1787143584895375231210e30fdd3003d5bf | [
"MIT"
] | 8 | 2018-08-21T07:26:30.000Z | 2019-04-07T07:23:32.000Z | nonebot/plugin.py | coffiasd/nonebot | c02b9a4ccf61126aa81e3f86b06b44685461af09 | [
"MIT"
] | 7 | 2020-07-17T11:47:58.000Z | 2022-02-26T01:39:17.000Z | nonebot/plugin.py | coffiasd/nonebot | c02b9a4ccf61126aa81e3f86b06b44685461af09 | [
"MIT"
] | 1 | 2019-02-25T11:29:53.000Z | 2019-02-25T11:29:53.000Z | import importlib
import os
import re
from typing import Any, Set, Optional
from .log import logger
class Plugin:
__slots__ = ('module', 'name', 'usage')
def __init__(self, module: Any,
name: Optional[str] = None,
usage: Optional[Any] = None):
self.module = module
... | 27.241379 | 69 | 0.609705 |
ed0bc0c23cc44b5a52570fb3016d9c1d63a93c68 | 866 | py | Python | gameSU.py | robinankele/privacy-games | 3a12194bbfb511ba4303d5cd1d37a7c1982622fa | [
"MIT"
] | null | null | null | gameSU.py | robinankele/privacy-games | 3a12194bbfb511ba4303d5cd1d37a7c1982622fa | [
"MIT"
] | null | null | null | gameSU.py | robinankele/privacy-games | 3a12194bbfb511ba4303d5cd1d37a7c1982622fa | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Author: Robin Ankele <robin.ankele@cs.ox.ac.uk>
http://users.ox.ac.uk/~kell4062
Copyright (c) 2017, University of Oxford
All rights reserved.
"""
from gameBasic import G
class G_SU(G):
def __init__(self):
G.__init__(self)
def __finialize__(self):
G.__finia... | 20.139535 | 80 | 0.622402 |
db1c0b5919b60d2247d98fa2109fd4da08a122a6 | 7,054 | py | Python | tensorflow_io/core/python/ops/arrow_io_tensor_ops.py | doc22940/io | 0b7f5de76df0d0426d1d9041b2e0a7d3f355da38 | [
"Apache-2.0"
] | null | null | null | tensorflow_io/core/python/ops/arrow_io_tensor_ops.py | doc22940/io | 0b7f5de76df0d0426d1d9041b2e0a7d3f355da38 | [
"Apache-2.0"
] | null | null | null | tensorflow_io/core/python/ops/arrow_io_tensor_ops.py | doc22940/io | 0b7f5de76df0d0426d1d9041b2e0a7d3f355da38 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. 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 applica... | 39.853107 | 115 | 0.653388 |
84259b40d00a0f2a5489a624a002aa845f433723 | 16,916 | py | Python | kinto/tests/core/resource/test_events.py | swhgoon/kinto | 10001d44bb08e4fbc74da31a41a4eaa461e0fd7f | [
"Apache-2.0"
] | null | null | null | kinto/tests/core/resource/test_events.py | swhgoon/kinto | 10001d44bb08e4fbc74da31a41a4eaa461e0fd7f | [
"Apache-2.0"
] | null | null | null | kinto/tests/core/resource/test_events.py | swhgoon/kinto | 10001d44bb08e4fbc74da31a41a4eaa461e0fd7f | [
"Apache-2.0"
] | 1 | 2020-07-15T04:27:08.000Z | 2020-07-15T04:27:08.000Z | import mock
import uuid
from contextlib import contextmanager
import webtest
from pyramid.config import Configurator
from kinto.core.events import (ResourceChanged, AfterResourceChanged,
ResourceRead, AfterResourceRead, ACTIONS)
from kinto.core.storage.exceptions import BackendError
fro... | 40.085308 | 78 | 0.606822 |
7edf3381386c69837aef05737fed92f8cf38d9ea | 7,002 | py | Python | tests/test_webapi.py | fusion-flap/flap_w7x_webapi | fd110fcaa3ed63c5cd45e7ef33b7c11011743c4b | [
"MIT"
] | null | null | null | tests/test_webapi.py | fusion-flap/flap_w7x_webapi | fd110fcaa3ed63c5cd45e7ef33b7c11011743c4b | [
"MIT"
] | 1 | 2019-09-15T21:23:40.000Z | 2019-09-15T21:30:28.000Z | tests/test_webapi.py | fusion-flap/flap_w7x_webapi | fd110fcaa3ed63c5cd45e7ef33b7c11011743c4b | [
"MIT"
] | null | null | null | import os
import unittest
import datetime
import numpy as np
import flap
import flap_w7x_webapi as webapi
# -------------------------------------INDEPENDENT FUNCTIONS FROM FLAP--------------------------------------------------
def test_basic():
# Getting ECRH data by giving the exact time
ecrh = ... | 38.262295 | 121 | 0.550557 |
7186f76ae0ab118dd81441cba40d6bb36375b556 | 640 | py | Python | pyhow/samples/impl/async.py | yoeo/pyhow | e882cc3a7b9765d6d4472de08128ac7b3c98c7c1 | [
"MIT"
] | 2 | 2016-02-29T13:57:58.000Z | 2016-03-21T16:40:46.000Z | pyhow/samples/impl/async.py | yoeo/pyhow | e882cc3a7b9765d6d4472de08128ac7b3c98c7c1 | [
"MIT"
] | 1 | 2018-06-21T08:58:54.000Z | 2018-06-21T08:58:54.000Z | pyhow/samples/impl/async.py | yoeo/pyhow | e882cc3a7b9765d6d4472de08128ac7b3c98c7c1 | [
"MIT"
] | null | null | null | """Handle asynchronious operations."""
# category: asynchronious operations
def aenter():
"""__aenter__: Todo."""
# TODO: async with, new in python 3.5
return NotImplemented
def aexit():
"""__aexit__: Todo."""
# TODO: async with, new in python 3.5
return NotImplemented
def aiter():
... | 16 | 41 | 0.628125 |
b5cc2844171f65bf96c169f978a3bb7f84dc6615 | 1,364 | py | Python | util/feature_extraction.py | GauravHub11/Audio_Emotion_recognition | 135c91a363101cd91fefdb992205543689071d23 | [
"MIT"
] | null | null | null | util/feature_extraction.py | GauravHub11/Audio_Emotion_recognition | 135c91a363101cd91fefdb992205543689071d23 | [
"MIT"
] | null | null | null | util/feature_extraction.py | GauravHub11/Audio_Emotion_recognition | 135c91a363101cd91fefdb992205543689071d23 | [
"MIT"
] | null | null | null | # feature_extracting
import librosa
import pandas as pd
import numpy as np
def get_audio_features(audio_path,sampling_rate):
X, sample_rate = librosa.load(audio_path ,res_type='kaiser_fast',duration=2.5,sr=sampling_rate*2,offset=0.5)
sample_rate = np.array(sample_rate)
y_harmonic, y_percussive = librosa.e... | 35.894737 | 112 | 0.717009 |
f480f4319da91683ca1aa2bf1e9535db94469d27 | 122,518 | py | Python | tensorflow/python/kernel_tests/conv_ops_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 1 | 2020-08-09T21:50:17.000Z | 2020-08-09T21:50:17.000Z | tensorflow/python/kernel_tests/conv_ops_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 3 | 2021-08-25T16:13:38.000Z | 2022-02-10T02:04:06.000Z | tensorflow/python/kernel_tests/conv_ops_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 3 | 2017-05-17T08:44:52.000Z | 2021-08-18T05:37:12.000Z | # Copyright 2015 The TensorFlow Authors. 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 applica... | 36.969825 | 115 | 0.588436 |
6ac797b1003a33194fca60517a98c9d9c28c696c | 8,667 | py | Python | olc_webportalv2/new_multisample/models.py | forestdussault/olc_webportalv2 | 9c8c719279ac7dfe9ea749c977d5391e4709b5b9 | [
"MIT"
] | 1 | 2019-01-03T21:14:22.000Z | 2019-01-03T21:14:22.000Z | olc_webportalv2/new_multisample/models.py | lowandrew/olc_webportalv2 | e75ba1b7af85bb25b59138d31e268ecde6616208 | [
"MIT"
] | 8 | 2018-03-05T21:19:41.000Z | 2018-04-05T13:54:45.000Z | olc_webportalv2/new_multisample/models.py | lowandrew/olc_webportalv2 | e75ba1b7af85bb25b59138d31e268ecde6616208 | [
"MIT"
] | 1 | 2019-01-03T21:14:37.000Z | 2019-01-03T21:14:37.000Z | from django.db import models
from olc_webportalv2.users.models import User
from django.contrib.postgres.fields.jsonb import JSONField
import os
from django.core.exceptions import ValidationError
# Create your models here.
def validate_fastq(fieldfile):
filename = os.path.basename(fieldfile.name)
if filename.... | 36.415966 | 98 | 0.678782 |
bc61d57432c789cdb436b4bc1c5183ead5243af6 | 352 | py | Python | test1/myscript4.py | josephernest/vversioning | de09ab66c018a5aceee787101c5e307f957a2601 | [
"MIT"
] | null | null | null | test1/myscript4.py | josephernest/vversioning | de09ab66c018a5aceee787101c5e307f957a2601 | [
"MIT"
] | null | null | null | test1/myscript4.py | josephernest/vversioning | de09ab66c018a5aceee787101c5e307f957a2601 | [
"MIT"
] | null | null | null | """
==CHANGELOG==
* support UTF8
==CHANGELOG==
"""
sqdgfhsqgfksqfkjgsqfkqsgdkfsqkgfqsdf
sqgjdfjsqdhfqgskdgfkqgsdjfsqdfggdsqjf
sqdgfhsqgfksqfkjgsqfkqsgdkfsqkgfqsdf
sqgjdfjsqdhfqgskdgfkqgsdjfsqdfggdsqjf
sqdgfhsqgfksqfkjgsqfkqsgdkfsqkgfqsdf
sqgjdfjsqdhfqgskdgfkqgsdjfsqdfggdsqjf
sqdgfhsqgfksqfkjgsqfkqsgdkfsqkgfqsdf
sqgjdf... | 23.466667 | 37 | 0.911932 |
efec86be34effc8afef49c51476f56364df69329 | 3,494 | py | Python | tests/test_utils.py | rra/aiohttp-remotes | a1aa6916c1713af40688370ab48bfffb350574fd | [
"MIT"
] | null | null | null | tests/test_utils.py | rra/aiohttp-remotes | a1aa6916c1713af40688370ab48bfffb350574fd | [
"MIT"
] | null | null | null | tests/test_utils.py | rra/aiohttp-remotes | a1aa6916c1713af40688370ab48bfffb350574fd | [
"MIT"
] | null | null | null | from ipaddress import IPv4Address, IPv6Address, ip_address, ip_network
import pytest
from aiohttp_remotes.exceptions import IncorrectIPCount, UntrustedIP
from aiohttp_remotes.utils import parse_trusted_list, remote_ip
def test_parse_str():
with pytest.raises(TypeError):
parse_trusted_list('127.0.0.1')
... | 29.610169 | 70 | 0.598454 |
fba5c06dd089c53e740a19d314c459e0945f7715 | 11,137 | py | Python | tf_model/residual_attention_keras.py | tamlhp/dfd_benchmark | 15cc5c4708a5414c6309ea1f20a5dfa3428409fa | [
"MIT"
] | 7 | 2020-03-20T18:46:29.000Z | 2022-03-22T03:06:17.000Z | tf_model/residual_attention_keras.py | tamlhp/dfd_benchmark | 15cc5c4708a5414c6309ea1f20a5dfa3428409fa | [
"MIT"
] | 1 | 2021-12-03T06:49:04.000Z | 2021-12-03T06:49:04.000Z | tf_model/residual_attention_keras.py | tamlhp/dfd_benchmark | 15cc5c4708a5414c6309ea1f20a5dfa3428409fa | [
"MIT"
] | 2 | 2021-08-23T08:54:09.000Z | 2022-02-07T10:04:23.000Z | import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" # see issue #152
os.environ["CUDA_VISIBLE_DEVICES"]="0"
import tensorflow.keras.backend as K
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
config.gpu_options.per_... | 36.276873 | 212 | 0.694711 |
30804e12aea73580edcae0f030cdcd4a4c714c7b | 3,281 | py | Python | guts/api/views/versions.py | smallwormer/stable-liberty-guts | e635b710cdd210f70e9d50c3b85fffdeb53e8f01 | [
"Apache-2.0"
] | null | null | null | guts/api/views/versions.py | smallwormer/stable-liberty-guts | e635b710cdd210f70e9d50c3b85fffdeb53e8f01 | [
"Apache-2.0"
] | null | null | null | guts/api/views/versions.py | smallwormer/stable-liberty-guts | e635b710cdd210f70e9d50c3b85fffdeb53e8f01 | [
"Apache-2.0"
] | 1 | 2022-03-03T05:41:31.000Z | 2022-03-03T05:41:31.000Z | # Copyright (c) 2015 Aptira Pty 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 requi... | 33.141414 | 79 | 0.586102 |
89dd2a46f5682a83f7140285f315366b7b828f02 | 391 | py | Python | 7KYU/reverse_number.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | 4 | 2021-07-17T22:48:03.000Z | 2022-03-25T14:10:58.000Z | 7KYU/reverse_number.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | null | null | null | 7KYU/reverse_number.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | 3 | 2021-06-14T14:18:16.000Z | 2022-03-16T06:02:02.000Z | def reverse_number(n: int) -> int:
""" This function takes in input 'n' and returns 'n' with all digits reversed. """
if len(str(n)) == 1:
return n
k = abs(n)
reversed_n = []
while k != 0:
i = k % 10
reversed_n.append(i)
k = (k - i) // 10
return int(''.join(map(st... | 32.583333 | 95 | 0.526854 |
2baa9ed47050f4f3d44ce3340987ea3b2f3d4431 | 2,565 | py | Python | test/functional/sbercoin_state_root.py | SbercoinCom/sbercoin.com | 8fb386e59e4db8a6abb3a2c638a2ecc918f6b9dd | [
"MIT"
] | 1 | 2021-05-17T06:06:57.000Z | 2021-05-17T06:06:57.000Z | test/functional/sbercoin_state_root.py | SbercoinCom/sbercoin.com | 8fb386e59e4db8a6abb3a2c638a2ecc918f6b9dd | [
"MIT"
] | null | null | null | test/functional/sbercoin_state_root.py | SbercoinCom/sbercoin.com | 8fb386e59e4db8a6abb3a2c638a2ecc918f6b9dd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2016 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 *
from tes... | 38.863636 | 200 | 0.716179 |
9bda86392cdfa530b398f3710444bf5b76b9ff7d | 2,780 | py | Python | Agent/duelingnet.py | hassaanakram/Resource-Allocation-using-deeprl | f36bfb6ba9956a0b072421a8feb8034428571403 | [
"MIT"
] | 33 | 2020-05-19T10:56:45.000Z | 2022-03-08T11:40:53.000Z | Agent/duelingnet.py | chisyliu/Resource-Allocation-using-deeprl | fec93a99177115ee32652483fd1005cdbf67ae56 | [
"MIT"
] | 5 | 2020-05-11T12:41:12.000Z | 2022-03-01T10:49:36.000Z | Agent/duelingnet.py | chisyliu/Resource-Allocation-using-deeprl | fec93a99177115ee32652483fd1005cdbf67ae56 | [
"MIT"
] | 17 | 2020-02-09T10:50:41.000Z | 2022-03-16T01:57:54.000Z | import numpy as np
import tensorflow as tf
import tflearn
import keras.backend as K
from keras.models import Model
from keras.layers import Dense, Input, Flatten, Conv1D, Conv2D, MaxPooling1D, MaxPooling2D, Add, Subtract, Lambda
class DuelingNetwork:
def __init__(self, session, dim_state, dim_action, learning_rat... | 37.567568 | 113 | 0.648561 |
da2638fa62f49345ce7fa3d187d19deb2e9ef627 | 586 | py | Python | tuple.py | oananbeh/Python-tutorial- | 5d2a1d4157fb2bade7be247d844090ed1ffbf973 | [
"Apache-2.0"
] | null | null | null | tuple.py | oananbeh/Python-tutorial- | 5d2a1d4157fb2bade7be247d844090ed1ffbf973 | [
"Apache-2.0"
] | null | null | null | tuple.py | oananbeh/Python-tutorial- | 5d2a1d4157fb2bade7be247d844090ed1ffbf973 | [
"Apache-2.0"
] | null | null | null | months=("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
"Aug", "Sep", "Oct", "Nov", "Dec")
print(months[1])
print(months[-1])
print(months[-3])
print(months[0:4])
example1=(1,3,5,7,9)
example2=(True,False,True)
example3=("Jon",24,True)
print(len(months))
if "Sep" in months:
print("Yes")
for month in months:
p... | 20.928571 | 56 | 0.588737 |
6c1674fff85928a4423cc488432ddd74e22df6b7 | 1,283 | py | Python | doc/source/cookbook/offaxis_projection.py | kastalpes/yt | b1e197ca84433fbd61eaf44b28ff5cdb37981d4c | [
"BSD-3-Clause-Clear"
] | 2 | 2021-03-02T18:59:49.000Z | 2021-03-02T18:59:50.000Z | doc/source/cookbook/offaxis_projection.py | kastalpes/yt | b1e197ca84433fbd61eaf44b28ff5cdb37981d4c | [
"BSD-3-Clause-Clear"
] | 4 | 2018-04-13T23:03:42.000Z | 2018-05-08T17:50:43.000Z | doc/source/cookbook/offaxis_projection.py | kastalpes/yt | b1e197ca84433fbd61eaf44b28ff5cdb37981d4c | [
"BSD-3-Clause-Clear"
] | 2 | 2020-05-16T15:29:37.000Z | 2020-06-22T10:17:08.000Z | import yt
import numpy as np
# Load the dataset.
ds = yt.load("IsolatedGalaxy/galaxy0030/galaxy0030")
# Choose a center for the render.
c = [0.5, 0.5, 0.5]
# Our image plane will be normal to some vector. For things like collapsing
# objects, you could set it the way you would a cutting plane -- but for this
# data... | 35.638889 | 79 | 0.731099 |
505b6081033057ca72ea64bc6264f0105ee0646f | 13,707 | py | Python | src/streamlink/plugins/crunchyroll.py | Erk-/streamlink | d240704d1237fb5878960480c3f8951e0c5023b9 | [
"BSD-2-Clause"
] | 6 | 2020-11-13T22:48:09.000Z | 2021-03-05T14:38:40.000Z | src/streamlink/plugins/crunchyroll.py | TheDrHax/streamlink | 4dfd0d516fd8484438389518985e3b5131b7a253 | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/crunchyroll.py | TheDrHax/streamlink | 4dfd0d516fd8484438389518985e3b5131b7a253 | [
"BSD-2-Clause"
] | 3 | 2020-11-21T14:50:52.000Z | 2021-03-23T09:55:35.000Z | import datetime
import logging
import re
from uuid import uuid4
from streamlink.plugin import Plugin, PluginArgument, PluginArguments, PluginError, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream
log = logging.getLogger(__name__)
STREAM_WEIGHTS = {
"low": 240,
... | 35.418605 | 120 | 0.569344 |
c3fa68df10c8465311bf748fbae122afb3d4a756 | 1,658 | py | Python | wagtail/wagtailredirects/forms.py | seddonym/wagtail-tableblock | aea3ce67a0800285b20b93018b7c0a8679e479b7 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailredirects/forms.py | seddonym/wagtail-tableblock | aea3ce67a0800285b20b93018b7c0a8679e479b7 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailredirects/forms.py | seddonym/wagtail-tableblock | aea3ce67a0800285b20b93018b7c0a8679e479b7 | [
"BSD-3-Clause"
] | 1 | 2019-03-05T15:37:22.000Z | 2019-03-05T15:37:22.000Z | from django import forms
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailadmin.widgets import AdminPageChooser
from wagtail.wagtailcore.models import Site
from wagtail.wagtailredirects.models import Redirect
class RedirectForm(forms.ModelForm):
site = forms.ModelChoiceField(
... | 36.043478 | 101 | 0.658625 |
aceae5f871e9a01900d6cf5229f6ed78d82368dd | 3,554 | py | Python | src/models/gbm1_indiv_pair_h2h_tuned.py | bushal01/league-ml2 | 6a3abf522faefcead017efa3fc6f9e2e8cafcd7f | [
"FTL"
] | 1 | 2019-11-14T22:46:08.000Z | 2019-11-14T22:46:08.000Z | src/models/gbm1_indiv_pair_h2h_tuned.py | bushal01/league-ml2 | 6a3abf522faefcead017efa3fc6f9e2e8cafcd7f | [
"FTL"
] | 25 | 2020-02-24T17:57:47.000Z | 2022-03-11T09:17:10.000Z | src/models/gbm1_indiv_pair_h2h_tuned.py | bushal01/league-ml2 | 6a3abf522faefcead017efa3fc6f9e2e8cafcd7f | [
"FTL"
] | 1 | 2018-08-04T02:50:10.000Z | 2018-08-04T02:50:10.000Z | import pandas as pd
import sklearn.ensemble
import sys
import os
import dotenv
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))
import get_modeling_data
import model_evaluation.model_performance_functions as mpf
import time
if __name__ == '__main__':
project_dir = os.path.join(os.path.dirname(_... | 46.155844 | 128 | 0.633089 |
427d88c1255fa80c8f8064a7e8d6926fd11cc3f7 | 1,132 | py | Python | examples/hellogrpc/deployment_test.py | linux-on-ibm-z/rules_k8s | e65b80edd2a2162f67120a98e84bb489f15fcf97 | [
"Apache-2.0"
] | 263 | 2017-08-29T22:38:58.000Z | 2022-03-09T06:46:28.000Z | examples/hellogrpc/deployment_test.py | linux-on-ibm-z/rules_k8s | e65b80edd2a2162f67120a98e84bb489f15fcf97 | [
"Apache-2.0"
] | 666 | 2017-08-31T23:22:52.000Z | 2022-03-19T09:57:07.000Z | examples/hellogrpc/deployment_test.py | linux-on-ibm-z/rules_k8s | e65b80edd2a2162f67120a98e84bb489f15fcf97 | [
"Apache-2.0"
] | 150 | 2017-09-03T17:20:27.000Z | 2022-02-09T18:45:37.000Z | # Copyright 2017 The Bazel Authors. 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 applicable la... | 32.342857 | 76 | 0.741166 |
b3a23b2a7e49bfc69c86905109db3da6a31e16a4 | 1,648 | py | Python | donedealfinderapi.py | tigranza/gooddeal | 96401a53a305d39b72962104682ee7bb3b0b84bd | [
"Apache-2.0"
] | null | null | null | donedealfinderapi.py | tigranza/gooddeal | 96401a53a305d39b72962104682ee7bb3b0b84bd | [
"Apache-2.0"
] | null | null | null | donedealfinderapi.py | tigranza/gooddeal | 96401a53a305d39b72962104682ee7bb3b0b84bd | [
"Apache-2.0"
] | null | null | null |
from bs4 import BeautifulSoup
import requests
import re
import json
from car import Car
from profiler import start_timer, print_time
host = 'https://donedeal.ie'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
class DoneDealException(Exception):
pass
class DoneDealFinderAp... | 26.580645 | 78 | 0.51699 |
3bc2013aaf0ca09f5658b30a77a601da331ac838 | 19,447 | py | Python | satchmo/apps/product/tests.py | djangoplicity/satchmo | 75b672dffb64fed3e55c253d51a0ce73f0747e05 | [
"BSD-3-Clause"
] | null | null | null | satchmo/apps/product/tests.py | djangoplicity/satchmo | 75b672dffb64fed3e55c253d51a0ce73f0747e05 | [
"BSD-3-Clause"
] | null | null | null | satchmo/apps/product/tests.py | djangoplicity/satchmo | 75b672dffb64fed3e55c253d51a0ce73f0747e05 | [
"BSD-3-Clause"
] | null | null | null | from decimal import Decimal
from django.conf import settings
from django.contrib.sites.models import Site
from django.core import urlresolvers
from django.forms.util import ValidationError
from django.http import HttpResponse
from django.test import TestCase
from django.utils import timezone
from product.forms import P... | 35.946396 | 124 | 0.612588 |
1064f5e3c69c181e0713ad1e483d842f6a5bcd24 | 1,703 | py | Python | mce/equiv.py | mvcisback/mce-spec-inference | 58432b35e35b75cab1c77cbbe2057aff94794597 | [
"MIT"
] | null | null | null | mce/equiv.py | mvcisback/mce-spec-inference | 58432b35e35b75cab1c77cbbe2057aff94794597 | [
"MIT"
] | null | null | null | mce/equiv.py | mvcisback/mce-spec-inference | 58432b35e35b75cab1c77cbbe2057aff94794597 | [
"MIT"
] | null | null | null | """
Code for checking if two trajectories index the same time unrolled state.
"""
from typing import Iterator
import aiger
import aiger_sat
import aiger_bv as BV
def bmc_equiv(circ1, circ2, horizon, assume=None) -> Iterator[bool]:
"""
Perform bounded model checking up to horizon to see if circ1 and
circ2... | 26.2 | 73 | 0.641221 |
0c453443fa4edefc2ba97b8fe38055f733650996 | 5,001 | py | Python | example/tutorial_frozenlake_dqn.py | lllcho/tensorlayer | 87591b4945a6a67dfb4ea797a575efae997fd9d2 | [
"Apache-2.0"
] | 1 | 2021-09-10T09:27:31.000Z | 2021-09-10T09:27:31.000Z | example/tutorial_frozenlake_dqn.py | lllcho/tensorlayer | 87591b4945a6a67dfb4ea797a575efae997fd9d2 | [
"Apache-2.0"
] | null | null | null | example/tutorial_frozenlake_dqn.py | lllcho/tensorlayer | 87591b4945a6a67dfb4ea797a575efae997fd9d2 | [
"Apache-2.0"
] | null | null | null | """Q-Network Q(a, s) - TD Learning, Off-Policy, e-Greedy Exploration (GLIE).
Q(S, A) <- Q(S, A) + alpha * (R + lambda * Q(newS, newA) - Q(S, A))
delta_w = R + lambda * Q(newS, newA)
See David Silver RL Tutorial Lecture 5 - Q-Learning for more details.
EN: https://medium.com/emergent-future/simple-reinforcement-learn... | 48.553398 | 158 | 0.645271 |
0f7981afcd5855d715bbf1e4cb50b68d3db6025f | 60 | py | Python | src/blueprints/multilingual/__init__.py | PseuToPy/PseuToPy-web | fe0d43b0c91b6ae115ba06cb5453df4ad7ca1292 | [
"MIT"
] | 1 | 2020-10-04T08:59:00.000Z | 2020-10-04T08:59:00.000Z | src/blueprints/multilingual/__init__.py | PseuToPy/PseuToPy-api | fe0d43b0c91b6ae115ba06cb5453df4ad7ca1292 | [
"MIT"
] | 4 | 2020-06-19T12:59:18.000Z | 2021-01-31T08:13:41.000Z | src/blueprints/multilingual/__init__.py | PseuToPy/PseuToPy-web | fe0d43b0c91b6ae115ba06cb5453df4ad7ca1292 | [
"MIT"
] | null | null | null | from src.blueprints.multilingual.routes import multilingual
| 30 | 59 | 0.883333 |
84ebeb4f64ab97cbe19b0542a887c523850e0e65 | 2,135 | py | Python | examples/remote_cluster.py | venukarnati92/python-1 | 3fabf9ed9f4758fb5133975a58fc147471e91d9d | [
"Apache-2.0"
] | 4,417 | 2018-01-13T04:30:48.000Z | 2022-03-31T15:33:59.000Z | examples/remote_cluster.py | belajarqywok/python | b15bea16a87ad03136a4627941ac437582ea4657 | [
"Apache-2.0"
] | 1,414 | 2018-01-12T19:31:56.000Z | 2022-03-31T22:01:02.000Z | examples/remote_cluster.py | palnabarun/python | 6b01c95e1673c0787d3d688b361bfd995d62dd98 | [
"Apache-2.0"
] | 2,854 | 2018-01-14T08:57:33.000Z | 2022-03-31T01:41:56.000Z | # Copyright 2018 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 35 | 81 | 0.725059 |
7329a6553c1d534de7857ec6b3b9822c54f2e0ba | 3,279 | py | Python | python/oneflow/nn/__init__.py | Warmchay/oneflow | 5a333ff065bb89990318de2f1bd650e314d49301 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/__init__.py | Warmchay/oneflow | 5a333ff065bb89990318de2f1bd650e314d49301 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/__init__.py | Warmchay/oneflow | 5a333ff065bb89990318de2f1bd650e314d49301 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. 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 applicable law or agr... | 25.617188 | 78 | 0.761208 |
f45207f874f94dee303f0bb0400e72370b61bdb9 | 1,726 | py | Python | Example/Gutenkunst2007/Brown_2004_All_One/Nets.py | bcdaniels/SloppyCell | 17e68127a6aba19056a5067748a2d18241cc4d76 | [
"BSD-3-Clause"
] | 2 | 2020-05-26T19:29:39.000Z | 2020-08-26T20:54:52.000Z | Example/Gutenkunst2007/Brown_2004_All_One/Nets.py | bcdaniels/SloppyCell | 17e68127a6aba19056a5067748a2d18241cc4d76 | [
"BSD-3-Clause"
] | 1 | 2020-05-26T16:50:49.000Z | 2021-07-08T20:35:35.000Z | Example/Gutenkunst2007/Brown_2004_All_One/Nets.py | jurquiza/SloppyCellUrquiza2019 | a9f64d9d4172c82735813f09e48f36777a714e9c | [
"BSD-3-Clause"
] | 3 | 2017-09-12T03:12:01.000Z | 2018-10-19T11:08:09.000Z | from SloppyCell.ReactionNetworks import *
# Load the network from the XML file
net = IO.from_SBML_file('BIOMD0000000033.xml')
for var in net.variables.keys():
# Set all typical values to 1.
net.set_var_typical_val(var, 1.0)
# Set all non-zero ICs to 1.
if net.get_var_ic(var) != 0:
net.set_var_i... | 31.381818 | 72 | 0.75956 |
396fcfe26645eea486b583d87ce80e9346861477 | 13,103 | py | Python | jello/dotmap.py | roehling/jello | 1073355e2bbfcd4f92af2584c9e539ce34859fc0 | [
"MIT"
] | 265 | 2020-03-25T06:59:33.000Z | 2022-03-29T19:07:18.000Z | jello/dotmap.py | roehling/jello | 1073355e2bbfcd4f92af2584c9e539ce34859fc0 | [
"MIT"
] | 7 | 2020-03-26T15:54:45.000Z | 2022-03-09T00:33:25.000Z | jello/dotmap.py | roehling/jello | 1073355e2bbfcd4f92af2584c9e539ce34859fc0 | [
"MIT"
] | 13 | 2020-03-26T11:01:39.000Z | 2022-02-21T03:16:29.000Z | # The MIT License (MIT)
#
# Copyright (c) 2015 Chris Redford
#
# 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 the Software without restriction, including without limitation the
# rights to use, copy, modif... | 35.223118 | 151 | 0.545448 |
462e3fb8680d29e52d4c551f5d0ed1f83e4d346c | 615 | py | Python | django_pre_post/migrations/0002_auto_20180402_2043.py | CSnap/Django-pre-post | b86138201e6e5503ff02c6bf4c3bb4f1b6c20757 | [
"MIT"
] | null | null | null | django_pre_post/migrations/0002_auto_20180402_2043.py | CSnap/Django-pre-post | b86138201e6e5503ff02c6bf4c3bb4f1b6c20757 | [
"MIT"
] | 12 | 2018-04-04T20:13:08.000Z | 2021-03-19T21:44:48.000Z | django_pre_post/migrations/0002_auto_20180402_2043.py | CSnap/Django-pre-post | b86138201e6e5503ff02c6bf4c3bb4f1b6c20757 | [
"MIT"
] | 1 | 2020-05-21T17:44:24.000Z | 2020-05-21T17:44:24.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-04-02 20:43
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('django_pre_post', '0001_initial'),
]
operations =... | 26.73913 | 146 | 0.656911 |
4c53cf4d6f2fc7c373cf43dc79de3c3242b99b13 | 535 | py | Python | phoenix/solr/__init__.py | TeriForey/fawkes | 1b51430d2f952d9802f13fa1f2d0f68df706c43e | [
"Apache-2.0"
] | null | null | null | phoenix/solr/__init__.py | TeriForey/fawkes | 1b51430d2f952d9802f13fa1f2d0f68df706c43e | [
"Apache-2.0"
] | 6 | 2016-12-01T16:17:10.000Z | 2020-11-11T03:19:31.000Z | phoenix/solr/__init__.py | TeriForey/fawkes | 1b51430d2f952d9802f13fa1f2d0f68df706c43e | [
"Apache-2.0"
] | null | null | null | from pyramid.settings import asbool
def includeme(config):
settings = config.registry.settings
if asbool(settings.get('phoenix.solr', 'false')):
# actions
pass
config.add_route('index_service', '/solr/{service_id}/index')
config.add_route('clear_index', '/solr/clear')
# check if ... | 29.722222 | 65 | 0.691589 |
1644223d6c699563673f7de9acda6d0ebc582065 | 93 | py | Python | runner/__init__.py | qklee-lz/resa | 12d10c23c42532e7120f5e23a5675707271c87c8 | [
"Apache-2.0"
] | 118 | 2021-02-28T08:34:41.000Z | 2022-03-24T02:50:54.000Z | runner/__init__.py | qklee-lz/resa | 12d10c23c42532e7120f5e23a5675707271c87c8 | [
"Apache-2.0"
] | 40 | 2021-03-30T09:14:40.000Z | 2022-03-30T13:45:25.000Z | runner/__init__.py | qklee-lz/resa | 12d10c23c42532e7120f5e23a5675707271c87c8 | [
"Apache-2.0"
] | 28 | 2021-03-28T12:21:18.000Z | 2022-03-24T07:18:16.000Z | from .evaluator import *
from .resa_trainer import *
from .registry import build_evaluator
| 18.6 | 38 | 0.795699 |
51d9c6889469ff7af56be77403a86733b855e8c7 | 391 | py | Python | tests/optimizers_test/test_emperor_penguin_optimizer.py | pfnet-research/batch-metaheuristics | 202372a4ef4439cceb71e71092487c9173fd367c | [
"MIT"
] | 7 | 2021-01-22T05:00:18.000Z | 2022-02-26T12:41:07.000Z | tests/optimizers_test/test_emperor_penguin_optimizer.py | pfnet-research/batch-metaheuristics | 202372a4ef4439cceb71e71092487c9173fd367c | [
"MIT"
] | null | null | null | tests/optimizers_test/test_emperor_penguin_optimizer.py | pfnet-research/batch-metaheuristics | 202372a4ef4439cceb71e71092487c9173fd367c | [
"MIT"
] | null | null | null | from batchopt.optimizers.emperor_penguin_optimizer import EmperorPenguinOptimizer
def test_epo_init(optimizer_init_test_func):
optimizer_init_test_func(EmperorPenguinOptimizer)
def test_epo_ask(optimizer_ask_test_func):
optimizer_ask_test_func(EmperorPenguinOptimizer)
def test_epo_train(optimizer_optimize... | 27.928571 | 81 | 0.877238 |
2d16b3b67fe5c3eae80637552cf4cb70dd108f23 | 482 | py | Python | setup.py | ascott1/regulations-site | 9c6ce452b8d3e82cc6f3a38953e6f2d04ae64788 | [
"CC0-1.0"
] | 1 | 2019-12-29T17:49:57.000Z | 2019-12-29T17:49:57.000Z | setup.py | ascott1/regulations-site | 9c6ce452b8d3e82cc6f3a38953e6f2d04ae64788 | [
"CC0-1.0"
] | null | null | null | setup.py | ascott1/regulations-site | 9c6ce452b8d3e82cc6f3a38953e6f2d04ae64788 | [
"CC0-1.0"
] | null | null | null | import os
from setuptools import setup, find_packages
setup(
name="regulations",
version="2.1.5",
packages=find_packages(),
include_package_data=True,
setup_requires=['cfgov_setup==1.2',],
frontend_build_script='frontendbuild.sh',
install_requires=[
'django>=1.8',
'lxml',
... | 21.909091 | 73 | 0.618257 |
593189fdc744d62b837fb18d26e0bf17f0ab40b4 | 9,197 | py | Python | tests/mockssh.py | lydian/mrjob | 13028274296f5618d63ffc00301537fd385eef82 | [
"Apache-2.0"
] | null | null | null | tests/mockssh.py | lydian/mrjob | 13028274296f5618d63ffc00301537fd385eef82 | [
"Apache-2.0"
] | null | null | null | tests/mockssh.py | lydian/mrjob | 13028274296f5618d63ffc00301537fd385eef82 | [
"Apache-2.0"
] | null | null | null | # Copyright 2009-2012 Yelp
# Copyright 2014 Ed Schofield
# Copyright 2015-2016 Yelp
# Copyright 2017 Yelp
#
# 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/LI... | 34.575188 | 78 | 0.611939 |
878a55922384e98104ba2f934c735c00bcc5bffd | 1,750 | py | Python | hello-stream-twitter.py | mdemaster/mdemaster_w205_exercise2 | 0030d78d674840f848250bff970824a1d49587fb | [
"Apache-2.0"
] | null | null | null | hello-stream-twitter.py | mdemaster/mdemaster_w205_exercise2 | 0030d78d674840f848250bff970824a1d49587fb | [
"Apache-2.0"
] | 1 | 2020-06-25T07:11:18.000Z | 2020-06-25T07:11:18.000Z | hello-stream-twitter.py | mdemaster/mdemaster_w205_exercise2 | 0030d78d674840f848250bff970824a1d49587fb | [
"Apache-2.0"
] | null | null | null | """
Using Twitter stream API, print all the tweets in the stream containing the term "Hello" in a 1 min period
"""
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
from Twittercredentials import *
from time import time,ctime
import simplejson
class StdOutListener(S... | 28.688525 | 106 | 0.585714 |
715a2a3490b3f315243ff12ca4974c4cca7ab80a | 2,423 | py | Python | onnxruntime/test/python/onnxruntime_test_python_keras.py | hqucms/onnxruntime | 6e4e76414639f50836a64546603c8957227857b0 | [
"MIT"
] | 3 | 2019-11-25T10:26:57.000Z | 2021-05-14T08:11:29.000Z | onnxruntime/test/python/onnxruntime_test_python_keras.py | hqucms/onnxruntime | 6e4e76414639f50836a64546603c8957227857b0 | [
"MIT"
] | 10 | 2019-03-25T21:47:46.000Z | 2019-04-30T02:33:05.000Z | onnxruntime/test/python/onnxruntime_test_python_keras.py | hqucms/onnxruntime | 6e4e76414639f50836a64546603c8957227857b0 | [
"MIT"
] | 4 | 2021-06-05T19:52:22.000Z | 2021-11-30T13:58:13.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# -*- coding: UTF-8 -*-
# Taken from https://github.com/onnx/onnxmltools/blob/master/tests/end2end/test_custom_op.py.
import unittest
import os
import sys
import numpy as np
import onnxmltools
import onnxruntime as onnxrt
fro... | 33.652778 | 119 | 0.673545 |
88db0bdd62872272a8beab751fcaccfd4738e8a8 | 434 | py | Python | bot/__main__.py | OpenASL/HowSignBot | bd9c5bc0edfd6fb50bdce7c7c1d84462e1e704c2 | [
"MIT"
] | 9 | 2021-01-12T07:28:30.000Z | 2021-12-30T09:27:04.000Z | bot/__main__.py | OpenASL/HowSignBot | bd9c5bc0edfd6fb50bdce7c7c1d84462e1e704c2 | [
"MIT"
] | 16 | 2021-03-28T16:31:42.000Z | 2022-03-21T00:18:30.000Z | bot/__main__.py | OpenASL/HowSignBot | bd9c5bc0edfd6fb50bdce7c7c1d84462e1e704c2 | [
"MIT"
] | 1 | 2021-07-18T20:49:19.000Z | 2021-07-18T20:49:19.000Z | import logging
from aiohttp import web
from . import __version__
from . import settings
from .app import app
log_format = "%(asctime)s - %(name)s %(levelname)s: %(message)s"
logging.getLogger("disnake").setLevel(logging.WARNING)
logging.basicConfig(
format=log_format,
level=settings.LOG_LEVEL,
)
logger = log... | 22.842105 | 64 | 0.758065 |
db30a0ad573c6e1d49f0f31d1002e2303dec6d7b | 7,211 | py | Python | test/expected/python.asyncio/service_extension_same_file/f_BasePinger.py | dustyholmes-wf/frugal | 915ccfc58fcc9baabc4549c522e3acd2975a2e0b | [
"Apache-2.0"
] | null | null | null | test/expected/python.asyncio/service_extension_same_file/f_BasePinger.py | dustyholmes-wf/frugal | 915ccfc58fcc9baabc4549c522e3acd2975a2e0b | [
"Apache-2.0"
] | null | null | null | test/expected/python.asyncio/service_extension_same_file/f_BasePinger.py | dustyholmes-wf/frugal | 915ccfc58fcc9baabc4549c522e3acd2975a2e0b | [
"Apache-2.0"
] | null | null | null | #
# Autogenerated by Frugal Compiler (3.4.7)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
import asyncio
from datetime import timedelta
import inspect
from frugal.aio.processor import FBaseProcessor
from frugal.aio.processor import FProcessorFunction
from frugal.exceptions import TApplicat... | 31.76652 | 151 | 0.628484 |
35b2f002a3806e320907999792cbeac674fc8fe5 | 137 | py | Python | project/app/admin.py | cs-fullstack-fall-2018/django-mini-project1-RoyzellW | 540a867f9890933f82b13bb3e7a12457f8594c65 | [
"Apache-2.0"
] | null | null | null | project/app/admin.py | cs-fullstack-fall-2018/django-mini-project1-RoyzellW | 540a867f9890933f82b13bb3e7a12457f8594c65 | [
"Apache-2.0"
] | null | null | null | project/app/admin.py | cs-fullstack-fall-2018/django-mini-project1-RoyzellW | 540a867f9890933f82b13bb3e7a12457f8594c65 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import teacherTimeSheet
# Register your models here.
admin.site.register(teacherTimeSheet) | 27.4 | 37 | 0.839416 |
9c1ecfde38e67ec50b0cffcc0c0307293652d888 | 22,849 | py | Python | malcolm/modules/scanning/controllers/runnablecontroller.py | aaron-parsons/pymalcolm | 4e7ebd6b09382ab7e013278a81097d17873fa5c4 | [
"Apache-2.0"
] | null | null | null | malcolm/modules/scanning/controllers/runnablecontroller.py | aaron-parsons/pymalcolm | 4e7ebd6b09382ab7e013278a81097d17873fa5c4 | [
"Apache-2.0"
] | null | null | null | malcolm/modules/scanning/controllers/runnablecontroller.py | aaron-parsons/pymalcolm | 4e7ebd6b09382ab7e013278a81097d17873fa5c4 | [
"Apache-2.0"
] | null | null | null | from annotypes import Anno, TYPE_CHECKING, add_call_types, Any
from scanpointgenerator import CompoundGenerator
from malcolm.core import AbortedError, MethodModel, Queue, Context, \
TimeoutError, AMri, NumberMeta, Widget, Part, DEFAULT_TIMEOUT
from malcolm.compat import OrderedDict
from malcolm.core.models import ... | 43.772031 | 80 | 0.619983 |
4367c8166ee51a3f70b6fdcda012e143daf38ee9 | 2,526 | py | Python | sdk/media/azure-mgmt-media/setup.py | moovy2/azure-sdk-for-python | 6b0495dc9917d47a7264f26cbd3221d43461a537 | [
"MIT"
] | null | null | null | sdk/media/azure-mgmt-media/setup.py | moovy2/azure-sdk-for-python | 6b0495dc9917d47a7264f26cbd3221d43461a537 | [
"MIT"
] | null | null | null | sdk/media/azure-mgmt-media/setup.py | moovy2/azure-sdk-for-python | 6b0495dc9917d47a7264f26cbd3221d43461a537 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 34.135135 | 91 | 0.605305 |
228b6b50192dbc7367e482f85e610619e8b7ce7f | 849 | py | Python | app/main/forms.py | abdirahman-ahmednoor/pitcher | 83c9f3caf033e422aafb781afbff186dbf3980f1 | [
"MIT"
] | null | null | null | app/main/forms.py | abdirahman-ahmednoor/pitcher | 83c9f3caf033e422aafb781afbff186dbf3980f1 | [
"MIT"
] | null | null | null | app/main/forms.py | abdirahman-ahmednoor/pitcher | 83c9f3caf033e422aafb781afbff186dbf3980f1 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, SelectField, TextAreaField, SubmitField
from wtforms.validators import Required
class UpdateProfile(FlaskForm):
bio = TextAreaField('Write a brief bio about you.', validators = [Required()])
submit = SubmitField('Save')
class PitchForm(FlaskForm... | 49.941176 | 231 | 0.716137 |
0c5fef4469184556d3fc84322ea22348960a9cc4 | 50,039 | py | Python | src/sage/schemes/elliptic_curves/ell_field.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 3 | 2019-07-15T13:48:24.000Z | 2019-11-08T12:31:43.000Z | src/sage/schemes/elliptic_curves/ell_field.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 2 | 2018-10-30T13:40:20.000Z | 2020-07-23T12:13:30.000Z | src/sage/schemes/elliptic_curves/ell_field.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 1 | 2020-07-23T10:29:58.000Z | 2020-07-23T10:29:58.000Z | r"""
Elliptic curves over a general field
This module defines the class ``EllipticCurve_field``, based on
``EllipticCurve_generic``, for elliptic curves over general fields.
"""
#*****************************************************************************
# Copyright (C) 2006 William Stein <wstein@gmail.com>
#
... | 41.388751 | 1,602 | 0.561782 |
ff6e5f5430c62860d578d8b3cc5ee467d6394b64 | 3,982 | py | Python | tests/utils/test_general.py | harmon/sentry-python | fc55f7909c8c1969b43d43acccb9835f65fcd48c | [
"BSD-2-Clause"
] | null | null | null | tests/utils/test_general.py | harmon/sentry-python | fc55f7909c8c1969b43d43acccb9835f65fcd48c | [
"BSD-2-Clause"
] | null | null | null | tests/utils/test_general.py | harmon/sentry-python | fc55f7909c8c1969b43d43acccb9835f65fcd48c | [
"BSD-2-Clause"
] | 1 | 2020-05-18T19:15:15.000Z | 2020-05-18T19:15:15.000Z | # coding: utf-8
import sys
import os
import pytest
from sentry_sdk.utils import (
BadDsn,
Dsn,
safe_repr,
exceptions_from_error_tuple,
filename_for_module,
handle_in_app_impl,
iter_event_stacktraces,
)
from sentry_sdk._compat import text_type
try:
from hypothesis import given
im... | 26.724832 | 85 | 0.613511 |
b0a29d3c88c94adda1f94d7800b3c1a9ea479ece | 669 | bzl | Python | source/bazel/deps/tabulator/get.bzl | luxe/CodeLang-compiler | 78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a | [
"MIT"
] | 1 | 2019-01-06T08:45:46.000Z | 2019-01-06T08:45:46.000Z | source/bazel/deps/tabulator/get.bzl | luxe/CodeLang-compiler | 78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a | [
"MIT"
] | 264 | 2015-11-30T08:34:00.000Z | 2018-06-26T02:28:41.000Z | source/bazel/deps/tabulator/get.bzl | UniLang/compiler | c338ee92994600af801033a37dfb2f1a0c9ca897 | [
"MIT"
] | null | null | null | # Do not edit this file directly.
# It was auto-generated by: code/programs/reflexivity/reflexive_refresh
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
def tabulator():
http_archive(
name = "tabulator",
build_... | 39.352941 | 107 | 0.717489 |
1f2cf36850b03ec592c2bd9b5411a351e6555a81 | 6,404 | py | Python | src/centerline/geometry.py | fgabel/centerline | 91d130aa1b00bf759d81e12576f2c7bb92a6ce4c | [
"MIT"
] | 1 | 2021-05-22T02:25:22.000Z | 2021-05-22T02:25:22.000Z | src/centerline/geometry.py | fgabel/centerline | 91d130aa1b00bf759d81e12576f2c7bb92a6ce4c | [
"MIT"
] | null | null | null | src/centerline/geometry.py | fgabel/centerline | 91d130aa1b00bf759d81e12576f2c7bb92a6ce4c | [
"MIT"
] | 1 | 2021-07-15T00:19:46.000Z | 2021-07-15T00:19:46.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from numpy import array
from scipy.spatial import Voronoi
from shapely.geometry import LineString, MultiLineString, MultiPolygon, Polygon
from shapely.ops import unary_union
from multiprocessing import Pool
from . import exceptions
class Centerline(Mul... | 35.776536 | 82 | 0.683167 |
2e84ffc180cc31823016f984fc71e820a29c3396 | 174 | py | Python | iwitness/views.py | elishaking/i-witness | 09fe9f6db04fb64440c306e714a5233db31db23e | [
"Apache-2.0"
] | null | null | null | iwitness/views.py | elishaking/i-witness | 09fe9f6db04fb64440c306e714a5233db31db23e | [
"Apache-2.0"
] | 2 | 2021-06-08T20:53:14.000Z | 2021-06-10T22:31:47.000Z | iwitness/views.py | elishaking/i-witness | 09fe9f6db04fb64440c306e714a5233db31db23e | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
def index(request):
return render(request, 'index.html', {})
def privacy(request):
return render(request, 'privacy.html', {})
| 17.4 | 46 | 0.695402 |
f004eee278bd347f70ae428cb923c052f77bb10b | 1,482 | py | Python | awesome_panel/apps/lib_bokeh.py | Hoxbro/awesome-panel | 724ba0b2303d9cf1f76c5039f7bc65659f2598cf | [
"Apache-2.0"
] | null | null | null | awesome_panel/apps/lib_bokeh.py | Hoxbro/awesome-panel | 724ba0b2303d9cf1f76c5039f7bc65659f2598cf | [
"Apache-2.0"
] | null | null | null | awesome_panel/apps/lib_bokeh.py | Hoxbro/awesome-panel | 724ba0b2303d9cf1f76c5039f7bc65659f2598cf | [
"Apache-2.0"
] | null | null | null | """
The purpose of this app is to demonstrate that Panel works with the tools you know and love
❤️, including Bokeh. It supports both light and dark theme.
"""
import numpy as np
import panel as pn
from bokeh.plotting import figure
from scipy.integrate import odeint
from awesome_panel import config
conf... | 23.15625 | 98 | 0.580972 |
193bdee09e90f9a202565d3caad31518445db624 | 910 | py | Python | C/multiprocessing_start.py | liriqingone/IP_Agent | f562dfe1e4096ed8496767cffa2596704e285861 | [
"Apache-2.0"
] | null | null | null | C/multiprocessing_start.py | liriqingone/IP_Agent | f562dfe1e4096ed8496767cffa2596704e285861 | [
"Apache-2.0"
] | null | null | null | C/multiprocessing_start.py | liriqingone/IP_Agent | f562dfe1e4096ed8496767cffa2596704e285861 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import os
import inspect
import Tianyan_spiders
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
from multiprocessing.pool import Pool as ProcessPool
# 全量抓取类实例
full_spiders = []
all_spiders = [Tianyan_spiders]
def start(spider_cls):
try:
spide... | 21.162791 | 91 | 0.656044 |
42faf3691c0fd5c090ba1d185145815466c046e6 | 1,452 | py | Python | rippl/legislature/google_civics.py | gnmerritt/dailyrippl | 9a0f9615ba597a475dbd6305b589827cb2d97b03 | [
"MIT"
] | 6 | 2016-12-03T20:30:43.000Z | 2017-01-10T01:50:09.000Z | rippl/legislature/google_civics.py | gnmerritt/dailyrippl | 9a0f9615ba597a475dbd6305b589827cb2d97b03 | [
"MIT"
] | 24 | 2016-11-30T02:31:13.000Z | 2020-02-25T22:47:27.000Z | rippl/legislature/google_civics.py | gnmerritt/dailyrippl | 9a0f9615ba597a475dbd6305b589827cb2d97b03 | [
"MIT"
] | 1 | 2016-12-25T21:42:31.000Z | 2016-12-25T21:42:31.000Z | """Use Google Civics API to get all the details about """
import logging
import os
import requests
logger = logging.getLogger(__name__)
GOOGLE_API_KEY = os.getenv('GOOGLE_API_KEY')
base_url = 'https://www.googleapis.com/civicinfo/v2/representatives'
def get_reps_for_address(address):
"""Get representatives for... | 27.923077 | 79 | 0.665978 |
e83678404abacc8c4b5a9e7bf83e8545982f4805 | 8,837 | py | Python | LeNet2.py | gregtyminski/Traffic-Sign-Claassifier | 7e05817d49702ffb83882e9dd13e1d1ff90171d4 | [
"MIT"
] | 1 | 2019-12-27T04:14:30.000Z | 2019-12-27T04:14:30.000Z | LeNet2.py | gregtyminski/Traffic-Sign-Claassifier | 7e05817d49702ffb83882e9dd13e1d1ff90171d4 | [
"MIT"
] | null | null | null | LeNet2.py | gregtyminski/Traffic-Sign-Claassifier | 7e05817d49702ffb83882e9dd13e1d1ff90171d4 | [
"MIT"
] | null | null | null | import tensorflow as tf
import neptune
from tensorflow.contrib.layers import flatten
from traffic_sign_dataset import TrafficData
import tensorflow.contrib.slim as slim
from sklearn.utils import shuffle
class LeNet2():
def __repr__(self):
return 'LeNet2()'
def __init__(self, output_classes: int = 43)... | 41.683962 | 118 | 0.603372 |
85ccefc5be6ba870a4592323f4ed31aac009da3a | 14,941 | py | Python | tsim/core/network/lane.py | eduardomezencio/tsim | 60ac63152a98fd7dabb59c66367bca216e6a7370 | [
"MIT"
] | 2 | 2021-04-24T06:48:13.000Z | 2022-01-25T02:38:44.000Z | tsim/core/network/lane.py | eduardomezencio/tsim | 60ac63152a98fd7dabb59c66367bca216e6a7370 | [
"MIT"
] | null | null | null | tsim/core/network/lane.py | eduardomezencio/tsim | 60ac63152a98fd7dabb59c66367bca216e6a7370 | [
"MIT"
] | null | null | null | """Lane and related classes."""
from __future__ import annotations
from dataclasses import dataclass
from typing import TYPE_CHECKING, NamedTuple, Optional, Sequence, Tuple
from dataslots import with_slots
from tsim.core.entity import EntityRef
from tsim.core.geometry import Point, Vector, line_intersection
from ts... | 35.658711 | 79 | 0.621645 |
1ad028fa4d08ca338e0b66bc5e6c116957bacec5 | 26,923 | py | Python | Lib/socketserver.py | gerph/cpython | 98813cb03c2371789669c3d8debf8fca2a344de9 | [
"CNRI-Python-GPL-Compatible"
] | 6,660 | 2018-01-13T12:16:53.000Z | 2022-03-31T15:15:28.000Z | Lib/socketserver.py | gerph/cpython | 98813cb03c2371789669c3d8debf8fca2a344de9 | [
"CNRI-Python-GPL-Compatible"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | Lib/socketserver.py | gerph/cpython | 98813cb03c2371789669c3d8debf8fca2a344de9 | [
"CNRI-Python-GPL-Compatible"
] | 1,933 | 2018-01-15T13:08:40.000Z | 2022-03-31T11:28:59.000Z | """Generic socket server classes.
This module tries to capture the various aspects of defining a server:
For socket-based servers:
- address family:
- AF_INET{,6}: IP (Internet Protocol) sockets (default)
- AF_UNIX: Unix domain sockets
- others, e.g. AF_DECNET are conceivable (see <socket.h>
... | 32.913203 | 85 | 0.639305 |
0bb12f9d08d9f2c5cda88c896e9db92ed154d539 | 907 | py | Python | rake_app/views.py | idf/tagr | 9f68f1a46b412ef305df62c2e6f5349e9edd92c9 | [
"BSD-3-Clause"
] | 6 | 2015-06-24T16:56:54.000Z | 2018-07-23T14:05:42.000Z | rake_app/views.py | idf/tagr | 9f68f1a46b412ef305df62c2e6f5349e9edd92c9 | [
"BSD-3-Clause"
] | 2 | 2015-06-24T20:39:31.000Z | 2015-06-29T15:12:55.000Z | rake_app/views.py | idf/tagr | 9f68f1a46b412ef305df62c2e6f5349e9edd92c9 | [
"BSD-3-Clause"
] | null | null | null | import json
from django.http import HttpResponse
from django.shortcuts import render
from django.template.response import SimpleTemplateResponse
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import TemplateView, View
from rake import ... | 33.592593 | 79 | 0.708931 |
1e173f03cb840ccef5d696654b84bd4622d6e4eb | 1,923 | py | Python | _scraper.py | IdeaBot/web_scraper | ca0e2cdc10beef78fd9a781258ac0aff29eb17fc | [
"MIT"
] | null | null | null | _scraper.py | IdeaBot/web_scraper | ca0e2cdc10beef78fd9a781258ac0aff29eb17fc | [
"MIT"
] | 1 | 2019-02-26T17:59:46.000Z | 2019-02-26T17:59:46.000Z | _scraper.py | IdeaBot/web_scraper | ca0e2cdc10beef78fd9a781258ac0aff29eb17fc | [
"MIT"
] | null | null | null | import sys
sys.path.append('.\libs\scraperlibs')
import pageRet, fileIO, wordSearcher, findPosts, findDates, findTitle
class page:
'''For storing and retrieving pages, with lots of functions for manipulating them'''
def __init__(self, url):
self.search = wordSearcher.wordSearcher
self.raw = page... | 34.339286 | 103 | 0.594384 |
24f38c5eb00d37c0dd3b830540a0632178b7655d | 1,452 | py | Python | examples/sarsa_cartpole.py | stefanbschneider/keras-rl | 216c3145f3dc4d17877be26ca2185ce7db462bad | [
"MIT"
] | 3,350 | 2018-03-07T09:46:43.000Z | 2022-03-31T11:25:35.000Z | examples/sarsa_cartpole.py | stefanbschneider/keras-rl | 216c3145f3dc4d17877be26ca2185ce7db462bad | [
"MIT"
] | 223 | 2018-03-11T00:07:46.000Z | 2022-03-09T13:26:01.000Z | examples/sarsa_cartpole.py | stefanbschneider/keras-rl | 216c3145f3dc4d17877be26ca2185ce7db462bad | [
"MIT"
] | 1,007 | 2018-03-08T11:26:49.000Z | 2022-03-14T05:19:34.000Z | import numpy as np
import gym
from keras.models import Sequential
from keras.layers import Dense, Activation, Flatten
from keras.optimizers import Adam
from rl.agents import SARSAAgent
from rl.policy import BoltzmannQPolicy
ENV_NAME = 'CartPole-v0'
# Get the environment and extract the number of actions.
env = gym... | 30.25 | 93 | 0.769284 |
7745eb98894c3876f48f2458759062889233f122 | 4,158 | py | Python | evennia/help/manager.py | pakhnu/my-world | 405983dca81e70fc64d58d6a60126ffa5e8ada8c | [
"BSD-3-Clause"
] | null | null | null | evennia/help/manager.py | pakhnu/my-world | 405983dca81e70fc64d58d6a60126ffa5e8ada8c | [
"BSD-3-Clause"
] | null | null | null | evennia/help/manager.py | pakhnu/my-world | 405983dca81e70fc64d58d6a60126ffa5e8ada8c | [
"BSD-3-Clause"
] | null | null | null | """
Custom manager for HelpEntry objects.
"""
from django.db import models
from evennia.utils import logger, utils
__all__ = ("HelpEntryManager",)
class HelpEntryManager(models.Manager):
"""
This HelpEntryManager implements methods for searching
and manipulating HelpEntries directly from the database.
... | 28.479452 | 87 | 0.613516 |
909bc24e0f26fe2ae5708a4404335a8dc40d3dbb | 4,052 | py | Python | classifier_models/resnet.py | Qinaty/input-aware-backdoor-attack-release | ce897adf4a3ce0d2badbd2b53233561fee6c7db7 | [
"MIT"
] | 67 | 2020-10-17T05:04:17.000Z | 2022-03-31T07:16:51.000Z | classifier_models/resnet.py | Qinaty/input-aware-backdoor-attack-release | ce897adf4a3ce0d2badbd2b53233561fee6c7db7 | [
"MIT"
] | 3 | 2020-12-27T03:54:38.000Z | 2022-03-29T15:33:08.000Z | classifier_models/resnet.py | Qinaty/input-aware-backdoor-attack-release | ce897adf4a3ce0d2badbd2b53233561fee6c7db7 | [
"MIT"
] | 12 | 2020-10-20T20:16:10.000Z | 2021-12-29T07:35:53.000Z | """ResNet in PyTorch.
For Pre-activation ResNet, see 'preact_resnet.py'.
Reference:
[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
Deep Residual Learning for Image Recognition. arXiv:1512.03385
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
class BasicBlock(nn.Module):
expansi... | 31.905512 | 104 | 0.616486 |
f2737d1e6da0d1ab2341c4b68ec781bf6559ff28 | 3,416 | py | Python | backtrader/backtrader/utils/py3.py | harshabakku/live-back-testing-trader | 1fd69c7598dc15bea740f160eed886f396bcba2c | [
"MIT"
] | 1 | 2021-07-14T22:04:08.000Z | 2021-07-14T22:04:08.000Z | backtrader/backtrader/utils/py3.py | ajmal017/LiveBackTestingTrader | 8b4f5804c0aa6046128f6706582f9cde78a0519a | [
"MIT"
] | null | null | null | backtrader/backtrader/utils/py3.py | ajmal017/LiveBackTestingTrader | 8b4f5804c0aa6046128f6706582f9cde78a0519a | [
"MIT"
] | 3 | 2021-03-07T16:29:40.000Z | 2022-03-17T21:42:38.000Z | #!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2015, 2016, 2017 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Li... | 25.492537 | 79 | 0.631733 |
845313b8ff6fd95955dec1e812a8cc79a1584f8d | 40,078 | py | Python | dev/Tools/build/waf-1.7.13/lmbrwaflib/az_code_generator.py | akulamartin/lumberyard | 2d4be458a02845179be098e40cdc0c48f28f3b5a | [
"AML"
] | 2 | 2020-12-22T01:02:01.000Z | 2020-12-22T01:02:05.000Z | dev/Tools/build/waf-1.7.13/lmbrwaflib/az_code_generator.py | akulamartin/lumberyard | 2d4be458a02845179be098e40cdc0c48f28f3b5a | [
"AML"
] | null | null | null | dev/Tools/build/waf-1.7.13/lmbrwaflib/az_code_generator.py | akulamartin/lumberyard | 2d4be458a02845179be098e40cdc0c48f28f3b5a | [
"AML"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or... | 46.5482 | 266 | 0.640751 |
9194106f7566a893ad381ce9c114f6f26fbcec26 | 1,277 | py | Python | resources/trials/maya/deformerOrder.py | adrienparis/Gapalion | 35d66c2d0de05ffb493a4d8753f675999ff9eaab | [
"MIT"
] | null | null | null | resources/trials/maya/deformerOrder.py | adrienparis/Gapalion | 35d66c2d0de05ffb493a4d8753f675999ff9eaab | [
"MIT"
] | null | null | null | resources/trials/maya/deformerOrder.py | adrienparis/Gapalion | 35d66c2d0de05ffb493a4d8753f675999ff9eaab | [
"MIT"
] | null | null | null | #!/bin/env mayapy
# -- coding: utf-8 --
u"""Sur une propal de Yann GENTY le boss ♥
l'ordre des deformer doit être cluster, puis skinCluster, pour finir sur les blendShape
Si vous mettez des lattices, le test peut se perdre, et donc une vérification manuelle est nécessaire"""
__author__ = "Adrien PARIS"
__email__... | 27.76087 | 104 | 0.573218 |
c308169a9cfd95aa5e4f4f9613604699a06098dc | 540 | py | Python | core/manage.py | sieira/cineclub | 005f631cc04c92d58232529b58934734aee4c674 | [
"BSD-3-Clause"
] | null | null | null | core/manage.py | sieira/cineclub | 005f631cc04c92d58232529b58934734aee4c674 | [
"BSD-3-Clause"
] | null | null | null | core/manage.py | sieira/cineclub | 005f631cc04c92d58232529b58934734aee4c674 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cineclub.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are... | 33.75 | 73 | 0.687037 |
65bd05005a432e1c2f12ed5cb35be2e9557d07bf | 3,241 | py | Python | cerberus/tests/test_rule_excludes.py | pykler/cerberus | 8765b317442c002a84e556bd5d9677b868e6deb2 | [
"0BSD"
] | 2,020 | 2017-03-08T13:24:00.000Z | 2022-03-30T19:46:02.000Z | cerberus/tests/test_rule_excludes.py | pykler/cerberus | 8765b317442c002a84e556bd5d9677b868e6deb2 | [
"0BSD"
] | 281 | 2017-03-08T23:05:10.000Z | 2022-03-25T01:37:04.000Z | cerberus/tests/test_rule_excludes.py | pykler/cerberus | 8765b317442c002a84e556bd5d9677b868e6deb2 | [
"0BSD"
] | 171 | 2017-03-10T17:27:41.000Z | 2022-03-16T06:43:34.000Z | from pytest import mark
from cerberus import errors
from cerberus.tests import assert_fail, assert_success
@mark.parametrize(
("test_function", "document"),
[
(assert_success, {'this_field': {}}),
(assert_success, {'that_field': {}}),
(assert_success, {}),
(assert_fail, {'that... | 30.28972 | 87 | 0.547362 |
1f4a8e99328acc6db042e0aef4d9f6a3b034760d | 1,468 | py | Python | examples/tf/vpgis_inverted_pendulum.py | icml2020submission6857/metarl | 9b66cefa2b6bcb6a38096d629ce8853b47c7171d | [
"MIT"
] | 2 | 2020-03-15T14:35:15.000Z | 2021-02-15T16:38:00.000Z | examples/tf/vpgis_inverted_pendulum.py | icml2020submission6857/metarl | 9b66cefa2b6bcb6a38096d629ce8853b47c7171d | [
"MIT"
] | null | null | null | examples/tf/vpgis_inverted_pendulum.py | icml2020submission6857/metarl | 9b66cefa2b6bcb6a38096d629ce8853b47c7171d | [
"MIT"
] | 1 | 2020-02-24T03:04:23.000Z | 2020-02-24T03:04:23.000Z | #!/usr/bin/env python3
"""Example using VPG with ISSampler.
Iterations alternate between live and importance sampled iterations.
"""
import gym
from metarl.envs import normalize
from metarl.experiment import run_experiment
from metarl.np.baselines import LinearFeatureBaseline
from metarl.sampler import ISSampler
from... | 26.690909 | 76 | 0.666894 |
6b064ca582cfbfdf87ddb61570fda368f89034d5 | 9,454 | py | Python | tests/select_related_regress/tests.py | jarvys/django-1.7-jdb | c5c68d2c5d96004e869fbcfda21f42932cab3dc8 | [
"BSD-3-Clause"
] | null | null | null | tests/select_related_regress/tests.py | jarvys/django-1.7-jdb | c5c68d2c5d96004e869fbcfda21f42932cab3dc8 | [
"BSD-3-Clause"
] | null | null | null | tests/select_related_regress/tests.py | jarvys/django-1.7-jdb | c5c68d2c5d96004e869fbcfda21f42932cab3dc8 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from django.test import TestCase
from django.utils import six
from .models import (Building, Child, Device, Port, Item, Country, Connection,
ClientStatus, State, Client, SpecialClient, TUser, Person, Student,
Organizer, Class, Enrollment, Hen, Chick, A, B, C)
class Se... | 47.034826 | 131 | 0.656442 |
48a239c1f371cf052f430b49a4196bff0f793668 | 3,050 | py | Python | app.py | JohnCSW/simple-rest-api | 835f44d4b220ba914daaab7938a515bb8b3d029c | [
"MIT"
] | null | null | null | app.py | JohnCSW/simple-rest-api | 835f44d4b220ba914daaab7938a515bb8b3d029c | [
"MIT"
] | null | null | null | app.py | JohnCSW/simple-rest-api | 835f44d4b220ba914daaab7938a515bb8b3d029c | [
"MIT"
] | null | null | null | from flask import Flask, request
from common.entity_serializer import serialize_entity
from repo.base_repo import BaseRepo
from repo.product_repo import ProductRepo
from repo.query.customer_query_builder import CustomerQueryBuilder
from repo.query.employee_query_builder import EmployeeQueryBuilder
from repo.query.orde... | 35.465116 | 263 | 0.702623 |
8cd6d56a9c05a4babcf89961392e490e12e62ac2 | 1,017 | py | Python | tljh/hooks.py | jzf2101/the-littlest-jupyterhub | bdfc390c705c8e017c22f389fe419e8e7fc34e6c | [
"BSD-3-Clause"
] | 1 | 2019-02-14T04:54:00.000Z | 2019-02-14T04:54:00.000Z | tljh/hooks.py | jzf2101/the-littlest-jupyterhub | bdfc390c705c8e017c22f389fe419e8e7fc34e6c | [
"BSD-3-Clause"
] | null | null | null | tljh/hooks.py | jzf2101/the-littlest-jupyterhub | bdfc390c705c8e017c22f389fe419e8e7fc34e6c | [
"BSD-3-Clause"
] | 1 | 2019-02-14T04:54:09.000Z | 2019-02-14T04:54:09.000Z | """
Hook specifications that pluggy plugins can override
"""
import pluggy
hookspec = pluggy.HookspecMarker('tljh')
hookimpl = pluggy.HookimplMarker('tljh')
@hookspec
def tljh_extra_user_conda_packages():
"""
Return list of extra conda packages to install in user environment.
"""
pass
@hookspec
def... | 22.108696 | 73 | 0.713864 |
9b6c7ae515031c09cbad1b5a888c37a12771ba85 | 210 | py | Python | jobs/admin.py | Manasranjanpati/Jobpost | e5654129538e70cedf8aafc65c1b0289a01535e5 | [
"MIT"
] | 20 | 2018-05-04T18:42:35.000Z | 2021-03-18T07:15:12.000Z | src/jobs/admin.py | fleepgeek/django-jobsite | d9547c4ee85751677ba6458380b609973c3b4a8d | [
"MIT"
] | 5 | 2020-02-11T22:22:33.000Z | 2021-06-10T20:18:05.000Z | jobs/admin.py | Manasranjanpati/Jobpost | e5654129538e70cedf8aafc65c1b0289a01535e5 | [
"MIT"
] | 8 | 2018-05-04T19:03:23.000Z | 2020-09-23T00:24:46.000Z | from django.contrib import admin
from .models import Job, Application
class JobAdmin(admin.ModelAdmin):
readonly_fields = ('voucher',)
admin.site.register(Job, JobAdmin)
admin.site.register(Application) | 21 | 36 | 0.780952 |
ff60b582b84f5c73838bd3bfc2474b53ac057c11 | 2,828 | py | Python | nbp_conversion.py | fri-it2/nbp | 920fad740aef9dbea989547e365cf9a8636c1105 | [
"MIT"
] | 1 | 2019-10-28T10:16:30.000Z | 2019-10-28T10:16:30.000Z | nbp_conversion.py | fri-it2/nbp | 920fad740aef9dbea989547e365cf9a8636c1105 | [
"MIT"
] | 3 | 2021-06-08T21:50:11.000Z | 2022-01-13T02:53:34.000Z | nbp_conversion.py | fri-it2/nbp | 920fad740aef9dbea989547e365cf9a8636c1105 | [
"MIT"
] | null | null | null | import string
import pdb
import numpy as np
chs = string.digits + string.ascii_uppercase
chs_len=len(chs)
def convert36ToAscii(start, chs):
"""Convert decimal address to ascci address
:param start: NBP adress in decimal reverse:Big Endian Byte Order: The most significant byte (the "big end") of the data is pla... | 25.25 | 170 | 0.667963 |
1a3565fc650d328a9375720173ff2141ff253814 | 455 | py | Python | examples/Motor/Motor_move_to_absolute_position.py | NStrijbosch/Robot-Inventor-SPIKE-Prime-hub2hub | b46d19ce138749dbe60e2ac7869c9fd9e4454d7e | [
"MIT"
] | 2 | 2021-09-12T16:53:26.000Z | 2022-01-23T00:36:09.000Z | examples/Motor/Motor_move_to_absolute_position.py | NStrijbosch/Robot-Inventor-SPIKE-Prime-hub2hub | b46d19ce138749dbe60e2ac7869c9fd9e4454d7e | [
"MIT"
] | 2 | 2021-05-16T14:00:20.000Z | 2022-02-17T20:41:12.000Z | examples/Motor/Motor_move_to_absolute_position.py | NStrijbosch/hub2hub | b46d19ce138749dbe60e2ac7869c9fd9e4454d7e | [
"MIT"
] | null | null | null | from hub2hub import TechnicHub, ble_handler
from time import sleep_ms
# Initialize ble handler and a technic hub
ble = ble_handler()
Thub = TechnicHub(ble)
# connect to a technic hub: press green button on the technic hub
Thub.connect()
# Servo motor connected to port A
Motor = Thub.port.A.motor
# move to 180 degre... | 22.75 | 65 | 0.769231 |
0cb403a84a3041156619302fb95467a05e194275 | 902 | py | Python | win64-postgresql/pgAdmin 4/web/pgadmin/utils/html.py | vnetcon/curvy | ed3749bd5d298c7ab6c0625de91c211d6da4c762 | [
"Apache-2.0"
] | null | null | null | win64-postgresql/pgAdmin 4/web/pgadmin/utils/html.py | vnetcon/curvy | ed3749bd5d298c7ab6c0625de91c211d6da4c762 | [
"Apache-2.0"
] | 3 | 2021-09-02T15:51:44.000Z | 2022-03-02T09:53:17.000Z | win64-postgresql/pgAdmin 4/web/pgadmin/utils/html.py | vnetcon/curvy | ed3749bd5d298c7ab6c0625de91c211d6da4c762 | [
"Apache-2.0"
] | null | null | null | ##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2020, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
#########################################################################
"""Utilities for H... | 25.055556 | 74 | 0.456763 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.