hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1cc6430aae49409753e53072d72074d4e901e4 | 61 | py | Python | data_processing/__init__.py | JHorcasitas/cnn_document_binarization | 075f76aed375ca14a53011f4dfeb12379debb5b3 | [
"MIT"
] | 9 | 2019-07-21T18:00:27.000Z | 2020-08-21T08:26:30.000Z | data_processing/__init__.py | JHorcasitas/cnn_document_binarization | 075f76aed375ca14a53011f4dfeb12379debb5b3 | [
"MIT"
] | 2 | 2019-10-30T09:05:56.000Z | 2020-09-18T10:41:34.000Z | data_processing/__init__.py | JHorcasitas/cnn_document_binarization | 075f76aed375ca14a53011f4dfeb12379debb5b3 | [
"MIT"
] | 3 | 2019-07-22T15:04:11.000Z | 2021-06-21T09:38:56.000Z | from .trainer import Trainer
from .evaluator import Evaluator | 30.5 | 32 | 0.852459 |
4a1cc8292b3d717a28a5660d68c8047587cfa037 | 940 | py | Python | rolz_bot/extensions/choose.py | Reriiru/rolz_org_to_discord | caf860585c551d85729b2d9661e8d801750a7aa5 | [
"MIT"
] | 1 | 2021-04-15T04:14:55.000Z | 2021-04-15T04:14:55.000Z | rolz_bot/extensions/choose.py | Reriiru/rolz_org_to_discord | caf860585c551d85729b2d9661e8d801750a7aa5 | [
"MIT"
] | null | null | null | rolz_bot/extensions/choose.py | Reriiru/rolz_org_to_discord | caf860585c551d85729b2d9661e8d801750a7aa5 | [
"MIT"
] | 2 | 2017-11-05T02:34:35.000Z | 2017-11-20T06:00:06.000Z | import discord
import rolz_bot.format_responses as format_responses
from discord.ext import commands
from rolz_bot.roller import Roller
class Choose(Roller):
@commands.command(name='choose')
async def choose(self, *variants: str):
'''Picks between your variants.'''
return_variants ... | 31.333333 | 78 | 0.62766 |
4a1cc85ba1df64c28dcffbc0e7cd28446034d0ee | 7,160 | py | Python | tests/test_authentication.py | codingedward/book-a-meal-api | 36756abc225bf7e8306330f2c3e223dc32af7869 | [
"MIT"
] | null | null | null | tests/test_authentication.py | codingedward/book-a-meal-api | 36756abc225bf7e8306330f2c3e223dc32af7869 | [
"MIT"
] | null | null | null | tests/test_authentication.py | codingedward/book-a-meal-api | 36756abc225bf7e8306330f2c3e223dc32af7869 | [
"MIT"
] | 2 | 2018-10-01T17:45:19.000Z | 2020-12-07T13:48:25.000Z | import json
from app import create_app, db
from app.models import User, UserType
from .base import BaseTest
class AuthenticationTestCase(BaseTest):
"""This will test authentication endpoints"""
def setUp(self):
self.app = create_app(config_name='testing')
self.client = self.app.test_client()
... | 33.302326 | 74 | 0.574441 |
4a1cc8f990467348a10504b8eed55901dcef38b9 | 631 | py | Python | home_server/manage.py | dkoleber/WebcamOracle | 972f86b7ea341adcee6b068c537296e0d51d6b51 | [
"Unlicense"
] | 2 | 2019-11-02T06:22:44.000Z | 2021-04-22T09:47:55.000Z | home_server/manage.py | dkoleber/WebcamOracle | 972f86b7ea341adcee6b068c537296e0d51d6b51 | [
"Unlicense"
] | null | null | null | home_server/manage.py | dkoleber/WebcamOracle | 972f86b7ea341adcee6b068c537296e0d51d6b51 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'home_server.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Im... | 28.681818 | 75 | 0.684628 |
4a1cc90f6e7490311a0d14e802bb4afed741c594 | 8,303 | py | Python | tests/test_utils/test_registry.py | DmitriySidnev/mmcv | 54ece10ffb144f572c1527b42072f6f925ff4bdf | [
"Apache-2.0"
] | 1 | 2019-05-31T14:01:25.000Z | 2019-05-31T14:01:25.000Z | tests/test_utils/test_registry.py | DmitriySidnev/mmcv | 54ece10ffb144f572c1527b42072f6f925ff4bdf | [
"Apache-2.0"
] | 10 | 2020-10-15T19:31:38.000Z | 2021-03-21T16:16:28.000Z | tests/test_utils/test_registry.py | DmitriySidnev/mmcv | 54ece10ffb144f572c1527b42072f6f925ff4bdf | [
"Apache-2.0"
] | 1 | 2019-12-14T12:12:48.000Z | 2019-12-14T12:12:48.000Z | import pytest
import mmcv
def test_registry():
CATS = mmcv.Registry('cat')
assert CATS.name == 'cat'
assert CATS.module_dict == {}
assert len(CATS) == 0
@CATS.register_module()
class BritishShorthair:
pass
assert len(CATS) == 1
assert CATS.get('BritishShorthair') is BritishS... | 29.653571 | 79 | 0.650488 |
4a1cc91f7a79f64961cfd40498ca41638157a94e | 10,123 | py | Python | cleepcli/ci.py | tangb/cleep-cli | 9b6c2c1673a20c95b7bc8e735b25ef892676ef1d | [
"MIT"
] | null | null | null | cleepcli/ci.py | tangb/cleep-cli | 9b6c2c1673a20c95b7bc8e735b25ef892676ef1d | [
"MIT"
] | null | null | null | cleepcli/ci.py | tangb/cleep-cli | 9b6c2c1673a20c95b7bc8e735b25ef892676ef1d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import zipfile
import os
import glob
import re
import requests
import time
from . import config
from .console import Console
from .check import Check
import subprocess
class Ci():
"""
Continuous Integration helpers
"""
EXTRACT_DIR = '/root/... | 45.599099 | 167 | 0.588462 |
4a1cc9626a456b32c380bc40b5e5ffafd9664071 | 3,070 | py | Python | examples/mail/Contacts.py | allbuttonspressed/pyjs | c726fdead530eb63ee4763ae15daaa58d84cd58f | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-09-19T09:14:16.000Z | 2018-09-19T09:14:16.000Z | examples/mail/Contacts.py | andreyvit/pyjamas | 1154abe3340a84dba7530b8174aaddecfc1a0944 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | examples/mail/Contacts.py | andreyvit/pyjamas | 1154abe3340a84dba7530b8174aaddecfc1a0944 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-11-18T14:17:59.000Z | 2019-11-18T14:17:59.000Z | from pyjamas.ui.Composite import Composite
from pyjamas.ui.HTML import HTML
from pyjamas.ui.HorizontalPanel import HorizontalPanel
from pyjamas.ui.Image import Image
from pyjamas.ui.PopupPanel import PopupPanel
from pyjamas.ui.VerticalPanel import VerticalPanel
from pyjamas.ui.Widget import Widget
from pyjamas.ui.Label... | 35.697674 | 110 | 0.652769 |
4a1ccad92599942ce163d63e0910094a2206bf7e | 4,356 | py | Python | fibo.py | loopspace/fibonacci_spirals | 9e72290fe519c340808572e897bf3084869d58d1 | [
"CC0-1.0"
] | null | null | null | fibo.py | loopspace/fibonacci_spirals | 9e72290fe519c340808572e897bf3084869d58d1 | [
"CC0-1.0"
] | null | null | null | fibo.py | loopspace/fibonacci_spirals | 9e72290fe519c340808572e897bf3084869d58d1 | [
"CC0-1.0"
] | null | null | null | import subprocess
import math
import argparse
import platform
parser = argparse.ArgumentParser(description="Generate a Fibonacci spiral")
parser.add_argument('-l','--lua',help="Use lualatex to compile document", action="store_true")
parser.add_argument('-x','--xe',help="Use xelatex to compile document", action="store... | 30.676056 | 139 | 0.601928 |
4a1ccc86f1c9820e18f3333448927b005b57a7de | 439 | py | Python | pickle/pickle.py | AEMICS/pycopy-lib | 56f4436123e30be9928662361098a71cae82eecc | [
"PSF-2.0"
] | 126 | 2019-07-19T14:42:41.000Z | 2022-03-21T22:22:19.000Z | pickle/pickle.py | AEMICS/pycopy-lib | 56f4436123e30be9928662361098a71cae82eecc | [
"PSF-2.0"
] | 38 | 2019-08-28T01:46:31.000Z | 2022-03-17T05:46:51.000Z | pickle/pickle.py | AEMICS/pycopy-lib | 56f4436123e30be9928662361098a71cae82eecc | [
"PSF-2.0"
] | 55 | 2019-08-02T09:32:33.000Z | 2021-12-22T11:25:51.000Z | HIGHEST_PROTOCOL = 0
def dump(obj, f, protocol=0):
f.write(repr(obj))
def dumps(obj, protocol=0):
return repr(obj).encode()
def load(f):
s = f.read()
return loads(s)
def loads(s):
d = {}
s = s.decode()
if "(" in s:
qualname = s.split("(", 1)[0]
if "." in qualname:
... | 19.086957 | 44 | 0.501139 |
4a1ccc9fd019f07f2b8cf725a888dbefd5dd1792 | 30,935 | py | Python | secv_guis/bimask_app/main_window.py | pshobowale/secv-guis | d916ae2c0bebc5d99a8f08052133b7e536bff231 | [
"MIT"
] | 3 | 2020-03-31T23:32:25.000Z | 2020-11-10T09:32:03.000Z | secv_guis/bimask_app/main_window.py | pshobowale/secv-guis | d916ae2c0bebc5d99a8f08052133b7e536bff231 | [
"MIT"
] | 2 | 2021-03-20T00:04:26.000Z | 2021-05-29T18:43:25.000Z | secv_guis/bimask_app/main_window.py | pshobowale/secv-guis | d916ae2c0bebc5d99a8f08052133b7e536bff231 | [
"MIT"
] | 1 | 2021-03-19T23:44:37.000Z | 2021-03-19T23:44:37.000Z | # -*- coding:utf-8 -*-
"""
This module contains the logic and widgets pertaining to the main window
of the bimask app: An app that allows displaying an image, editing a mask
on it and also displaying/editing a preannotation mask.
It can be used to efficiently annotate large images with pixel precision.
Check instruc... | 41.301736 | 92 | 0.613997 |
4a1ccd2e74aae1ada96fbc6848346a134fba3da8 | 2,767 | py | Python | RainMachineDev.indigoPlugin/Contents/Server Plugin/controller.py | geoffsharris/Indigo-Rainmachine | 375d93ae7ee66a8c3037df17022f46168bf832a1 | [
"MIT"
] | null | null | null | RainMachineDev.indigoPlugin/Contents/Server Plugin/controller.py | geoffsharris/Indigo-Rainmachine | 375d93ae7ee66a8c3037df17022f46168bf832a1 | [
"MIT"
] | 5 | 2020-12-16T18:18:00.000Z | 2021-05-24T15:42:26.000Z | RainMachineDev.indigoPlugin/Contents/Server Plugin/controller.py | geoffsharris/Indigo-Rainmachine | 375d93ae7ee66a8c3037df17022f46168bf832a1 | [
"MIT"
] | null | null | null | """Define a RainMachine controller class."""
from datetime import datetime, timedelta
from program import Program
from provision import Provision
from zone import Zone
from watering import Watering
URL_BASE_LOCAL = 'https://{}:{}/api/4'
URL_BASE_REMOTE = 'https://api.rainmachine.com/{}/api/4'
class Controller: #... | 32.940476 | 109 | 0.637875 |
4a1ccfb1295319b59de0720edb0c4a91725b5a21 | 272 | py | Python | BOJ_Solved/BOJ-1003.py | CodingLeeSeungHoon/Python_Algorithm_TeamNote | 1e92986999b45aa9951e12e67b23062e410e9b36 | [
"MIT"
] | 7 | 2021-11-19T14:50:59.000Z | 2022-02-25T20:00:20.000Z | BOJ_Solved/BOJ-1003.py | CodingLeeSeungHoon/Python_Algorithm_TeamNote | 1e92986999b45aa9951e12e67b23062e410e9b36 | [
"MIT"
] | null | null | null | BOJ_Solved/BOJ-1003.py | CodingLeeSeungHoon/Python_Algorithm_TeamNote | 1e92986999b45aa9951e12e67b23062e410e9b36 | [
"MIT"
] | null | null | null | """
백준 1003번 : 피보나치 함수
"""
T = int(input( ))
zero = [1, 0, 1]
one = [0, 1, 1]
for i in range(3, 41):
zero.append(one[i - 1])
one.append(one[i - 1] + zero[i - 1])
for _ in range(T):
number = int(input( ))
print("{} {}".format(zero[number], one[number])) | 17 | 52 | 0.514706 |
4a1ccfd5d0a17686cc05a63478d7a5dc2504340b | 3,421 | py | Python | tests/test_update.py | quantus/sqlalchemy-continuum | 1453888e4e696dac835f8b907b7f819433b27e6c | [
"BSD-3-Clause"
] | null | null | null | tests/test_update.py | quantus/sqlalchemy-continuum | 1453888e4e696dac835f8b907b7f819433b27e6c | [
"BSD-3-Clause"
] | null | null | null | tests/test_update.py | quantus/sqlalchemy-continuum | 1453888e4e696dac835f8b907b7f819433b27e6c | [
"BSD-3-Clause"
] | null | null | null | import sqlalchemy as sa
from tests import TestCase
class TestUpdate(TestCase):
def test_creates_versions_on_update(self):
article = self.Article()
article.name = u'Some article'
article.content = u'Some content'
self.session.add(article)
self.session.commit()
artic... | 32.273585 | 77 | 0.625256 |
4a1cd2e25ae1742d83024490fe0b89865168ebd9 | 1,927 | py | Python | Integer to Roman.py | sugia/leetcode | 6facec2a54d1d9f133f420c9bce1d1043f57ebc6 | [
"Apache-2.0"
] | null | null | null | Integer to Roman.py | sugia/leetcode | 6facec2a54d1d9f133f420c9bce1d1043f57ebc6 | [
"Apache-2.0"
] | null | null | null | Integer to Roman.py | sugia/leetcode | 6facec2a54d1d9f133f420c9bce1d1043f57ebc6 | [
"Apache-2.0"
] | null | null | null | '''
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just two one's added together. Twelve is... | 31.080645 | 345 | 0.57862 |
4a1cd3174fb23a25a00689c66f35dd83df025888 | 1,021 | py | Python | models/bert.py | XJay18/ChineseTextClassification | 0920af34f68830b842fd6a246d1ee72183fe23d6 | [
"MIT"
] | null | null | null | models/bert.py | XJay18/ChineseTextClassification | 0920af34f68830b842fd6a246d1ee72183fe23d6 | [
"MIT"
] | null | null | null | models/bert.py | XJay18/ChineseTextClassification | 0920af34f68830b842fd6a246d1ee72183fe23d6 | [
"MIT"
] | null | null | null | import torch.nn as nn
from transformers import BertTokenizer, BertModel
PRETRAINED_WEIGHTS = "bert-base-chinese"
class BERT(nn.Module):
def __init__(self, weights=None, hidden_state=768, num_classes=2):
super(BERT, self).__init__()
self.tokenizer = BertTokenizer.from_pretrained(PRETRAINED_WEIGHTS... | 32.935484 | 74 | 0.670911 |
4a1cd38fdd2e6e1cd83ef42380209e021718c22e | 857 | py | Python | mysite/mysite/urls.py | elexihuanchifan/hellopy | ee51c0eefca7136b5dca30679117d7d6ecd87d7a | [
"MIT"
] | null | null | null | mysite/mysite/urls.py | elexihuanchifan/hellopy | ee51c0eefca7136b5dca30679117d7d6ecd87d7a | [
"MIT"
] | null | null | null | mysite/mysite/urls.py | elexihuanchifan/hellopy | ee51c0eefca7136b5dca30679117d7d6ecd87d7a | [
"MIT"
] | null | null | null | """mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-base... | 34.28 | 79 | 0.689615 |
4a1cd56daf7433b1b7603fc04015651eea3fd07d | 14,313 | py | Python | inception.py | phymhan/ACGAN-PyTorch | 36dca717ddcac37e77c6ecfe04e6d66575a02555 | [
"MIT"
] | null | null | null | inception.py | phymhan/ACGAN-PyTorch | 36dca717ddcac37e77c6ecfe04e6d66575a02555 | [
"MIT"
] | null | null | null | inception.py | phymhan/ACGAN-PyTorch | 36dca717ddcac37e77c6ecfe04e6d66575a02555 | [
"MIT"
] | 1 | 2020-06-16T04:00:18.000Z | 2020-06-16T04:00:18.000Z | ''' Inception utilities
This file contains methods for calculating IS and FID, using either
the original numpy code or an accelerated fully-pytorch version that
uses a fast newton-schulz approximation for the matrix sqrt. There are also
methods for acquiring a desired number of samples from the Generato... | 41.973607 | 112 | 0.638301 |
4a1cd63af0fcc0e8a9fc9bc2b733cb8bdfa995a2 | 751 | py | Python | userbot/modules/sql_helper/gmute_sql.py | jefanya14/Bot | 2166a9cce2a595dd4dbe08f09c036c3757c1f25b | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-11-28T16:04:59.000Z | 2021-11-28T16:04:59.000Z | userbot/modules/sql_helper/gmute_sql.py | jefanya14/Bot | 2166a9cce2a595dd4dbe08f09c036c3757c1f25b | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 5 | 2021-11-28T21:14:32.000Z | 2021-11-29T09:20:22.000Z | userbot/modules/sql_helper/gmute_sql.py | jefanya14/Bot | 2166a9cce2a595dd4dbe08f09c036c3757c1f25b | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-11-29T05:25:48.000Z | 2021-11-29T05:25:48.000Z | try:
from userbot.modules.sql_helper import BASE, SESSION
except ImportError:
raise AttributeError
from sqlalchemy import Column, String
class GMute(BASE):
__tablename__ = "gmute"
sender = Column(String(14), primary_key=True)
def __init__(self, sender):
self.sender = str(sender)
GMute.... | 18.775 | 56 | 0.664447 |
4a1cd8ae8989c0b74f43df575ac55d331929527c | 125 | py | Python | jointly/__init__.py | enra64/jointly-1 | 002665e6728dc1dac6a59b7fd0f24456f15ceeba | [
"MIT"
] | null | null | null | jointly/__init__.py | enra64/jointly-1 | 002665e6728dc1dac6a59b7fd0f24456f15ceeba | [
"MIT"
] | null | null | null | jointly/__init__.py | enra64/jointly-1 | 002665e6728dc1dac6a59b7fd0f24456f15ceeba | [
"MIT"
] | null | null | null | from .abstract_extractor import *
from .shake_extractor import *
from .segment_selector import *
from .synchronizer import *
| 25 | 33 | 0.808 |
4a1cda8c090e7d4b214270515c76796db5a79656 | 3,527 | py | Python | g2p_project/g2p/views.py | Vivaq/g2p | a92e37835851abba12985614aa52e80179025aa3 | [
"BSD-2-Clause"
] | 1 | 2015-10-02T12:01:17.000Z | 2015-10-02T12:01:17.000Z | g2p_project/g2p/views.py | Vivaq/g2p | a92e37835851abba12985614aa52e80179025aa3 | [
"BSD-2-Clause"
] | null | null | null | g2p_project/g2p/views.py | Vivaq/g2p | a92e37835851abba12985614aa52e80179025aa3 | [
"BSD-2-Clause"
] | null | null | null | #-*- coding: utf-8 -*-
import json
from itertools import product
from django.shortcuts import render_to_response, render
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from g2p.forms import DocumentForm
import sqlite3
import os
from g... | 37.126316 | 119 | 0.576978 |
4a1cdac65cb961179083c83aeeec50d4b843449e | 7,384 | py | Python | mujoco/vail/main.py | amy12xx/lets-do-irl | fd469e9fb7426e41b07c83ce4b87962ac3543b1e | [
"MIT"
] | 408 | 2019-02-06T00:31:28.000Z | 2022-03-31T03:21:44.000Z | mujoco/vail/main.py | LeeonTree/lets-do-irl | 2ce7496dddf95e9e9f418817150108bd66d65407 | [
"MIT"
] | 5 | 2020-02-05T04:03:47.000Z | 2021-08-21T01:30:57.000Z | mujoco/vail/main.py | LeeonTree/lets-do-irl | 2ce7496dddf95e9e9f418817150108bd66d65407 | [
"MIT"
] | 81 | 2019-02-23T20:46:18.000Z | 2022-03-24T17:43:02.000Z | import os
import gym
import pickle
import argparse
import numpy as np
from collections import deque
import torch
import torch.optim as optim
from tensorboardX import SummaryWriter
from utils.utils import *
from utils.zfilter import ZFilter
from model import Actor, Critic, VDB
from train_model import train_actor_crit... | 40.130435 | 101 | 0.609832 |
4a1cdce4dabe63a150279b3a593d4830ed33681a | 11,232 | py | Python | deals/tests/deals_data.py | xuppr/GameDealsDashboard-server | a15e90fe6a37431db1b4de565e9e7d54d2aee223 | [
"MIT"
] | null | null | null | deals/tests/deals_data.py | xuppr/GameDealsDashboard-server | a15e90fe6a37431db1b4de565e9e7d54d2aee223 | [
"MIT"
] | null | null | null | deals/tests/deals_data.py | xuppr/GameDealsDashboard-server | a15e90fe6a37431db1b4de565e9e7d54d2aee223 | [
"MIT"
] | null | null | null | mock_data = [{
"internalName": "DEUSEXHUMANREVOLUTIONDIRECTORSCUT",
"title": "Deus Ex: Human Revolution - Director's Cut",
"metacriticLink": "\/game\/pc\/deus-ex-human-revolution---directors-cut",
"dealID": "mU%2FbH6z0MsHtcyqBBnv1C29aei%2FU0ZcsW0tNaZjC3xQ%3D",
"storeID": "11",
"gameID": "102249"... | 34.990654 | 159 | 0.625623 |
4a1cdff5b505ccf761d6fd53c76d7ac0f82c6ee0 | 15,187 | py | Python | cellpack/mgl_tools/DejaVu/GleObjects.py | mesoscope/cellpack | ec6b736fc706c1fae16392befa814b5337a3a692 | [
"MIT"
] | null | null | null | cellpack/mgl_tools/DejaVu/GleObjects.py | mesoscope/cellpack | ec6b736fc706c1fae16392befa814b5337a3a692 | [
"MIT"
] | 21 | 2021-10-02T00:07:05.000Z | 2022-03-30T00:02:10.000Z | cellpack/mgl_tools/DejaVu/GleObjects.py | mesoscope/cellpack | ec6b736fc706c1fae16392befa814b5337a3a692 | [
"MIT"
] | null | null | null | ## Automatically adapted for numpy.oldnumeric Jul 23, 2007 by
#############################################################################
#
# Author: Michel F. SANNER, Sophie Coon
#
# Copyright: M. Sanner TSRI 2000
#
#############################################################################
# $Header: /opt/cvs/p... | 33.159389 | 107 | 0.558833 |
4a1ce02fb3cf3d3e1fe0dd1c77a8cb96ca34981c | 1,593 | py | Python | src/main/py/com/example/sql/sql-s3a-read.py | brijeshdhaker/spark-python-examples | bb3504d21c073448c336c228f74449de68853b8d | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-07-18T16:23:56.000Z | 2021-07-18T16:23:56.000Z | src/main/py/com/example/sql/sql-s3a-read.py | brijeshdhaker/spark-python-examples | bb3504d21c073448c336c228f74449de68853b8d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/main/py/com/example/sql/sql-s3a-read.py | brijeshdhaker/spark-python-examples | bb3504d21c073448c336c228f74449de68853b8d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import src.utils.commons as commons
from pyspark import SparkConf, SparkContext
from pyspark.sql import SparkSession
from pyspark.sql.types import StructType, StructField, StringType, IntegerType
conf = (
SparkConf()
.setAppName("Spark minIO Test")
.set("spark.eventLog.enabled", "true")
.se... | 37.928571 | 88 | 0.691149 |
4a1ce1376b43f9c4f13bc00b339cabc965673dad | 143,559 | py | Python | env/lib/python3.6/site-packages/pygments/lexers/lisp.py | DivyaSDV/pySINDy | e7cba8f983e083ef8cdce66c7c1572276717b225 | [
"MIT"
] | 69 | 2019-02-18T12:07:35.000Z | 2022-03-12T10:38:32.000Z | env/lib/python3.6/site-packages/pygments/lexers/lisp.py | DivyaSDV/pySINDy | e7cba8f983e083ef8cdce66c7c1572276717b225 | [
"MIT"
] | 12 | 2018-12-06T22:06:49.000Z | 2022-02-25T17:40:44.000Z | env/lib/python3.6/site-packages/pygments/lexers/lisp.py | DivyaSDV/pySINDy | e7cba8f983e083ef8cdce66c7c1572276717b225 | [
"MIT"
] | 28 | 2019-03-22T01:07:13.000Z | 2022-02-21T16:38:27.000Z | # -*- coding: utf-8 -*-
"""
pygments.lexers.lisp
~~~~~~~~~~~~~~~~~~~~
Lexers for Lispy languages.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, words, default
from... | 53.288419 | 89 | 0.57577 |
4a1ce168c298d2173270cc1f9401d8ad6b2c7eb2 | 32 | py | Python | src/lavatory/__init__.py | sijis/lavatory | 4560adc45539cde061c9077205a0b7e0c0b353d6 | [
"Apache-2.0"
] | 25 | 2017-10-30T21:22:32.000Z | 2021-05-21T19:44:29.000Z | src/lavatory/__init__.py | sijis/lavatory | 4560adc45539cde061c9077205a0b7e0c0b353d6 | [
"Apache-2.0"
] | 26 | 2017-10-30T17:37:12.000Z | 2020-09-24T10:54:24.000Z | src/lavatory/__init__.py | gogoair/artifactorypurge | 37eba1c403b0e6707748d0538e01d6efb23c6289 | [
"Apache-2.0"
] | 10 | 2018-08-01T19:48:28.000Z | 2020-08-23T18:02:41.000Z | from . import exceptions, utils
| 16 | 31 | 0.78125 |
4a1ce1eece6896baee2e013279b4cc4cf4526fc2 | 1,163 | py | Python | fileprocessor/abstracts.py | ahlusar1989/fileprocessor | ad8557e86b054ebc14d9b2364ddfa9d7104e2391 | [
"MIT"
] | 1 | 2021-06-27T22:49:02.000Z | 2021-06-27T22:49:02.000Z | fileprocessor/abstracts.py | DonaldWhyte/fileprocessor | 5ccbbae87387b5683b9e5fc5fe559a0d3e50b9c1 | [
"MIT"
] | null | null | null | fileprocessor/abstracts.py | DonaldWhyte/fileprocessor | 5ccbbae87387b5683b9e5fc5fe559a0d3e50b9c1 | [
"MIT"
] | null | null | null | """Contains the abstract classes for the major components of the library."""
class Searcher:
"""Searches directory for files to process."""
def search(self, rootDirectory):
"""Search directory for files and return list of absolute paths to those files.
Arguments:
rootDirectory -- Root directory to... | 26.431818 | 98 | 0.708512 |
4a1ce2260c0ea16e78a875f08825faf5da422aa8 | 8,252 | py | Python | tests/core/full_node/test_performance.py | hashgreen/chia-blockchain | b1acb5597ba242649d1dc97de7fd605148e33816 | [
"Apache-2.0"
] | null | null | null | tests/core/full_node/test_performance.py | hashgreen/chia-blockchain | b1acb5597ba242649d1dc97de7fd605148e33816 | [
"Apache-2.0"
] | 1 | 2022-03-29T03:05:10.000Z | 2022-03-29T03:05:10.000Z | tests/core/full_node/test_performance.py | hashgreen/chia-blockchain | b1acb5597ba242649d1dc97de7fd605148e33816 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa: F811, F401
import asyncio
import dataclasses
import logging
import random
import time
from typing import Dict
from clvm.casts import int_to_bytes
import pytest
import pytest_asyncio
import cProfile
from chia.consensus.block_record import BlockRecord
from chia.full_node.full_node_api import FullNodeAPI... | 38.203704 | 120 | 0.672322 |
4a1ce2738966ed2821b5da240e59b7090ca221c0 | 703 | py | Python | test/test_db_matches_ui.py | KarpikovaSV/python_training | 7dac017d3120d7a5b832fad64858ae1a2d7bf355 | [
"Apache-2.0"
] | null | null | null | test/test_db_matches_ui.py | KarpikovaSV/python_training | 7dac017d3120d7a5b832fad64858ae1a2d7bf355 | [
"Apache-2.0"
] | null | null | null | test/test_db_matches_ui.py | KarpikovaSV/python_training | 7dac017d3120d7a5b832fad64858ae1a2d7bf355 | [
"Apache-2.0"
] | null | null | null | from model.group import Group
from model.contact import Contact
def test_group_list(app, db):
ui_list = app.group.get_group_list()
def clean(group):
return Group(id=group.id, name=group.name.strip())
db_list = map(clean, db.get_group_list())
assert sorted(ui_list, key=Group.id_or_max) == sorte... | 41.352941 | 109 | 0.728307 |
4a1ce2bb77f0d8bc0ba2f647cae20a4d486ca579 | 1,480 | py | Python | 04. Variables and Names/ex4.py | vishalnarnaware/Learn-PYTHON-the-HARD-WAY | 392bae04c686c4a1076144f5dd295c7533e71163 | [
"MIT"
] | null | null | null | 04. Variables and Names/ex4.py | vishalnarnaware/Learn-PYTHON-the-HARD-WAY | 392bae04c686c4a1076144f5dd295c7533e71163 | [
"MIT"
] | null | null | null | 04. Variables and Names/ex4.py | vishalnarnaware/Learn-PYTHON-the-HARD-WAY | 392bae04c686c4a1076144f5dd295c7533e71163 | [
"MIT"
] | null | null | null | cars = 100
space_in_a_car = 4.0
drivers = 30
passengers = 90
cars_not_driven = cars - drivers
cars_driven = drivers
carpool_capacity = cars_driven * space_in_a_car
average_passenger_per_car = passengers / cars_driven
print("There are", cars, "cars available.")
print("There are only", drivers, "drivers available.")
pr... | 38.947368 | 88 | 0.743243 |
4a1ce2fd8d9ffda6580a82da2bf34e4f765840d7 | 3,192 | py | Python | artista/artistFollowing/views.py | Rafat97/Artista | 40a824f97dcc8f97632a1864a12329c3172c7c66 | [
"MIT"
] | 17 | 2020-09-21T19:59:23.000Z | 2021-05-16T15:28:41.000Z | artista/artistFollowing/views.py | Rafat97/Artista | 40a824f97dcc8f97632a1864a12329c3172c7c66 | [
"MIT"
] | null | null | null | artista/artistFollowing/views.py | Rafat97/Artista | 40a824f97dcc8f97632a1864a12329c3172c7c66 | [
"MIT"
] | 2 | 2021-03-13T09:31:30.000Z | 2022-03-19T09:43:15.000Z | from django.http import HttpResponse
from django.shortcuts import render, redirect, reverse
from django.http import HttpResponse, Http404
from django.views import View
from artista.utils import get_current_user
from htmlmin.decorators import minified_response
from django.shortcuts import get_object_or_404
from .models... | 23.470588 | 71 | 0.635338 |
4a1ce3a7ea504fbf2a3cef3d1264890a587eb4db | 97,417 | py | Python | tools/machine_learning/dataset/dataset_1800.py | emiliopomares/flow-separation-prediction | ca4585a8263cd5933889fbd763154e2f3851969a | [
"MIT"
] | null | null | null | tools/machine_learning/dataset/dataset_1800.py | emiliopomares/flow-separation-prediction | ca4585a8263cd5933889fbd763154e2f3851969a | [
"MIT"
] | null | null | null | tools/machine_learning/dataset/dataset_1800.py | emiliopomares/flow-separation-prediction | ca4585a8263cd5933889fbd763154e2f3851969a | [
"MIT"
] | null | null | null | dataset = [[575, 1.8478238142818033, 335.84132856507614, 4.0, 40.0, 18.0, 1.0], [576, 15.77686287348893, 42.441254859835766, 4.0, 40.0, 18.0, 1.0], [577, 2.5651959697179394, 460.4148384334217, 4.0, 40.0, 18.0, 0.796539971089987], [578, 17.085286455903624, 1722.0569227642409, 4.0, 40.0, 18.0, 0.20868652310905142], [579,... | 48,708.5 | 97,416 | 0.731217 |
4a1ce3d450302d04c9c8e3716f1587528aeb712e | 9,711 | py | Python | tests/records/test_api.py | audrium/invenio-drafts-resources | 982daaf92abe3538e8fe025916a6a6f93987a09c | [
"MIT"
] | null | null | null | tests/records/test_api.py | audrium/invenio-drafts-resources | 982daaf92abe3538e8fe025916a6a6f93987a09c | [
"MIT"
] | null | null | null | tests/records/test_api.py | audrium/invenio-drafts-resources | 982daaf92abe3538e8fe025916a6a6f93987a09c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
#
# Invenio-Drafts-Resources is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
"""Data access layer tests."""
import pytest
from invenio_search import current_search_client
from jso... | 31.735294 | 76 | 0.702708 |
4a1ce4377c8c080fff7cbb7f0c6167311b82a9c5 | 11,731 | py | Python | samples/jobs.py | awslabs/aws-iot-device-sdk-python-v2 | b2f035c0dc17b0a719695f22137688ceae742436 | [
"Apache-2.0"
] | 4 | 2019-05-08T08:27:49.000Z | 2019-10-17T00:26:58.000Z | samples/jobs.py | awslabs/aws-iot-device-sdk-python-v2 | b2f035c0dc17b0a719695f22137688ceae742436 | [
"Apache-2.0"
] | 1 | 2019-10-16T17:08:58.000Z | 2019-10-23T22:13:56.000Z | samples/jobs.py | awslabs/aws-iot-device-sdk-python-v2 | b2f035c0dc17b0a719695f22137688ceae742436 | [
"Apache-2.0"
] | 2 | 2019-05-27T18:39:42.000Z | 2019-09-06T09:06:56.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0.
import argparse
from awscrt import auth, http, io, mqtt
from awsiot import iotjobs
from awsiot import mqtt_connection_builder
from concurrent.futures import Future
import sys
import threading
import time
import ... | 39.631757 | 149 | 0.704714 |
4a1ce47dfd54754ce5dcfca198cdb554f5698e15 | 281 | py | Python | numberofwaystomakechanges/program.py | anzharip/algorithm-and-datastructure | b83273330066ace02ecccfe834acdd998d21b5a4 | [
"MIT"
] | null | null | null | numberofwaystomakechanges/program.py | anzharip/algorithm-and-datastructure | b83273330066ace02ecccfe834acdd998d21b5a4 | [
"MIT"
] | null | null | null | numberofwaystomakechanges/program.py | anzharip/algorithm-and-datastructure | b83273330066ace02ecccfe834acdd998d21b5a4 | [
"MIT"
] | null | null | null | def numberOfWaysToMakeChange(n, denoms):
# Write your code here.
ways = [0] * (n + 1)
ways[0] = 1
for denom in denoms:
for amount in range(1, n + 1):
if amount >= denom:
ways[amount] += ways[amount - denom]
return ways[n]
| 21.615385 | 52 | 0.52669 |
4a1ce49f5b92dab44bdccc26f59ee12a7395293f | 1,621 | py | Python | examples/entrypoint.py | mediapills/console | a4ec98a0205e199649297eedd445186faad1ee27 | [
"MIT"
] | null | null | null | examples/entrypoint.py | mediapills/console | a4ec98a0205e199649297eedd445186faad1ee27 | [
"MIT"
] | null | null | null | examples/entrypoint.py | mediapills/console | a4ec98a0205e199649297eedd445186faad1ee27 | [
"MIT"
] | null | null | null | # Copyright (c) 2021-2021 MediaPills Console Authors.
#
# 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, modify, me... | 43.810811 | 72 | 0.74892 |
4a1ce606899318115dedcb61b7435a2448b27848 | 1,424 | py | Python | var/spack/repos/builtin/packages/libcuml/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/libcuml/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/libcuml/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 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 Libcuml(CMakePackage):
"""cuML is a suite of libraries that implement machine
learning... | 30.956522 | 97 | 0.676264 |
4a1ce78d8c117a46f42bc0347dbea562ce82fb33 | 28,179 | py | Python | tests/test_verbs.py | slint/invenio-oaiserver | fd715a5a6af117564f152dbc09938b788ed8bc8d | [
"MIT"
] | null | null | null | tests/test_verbs.py | slint/invenio-oaiserver | fd715a5a6af117564f152dbc09938b788ed8bc8d | [
"MIT"
] | null | null | null | tests/test_verbs.py | slint/invenio-oaiserver | fd715a5a6af117564f152dbc09938b788ed8bc8d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2019 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Test OAI verbs."""
from __future__ import absolute_import
import uuid
from copy ... | 38.131258 | 79 | 0.586323 |
4a1ce7922b310c763c033cd1147d5c54e16f519f | 4,374 | py | Python | contrib/seeds/generate-seeds.py | vladlenomg/potatocoin | 9f0f224de97828ab831e1a3992142a3c40939c3b | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | vladlenomg/potatocoin | 9f0f224de97828ab831e1a3992142a3c40939c3b | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | vladlenomg/potatocoin | 9f0f224de97828ab831e1a3992142a3c40939c3b | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the directory tha... | 31.467626 | 98 | 0.582076 |
4a1ce84eba1f13833edd71f268f7d72f662ca500 | 10,968 | py | Python | HSTB/kluster/gui/dialog_daskclient.py | giumas/kluster | 40abd266551a56b693132a7cb12471601f5a02b4 | [
"CC0-1.0"
] | 18 | 2020-11-01T19:59:33.000Z | 2022-03-31T22:46:48.000Z | HSTB/kluster/gui/dialog_daskclient.py | giumas/kluster | 40abd266551a56b693132a7cb12471601f5a02b4 | [
"CC0-1.0"
] | 46 | 2020-10-23T13:55:24.000Z | 2022-03-31T15:58:26.000Z | HSTB/kluster/gui/dialog_daskclient.py | giumas/kluster | 40abd266551a56b693132a7cb12471601f5a02b4 | [
"CC0-1.0"
] | 9 | 2021-03-18T22:28:26.000Z | 2022-02-23T21:48:09.000Z | from HSTB.kluster.gui.backends._qt import QtGui, QtCore, QtWidgets, Signal
from dask.distributed import get_client
from HSTB.kluster.gui.common_widgets import SaveStateDialog
from HSTB.kluster.dask_helpers import dask_find_or_start_client
from HSTB.kluster import kluster_variables
class DaskClientStart(SaveStateDialo... | 51.013953 | 184 | 0.661105 |
4a1ce87ff4ad97dcb2305b7ae819c4e9fc7ad3a4 | 409 | py | Python | backend/lyftmylife_32006/wsgi.py | crowdbotics-apps/lyftmylife-32006 | f560c3b68bb66b1b164ac7928f9597f0ee90aa9f | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/lyftmylife_32006/wsgi.py | crowdbotics-apps/lyftmylife-32006 | f560c3b68bb66b1b164ac7928f9597f0ee90aa9f | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/lyftmylife_32006/wsgi.py | crowdbotics-apps/lyftmylife-32006 | f560c3b68bb66b1b164ac7928f9597f0ee90aa9f | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for lyftmylife_32006 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJA... | 24.058824 | 78 | 0.794621 |
4a1ce9129e02117856d7ceca5231083ca9d571b9 | 1,378 | py | Python | target_athena/formats.py | beubeu13220/target-athena | ebe012bb6694f3685e4efa616a0acbd75c982fc5 | [
"Apache-2.0"
] | 4 | 2021-09-08T17:41:57.000Z | 2021-12-22T03:30:06.000Z | target_athena/formats.py | beubeu13220/target-athena | ebe012bb6694f3685e4efa616a0acbd75c982fc5 | [
"Apache-2.0"
] | 19 | 2021-05-28T21:48:41.000Z | 2021-08-23T04:17:01.000Z | target_athena/formats.py | beubeu13220/target-athena | ebe012bb6694f3685e4efa616a0acbd75c982fc5 | [
"Apache-2.0"
] | 7 | 2021-12-02T19:27:57.000Z | 2022-03-09T08:23:12.000Z | """Methods for writinig different object formats."""
import os
import csv
import json
def write_csv(filename, record, header=None, delimiter= ",", quotechar='"'):
file_is_empty = (not os.path.isfile(filename)) or os.stat(
filename
).st_size == 0
if not header and not file_is_empty:
w... | 29.956522 | 76 | 0.575472 |
4a1ce92ddef15d3ed22a7325d2db115835928f4e | 9,530 | py | Python | recipes/recipe_modules/bot_update/examples/full.py | mycode9998/chromium-tools-depot_tools | 490961030b55067d50c87e2125c631f5078332a0 | [
"BSD-3-Clause"
] | null | null | null | recipes/recipe_modules/bot_update/examples/full.py | mycode9998/chromium-tools-depot_tools | 490961030b55067d50c87e2125c631f5078332a0 | [
"BSD-3-Clause"
] | null | null | null | recipes/recipe_modules/bot_update/examples/full.py | mycode9998/chromium-tools-depot_tools | 490961030b55067d50c87e2125c631f5078332a0 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
DEPS = [
'bot_update',
'gclient',
'gerrit',
'tryserver',
'recipe_engine/buildbucket',
'recipe_engine/json',
'recipe_engine/path',
'recipe_eng... | 29.78125 | 89 | 0.619098 |
4a1ceaf38773fa0905170c8e89ab1c5dd2a537ec | 1,049 | py | Python | lib_collection/sort/quick_3_string.py | caser789/libcollection | eb0a6fc36ce1cb57ed587865bbc1576e81c08924 | [
"MIT"
] | null | null | null | lib_collection/sort/quick_3_string.py | caser789/libcollection | eb0a6fc36ce1cb57ed587865bbc1576e81c08924 | [
"MIT"
] | null | null | null | lib_collection/sort/quick_3_string.py | caser789/libcollection | eb0a6fc36ce1cb57ed587865bbc1576e81c08924 | [
"MIT"
] | null | null | null | def sort(keys):
_sort(keys, 0, len(keys)-1, 0)
def _sort(keys, lo, hi, start):
if hi <= lo:
return
lt = lo
gt = hi
v = get_r(keys[lt], start)
i = lt + 1
while i <= gt:
c = get_r(keys[i], start)
if c < v:
keys[lt], keys[i] = keys[i], keys[lt]
... | 16.919355 | 49 | 0.414681 |
4a1ceb094286746a0f0c0ded1dc0541966c411e0 | 120 | py | Python | guet/steps/preparation/__init__.py | AbhishekMashetty/pairprogrammingmasetty | 0528d4999b472ec6d94058193275a505eaf2c762 | [
"Apache-2.0"
] | 13 | 2018-12-21T22:47:28.000Z | 2021-12-17T14:27:35.000Z | guet/steps/preparation/__init__.py | chiptopher/guet | 1099ee623311ba1d052237612efc9b06b7ff68bb | [
"Apache-2.0"
] | 63 | 2018-08-30T11:19:12.000Z | 2021-05-13T12:11:08.000Z | guet/steps/preparation/__init__.py | chiptopher/guet | 1099ee623311ba1d052237612efc9b06b7ff68bb | [
"Apache-2.0"
] | 7 | 2019-05-21T13:52:37.000Z | 2022-01-30T22:57:21.000Z | from ._local_swap import SwapToLocal
from .initialize import InitializePreparation
from .preapration import Preparation
| 30 | 45 | 0.875 |
4a1cebabd16ee14ada0a50ec86a59c6ad58b8874 | 14,344 | py | Python | tools/offwaketime.py | palao/bcc | ed17d7f387ee71afbb64d9b08bf89c2d6c9a74b4 | [
"Apache-2.0"
] | 4 | 2018-01-29T13:38:50.000Z | 2021-06-30T07:28:47.000Z | tools/offwaketime.py | palao/bcc | ed17d7f387ee71afbb64d9b08bf89c2d6c9a74b4 | [
"Apache-2.0"
] | 13 | 2018-02-09T22:24:29.000Z | 2018-06-18T22:33:29.000Z | tools/offwaketime.py | palao/bcc | ed17d7f387ee71afbb64d9b08bf89c2d6c9a74b4 | [
"Apache-2.0"
] | 5 | 2018-01-31T05:04:19.000Z | 2018-06-12T00:45:21.000Z | #!/usr/bin/python
#
# offwaketime Summarize blocked time by kernel off-CPU stack + waker stack
# For Linux, uses BCC, eBPF.
#
# USAGE: offwaketime [-h] [-p PID | -u | -k] [-U | -K] [-f] [duration]
#
# Copyright 2016 Netflix, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
#
# 20-Ja... | 36.406091 | 104 | 0.643196 |
4a1cebebff575e77d8f02d9cb43e908aca310f15 | 11,510 | py | Python | Code/linkedlist.py | Jeromeschmidt/CS-1.3-Core-Data-Structures | d897010e17fc5569cf972963fb9337a8ec08aed6 | [
"MIT"
] | null | null | null | Code/linkedlist.py | Jeromeschmidt/CS-1.3-Core-Data-Structures | d897010e17fc5569cf972963fb9337a8ec08aed6 | [
"MIT"
] | 6 | 2020-02-14T07:54:37.000Z | 2020-03-10T19:17:43.000Z | Code/linkedlist.py | Jeromeschmidt/CS-1.3-Core-Data-Structures | d897010e17fc5569cf972963fb9337a8ec08aed6 | [
"MIT"
] | null | null | null | #!python
###Doubly linked list and tests can be found at: https://github.com/Jeromeschmidt/CS-1.2-Intro-Data-Structures/blob/master/Code/linkedlist.py
class Node(object):
def __init__(self, data):
"""Initialize this node with the given data."""
self.data = data
self.next = None
def _... | 39.016949 | 141 | 0.58636 |
4a1cebf2fffa4e807660fa084ba5a8ce5e56bd4d | 448 | py | Python | slmpd/migrations/0005_auto_20201202_1710.py | phecht/djxpde | 01c092c1329fc3493ad2baad2dfcd2b10af88008 | [
"MIT"
] | null | null | null | slmpd/migrations/0005_auto_20201202_1710.py | phecht/djxpde | 01c092c1329fc3493ad2baad2dfcd2b10af88008 | [
"MIT"
] | 6 | 2021-04-06T18:19:18.000Z | 2021-06-10T20:23:03.000Z | slmpd/migrations/0005_auto_20201202_1710.py | phecht/djxpde | 01c092c1329fc3493ad2baad2dfcd2b10af88008 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2020-12-02 17:10
from django.db import migrations
import django.db.models.manager
class Migration(migrations.Migration):
dependencies = [
('slmpd', '0004_auto_20201130_1748'),
]
operations = [
migrations.AlterModelManagers(
name='crime_neighbor... | 21.333333 | 65 | 0.59375 |
4a1cec3c5ad826132d680c4c3812165a4e20ae5e | 6,344 | py | Python | mipego/misc.py | Basvanstein/MIP-EGO | e1ed0b0ea020850c72c4de5efd5dda0a99de571f | [
"MIT"
] | 23 | 2018-07-20T17:22:28.000Z | 2022-02-23T15:41:30.000Z | mipego/misc.py | Basvanstein/MIP-EGO | e1ed0b0ea020850c72c4de5efd5dda0a99de571f | [
"MIT"
] | 5 | 2019-03-05T22:09:13.000Z | 2021-10-08T08:48:43.000Z | mipego/misc.py | Basvanstein/MIP-EGO | e1ed0b0ea020850c72c4de5efd5dda0a99de571f | [
"MIT"
] | 14 | 2018-05-15T21:47:57.000Z | 2021-12-07T02:04:38.000Z | """
Created on Mon May 19 10:17:43 2014
@author: Hao Wang
@email: wangronin@gmail.com
"""
import logging, os, random, string, re
from copy import copy
import numpy as np
# TODO: re-written those functions to C/Cython
def non_dominated_set_2d(y, minimize=True):
"""
Argument
--------
y : numpy 2d array... | 29.64486 | 106 | 0.558953 |
4a1cec5b32db6aaccb392896c99e301b41ae83c5 | 26,154 | py | Python | bot/exts/fun/trivia_quiz.py | katimoth/sir-lancebot | ec734d37acc009730eaeefb6f8e51552b1ee1165 | [
"MIT"
] | 122 | 2020-11-22T17:25:24.000Z | 2022-03-30T22:53:30.000Z | bot/exts/fun/trivia_quiz.py | katimoth/sir-lancebot | ec734d37acc009730eaeefb6f8e51552b1ee1165 | [
"MIT"
] | 441 | 2020-11-21T00:06:19.000Z | 2022-03-25T02:45:56.000Z | bot/exts/fun/trivia_quiz.py | katimoth/sir-lancebot | ec734d37acc009730eaeefb6f8e51552b1ee1165 | [
"MIT"
] | 183 | 2020-11-22T09:24:47.000Z | 2022-03-26T08:21:36.000Z | import asyncio
import json
import logging
import operator
import random
import re
import string
from collections import defaultdict
from dataclasses import dataclass
from datetime import datetime, timedelta
from pathlib import Path
from typing import Callable, Optional
import discord
from discord.ext import commands, ... | 38.689349 | 118 | 0.573947 |
4a1ceecb155c6ec5ae2958bd9b4f9b4cdf20dcaf | 37,737 | py | Python | site/flask/lib/python2.7/site-packages/sqlalchemy/dialects/oracle/cx_oracle.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 5 | 2015-01-06T17:01:59.000Z | 2016-08-13T05:29:24.000Z | site/flask/lib/python2.7/site-packages/sqlalchemy/dialects/oracle/cx_oracle.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 309 | 2016-10-27T23:47:06.000Z | 2017-04-02T04:40:21.000Z | site/flask/lib/python2.7/site-packages/sqlalchemy/dialects/oracle/cx_oracle.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 6 | 2015-01-06T17:02:01.000Z | 2016-11-11T02:50:27.000Z | # oracle/cx_oracle.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: oracle+cx_oracle
:name: cx-Oracle
:dbapi: cx_oracle
... | 39.024819 | 78 | 0.64181 |
4a1cef46e7a88a9412ae0dc5d6166791b46058bd | 5,621 | py | Python | qnarre/prep/metric/squad2.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/metric/squad2.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/metric/squad2.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2022 Quantapix 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 l... | 29.276042 | 91 | 0.505248 |
4a1cef556be2b6517eff11630e353b2f1987cb24 | 13,954 | py | Python | intro-ansible/venv3/lib/python3.8/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_system_saml.py | Stienvdh/statrick | 7b092fc42171e226718a70a285a4b323f2f395ad | [
"MIT"
] | null | null | null | intro-ansible/venv3/lib/python3.8/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_system_saml.py | Stienvdh/statrick | 7b092fc42171e226718a70a285a4b323f2f395ad | [
"MIT"
] | null | null | null | intro-ansible/venv3/lib/python3.8/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_system_saml.py | Stienvdh/statrick | 7b092fc42171e226718a70a285a4b323f2f395ad | [
"MIT"
] | null | null | null | #!/usr/bin/python
from __future__ import absolute_import, division, print_function
# Copyright 2019-2020 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the ... | 34.539604 | 153 | 0.472911 |
4a1cf1711bf992a92004def2360feec7c7930c41 | 160 | py | Python | customer/admin.py | Amankori2307/Park-Here | bf30e721577ff6df3b761f8bbb1bfe085ffac14c | [
"MIT"
] | null | null | null | customer/admin.py | Amankori2307/Park-Here | bf30e721577ff6df3b761f8bbb1bfe085ffac14c | [
"MIT"
] | null | null | null | customer/admin.py | Amankori2307/Park-Here | bf30e721577ff6df3b761f8bbb1bfe085ffac14c | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Customer, Vehicle
# Register your models here.
admin.site.register(Customer)
admin.site.register(Vehicle)
| 22.857143 | 37 | 0.8125 |
4a1cf1bd60e1db58a00659aa9f6f9e2211900977 | 1,154 | py | Python | test/test_day02.py | 0Bu/advent-of-code-2018 | 04b6088385d031a43109146be98e3e91870af44b | [
"MIT"
] | null | null | null | test/test_day02.py | 0Bu/advent-of-code-2018 | 04b6088385d031a43109146be98e3e91870af44b | [
"MIT"
] | null | null | null | test/test_day02.py | 0Bu/advent-of-code-2018 | 04b6088385d031a43109146be98e3e91870af44b | [
"MIT"
] | null | null | null | import unittest
import day02
class Part1(unittest.TestCase):
ids = ["abcdef", "bababc", "abbcde", "abcccd", "aabcdd", "abcdee", "ababab"]
def test_get_variance(self):
self.assertDictEqual(day02.get_variance(self.ids[0]), dict.fromkeys(set(self.ids[0]), 1))
self.assertDictEqual(day02.get_varia... | 44.384615 | 103 | 0.611785 |
4a1cf215d8b7801254c7b86a4707c95c64d0aeaa | 9,662 | py | Python | ptopk_patch_selection/lib/preprocess/preprocess_spec.py | pedersor/google-research | 6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6 | [
"Apache-2.0"
] | null | null | null | ptopk_patch_selection/lib/preprocess/preprocess_spec.py | pedersor/google-research | 6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6 | [
"Apache-2.0"
] | null | null | null | ptopk_patch_selection/lib/preprocess/preprocess_spec.py | pedersor/google-research | 6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | 36.323308 | 82 | 0.697475 |
4a1cf25bbe0f82f86e0a0f7054f11a197eee927a | 1,710 | py | Python | benchmark/datasets/femnist/preprocess/get_hashes.py | FederalLab/benchmark-lightly | ff05a99a19c0e1dcddf16996f922431e09771c4c | [
"MIT"
] | null | null | null | benchmark/datasets/femnist/preprocess/get_hashes.py | FederalLab/benchmark-lightly | ff05a99a19c0e1dcddf16996f922431e09771c4c | [
"MIT"
] | null | null | null | benchmark/datasets/femnist/preprocess/get_hashes.py | FederalLab/benchmark-lightly | ff05a99a19c0e1dcddf16996f922431e09771c4c | [
"MIT"
] | null | null | null | # @Author : FederalLab
# @Date : 2021-09-26 00:32:12
# @Last Modified by : Chen Dengsheng
# @Last Modified time: 2021-09-26 00:32:12
# Copyright (c) FederalLab. All rights reserved.
import hashlib
import os
import sys
from benchmark.datasets.femnist.preprocess.utils import load_obj, save_obj
... | 28.5 | 77 | 0.697076 |
4a1cf2d239530e22293f557e116f3285210da7de | 1,358 | py | Python | Jernej Kos/experiments/classifiers/simple.py | shenkev/Exact-Inference-VAE-Robustness | 37438df2d63b2de19b084153e6c68d528d533837 | [
"MIT"
] | 3 | 2017-11-06T06:00:23.000Z | 2017-12-01T20:51:07.000Z | Jernej Kos/experiments/classifiers/simple.py | shenkev/Exact-Inference-VAE-Robustness | 37438df2d63b2de19b084153e6c68d528d533837 | [
"MIT"
] | null | null | null | Jernej Kos/experiments/classifiers/simple.py | shenkev/Exact-Inference-VAE-Robustness | 37438df2d63b2de19b084153e6c68d528d533837 | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorflow.contrib.slim as slim
from .. import classifier
class Classifier(classifier.ClassifierBase):
"""Simple classifier with two fully-connected hidden layers."""
name = 'simple-classifier'
def _build(self, x):
# Run the encoder of the underlying model to get t... | 41.151515 | 91 | 0.655376 |
4a1cf37d830de67b0ba37c1be37fd60a51ebd41a | 2,279 | py | Python | experiments/ashvin/icml2020/mujoco/pendulum/demo_awr2.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/mujoco/pendulum/demo_awr2.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/mujoco/pendulum/demo_awr2.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from railrl.demos.source.mdp_path_loader import MDPPathLoader
from railrl.launchers.experiments.ashvin.awr_sac_rl import experiment
import railrl.misc.hyperparameter as hyp
from railrl.launchers.arglauncher import run_variants
if __name__ == "__main__":
variant = dict(
... | 28.135802 | 70 | 0.585344 |
4a1cf39536cd2465ef5fc5b7a272c54efcdd504d | 10,430 | py | Python | sparkdatachallenge.py | tomerten/sparkdatachallenge | d20dbf5008a4dc5909b886486bb7f5658edd0e73 | [
"MIT"
] | null | null | null | sparkdatachallenge.py | tomerten/sparkdatachallenge | d20dbf5008a4dc5909b886486bb7f5658edd0e73 | [
"MIT"
] | null | null | null | sparkdatachallenge.py | tomerten/sparkdatachallenge | d20dbf5008a4dc5909b886486bb7f5658edd0e73 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Package sparkdatachallenge
==========================
Arrays A and B consisting of N non-negative integers are given.
Together, they represent N real numbers, denoted as C[0], ..., C[N−1].
Elements of A represent the integer parts and the corresponding elements of
B (divided by 1,000,000) ... | 26.075 | 98 | 0.582359 |
4a1cf3f3800cf34cd7c0b41291cd36e178aca479 | 608 | py | Python | AppDB/appscale/datastore/scripts/data_layout.py | Honcharov12/appscale | be1cf90fcd24f1a5a88848f7eb73331b6e4e66d9 | [
"Apache-2.0"
] | 1 | 2017-04-07T15:33:35.000Z | 2017-04-07T15:33:35.000Z | AppDB/appscale/datastore/scripts/data_layout.py | Honcharov12/appscale | be1cf90fcd24f1a5a88848f7eb73331b6e4e66d9 | [
"Apache-2.0"
] | 1 | 2019-10-15T15:57:53.000Z | 2019-10-15T15:57:53.000Z | AppDB/appscale/datastore/scripts/data_layout.py | Honcharov12/appscale | be1cf90fcd24f1a5a88848f7eb73331b6e4e66d9 | [
"Apache-2.0"
] | 1 | 2019-08-27T05:19:48.000Z | 2019-08-27T05:19:48.000Z | import argparse
import sys
from ..appscale_datastore_batch import DatastoreFactory
# The exit code that indicates the data layout version is unexpected.
INVALID_VERSION_EXIT_CODE = 64
def main():
parser = argparse.ArgumentParser(
description='Checks if the data layout is valid')
parser.add_argument('--db-ty... | 25.333333 | 69 | 0.769737 |
4a1cf4916f780a291c0167f34b69f8197bffc279 | 3,560 | py | Python | Cura/Cura/cura/PrinterOutput/Models/ExtruderConfigurationModel.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | Cura/Cura/cura/PrinterOutput/Models/ExtruderConfigurationModel.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | Cura/Cura/cura/PrinterOutput/Models/ExtruderConfigurationModel.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Optional
from PyQt5.QtCore import pyqtProperty, QObject, pyqtSignal
from .MaterialOutputModel import MaterialOutputModel
class ExtruderConfigurationModel(QObject):
extruderConfigurationChanged = p... | 40 | 132 | 0.671629 |
4a1cf66b17137fb70cd2b0746a4d5237d2066dc9 | 6,413 | py | Python | AppServer/lib/django-1.5/django/contrib/sitemaps/tests/http.py | loftwah/appscale | 586fc1347ebc743d7a632de698f4dbfb09ae38d6 | [
"Apache-2.0"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | AppServer/lib/django-1.5/django/contrib/sitemaps/tests/http.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | AppServer/lib/django-1.5/django/contrib/sitemaps/tests/http.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | from __future__ import unicode_literals
import os
from datetime import date
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.sitemaps import Sitemap, GenericSitemap
from django.contrib.sites.models import Site
from django.core.exceptions import ImproperlyConfigured
from... | 43.331081 | 124 | 0.691408 |
4a1cf6b1a18c80ee69373ece1b2d13ffa409aa9b | 1,169 | py | Python | pytanga/components/Cisco/xe/ip/ip.py | renatoalmeidaoliveira/Pytanga | aa02f1c0f2573da1330d1d246ab780fa3be336a5 | [
"MIT"
] | null | null | null | pytanga/components/Cisco/xe/ip/ip.py | renatoalmeidaoliveira/Pytanga | aa02f1c0f2573da1330d1d246ab780fa3be336a5 | [
"MIT"
] | null | null | null | pytanga/components/Cisco/xe/ip/ip.py | renatoalmeidaoliveira/Pytanga | aa02f1c0f2573da1330d1d246ab780fa3be336a5 | [
"MIT"
] | null | null | null | from pytanga.components import AbstractComponent
class ipComponent(AbstractComponent):
def __init__(self):
self._xmlns = {}
self.attributes = self.setAttributes()
self.parent_xmlns = {}
self._children: List[AbstractComponent] = []
self.childrenData = []
self.tag = ... | 24.87234 | 61 | 0.615056 |
4a1cf7679ec6e01110933600be0e62651c5196a4 | 3,239 | py | Python | video/cloud-client/labels/labels.py | summersab/python-docs-samples | 7c1e9685fe190f7789d8e1dbcfe8c01a20e3dc66 | [
"Apache-2.0"
] | 3 | 2021-01-24T23:42:57.000Z | 2021-02-17T12:02:12.000Z | video/cloud-client/labels/labels.py | summersab/python-docs-samples | 7c1e9685fe190f7789d8e1dbcfe8c01a20e3dc66 | [
"Apache-2.0"
] | 320 | 2020-11-08T21:02:43.000Z | 2022-02-10T10:43:29.000Z | video/cloud-client/labels/labels.py | summersab/python-docs-samples | 7c1e9685fe190f7789d8e1dbcfe8c01a20e3dc66 | [
"Apache-2.0"
] | 3 | 2019-02-11T16:16:11.000Z | 2019-04-19T21:34:37.000Z | #!/usr/bin/env python
# Copyright 2017 Google Inc. 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... | 38.105882 | 75 | 0.725533 |
4a1cf791ef3c7874963fc04d2c955e964b1209f2 | 77 | py | Python | src/bytes_encryptor/__init__.py | huykingsofm/bytes_encryptor | c23dd196b95faea26cb61d495d2c562b11743228 | [
"MIT"
] | null | null | null | src/bytes_encryptor/__init__.py | huykingsofm/bytes_encryptor | c23dd196b95faea26cb61d495d2c562b11743228 | [
"MIT"
] | null | null | null | src/bytes_encryptor/__init__.py | huykingsofm/bytes_encryptor | c23dd196b95faea26cb61d495d2c562b11743228 | [
"MIT"
] | null | null | null | from bytes_encryptor.bytes_encryptor import BytesEncryptor, BMPImageEncryptor | 77 | 77 | 0.922078 |
4a1cf821a8624c53d0f1ac1aca3b407768ec2dbe | 1,086 | py | Python | ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/custom_params.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 25 | 2019-12-04T03:09:55.000Z | 2022-03-08T10:52:06.000Z | ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/custom_params.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 29 | 2019-12-04T03:00:39.000Z | 2022-03-02T06:25:44.000Z | ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/custom_params.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 33 | 2019-12-04T02:51:30.000Z | 2022-03-24T02:47:38.000Z | """
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... | 49.363636 | 155 | 0.802026 |
4a1cf9815e0dd3a9a90cbba87eae59dd758c4d5d | 79,781 | py | Python | transformers_modified/modeling_xlnet.py | mattf1n/lm-intervention | a35af3d8976931d588a08f5ae6a852587ae0b66f | [
"MIT"
] | 2 | 2021-06-17T19:11:04.000Z | 2021-06-19T17:31:15.000Z | transformers_modified/modeling_xlnet.py | mattf1n/lm-intervention | a35af3d8976931d588a08f5ae6a852587ae0b66f | [
"MIT"
] | null | null | null | transformers_modified/modeling_xlnet.py | mattf1n/lm-intervention | a35af3d8976931d588a08f5ae6a852587ae0b66f | [
"MIT"
] | 1 | 2021-11-18T16:49:04.000Z | 2021-11-18T16:49:04.000Z | """ A copy of transformers/modeling_xlnet.py from the Huggingface
transformers library modified so that the attention module is called with
non-keyword arguments (to make those arguments accessible to the hook).
"""
# coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors a... | 48.945399 | 304 | 0.64098 |
4a1cf9b17bb22437bf2f596bb015536ac2e483b7 | 7,489 | py | Python | juriscraper/pacer/utils.py | EvandoBlanco/juriscraper | 3d16af258620d4ba1b4827f66ef69e8a2c5a0484 | [
"BSD-2-Clause"
] | null | null | null | juriscraper/pacer/utils.py | EvandoBlanco/juriscraper | 3d16af258620d4ba1b4827f66ef69e8a2c5a0484 | [
"BSD-2-Clause"
] | null | null | null | juriscraper/pacer/utils.py | EvandoBlanco/juriscraper | 3d16af258620d4ba1b4827f66ef69e8a2c5a0484 | [
"BSD-2-Clause"
] | null | null | null | import re
import requests
import tldextract
from lxml import html
from ..lib.exceptions import ParsingException
def get_pacer_court_info():
r = requests.get("https://court-version-scraper.herokuapp.com/courts.json")
return r.json()
def get_courts_from_json(j):
courts = []
for k, v in j.items():
... | 29.956 | 88 | 0.631326 |
4a1cfa1b4106a0a3b86b95637ab1cd1212bbe63c | 6,739 | py | Python | vpython/with_notebook.py | kdunn926/vpython-jupyter | b8e816b5ff9eac1d33ce2cfe1e15cfab4900b343 | [
"MIT"
] | 1 | 2019-07-13T08:21:28.000Z | 2019-07-13T08:21:28.000Z | vpython/with_notebook.py | kdunn926/vpython-jupyter | b8e816b5ff9eac1d33ce2cfe1e15cfab4900b343 | [
"MIT"
] | null | null | null | vpython/with_notebook.py | kdunn926/vpython-jupyter | b8e816b5ff9eac1d33ce2cfe1e15cfab4900b343 | [
"MIT"
] | null | null | null | import os
import time
from threading import Thread
from jupyter_core.paths import jupyter_data_dir
import notebook
import IPython
from IPython.display import display, Javascript
from .vpython import GlowWidget, baseObj, canvas
from .rate_control import ws_queue
from . import __version__
import tornado.httpserver
imp... | 39.180233 | 205 | 0.686155 |
4a1cfad66263be249b24713177c993933b1286a6 | 11,075 | py | Python | model/onmt/Loss.py | wanghm92/rotowire_fg | 67d7534f78368da8cb74bd222f311fc1a8906ba9 | [
"MIT"
] | 13 | 2019-11-11T12:03:15.000Z | 2022-03-31T20:02:41.000Z | model/onmt/Loss.py | wanghm92/rotowire_fg | 67d7534f78368da8cb74bd222f311fc1a8906ba9 | [
"MIT"
] | 5 | 2020-07-21T03:15:16.000Z | 2021-02-08T02:27:04.000Z | model/onmt/Loss.py | wanghm92/rotowire_fg | 67d7534f78368da8cb74bd222f311fc1a8906ba9 | [
"MIT"
] | 8 | 2019-11-12T10:38:20.000Z | 2020-11-16T02:28:47.000Z | """
This file handles the details of the loss function during training.
This includes: LossComputeBase and the standard NMTLossCompute, and
sharded loss compute stuff.
"""
from __future__ import division
import torch
import torch.nn as nn
from torch.autograd import Variable
import onmt
import onmt.io
... | 38.454861 | 80 | 0.610835 |
4a1cfc11a07055a725ff0a2720e75a79eb3968e9 | 8,064 | py | Python | supports/integration-test/util.py | plusplusjiajia/SSM | 1a5b3c476250c1db2d636a15d00be208634fac9a | [
"Apache-2.0"
] | null | null | null | supports/integration-test/util.py | plusplusjiajia/SSM | 1a5b3c476250c1db2d636a15d00be208634fac9a | [
"Apache-2.0"
] | null | null | null | supports/integration-test/util.py | plusplusjiajia/SSM | 1a5b3c476250c1db2d636a15d00be208634fac9a | [
"Apache-2.0"
] | null | null | null | import requests
import random
import time
import uuid
# Server info
BASE_URL = "http://localhost:7045"
# Restapi root
REST_ROOT = BASE_URL + "/smart/api/v1"
RULE_ROOT = REST_ROOT + "/rules"
CMDLET_ROOT = REST_ROOT + "/cmdlets"
ACTION_ROOT = REST_ROOT + "/actions"
CLUSTER_ROOT = REST_ROOT + "/cluster"
SYSTEM_ROOT = RE... | 25.846154 | 74 | 0.646205 |
4a1cfc1dcc70242836a5aba8afbdc9cf2afc462f | 163 | py | Python | code_all/day09/exercise03.py | testcg/python | 4db4bd5d0e44af807d2df80cf8c8980b40cc03c4 | [
"MIT"
] | null | null | null | code_all/day09/exercise03.py | testcg/python | 4db4bd5d0e44af807d2df80cf8c8980b40cc03c4 | [
"MIT"
] | null | null | null | code_all/day09/exercise03.py | testcg/python | 4db4bd5d0e44af807d2df80cf8c8980b40cc03c4 | [
"MIT"
] | null | null | null | """
"""
data01 = 10
def func01(p):
global data01
data01 += 1
p += 1
data02 = 10
func01(data02)
func01(data02)
print(data01) # 12
print(data02) # 10 | 10.1875 | 18 | 0.595092 |
4a1cfc6f67de59a9ed86806a8128bd9ab49b1bc7 | 16,162 | py | Python | resnet/resnet_train_imagenet.py | arjish/meta-meta-classification | 3e1df26a486094bd9cb394ff99d3c29b587b66c3 | [
"MIT"
] | 3 | 2021-07-30T23:58:35.000Z | 2021-11-11T02:05:58.000Z | resnet/resnet_train_imagenet.py | arjish/meta-meta-classification | 3e1df26a486094bd9cb394ff99d3c29b587b66c3 | [
"MIT"
] | null | null | null | resnet/resnet_train_imagenet.py | arjish/meta-meta-classification | 3e1df26a486094bd9cb394ff99d3c29b587b66c3 | [
"MIT"
] | 1 | 2021-09-13T10:12:16.000Z | 2021-09-13T10:12:16.000Z | import argparse
import os
import random
import shutil
import time
import warnings
import sys
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.distributed as dist
import torch.optim
import torch.multiprocessing as mp
import torch.utils.data
import torch.utils... | 38.850962 | 91 | 0.602524 |
4a1cfd367375352004d36fd7a31af2463a4c7fba | 5,421 | py | Python | cfm/cli/options.py | bullocke/NRT-CCDC | 49785a28960fd3c6e473c88ae36d062b4d498e23 | [
"MIT"
] | 5 | 2020-04-08T22:30:23.000Z | 2021-12-15T12:49:12.000Z | cfm/cli/options.py | bullocke/NRT-CCDC | 49785a28960fd3c6e473c88ae36d062b4d498e23 | [
"MIT"
] | null | null | null | cfm/cli/options.py | bullocke/NRT-CCDC | 49785a28960fd3c6e473c88ae36d062b4d498e23 | [
"MIT"
] | 6 | 2019-07-25T02:27:28.000Z | 2022-03-02T00:28:07.000Z | """ YATSM command line interface """
from datetime import datetime as dt
import os
import click
# CLI VALIDATORS
def valid_band(ctx, param, value):
""" Check image band validity (band >= 1)"""
try:
band = int(value)
assert band >= 1
except:
raise click.BadParameter('Band must be i... | 30.284916 | 76 | 0.539384 |
4a1cfddaadb0b895767b54df2e1bfe4865042327 | 4,971 | py | Python | distantbes/proto/proto/build_status_pb2.py | antmicro/distant-bes | b8e3e40f0b173cbf3bf2d489640c93a42a20c021 | [
"Apache-2.0"
] | 5 | 2020-09-28T10:21:26.000Z | 2021-12-02T19:44:04.000Z | distantbes/proto/proto/build_status_pb2.py | antmicro/distant-bes | b8e3e40f0b173cbf3bf2d489640c93a42a20c021 | [
"Apache-2.0"
] | null | null | null | distantbes/proto/proto/build_status_pb2.py | antmicro/distant-bes | b8e3e40f0b173cbf3bf2d489640c93a42a20c021 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: proto/build_status.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database a... | 37.37594 | 762 | 0.758198 |
4a1cfddf2ee4f1003ec1bb4f50ca7ca73dafbe18 | 6,052 | py | Python | RTAscience/timing/time_gammapy3d_binned_fit.py | ambra-dipiano/cta-sag-sci | f2e238c323d35badd477ce4030069a0097d550bb | [
"BSD-3-Clause"
] | 1 | 2021-01-29T15:17:31.000Z | 2021-01-29T15:17:31.000Z | RTAscience/timing/time_gammapy3d_binned_fit.py | ambra-dipiano/cta-sag-sci | f2e238c323d35badd477ce4030069a0097d550bb | [
"BSD-3-Clause"
] | 5 | 2021-03-17T09:10:36.000Z | 2021-12-21T16:43:15.000Z | RTAscience/timing/time_gammapy3d_binned_fit.py | ambra-dipiano/cta-sag-sci | f2e238c323d35badd477ce4030069a0097d550bb | [
"BSD-3-Clause"
] | null | null | null | # *******************************************************************************
# Copyright (C) 2020 INAF
#
# This software is distributed under the terms of the BSD-3-Clause license
#
# Authors:
# Ambra Di Piano <ambra.dipiano@inaf.it>
# *******************************************************************************... | 36.902439 | 158 | 0.708361 |
4a1cfea51f5a13be30e2d5628d5b2f02cdcdbc7e | 3,343 | py | Python | molecule/command/check.py | odyssey4me/molecule | 9f28e0e57b48403f39e0635ededc266afe52408c | [
"MIT"
] | 1 | 2020-09-16T10:23:37.000Z | 2020-09-16T10:23:37.000Z | molecule/command/check.py | odyssey4me/molecule | 9f28e0e57b48403f39e0635ededc266afe52408c | [
"MIT"
] | 6 | 2020-09-16T10:14:24.000Z | 2020-09-20T16:01:11.000Z | molecule/command/check.py | corserp/molecule | 48921fa43c3c4647a3f835c79290959af945a522 | [
"MIT"
] | null | null | null | # Copyright (c) 2015-2018 Cisco Systems, Inc.
#
# 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, modify, merge... | 29.584071 | 79 | 0.697876 |
4a1cfefd266d4c1fdcdc23af17a6db50a718ba32 | 945 | py | Python | acquisition/tomviz/__main__.py | alvarosan/tomviz | b53ccb0a07bfe7a33c3fb984c28d9b2658faa64b | [
"BSD-3-Clause"
] | null | null | null | acquisition/tomviz/__main__.py | alvarosan/tomviz | b53ccb0a07bfe7a33c3fb984c28d9b2658faa64b | [
"BSD-3-Clause"
] | null | null | null | acquisition/tomviz/__main__.py | alvarosan/tomviz | b53ccb0a07bfe7a33c3fb984c28d9b2658faa64b | [
"BSD-3-Clause"
] | null | null | null | import argparse
import tomviz
from tomviz.acquisition import server
def main():
parser = argparse.ArgumentParser(
description='Tomviz acquisition server.')
parser.add_argument("-a", "--adapter", help="source adapter to install")
parser.add_argument("-i", "--interface",
help... | 27 | 76 | 0.610582 |
4a1d00459158ca7cdff4abeea30793d94278ef86 | 3,664 | py | Python | pyunsplash/src/unobject.py | mmangione/pyunsplash | c79aff3b0800c71b921b2090dac275247d0c88fc | [
"MIT"
] | 40 | 2018-05-22T15:50:10.000Z | 2022-01-31T10:39:05.000Z | pyunsplash/src/unobject.py | mmangione/pyunsplash | c79aff3b0800c71b921b2090dac275247d0c88fc | [
"MIT"
] | 13 | 2017-09-13T03:37:42.000Z | 2020-10-20T16:04:08.000Z | pyunsplash/src/unobject.py | mmangione/pyunsplash | c79aff3b0800c71b921b2090dac275247d0c88fc | [
"MIT"
] | 17 | 2017-01-31T17:30:19.000Z | 2022-02-09T21:59:41.000Z | ###############################################################################
# Copyright (c) 2016 Salvatore Ventura <salvoventura@gmail.com>
#
# File: unobject.py
#
# Author: Salvatore Ventura <salvoventura@gmail.com>
# Date: 07 Dec 2016
# Purpose: Base class for Unsplash API objects
#
# Revision:... | 40.711111 | 112 | 0.578603 |
4a1d010d0e35727228500a6916df36586d449582 | 12,489 | py | Python | qa/rpc-tests/p2p-acceptblock.py | Masternode/mastercoin | 6f1a32f3bab23f3376b139513c12bc1e6fc03169 | [
"MIT"
] | null | null | null | qa/rpc-tests/p2p-acceptblock.py | Masternode/mastercoin | 6f1a32f3bab23f3376b139513c12bc1e6fc03169 | [
"MIT"
] | null | null | null | qa/rpc-tests/p2p-acceptblock.py | Masternode/mastercoin | 6f1a32f3bab23f3376b139513c12bc1e6fc03169 | [
"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.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from... | 42.624573 | 107 | 0.651373 |
4a1d01cb7b8653a177dc7a774e8cd56fbf432f58 | 1,037 | py | Python | quickstarts/docs/api/python/source/azure/azure_vpng_delete_connection.py | NetFoundry/mop-samples | b0a3a9a6415a9f9cf3fda526a1e70450f5fe2ec6 | [
"Apache-2.0"
] | 1 | 2020-05-13T19:30:17.000Z | 2020-05-13T19:30:17.000Z | quickstarts/docs/api/python/source/azure/azure_vpng_delete_connection.py | NetFoundry/mop-samples | b0a3a9a6415a9f9cf3fda526a1e70450f5fe2ec6 | [
"Apache-2.0"
] | 3 | 2020-05-22T17:41:46.000Z | 2021-04-17T02:29:45.000Z | quickstarts/docs/api/python/source/azure/azure_vpng_delete_connection.py | NetFoundry/mop-samples | b0a3a9a6415a9f9cf3fda526a1e70450f5fe2ec6 | [
"Apache-2.0"
] | 1 | 2020-05-13T19:31:05.000Z | 2020-05-13T19:31:05.000Z | #!/usr/bin/python3
"""Disconnect VPN Site to VPN Gateway."""
import os
from azure.mgmt.network import NetworkManagementClient
from azure.common.credentials import ServicePrincipalCredentials
# setup Azure Login Credentials from Environmental Variables
credentials = ServicePrincipalCredentials(
client_id=os... | 35.758621 | 93 | 0.768563 |
4a1d043d15ec9bd59a0663c526fb33c6a2a2031d | 14,132 | py | Python | scale/plot.py | kridsadakorn/SCALE | 1fcb9ddec1cfe258c3a6507c3bea551de41a2ee4 | [
"MIT"
] | null | null | null | scale/plot.py | kridsadakorn/SCALE | 1fcb9ddec1cfe258c3a6507c3bea551de41a2ee4 | [
"MIT"
] | null | null | null | scale/plot.py | kridsadakorn/SCALE | 1fcb9ddec1cfe258c3a6507c3bea551de41a2ee4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
# Author: Xiong Lei
# Created Time : Mon 09 Apr 2018 07:36:48 PM CST
# File Name: plotting.py
# Description:
"""
import numpy as np
import pandas as pd
import matplotlib
matplotlib.use('agg')
from matplotlib import pyplot as plt
import seaborn as sns
# import os
# plt.rcParams['savefig.dpi... | 33.971154 | 122 | 0.574016 |
4a1d061153f98b6da38154d405565fcc81e1f36f | 2,268 | py | Python | tensorflow/tensorboard/backend/json_util_test.py | AlexChrisF/udacity | b7f85a74058fc63ccb7601c418450ab934ef5953 | [
"Apache-2.0"
] | 22 | 2017-06-26T01:27:45.000Z | 2021-06-23T10:00:31.000Z | tensorflow/tensorboard/backend/json_util_test.py | AlexChrisF/udacity | b7f85a74058fc63ccb7601c418450ab934ef5953 | [
"Apache-2.0"
] | 7 | 2017-07-13T09:40:59.000Z | 2019-04-08T22:46:51.000Z | tensorflow/tensorboard/backend/json_util_test.py | AlexChrisF/udacity | b7f85a74058fc63ccb7601c418450ab934ef5953 | [
"Apache-2.0"
] | 38 | 2017-04-28T04:15:48.000Z | 2019-09-28T05:11:46.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... | 34.892308 | 80 | 0.701058 |
4a1d072f07b2fc956b6cbd68c93ba3caac14ff1a | 3,305 | py | Python | enaml/qt/qt_date_selector.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | 26 | 2016-04-01T18:49:31.000Z | 2020-07-21T22:19:46.000Z | enaml/qt/qt_date_selector.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | 29 | 2016-02-22T17:40:55.000Z | 2018-08-21T18:18:36.000Z | enaml/qt/qt_date_selector.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | 4 | 2015-01-27T01:56:14.000Z | 2021-02-23T07:21:20.000Z | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | 28.247863 | 79 | 0.512557 |
4a1d089742717a8f98faf63c0c97dd43984dedd4 | 1,717 | py | Python | onnx/backend/test/case/node/convinteger.py | pchandrasekaran1595/onnx | 10da6f2e919c8515877e227a41cd44e86ae0bb2d | [
"Apache-2.0"
] | 12,820 | 2017-09-07T07:00:24.000Z | 2022-03-31T14:41:57.000Z | onnx/backend/test/case/node/convinteger.py | pchandrasekaran1595/onnx | 10da6f2e919c8515877e227a41cd44e86ae0bb2d | [
"Apache-2.0"
] | 3,213 | 2017-09-07T17:48:17.000Z | 2022-03-31T19:44:57.000Z | onnx/backend/test/case/node/convinteger.py | pchandrasekaran1595/onnx | 10da6f2e919c8515877e227a41cd44e86ae0bb2d | [
"Apache-2.0"
] | 2,922 | 2017-09-07T07:46:00.000Z | 2022-03-31T15:55:24.000Z | # SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np # type: ignore
import onnx
from ..base import Base
from . import expect
class ConvInteger(Base):
@static... | 34.34 | 117 | 0.598719 |
4a1d08b8797a0d581ed34a96a359965b8fbaf54e | 7,595 | py | Python | dgm4nlp/tf/tri.py | uva-slpl/dgm4nlp | 9c5b3a4bc3f5e9b4f971d5b9bbad70e19bb12f8c | [
"MIT"
] | null | null | null | dgm4nlp/tf/tri.py | uva-slpl/dgm4nlp | 9c5b3a4bc3f5e9b4f971d5b9bbad70e19bb12f8c | [
"MIT"
] | null | null | null | dgm4nlp/tf/tri.py | uva-slpl/dgm4nlp | 9c5b3a4bc3f5e9b4f971d5b9bbad70e19bb12f8c | [
"MIT"
] | null | null | null | """Utilities for probability distributions."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools
import hashlib
import numpy as np
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import dtypes
from tensor... | 40.614973 | 80 | 0.604872 |
4a1d08ed80d4dc6149ac9cd752adbc47d052d265 | 1,502 | py | Python | facial_landmarks/app.py | alwaysai/facial_landmarks_with_dlib | 1eb3a4384cc3304c53fe705fc06cba31972ed4e8 | [
"Apache-2.0"
] | 4 | 2020-09-03T08:44:22.000Z | 2020-10-14T18:57:43.000Z | facial_landmarks/app.py | alwaysai/facial_landmarks_with_dlib | 1eb3a4384cc3304c53fe705fc06cba31972ed4e8 | [
"Apache-2.0"
] | null | null | null | facial_landmarks/app.py | alwaysai/facial_landmarks_with_dlib | 1eb3a4384cc3304c53fe705fc06cba31972ed4e8 | [
"Apache-2.0"
] | 2 | 2020-09-05T08:26:07.000Z | 2020-09-24T10:33:22.000Z | import edgeiq
import facial_landmarks
import cv2
def main():
text = "Facial Landmarks with Dlib"
try:
shape_predictor = "shape_predictor_68_face_landmarks.dat"
dlib_flm = facial_landmarks.Dlib_FLM(shape_predictor)
image_paths = sorted(list(edgeiq.list_images("images/")))
print... | 36.634146 | 89 | 0.565246 |
4a1d0a151751f58ac1d5d62f0e39aae3f98126db | 10,524 | py | Python | dist/ba_data/python/ba/_hooks.py | Bartixxx32/Bombsquad-Ballistica-Modded-Server | 26d36f07a5b96702e4fbdf172c0d66671f1ee0bd | [
"MIT"
] | 21 | 2021-03-29T05:49:35.000Z | 2022-03-18T09:02:34.000Z | dist/ba_data/python/ba/_hooks.py | Bartixxx32/Bombsquad-Ballistica-Modded-Server | 26d36f07a5b96702e4fbdf172c0d66671f1ee0bd | [
"MIT"
] | 15 | 2021-04-10T11:08:09.000Z | 2022-03-22T07:48:58.000Z | dist/ba_data/python/ba/_hooks.py | Bartixxx32/Bombsquad-Ballistica-Modded-Server | 26d36f07a5b96702e4fbdf172c0d66671f1ee0bd | [
"MIT"
] | 31 | 2021-03-29T05:54:57.000Z | 2022-03-22T16:58:57.000Z | # Released under the MIT License. See LICENSE for details.
#
"""Snippets of code for use by the internal C++ layer.
History: originally I would dynamically compile/eval bits of Python text
from within C++ code, but the major downside there was that none of that was
type-checked so if names or arguments changed I would... | 28.214477 | 79 | 0.688712 |
4a1d0b4f8e9df8e6a8da9d9e55f6f28cd26dddb8 | 976 | py | Python | test_rt.py | uschen/DSFD-Pytorch-Inference | 8fce6ca3a4d91f638e77b861919bfef3f86e4580 | [
"Apache-2.0"
] | null | null | null | test_rt.py | uschen/DSFD-Pytorch-Inference | 8fce6ca3a4d91f638e77b861919bfef3f86e4580 | [
"Apache-2.0"
] | null | null | null | test_rt.py | uschen/DSFD-Pytorch-Inference | 8fce6ca3a4d91f638e77b861919bfef3f86e4580 | [
"Apache-2.0"
] | null | null | null | import glob
import os
import cv2
import time
import face_detection
from face_detection.retinaface.tensorrt_wrap import TensorRTRetinaFace
def draw_faces(im, bboxes):
for bbox in bboxes:
x0, y0, x1, y1 = [int(_) for _ in bbox]
cv2.rectangle(im, (x0, y0), (x1, y1), (0, 0, 255), 2)
if __name__ == "__... | 31.483871 | 72 | 0.615779 |
4a1d0bf86f67c1abd0be967d5465bf515dae4f02 | 2,440 | py | Python | scr/visualization/visualize_united_states_temporal.py | luyuliu/COVID-Transit-Demand | 0b44cdec2c40ec48fd24b4bd7dfdc0573fbec777 | [
"MIT"
] | null | null | null | scr/visualization/visualize_united_states_temporal.py | luyuliu/COVID-Transit-Demand | 0b44cdec2c40ec48fd24b4bd7dfdc0573fbec777 | [
"MIT"
] | null | null | null | scr/visualization/visualize_united_states_temporal.py | luyuliu/COVID-Transit-Demand | 0b44cdec2c40ec48fd24b4bd7dfdc0573fbec777 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import scipy.optimize
import csv
import os
from datetime import date
from pymongo import MongoClient, ASCENDING
from scipy.optimize import leastsq
client = MongoClient('mongodb://localhost:27017/')
db_corona = client.corona
col_system = db_corona.system_info
col_case ... | 24.897959 | 176 | 0.620082 |
4a1d0c18bb1c62b83b6cd118997f98927a0ff973 | 1,298 | py | Python | e5.py | SNH48Live/snh48g-livestreams-analysis | 6ceb43ba054779c6d0557ff0533fc4e511c11f34 | [
"MIT"
] | null | null | null | e5.py | SNH48Live/snh48g-livestreams-analysis | 6ceb43ba054779c6d0557ff0533fc4e511c11f34 | [
"MIT"
] | null | null | null | e5.py | SNH48Live/snh48g-livestreams-analysis | 6ceb43ba054779c6d0557ff0533fc4e511c11f34 | [
"MIT"
] | null | null | null | G1 = [
('李艺彤', 16),
('黄婷婷', 22),
('冯薪朵', 7),
('陆婷', 34),
('莫寒', 35),
('赵粤', 27),
('许佳琪', 21),
('戴萌', 38),
('钱蓓婷', 36),
('林思意', 24),
('谢蕾蕾', 63572),
('吴哲晗', 39),
('孔肖吟', 19),
('苏杉杉', 327597),
('段艺璇', 63554),
('张语格', 1),
]
G2 = [
('孙芮', 8),
('郑丹妮', ... | 16.641026 | 20 | 0.365948 |
4a1d0caff8c1b2ecd594c05ebdf12ec563307ece | 14,234 | py | Python | pandasgui/gui.py | ruben-itinera/pandasgui | 11041860a95cdc730bcac550c7bb54dc2d1804d4 | [
"MIT"
] | 1 | 2020-04-23T14:35:46.000Z | 2020-04-23T14:35:46.000Z | pandasgui/gui.py | ruben-itinera/pandasgui | 11041860a95cdc730bcac550c7bb54dc2d1804d4 | [
"MIT"
] | null | null | null | pandasgui/gui.py | ruben-itinera/pandasgui | 11041860a95cdc730bcac550c7bb54dc2d1804d4 | [
"MIT"
] | null | null | null | """Defines the main PandasGUI class and related functions"""
import inspect
import sys
import os
import pkg_resources
import pandas as pd
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt
from pandasgui.widgets import PivotDialog, ScatterDialog
from pandasgui.widgets import DataFrameExplorer
from ... | 34.972973 | 120 | 0.623296 |
4a1d0e170def99eefa351889e867e1c81629ed42 | 391 | py | Python | botree/models.py | ericmiguel/botree | 289ca8c966d4b1592240b4da0179825907c86579 | [
"MIT"
] | 2 | 2021-11-18T20:25:24.000Z | 2021-11-22T16:53:41.000Z | botree/models.py | ericmiguel/botree | 289ca8c966d4b1592240b4da0179825907c86579 | [
"MIT"
] | null | null | null | botree/models.py | ericmiguel/botree | 289ca8c966d4b1592240b4da0179825907c86579 | [
"MIT"
] | null | null | null | from typing import Dict
from typing import Union
from pydantic import BaseModel
from pydantic import Field
class ResponseMetadata(BaseModel):
request_id: str = Field("", alias="RequestId")
http_status_code: int = Field(200, alias="HTTPStatusCode")
http_headers: Dict[str, Union[str, int]] = Field(alias="H... | 30.076923 | 73 | 0.744246 |
4a1d0e183bd57a15d96ce04f60a01042fd5eea5e | 319 | py | Python | tests/test_skeleton.py | ashrafuzzaman/pdf-wordcloud | 38fa37bffcc71eda734432d8d9005f9bfb0f4229 | [
"MIT"
] | null | null | null | tests/test_skeleton.py | ashrafuzzaman/pdf-wordcloud | 38fa37bffcc71eda734432d8d9005f9bfb0f4229 | [
"MIT"
] | null | null | null | tests/test_skeleton.py | ashrafuzzaman/pdf-wordcloud | 38fa37bffcc71eda734432d8d9005f9bfb0f4229 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
from pdf_wordcloud.skeleton import fib
__author__ = "A.K.M. Ashrafuzzaman"
__copyright__ = "A.K.M. Ashrafuzzaman"
__license__ = "mit"
def test_fib():
assert fib(1) == 1
assert fib(2) == 1
assert fib(7) == 13
with pytest.raises(AssertionError):
fib(-10)
| 18.764706 | 39 | 0.642633 |
4a1d0e87fd6ce1682417ec6c7056e90c93e466d8 | 2,247 | py | Python | crowd_anki/history/archiver_vendor.py | katrinleinweber/CrowdAnki | c78d837e082365d69bde5b1361b1dd4d11cd3d63 | [
"MIT"
] | 391 | 2016-08-31T21:55:07.000Z | 2022-03-30T16:30:12.000Z | crowd_anki/history/archiver_vendor.py | katrinleinweber/CrowdAnki | c78d837e082365d69bde5b1361b1dd4d11cd3d63 | [
"MIT"
] | 150 | 2016-09-01T00:35:35.000Z | 2022-03-30T23:26:48.000Z | crowd_anki/history/archiver_vendor.py | katrinleinweber/CrowdAnki | c78d837e082365d69bde5b1361b1dd4d11cd3d63 | [
"MIT"
] | 51 | 2016-09-04T17:02:39.000Z | 2022-02-04T11:49:10.000Z | from dataclasses import field, dataclass
from pathlib import Path
from typing import Any
from .anki_deck_archiver import AnkiDeckArchiver
from .archiver import AllDeckArchiver
from .dulwich_repo import DulwichAnkiRepo
from ..anki.adapters.deck_manager import AnkiStaticDeckManager, DeckManager
from ..anki.ui.utils impo... | 39.421053 | 121 | 0.689809 |
4a1d0f5d087cd5a51153320f152d3dc358f0cb11 | 90 | py | Python | animals/admin.py | sourovw/rescue-and-adoption-system | 3852d0e512abe34b1a2ccafd2808a575139045f3 | [
"BSD-3-Clause"
] | 5 | 2021-08-05T07:47:31.000Z | 2021-08-07T16:06:10.000Z | animals/admin.py | sourovw/rescue-and-adoption-system | 3852d0e512abe34b1a2ccafd2808a575139045f3 | [
"BSD-3-Clause"
] | null | null | null | animals/admin.py | sourovw/rescue-and-adoption-system | 3852d0e512abe34b1a2ccafd2808a575139045f3 | [
"BSD-3-Clause"
] | 4 | 2021-08-05T08:19:33.000Z | 2021-08-09T20:08:15.000Z | from django.contrib import admin
from .models import Animal
admin.site.register(Animal)
| 15 | 32 | 0.811111 |
4a1d10027d9b555163795ebb06163646554883b5 | 2,135 | py | Python | test/test_run.py | kuri8ive/gokart | 7492248e28b159e2790882e7c96bfd938952dedf | [
"MIT"
] | 1 | 2021-07-06T23:37:49.000Z | 2021-07-06T23:37:49.000Z | test/test_run.py | kuri8ive/gokart | 7492248e28b159e2790882e7c96bfd938952dedf | [
"MIT"
] | null | null | null | test/test_run.py | kuri8ive/gokart | 7492248e28b159e2790882e7c96bfd938952dedf | [
"MIT"
] | null | null | null | import os
import unittest
from unittest.mock import patch
import luigi
import luigi.mock
import gokart
class _DummyTask(gokart.TaskOnKart):
task_namespace = __name__
param = luigi.Parameter()
class RunTest(unittest.TestCase):
def setUp(self):
luigi.configuration.LuigiConfigParser._instance = N... | 41.862745 | 189 | 0.696956 |
4a1d106e17936230bafba3f86ce4465613d67bae | 1,514 | py | Python | selvbetjening/core/members/models.py | animekita/selvbetjening | fee63d178fbd5ce2976c04d3a4b2dde6d8691892 | [
"MIT"
] | null | null | null | selvbetjening/core/members/models.py | animekita/selvbetjening | fee63d178fbd5ce2976c04d3a4b2dde6d8691892 | [
"MIT"
] | 3 | 2020-02-11T21:54:59.000Z | 2021-06-10T17:35:21.000Z | selvbetjening/core/members/models.py | animekita/selvbetjening | fee63d178fbd5ce2976c04d3a4b2dde6d8691892 | [
"MIT"
] | null | null | null | # coding=UTF-8
import datetime
from django.contrib.auth import get_user_model
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import post_save
from countries.models import Country
from selvbetjening.core.user.models import SUser
import signals
de... | 27.527273 | 92 | 0.729855 |
4a1d10a0975a06ab154c83fa19a173b036812339 | 168 | py | Python | Server/inputs.py | qqgg231/PyMail | 256af9dd9f16bb748131153e00df4661118d5404 | [
"MIT"
] | 22 | 2018-10-04T02:58:36.000Z | 2021-11-12T11:15:17.000Z | Server/inputs.py | qqgg231/PyMail | 256af9dd9f16bb748131153e00df4661118d5404 | [
"MIT"
] | 3 | 2018-11-02T12:47:42.000Z | 2018-11-02T19:16:03.000Z | Server/inputs.py | qqgg231/PyMail | 256af9dd9f16bb748131153e00df4661118d5404 | [
"MIT"
] | 5 | 2018-11-02T11:51:40.000Z | 2020-12-07T15:30:26.000Z | import graphene
# Arguments you want to query
class MessagesInput(graphene.InputObjectType):
_id = graphene.ID(required=False)
name = graphene.String(required=False) | 28 | 46 | 0.803571 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.