hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d7702a9b2e58db18587254af35a4b4199fcc47d0 | 1,386 | py | Python | plio/sqlalchemy_json/alchemy.py | kaitlyndlee/plio | 99f0852d8eb92efeba72f366077bd023a7da7cdd | [
"Unlicense"
] | 11 | 2018-02-01T02:56:26.000Z | 2022-02-21T12:08:12.000Z | plio/sqlalchemy_json/alchemy.py | kaitlyndlee/plio | 99f0852d8eb92efeba72f366077bd023a7da7cdd | [
"Unlicense"
] | 151 | 2016-06-15T21:31:37.000Z | 2021-11-15T16:55:53.000Z | plio/sqlalchemy_json/alchemy.py | kaitlyndlee/plio | 99f0852d8eb92efeba72f366077bd023a7da7cdd | [
"Unlicense"
] | 21 | 2016-06-17T17:02:39.000Z | 2021-03-08T20:47:50.000Z | # Third-party modules
try:
import simplejson as json
except ImportError:
import json
import sqlalchemy
from sqlalchemy.ext import mutable
# Custom modules
from . import track
class NestedMutable(mutable.MutableDict, track.TrackedDict):
"""SQLAlchemy `mutable` extension dictionary with nested change tracking."... | 27.176471 | 78 | 0.752525 | 1,097 | 0.791486 | 0 | 0 | 243 | 0.175325 | 0 | 0 | 430 | 0.310245 |
d77119de6b793cbac0f2940da62fd48d954f6aef | 165 | py | Python | squirrel/__main__.py | egxdigital/squirrel | f4c5dbead63788a088d24b28b6cd8ad283585eaa | [
"MIT"
] | null | null | null | squirrel/__main__.py | egxdigital/squirrel | f4c5dbead63788a088d24b28b6cd8ad283585eaa | [
"MIT"
] | null | null | null | squirrel/__main__.py | egxdigital/squirrel | f4c5dbead63788a088d24b28b6cd8ad283585eaa | [
"MIT"
] | null | null | null | """Squirrel Main
This module contains the entry point code for the Squirrel program.
"""
from squirrel.squirrel import main
if __name__ == '__main__':
main() | 16.5 | 67 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.6 |
d7741c04bf8fcb98f38a8a2f9343cab79bc9f668 | 394 | py | Python | clairvoyance/preprocessing/__init__.py | ZhaozhiQIAN/SyncTwin-NeurIPS-2021 | 78eff91d0287c7f1f66c76ca24834c7d1029ad3b | [
"MIT"
] | 5 | 2021-11-23T08:41:08.000Z | 2022-03-06T16:20:37.000Z | clairvoyance/preprocessing/__init__.py | ZhaozhiQIAN/SyncTwin-NeurIPS-2021 | 78eff91d0287c7f1f66c76ca24834c7d1029ad3b | [
"MIT"
] | null | null | null | clairvoyance/preprocessing/__init__.py | ZhaozhiQIAN/SyncTwin-NeurIPS-2021 | 78eff91d0287c7f1f66c76ca24834c7d1029ad3b | [
"MIT"
] | 2 | 2021-11-16T16:10:53.000Z | 2021-12-28T07:13:03.000Z | from .encoding import (
MinMaxNormalizer,
Normalizer,
OneHotEncoder,
ProblemMaker,
ReNormalizer,
StandardNormalizer,
)
from .outlier_filter import FilterNegative, FilterOutOfRange
__all__ = [
"FilterNegative",
"FilterOutOfRange",
"OneHotEncoder",
"MinMaxNormalizer",
"Standar... | 18.761905 | 60 | 0.687817 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.322335 |
d7751bcbe755b9830a28eda231e1c57944ba867e | 3,659 | py | Python | csrc/layers/cfc2.py | radu-dogaru/numpyCNN | efe8749d7a35156ff9e67e7cc6df62a8077bf2ea | [
"MIT"
] | null | null | null | csrc/layers/cfc2.py | radu-dogaru/numpyCNN | efe8749d7a35156ff9e67e7cc6df62a8077bf2ea | [
"MIT"
] | null | null | null | csrc/layers/cfc2.py | radu-dogaru/numpyCNN | efe8749d7a35156ff9e67e7cc6df62a8077bf2ea | [
"MIT"
] | null | null | null | import cupy as cp
from csrc.activation import SoftMax
from csrc.layers.layer import Layer
# Cu sinapsa comparativa GPU
from csrc.comp_syn import cp_comp
class C2FullyConnected(Layer):
"""Densely connected layer (comparative).
Attributes
----------
size : int
Number of neurons.
activa... | 30.239669 | 97 | 0.543591 | 3,498 | 0.955999 | 0 | 0 | 0 | 0 | 0 | 0 | 2,023 | 0.552883 |
d7756e6a29e9091ac15a875449e344d6705dafd8 | 4,640 | py | Python | ryu/app/network_ding/network_loss.py | nicePaul521/Ryu | fc1b5b79dbeac5164d0bc29006439bebb94a891c | [
"Apache-2.0"
] | null | null | null | ryu/app/network_ding/network_loss.py | nicePaul521/Ryu | fc1b5b79dbeac5164d0bc29006439bebb94a891c | [
"Apache-2.0"
] | null | null | null | ryu/app/network_ding/network_loss.py | nicePaul521/Ryu | fc1b5b79dbeac5164d0bc29006439bebb94a891c | [
"Apache-2.0"
] | null | null | null | from ryu.controller import ofp_event
from ryu.controller.handler import MAIN_DISPATCHER,DEAD_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.base.app_manager import lookup_service_brick
from ryu.lib import hub
from ryu.base import app_manager
from operator import attrgetter
import setting
class PortM... | 45.048544 | 123 | 0.561422 | 4,329 | 0.932974 | 0 | 0 | 1,512 | 0.325862 | 0 | 0 | 761 | 0.164009 |
d7760b7f6c4a005bf5f4aee31cc5261044469478 | 875 | py | Python | dealWithDataNpy.py | ItGirls/autoencoding_vi_for_topic_models | 10e47a3dffc92ed9373f7dd55dc66ea034097a32 | [
"MIT"
] | null | null | null | dealWithDataNpy.py | ItGirls/autoencoding_vi_for_topic_models | 10e47a3dffc92ed9373f7dd55dc66ea034097a32 | [
"MIT"
] | null | null | null | dealWithDataNpy.py | ItGirls/autoencoding_vi_for_topic_models | 10e47a3dffc92ed9373f7dd55dc66ea034097a32 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3
# -*-coding:utf-8 -*-
"""
@Date : 2020/7/28 下午7:01
@Author : zhutingting
@Desc : ==============================================
Blowing in the wind. ===
# ======================================================
@Project : autoencoding_vi_for_topic_models
@FileName: dealWithDataNpy.py
@So... | 21.341463 | 98 | 0.596571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 460 | 0.523322 |
d7761ae1988375a09b4acc44806bcabebad35bcd | 557 | py | Python | yoga/project/yoga/Database/migrations/0001_initial.py | sherlklee/yoga | fcfdfa2b326f20f2218b69fce6f881ff5d11d47b | [
"MIT"
] | null | null | null | yoga/project/yoga/Database/migrations/0001_initial.py | sherlklee/yoga | fcfdfa2b326f20f2218b69fce6f881ff5d11d47b | [
"MIT"
] | null | null | null | yoga/project/yoga/Database/migrations/0001_initial.py | sherlklee/yoga | fcfdfa2b326f20f2218b69fce6f881ff5d11d47b | [
"MIT"
] | 1 | 2019-06-04T01:53:52.000Z | 2019-06-04T01:53:52.000Z | # Generated by Django 2.2.1 on 2019-06-03 11:46
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Customer',
fields=[
('username', models.Cha... | 24.217391 | 97 | 0.578097 | 464 | 0.833034 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.174147 |
d776fa923d096d8bed7a6623cbd0a90df2ecdfdb | 9,604 | py | Python | 1GDL - Newmark.py | ZibraMax/tkinter-y-sus-cosas | 713e0b5e4771fdc31f55dc29f3aeb58795587208 | [
"MIT"
] | null | null | null | 1GDL - Newmark.py | ZibraMax/tkinter-y-sus-cosas | 713e0b5e4771fdc31f55dc29f3aeb58795587208 | [
"MIT"
] | null | null | null | 1GDL - Newmark.py | ZibraMax/tkinter-y-sus-cosas | 713e0b5e4771fdc31f55dc29f3aeb58795587208 | [
"MIT"
] | null | null | null | import math
from tkinter import Tk, Canvas, W, E, NW
from tkinter.filedialog import askopenfilename
from tkinter import messagebox
from scipy.interpolate import interp1d
import time
import numpy as np
# Definición recursiva, requiere numpy
# def B(t,P):
# if len(P)==1:
# return np.array(P[0])
# else:
# ... | 29.733746 | 372 | 0.500729 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,151 | 0.119808 |
d7771b4290c405990f615c022afc0dd3a2f27b5e | 3,216 | py | Python | python/parserDev/brothon/live_simulator.py | jzadeh/aktaion | 485488908e88212e615cd8bde04c6b1b63403cd0 | [
"Apache-2.0"
] | 112 | 2017-07-26T00:30:29.000Z | 2021-11-09T14:02:12.000Z | python/parserDev/brothon/live_simulator.py | jzadeh/aktaion | 485488908e88212e615cd8bde04c6b1b63403cd0 | [
"Apache-2.0"
] | null | null | null | python/parserDev/brothon/live_simulator.py | jzadeh/aktaion | 485488908e88212e615cd8bde04c6b1b63403cd0 | [
"Apache-2.0"
] | 38 | 2017-07-28T03:09:01.000Z | 2021-05-07T03:21:32.000Z | """LiveSimulator: This class reads in various Bro IDS logs. The class utilizes
the BroLogReader and simply loops over the static bro log
file, replaying rows and changing any time stamps
Args:
eps (int): Events Per Second that the simulator will emit events (default... | 33.852632 | 129 | 0.627799 | 2,039 | 0.634017 | 686 | 0.213308 | 186 | 0.057836 | 0 | 0 | 1,757 | 0.546331 |
d7774dc77e51cb47753ab4f85b00f22b278e1195 | 2,488 | py | Python | dataset_scripts/merge_results_as_csv.py | contec-korong/r3det-on-mmdetection | 4a78a0b3330d0fcb9c017a5c97d06a92cf85ebac | [
"Apache-2.0"
] | null | null | null | dataset_scripts/merge_results_as_csv.py | contec-korong/r3det-on-mmdetection | 4a78a0b3330d0fcb9c017a5c97d06a92cf85ebac | [
"Apache-2.0"
] | null | null | null | dataset_scripts/merge_results_as_csv.py | contec-korong/r3det-on-mmdetection | 4a78a0b3330d0fcb9c017a5c97d06a92cf85ebac | [
"Apache-2.0"
] | null | null | null | from glob import glob
import os
import pandas as pd
import argparse
CATEGORIES_5 = ('background', 'small ship', 'large ship', 'individual container', 'grouped container', 'crane')
CATEGORIES_15 = ('background', 'small ship', 'large ship', 'civilian aircraft', 'military aircraft', 'small car', 'bus', 'truck', 'train',
... | 43.649123 | 138 | 0.58963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,068 | 0.42926 |
d777be6f240c93857c87bee44f62377cde598f0d | 12,511 | py | Python | testcases/OpTestIPMILockMode.py | vaibhav92/op-test-framework | 792fa18d3f09fd8c28073074815ff96d373ab96d | [
"Apache-2.0"
] | null | null | null | testcases/OpTestIPMILockMode.py | vaibhav92/op-test-framework | 792fa18d3f09fd8c28073074815ff96d373ab96d | [
"Apache-2.0"
] | null | null | null | testcases/OpTestIPMILockMode.py | vaibhav92/op-test-framework | 792fa18d3f09fd8c28073074815ff96d373ab96d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: op-test-framework/testcases/OpTestIPMILockMode.py $
#
# OpenPOWER Automated Test Project
#
# Contributors Listed Below - COPYRIGHT 2015
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache Lice... | 41.842809 | 104 | 0.671809 | 10,992 | 0.878587 | 0 | 0 | 0 | 0 | 0 | 0 | 5,522 | 0.441372 |
d779c2a2f911575752519902fdcf73487b5c0405 | 1,446 | py | Python | scripts/update_pins.py | machow/gh-projects-cli | f0e414f7d900ac5546bab0ec6f1448a0f36bf300 | [
"MIT"
] | null | null | null | scripts/update_pins.py | machow/gh-projects-cli | f0e414f7d900ac5546bab0ec6f1448a0f36bf300 | [
"MIT"
] | 6 | 2022-01-03T18:07:01.000Z | 2022-01-04T01:22:07.000Z | scripts/update_pins.py | machow/gh-projects-cli | f0e414f7d900ac5546bab0ec6f1448a0f36bf300 | [
"MIT"
] | null | null | null | import jq
from dotenv import load_dotenv
from gh_projects import (
update_project_with_repo_issues,
fetch_all_issues,
push_issues_to_project_next,
)
load_dotenv()
PROJECT_ID = "PN_kwHOACdIos4AAto7"
# fetch_project_item_issue_ids("PN_kwHOACdIos4AAYbQ")
all_issues = fetch_all_issues("machow", "pins-pyth... | 25.821429 | 89 | 0.667358 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 902 | 0.62379 |
d77c6fdb8c4f6bbd8699fdd1ff1c22e620654dfe | 7,061 | py | Python | aiosvc/amqp/pool.py | acsnem/aiosvc | 5bb316fe6958d4143bc0434f6dfbe9bfa9328916 | [
"MIT"
] | null | null | null | aiosvc/amqp/pool.py | acsnem/aiosvc | 5bb316fe6958d4143bc0434f6dfbe9bfa9328916 | [
"MIT"
] | null | null | null | aiosvc/amqp/pool.py | acsnem/aiosvc | 5bb316fe6958d4143bc0434f6dfbe9bfa9328916 | [
"MIT"
] | null | null | null | import logging
import asyncio
from aiosvc import Componet
from .simple import Publisher
# class Pool(Componet):
#
# def __init__(self, exchange, *, publish_timeout=5, try_publish_interval=.9, size=1, max_size=2, loop=None, start_priority=1):
# super().__init__(loop=loop, start_priority=start_priority)
# ... | 31.950226 | 131 | 0.578813 | 6,622 | 0.937828 | 0 | 0 | 0 | 0 | 3,454 | 0.489166 | 2,080 | 0.294576 |
d77d2bb48907dd464ade365bdb00dd8e8c032d0d | 2,364 | py | Python | src/result.py | danbailo/T2-Analise-Algoritmos | 5335207307e68594f1669653fe871624cd2f3163 | [
"MIT"
] | 1 | 2019-05-16T16:04:01.000Z | 2019-05-16T16:04:01.000Z | src/result.py | danbailo/T2-Analise-Algoritmos-I | 5335207307e68594f1669653fe871624cd2f3163 | [
"MIT"
] | null | null | null | src/result.py | danbailo/T2-Analise-Algoritmos-I | 5335207307e68594f1669653fe871624cd2f3163 | [
"MIT"
] | null | null | null | from knapsack import Knapsack, read_instances, organize_instances
from os import path,mkdir
from platform import system
import json
def number_solutions(n):
with open('./number_of_results.txt', 'w') as result_txt: result_txt.write(n)
try:
number = int(n)
if number == 0:
print('\n0 ... | 44.603774 | 103 | 0.615059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 772 | 0.326565 |
d77d6e7fb86f611447c66f19c0c89a6591454f10 | 162 | py | Python | parse.py | lpmi-13/telegramStressBot | d6968108347e1215a97c6f8a2a2801e3770874d7 | [
"MIT"
] | null | null | null | parse.py | lpmi-13/telegramStressBot | d6968108347e1215a97c6f8a2a2801e3770874d7 | [
"MIT"
] | 2 | 2017-05-08T21:03:37.000Z | 2020-10-25T05:16:55.000Z | parse.py | lpmi-13/telegramStressBot | d6968108347e1215a97c6f8a2a2801e3770874d7 | [
"MIT"
] | null | null | null | import nltk
from nltk import word_tokenize
def create_POS_tags(sentence):
parsedSentence = word_tokenize(sentence)
return nltk.pos_tag(parsedSentence)
| 18 | 44 | 0.796296 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d77e06fa86733c3b6164292916851025cf9ee6e3 | 472 | py | Python | matplotlib_examples/examples_src/pylab_examples/ellipse_demo.py | xzlmark/webspider | 133c620c65aa45abea1718b0dada09618c2115bf | [
"Apache-2.0"
] | 3 | 2020-04-09T02:35:26.000Z | 2021-02-27T17:00:21.000Z | matplotlib_examples/examples_src/pylab_examples/ellipse_demo.py | colorworlds/webspider | 133c620c65aa45abea1718b0dada09618c2115bf | [
"Apache-2.0"
] | null | null | null | matplotlib_examples/examples_src/pylab_examples/ellipse_demo.py | colorworlds/webspider | 133c620c65aa45abea1718b0dada09618c2115bf | [
"Apache-2.0"
] | 1 | 2020-04-09T02:35:08.000Z | 2020-04-09T02:35:08.000Z | import matplotlib.pyplot as plt
import numpy.random as rnd
from matplotlib.patches import Ellipse
NUM = 250
ells = [Ellipse(xy=rnd.rand(2)*10, width=rnd.rand(), height=rnd.rand(), angle=rnd.rand()*360)
for i in range(NUM)]
fig = plt.figure(0)
ax = fig.add_subplot(111, aspect='equal')
for e in ells:
ax.ad... | 21.454545 | 93 | 0.684322 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.014831 |
d77e372f71687020e3c52a4156b4641851c6ee87 | 2,779 | py | Python | messageAnalysis.py | brennanmcmicking/message-counter | 912abb960ce3e67648c766ddadac829ad80033cb | [
"MIT"
] | null | null | null | messageAnalysis.py | brennanmcmicking/message-counter | 912abb960ce3e67648c766ddadac829ad80033cb | [
"MIT"
] | null | null | null | messageAnalysis.py | brennanmcmicking/message-counter | 912abb960ce3e67648c766ddadac829ad80033cb | [
"MIT"
] | null | null | null |
# Standard library imports
import glob
import json
import argparse
# Third-party imports
import pandas as pd
# Parse command line parameters
parser = argparse.ArgumentParser(description='''
Process facebook json message data. The messages directory from the data download must
be in the current w... | 28.357143 | 92 | 0.652393 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 962 | 0.346168 |
d77fd3ef68e31fafb19d287504f750c6ea163eef | 14,162 | py | Python | robogen/rgkit/backup bots/KarenRoper10.py | andrewgailey/robogen | 7e96cfa26d2e6dc383c5d205816ddd98f8f100d7 | [
"Unlicense"
] | null | null | null | robogen/rgkit/backup bots/KarenRoper10.py | andrewgailey/robogen | 7e96cfa26d2e6dc383c5d205816ddd98f8f100d7 | [
"Unlicense"
] | null | null | null | robogen/rgkit/backup bots/KarenRoper10.py | andrewgailey/robogen | 7e96cfa26d2e6dc383c5d205816ddd98f8f100d7 | [
"Unlicense"
] | null | null | null | # Karen Roper 1.0 by Adam
# http://robotgame.net/viewrobot/7819
import rg
escapeSquares = []
globTurn = 0
class Robot:
def act(self, game):
# reset the escape squares for this turn
global escapeSquares
global globTurn
if globTurn != game.turn:
globTurn = game.turn
... | 55.105058 | 167 | 0.492303 | 14,052 | 0.992233 | 0 | 0 | 0 | 0 | 0 | 0 | 2,860 | 0.201949 |
d7803ad66a3a0cc62d5dfd23d899e392e7609904 | 10,150 | py | Python | tests/cli/tools.py | CNR-ITTIG/plasodfaxp | 923797fc00664fa9e3277781b0334d6eed5664fd | [
"Apache-2.0"
] | 1 | 2019-09-26T08:16:30.000Z | 2019-09-26T08:16:30.000Z | tests/cli/tools.py | CNR-ITTIG/plasodfaxp | 923797fc00664fa9e3277781b0334d6eed5664fd | [
"Apache-2.0"
] | null | null | null | tests/cli/tools.py | CNR-ITTIG/plasodfaxp | 923797fc00664fa9e3277781b0334d6eed5664fd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the CLI tools classes."""
import argparse
import io
import sys
import unittest
from plaso.cli import tools
from plaso.lib import errors
from tests.cli import test_lib
class CLIToolTest(test_lib.CLIToolTestCase):
"""Tests for the CLI tool base class."""
_E... | 33.278689 | 79 | 0.670936 | 9,875 | 0.972332 | 0 | 0 | 0 | 0 | 0 | 0 | 3,731 | 0.367369 |
d780a8f6fa48d64a0962e1a1c43209f9666ae9dc | 18,108 | py | Python | src/sklearndf/transformation/wrapper/_wrapper.py | mtsokol/sklearndf | 172fb9d5497d6a8f5586d9f4d02e9b48b9bf62c3 | [
"Apache-2.0"
] | 37 | 2021-01-12T08:06:45.000Z | 2022-02-02T02:32:25.000Z | src/sklearndf/transformation/wrapper/_wrapper.py | mtsokol/sklearndf | 172fb9d5497d6a8f5586d9f4d02e9b48b9bf62c3 | [
"Apache-2.0"
] | 13 | 2021-01-20T13:03:13.000Z | 2022-03-04T15:44:58.000Z | src/sklearndf/transformation/wrapper/_wrapper.py | mtsokol/sklearndf | 172fb9d5497d6a8f5586d9f4d02e9b48b9bf62c3 | [
"Apache-2.0"
] | 4 | 2021-01-31T16:14:24.000Z | 2022-03-14T08:20:08.000Z | """
Core implementation of :mod:`sklearndf.transformation.wrapper`
"""
import logging
from abc import ABCMeta, abstractmethod
from typing import Any, Generic, List, Optional, TypeVar, Union
import numpy as np
import pandas as pd
from sklearn.base import TransformerMixin
from sklearn.compose import ColumnTransformer
f... | 33.783582 | 88 | 0.678264 | 15,985 | 0.882759 | 0 | 0 | 931 | 0.051414 | 0 | 0 | 6,013 | 0.332063 |
d7815d2c4c1816fa3330d39ab973353055d555f9 | 4,073 | py | Python | tests/test_graph.py | nokia/PyBGL | e9868361e5a3870b5247872a8c8c91a1c065fe84 | [
"BSD-3-Clause"
] | 11 | 2019-05-20T16:47:03.000Z | 2021-12-17T10:24:22.000Z | tests/test_graph.py | nokia/PyBGL | e9868361e5a3870b5247872a8c8c91a1c065fe84 | [
"BSD-3-Clause"
] | null | null | null | tests/test_graph.py | nokia/PyBGL | e9868361e5a3870b5247872a8c8c91a1c065fe84 | [
"BSD-3-Clause"
] | 3 | 2019-05-24T02:24:30.000Z | 2020-03-17T09:55:40.000Z | #!/usr/bin/env pytest-3
# -*- coding: utf-8 -*-
__author__ = "Marc-Olivier Buob"
__maintainer__ = "Marc-Olivier Buob"
__email__ = "marc-olivier.buob@nokia-bell-labs.com"
__copyright__ = "Copyright (C) 2020, Nokia"
__license__ = "BSD-3"
from pybgl.graph import *
from pybgl.graphviz import graph... | 33.661157 | 76 | 0.532286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.038547 |
d782321c51f6868ecf0aeda657d36d93a32a2794 | 18,087 | py | Python | tests/engine/test_error_handling.py | vanguard/sql_translate | 28ae149e54a300c3337b538691be80d878a7dbf2 | [
"Apache-2.0"
] | 3 | 2021-03-19T21:39:29.000Z | 2021-03-26T14:00:24.000Z | tests/engine/test_error_handling.py | vanguard/sql_translate | 28ae149e54a300c3337b538691be80d878a7dbf2 | [
"Apache-2.0"
] | 1 | 2021-07-07T11:45:04.000Z | 2021-07-07T11:45:04.000Z | tests/engine/test_error_handling.py | vanguard/sql_translate | 28ae149e54a300c3337b538691be80d878a7dbf2 | [
"Apache-2.0"
] | null | null | null | import unittest
import pytest
import sqlparse
from sql_translate.engine import error_handling
from typing import Dict, List
import re
E = error_handling._ErrorHandler() # Just for coverage
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("select cast(a as integer)",
"line 1:8: Cannot... | 62.368966 | 203 | 0.697241 | 0 | 0 | 0 | 0 | 17,845 | 0.98662 | 0 | 0 | 9,796 | 0.541604 |
d783237b7b4b1a622bb0239356949acd7f8af40d | 472 | py | Python | day1/debugme.py | autotaker/training-domo | 91ac3f90e1a1e06f51f5c794a3a15ade0ade246c | [
"MIT"
] | null | null | null | day1/debugme.py | autotaker/training-domo | 91ac3f90e1a1e06f51f5c794a3a15ade0ade246c | [
"MIT"
] | null | null | null | day1/debugme.py | autotaker/training-domo | 91ac3f90e1a1e06f51f5c794a3a15ade0ade246c | [
"MIT"
] | null | null | null | def convert_fizzbuzz(n: int) -> str:
s = str(n)
if n % 3 == 0 and n % 5 == 0:
s = "FizzBuzz"
if n % 3 == 0:
s = "Fizz"
if n % 5 == 0:
s = "Buzz"
return s
def fizzbuzz() -> None:
"""
1から100までの整数nに対して
* nが3の倍数かつ5の倍数の時はFizzBuzz
* nが3の倍数の時はFizz
* nが5の倍数の時はBu... | 16.857143 | 36 | 0.516949 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 291 | 0.491554 |
d7854c788a36c44c1e1a449591bc078424ed689c | 4,854 | py | Python | src/Selenium2Library/locators/windowmanager.py | tanggai/robotframework_selenium2library | c702cfad4584f54a08a73f8366e769d2304bf1ee | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2015-09-11T03:24:48.000Z | 2018-08-08T11:59:54.000Z | src/Selenium2Library/locators/windowmanager.py | tanggai/robotframework_selenium2library | c702cfad4584f54a08a73f8366e769d2304bf1ee | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/Selenium2Library/locators/windowmanager.py | tanggai/robotframework_selenium2library | c702cfad4584f54a08a73f8366e769d2304bf1ee | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2016-09-29T03:53:13.000Z | 2021-11-09T02:35:37.000Z | from types import *
from robot import utils
from selenium.webdriver.remote.webdriver import WebDriver
from selenium.common.exceptions import NoSuchWindowException
class WindowManager(object):
def __init__(self):
self._strategies = {
'title': self._select_by_title,
'name':... | 40.789916 | 107 | 0.598475 | 4,683 | 0.964771 | 0 | 0 | 0 | 0 | 0 | 0 | 427 | 0.087969 |
d7857acd245bcadd0807a8048540079a29f7bb0b | 1,265 | py | Python | localshop/urls.py | rcoup/localshop | b7d0803afd9335862accfc79dee047a6b0e67ad6 | [
"BSD-3-Clause"
] | null | null | null | localshop/urls.py | rcoup/localshop | b7d0803afd9335862accfc79dee047a6b0e67ad6 | [
"BSD-3-Clause"
] | null | null | null | localshop/urls.py | rcoup/localshop | b7d0803afd9335862accfc79dee047a6b0e67ad6 | [
"BSD-3-Clause"
] | null | null | null | import re
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.views.generic.base import RedirectView
from localshop.apps.packages.xmlrpc import handle_request
admin.autodiscover()
static_prefix = re.escape(settings.STATIC_URL.lstrip('/'))
... | 30.119048 | 77 | 0.690909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 564 | 0.44585 |
d7870e58d2f2ce7682797454d2079370c26d1673 | 1,150 | py | Python | test/util_test.py | quiet-oceans/libais | 61ed34683c01662925f4b9ed69b10885dcb3bc79 | [
"Apache-2.0"
] | 161 | 2015-02-10T16:40:25.000Z | 2022-02-11T10:17:28.000Z | test/util_test.py | quiet-oceans/libais | 61ed34683c01662925f4b9ed69b10885dcb3bc79 | [
"Apache-2.0"
] | 179 | 2015-01-14T23:19:25.000Z | 2021-10-15T23:32:14.000Z | test/util_test.py | quiet-oceans/libais | 61ed34683c01662925f4b9ed69b10885dcb3bc79 | [
"Apache-2.0"
] | 88 | 2015-01-19T05:10:39.000Z | 2022-03-09T06:59:27.000Z | #!/usr/bin/env python
"""Tests for ais.util."""
import unittest
from ais import util
import six
class UtilTest(unittest.TestCase):
def testMaybeToNumber(self):
self.assertEqual(util.MaybeToNumber(None), None)
self.assertEqual(util.MaybeToNumber([]), [])
self.assertEqual(util.MaybeToNumber({}), {})
... | 30.263158 | 75 | 0.715652 | 1,003 | 0.872174 | 0 | 0 | 0 | 0 | 0 | 0 | 175 | 0.152174 |
d787a69ca7a5c43e3169025b3f9e4ad5662b526b | 8,695 | py | Python | 16_1.py | yunjung-lee/class_python_numpy | 589817c8bbca85d70596e4097c0ece093b5353c3 | [
"MIT"
] | null | null | null | 16_1.py | yunjung-lee/class_python_numpy | 589817c8bbca85d70596e4097c0ece093b5353c3 | [
"MIT"
] | null | null | null | 16_1.py | yunjung-lee/class_python_numpy | 589817c8bbca85d70596e4097c0ece093b5353c3 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from pandas import DataFrame, Series
import matplotlib.pyplot as plt
num = np.array(['3.14','-2.7','30'], dtype=np.string_) #코드 이해 쉽게 : dtype=np.string_
# num=num.astype(int)
# print(num)
# ValueError: invalid literal for int() with base 10: '3.14'
num=num.astype(float).... | 24.287709 | 114 | 0.531685 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,727 | 0.697026 |
d78849ae509b808adaa2636049aede936282f95e | 1,063 | py | Python | Chapter8/listing8_1.py | hohsieh/osgeopy-code | 932157c748c8fedb67d862b266a983fdd29ead56 | [
"MIT"
] | 160 | 2015-01-11T06:45:11.000Z | 2022-03-07T15:09:57.000Z | Chapter8/listing8_1.py | sthagen/osgeopy-code | bc85f4ec7a630b53502ee491e400057b67cdab22 | [
"MIT"
] | 3 | 2018-09-29T11:34:13.000Z | 2020-07-20T16:45:23.000Z | Chapter8/listing8_1.py | sthagen/osgeopy-code | bc85f4ec7a630b53502ee491e400057b67cdab22 | [
"MIT"
] | 108 | 2015-05-28T11:29:01.000Z | 2022-02-12T12:01:46.000Z | # Script to reproject a shapefile.
from osgeo import ogr, osr
# Create an output SRS.
sr = osr.SpatialReference()
sr.ImportFromProj4('''+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23
+lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80
+datum=NAD83 +units=m +no_defs''')
# Don't forget to ch... | 28.72973 | 65 | 0.668862 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 514 | 0.483537 |
d788ad2e0e4762dfe1aa6e2559af48c180f16bf4 | 10,962 | py | Python | examples/seq2seq/task_seq2seq_simbert_v2_stage2.py | Tongjilibo/bert4torch | 71d5ffb3698730b16e5a252b06644a136787711e | [
"MIT"
] | 49 | 2022-03-15T07:28:16.000Z | 2022-03-31T07:16:15.000Z | examples/seq2seq/task_seq2seq_simbert_v2_stage2.py | Tongjilibo/bert4torch | 71d5ffb3698730b16e5a252b06644a136787711e | [
"MIT"
] | null | null | null | examples/seq2seq/task_seq2seq_simbert_v2_stage2.py | Tongjilibo/bert4torch | 71d5ffb3698730b16e5a252b06644a136787711e | [
"MIT"
] | null | null | null | #! -*- coding: utf-8 -*-
# SimBERT_v2预训练代码stage2,把simbert的相似度蒸馏到roformer-sim上
# 官方项目:https://github.com/ZhuiyiTechnology/roformer-sim
import json
import numpy as np
import torch
from torch import nn, optim
from torch.utils.data import DataLoader
import torch.nn.functional as F
from bert4torch.models import build_trans... | 36.54 | 137 | 0.628352 | 4,711 | 0.390177 | 0 | 0 | 772 | 0.063939 | 0 | 0 | 3,452 | 0.285904 |
d78a10d27ddc86c99b26b8eff9416d8403b7dcfc | 5,872 | py | Python | Validation/RecoTrack/python/customiseMTVForBPix123Holes.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Validation/RecoTrack/python/customiseMTVForBPix123Holes.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Validation/RecoTrack/python/customiseMTVForBPix123Holes.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | from __future__ import print_function
# This customise file provides an example (in the form of holes in
# BPix L1-L2 and L3-L3) on how to select a subset of generalTracks
# (e.g. by phi and eta) and setup various MTV instances for those
# (selected tracks, built tracks, and seeds in this case). The naming
# of DQM fol... | 48.933333 | 129 | 0.679666 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 916 | 0.155995 |
d78adda6c383319ee2452a20f3e7494d5bd7a171 | 145 | py | Python | helloworld/api/v1.py | ElyasSantana/example-api | f99cff55a152e3ab4e1b3490d2632e8f06b7f7fb | [
"MIT"
] | null | null | null | helloworld/api/v1.py | ElyasSantana/example-api | f99cff55a152e3ab4e1b3490d2632e8f06b7f7fb | [
"MIT"
] | null | null | null | helloworld/api/v1.py | ElyasSantana/example-api | f99cff55a152e3ab4e1b3490d2632e8f06b7f7fb | [
"MIT"
] | null | null | null | from fastapi import APIRouter
router_helloworld = APIRouter()
@router_helloworld.get("/")
def get_helloworld():
return {"Hello": "World"}
| 16.111111 | 31 | 0.724138 | 0 | 0 | 0 | 0 | 79 | 0.544828 | 0 | 0 | 17 | 0.117241 |
d78be78c3b064c64ae4256d80473c5ab6ad70fcf | 791 | py | Python | projects/slots/activities/activity_randomizer.py | only-romano/junkyard | b60a25b2643f429cdafee438d20f9966178d6f36 | [
"MIT"
] | null | null | null | projects/slots/activities/activity_randomizer.py | only-romano/junkyard | b60a25b2643f429cdafee438d20f9966178d6f36 | [
"MIT"
] | null | null | null | projects/slots/activities/activity_randomizer.py | only-romano/junkyard | b60a25b2643f429cdafee438d20f9966178d6f36 | [
"MIT"
] | null | null | null | from random import sample, randint
"""
Randomizer for available lists
plus radio broadcasting randomizer
"""
# Available lists randomizer class
class Randomize_and_pop_on_call:
"""
Randomize given array and on call pop given value from array.
If array is empty - returns None
"""
# created only to ea... | 25.516129 | 65 | 0.672566 | 358 | 0.445828 | 0 | 0 | 0 | 0 | 0 | 0 | 359 | 0.447073 |
d78d46855b1e8af013795bcd9ce42f63ccd57ab7 | 7,716 | py | Python | tests/test_contract.py | iwob/pysv | 6fdfb93d66cce84cceacabd3806f3f51f0cbbe17 | [
"MIT"
] | 2 | 2017-06-21T04:00:11.000Z | 2018-06-11T17:28:55.000Z | tests/test_contract.py | iwob/pysv | 6fdfb93d66cce84cceacabd3806f3f51f0cbbe17 | [
"MIT"
] | null | null | null | tests/test_contract.py | iwob/pysv | 6fdfb93d66cce84cceacabd3806f3f51f0cbbe17 | [
"MIT"
] | 1 | 2018-06-11T17:28:56.000Z | 2018-06-11T17:28:56.000Z | import unittest
from pysv.contract import *
class TestsContract(unittest.TestCase):
def test_program_vars_input_and_local(self):
vars = ProgramVars({'x': 'Int'}, {'y': 'Int'})
vars.add_marked_variables(["|x|'", "|y|'", "|y|''"])
self.assertEquals({'x': 'Int', "|x|'": 'Int'}, vars.input_v... | 49.780645 | 194 | 0.525531 | 7,670 | 0.994038 | 0 | 0 | 0 | 0 | 0 | 0 | 1,861 | 0.241187 |
d791857131ffb45651a77bad5f5ede0b6842e7f5 | 3,774 | py | Python | unittests/unintary_tests.py | OneCricketeer/pysqoop | 616199a8441d886ffcc4111445da3d0351401454 | [
"MIT"
] | 9 | 2019-06-17T19:21:22.000Z | 2021-07-12T05:14:03.000Z | unittests/unintary_tests.py | OneCricketeer/pysqoop | 616199a8441d886ffcc4111445da3d0351401454 | [
"MIT"
] | 5 | 2019-07-19T14:42:43.000Z | 2020-08-06T16:55:05.000Z | unittests/unintary_tests.py | OneCricketeer/pysqoop | 616199a8441d886ffcc4111445da3d0351401454 | [
"MIT"
] | 14 | 2019-06-05T16:50:27.000Z | 2021-08-05T16:36:15.000Z | import unittest
from pysqoop.SqoopImport import Sqoop
class TestStringMethods(unittest.TestCase):
def test_empty_sqoop(self):
try:
Sqoop()
except Exception as e:
self.assertEqual(str(e), 'all parameters are empty')
def test_properties_not_empty(self):
try:
... | 51.69863 | 454 | 0.607578 | 3,668 | 0.971913 | 0 | 0 | 0 | 0 | 0 | 0 | 1,612 | 0.427133 |
d793148e8a5d44297963077f150757b903cf3e64 | 1,084 | py | Python | tests/base.py | strukovsv/PyHAML | 75d7774f30809f755dad2867e9ab55cea3019046 | [
"BSD-3-Clause"
] | 21 | 2015-01-27T13:32:46.000Z | 2022-03-12T21:45:12.000Z | tests/base.py | strukovsv/PyHAML | 75d7774f30809f755dad2867e9ab55cea3019046 | [
"BSD-3-Clause"
] | 2 | 2017-05-23T11:30:01.000Z | 2019-07-29T01:21:27.000Z | tests/base.py | strukovsv/PyHAML | 75d7774f30809f755dad2867e9ab55cea3019046 | [
"BSD-3-Clause"
] | 8 | 2015-07-13T17:46:24.000Z | 2021-12-08T18:13:22.000Z | from unittest import TestCase, main, SkipTest
import os
from mako.template import Template
import haml
def skip(func):
def test(*args, **kwargs):
raise SkipTest()
return test
def skip_on_travis(func):
if os.environ.get('TRAVIS') == 'true':
def test(*args, **kwargs):
raise S... | 24.636364 | 100 | 0.551661 | 701 | 0.646679 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.095018 |
d793b12d0e01c44da57d39ebb7878a010a633a7a | 5,787 | py | Python | playground/basis_set.py | not-matt/QuantumPlayground | ddd832efb73563cf80c1090b817fa11ff05fc535 | [
"MIT"
] | null | null | null | playground/basis_set.py | not-matt/QuantumPlayground | ddd832efb73563cf80c1090b817fa11ff05fc535 | [
"MIT"
] | null | null | null | playground/basis_set.py | not-matt/QuantumPlayground | ddd832efb73563cf80c1090b817fa11ff05fc535 | [
"MIT"
] | null | null | null | import requests
import logging
import numpy as np
from playground.utils import elements, angular_quanta
_LOGGER = logging.getLogger(__name__)
class AO(object):
"""
atomic orbital
"""
def __init__(self,
orbital_type: str,
contract_num: int,
... | 36.859873 | 145 | 0.541386 | 1,714 | 0.296181 | 0 | 0 | 0 | 0 | 0 | 0 | 1,311 | 0.226542 |
d797ff101f30669e899d5350f2889ccccfcd1a17 | 849 | py | Python | controls.py | juandigomez/me366j | 9f82d0ea2b6e4b422be0add0ceb1a842e0dd6b21 | [
"MIT"
] | null | null | null | controls.py | juandigomez/me366j | 9f82d0ea2b6e4b422be0add0ceb1a842e0dd6b21 | [
"MIT"
] | null | null | null | controls.py | juandigomez/me366j | 9f82d0ea2b6e4b422be0add0ceb1a842e0dd6b21 | [
"MIT"
] | null | null | null | import pygame
import sys
pygame.init()
screen = pygame.display.set_mode((640, 480))
clock = pygame.time.Clock()
x = 0
y = 0
# use a (r, g, b) tuple for color
yellow = (255, 255, 0)
# create the basic window/screen and a title/caption
# default is a black background
screen = pygame.display.set_mode((640, 280))
pygame.... | 21.225 | 57 | 0.687868 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 195 | 0.229682 |
d798c9e9d158d810636d91b75d39f308e04e9254 | 1,439 | py | Python | scripts/conversion/rename_associations.py | xapple/libcbm_runner | d042bc45e0bb9bcf2c59330b67e9a836d237ccbf | [
"MIT"
] | 2 | 2019-10-18T15:39:53.000Z | 2022-02-22T17:54:56.000Z | scripts/conversion/rename_associations.py | xapple/libcbm_runner | d042bc45e0bb9bcf2c59330b67e9a836d237ccbf | [
"MIT"
] | null | null | null | scripts/conversion/rename_associations.py | xapple/libcbm_runner | d042bc45e0bb9bcf2c59330b67e9a836d237ccbf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Written by Lucas Sinclair and Paul Rougieux.
JRC Biomass Project.
Unit D1 Bioeconomy.
This script will rename the header column of the file:
* /common/associations.csv
Before running this script the headers are simply "A", "B", "C".
After running this script, the... | 24.810345 | 79 | 0.589993 | 503 | 0.349548 | 0 | 0 | 0 | 0 | 0 | 0 | 834 | 0.579569 |
d798da1a3531801a3799d983990b94ffd796a480 | 342 | py | Python | _Training_/RegEx - HackerRank/1. Introduction/Matching Anything But a Newline.py | JUD210/Study-Note | 2add9db3f11d99370f49878f0c19e9caa60d2d02 | [
"MIT"
] | null | null | null | _Training_/RegEx - HackerRank/1. Introduction/Matching Anything But a Newline.py | JUD210/Study-Note | 2add9db3f11d99370f49878f0c19e9caa60d2d02 | [
"MIT"
] | null | null | null | _Training_/RegEx - HackerRank/1. Introduction/Matching Anything But a Newline.py | JUD210/Study-Note | 2add9db3f11d99370f49878f0c19e9caa60d2d02 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/matching-anything-but-new-line/problem
import re
# Inputs
standard_input = """123.456.abc.def"""
regex_pattern = r".{3}\..{3}\..{3}\..{3}$" # Do not delete 'r'.
test_string = input()
# 123.456.abc.def
match = re.match(regex_pattern, test_string) is not None
print(str(m... | 16.285714 | 78 | 0.669591 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 176 | 0.51462 |
ad02704fb18873433d885fc6641f661f8839081f | 3,004 | py | Python | test1.py | czyczyyzc/MyForElise | dcbf5924d3d63f441d3247741828804f74a29345 | [
"MIT"
] | null | null | null | test1.py | czyczyyzc/MyForElise | dcbf5924d3d63f441d3247741828804f74a29345 | [
"MIT"
] | null | null | null | test1.py | czyczyyzc/MyForElise | dcbf5924d3d63f441d3247741828804f74a29345 | [
"MIT"
] | null | null | null | import time
import numpy as np
import tensorflow as tf
from yalenet import YaleNet
from Mybase.solver import Solver
"""
def test():
mdl = YaleNet(cls_num=1000, reg=1e-4, typ=tf.float32)
sov = Solver(mdl,
opm_cfg={
'lr_base': 0.005,
'decay_rul... | 32.301075 | 57 | 0.374168 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,790 | 0.595872 |
ad032b910fb71a08f9b40c52e3ef58efd6aac044 | 368 | py | Python | a4/decrypt/elliptic.py | fultonms/crypto | a3819e3e81b9f93b818a63382183c1804d2edacc | [
"MIT"
] | null | null | null | a4/decrypt/elliptic.py | fultonms/crypto | a3819e3e81b9f93b818a63382183c1804d2edacc | [
"MIT"
] | null | null | null | a4/decrypt/elliptic.py | fultonms/crypto | a3819e3e81b9f93b818a63382183c1804d2edacc | [
"MIT"
] | null | null | null | import argparse
parser = argparse.ArgumentParser(description="Decrpyt a selection of text from a substitution cypher, with the provided key")
parser.add_argument('cryptFile', metavar='encrypted', type=str, help='Path to the encrpyted text')
parser.add_argument('keyFile', metavar='key', type=str, help='Path to the key ... | 40.888889 | 125 | 0.766304 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.44837 |
ad049c2108d387b7a21cb9771949419fab0bb4c8 | 251 | py | Python | examples/hist.py | RyanAugust/geoplotlib | 97ae83fc05d19237db79be66eb577906c35e8db5 | [
"MIT"
] | 1,021 | 2015-02-26T12:08:01.000Z | 2022-03-15T10:04:29.000Z | examples/hist.py | RyanAugust/geoplotlib | 97ae83fc05d19237db79be66eb577906c35e8db5 | [
"MIT"
] | 51 | 2015-03-27T20:46:44.000Z | 2022-02-03T09:58:35.000Z | examples/hist.py | RyanAugust/geoplotlib | 97ae83fc05d19237db79be66eb577906c35e8db5 | [
"MIT"
] | 196 | 2015-03-25T02:32:28.000Z | 2022-03-25T23:07:22.000Z | """
Example of 2D histogram
"""
import geoplotlib
from geoplotlib.utils import read_csv, BoundingBox
data = read_csv('data/opencellid_dk.csv')
geoplotlib.hist(data, colorscale='sqrt', binsize=8)
geoplotlib.set_bbox(BoundingBox.DK)
geoplotlib.show()
| 20.916667 | 51 | 0.784861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.243028 |
ad051771273652e3931222dfcf867589f136b709 | 20,814 | py | Python | gui/StaffScreen.py | Harsh0294/carrentsystem | c94f8cddd02b0057bac2c8813ec90460c9496f3b | [
"MIT"
] | null | null | null | gui/StaffScreen.py | Harsh0294/carrentsystem | c94f8cddd02b0057bac2c8813ec90460c9496f3b | [
"MIT"
] | null | null | null | gui/StaffScreen.py | Harsh0294/carrentsystem | c94f8cddd02b0057bac2c8813ec90460c9496f3b | [
"MIT"
] | null | null | null | from PyQt4 import QtCore, QtGui
from Vehicles import *
class StaffScreen(QtGui.QMainWindow):
combo_box_items = ["Car", "Van", "Camper Van"]
# Class constructor parent represents login screen
def __init__(self, parent, staff_user, vehicles):
super(StaffScreen, self).__init__(parent)
self.s... | 55.504 | 141 | 0.611608 | 20,756 | 0.997213 | 0 | 0 | 0 | 0 | 0 | 0 | 2,494 | 0.119823 |
ad052c19680261e01fda678f8a14469fccd45f3c | 10,083 | py | Python | southwestalerts/southwest.py | hoopsbwc34/southwest-alerts | 39a9e13cb045cf3601b02518fc4e13753cce9ca6 | [
"MIT"
] | null | null | null | southwestalerts/southwest.py | hoopsbwc34/southwest-alerts | 39a9e13cb045cf3601b02518fc4e13753cce9ca6 | [
"MIT"
] | null | null | null | southwestalerts/southwest.py | hoopsbwc34/southwest-alerts | 39a9e13cb045cf3601b02518fc4e13753cce9ca6 | [
"MIT"
] | null | null | null | import json
import time
import requests
BASE_URL = 'https://mobile.southwest.com'
class Southwest(object):
def __init__(self, username, password, headers, cookies, account):
self._session = _SouthwestSession(username, password, headers, cookies, account)
def get_upcoming_trips(self):
# re... | 47.561321 | 318 | 0.648517 | 9,988 | 0.990578 | 0 | 0 | 823 | 0.081623 | 0 | 0 | 4,369 | 0.433304 |
ad05edc84a23e5d2226eaa6c195a89e43c5ab6c0 | 17,502 | py | Python | lear-db/test_data/data_loader.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | 1 | 2019-11-07T20:32:59.000Z | 2019-11-07T20:32:59.000Z | lear-db/test_data/data_loader.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | null | null | null | lear-db/test_data/data_loader.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# 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... | 43.214815 | 116 | 0.620958 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,401 | 0.251443 |
ad07b147f4f90acb57865d0385c6621563004a6f | 2,115 | py | Python | compiler/extensions/python/runtime/src/zserio/bitfield.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | 2 | 2019-02-06T17:50:24.000Z | 2019-11-20T16:51:34.000Z | compiler/extensions/python/runtime/src/zserio/bitfield.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | 1 | 2019-11-25T16:25:51.000Z | 2019-11-25T18:09:39.000Z | compiler/extensions/python/runtime/src/zserio/bitfield.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | null | null | null | """
The module provides help methods for bit fields calculation.
"""
from zserio.exception import PythonRuntimeException
def getBitFieldLowerBound(length):
"""
Gets the lower bound of a unsigned bitfield type with given length.
:param length: Length of the unsigned bitfield in bits.
:returns: The low... | 34.112903 | 101 | 0.74279 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,316 | 0.622222 |
ad08cf47ba42bae95ff25fda628ffbf2136e4ecb | 59 | py | Python | pacote-download/Mundo1/ex002.py | ariadne-pereira/cev-python | b2c6bbebb5106bb0152c9127c04c83f23e9d7757 | [
"MIT"
] | null | null | null | pacote-download/Mundo1/ex002.py | ariadne-pereira/cev-python | b2c6bbebb5106bb0152c9127c04c83f23e9d7757 | [
"MIT"
] | null | null | null | pacote-download/Mundo1/ex002.py | ariadne-pereira/cev-python | b2c6bbebb5106bb0152c9127c04c83f23e9d7757 | [
"MIT"
] | null | null | null | nome = input('Qual o seu nome?')
print('Bem vindo ' , nome) | 29.5 | 32 | 0.644068 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.508475 |
ad099a3f7a3f39b1c81dfbd2b6b67a25e14da906 | 25 | py | Python | eqparse/spaceloads/__init__.py | TfedUD/eqparse | ab1fba5b4995bed3f5fa2f77cdf505bb613c7e71 | [
"MIT"
] | 3 | 2021-01-26T18:48:39.000Z | 2021-07-14T23:22:09.000Z | eqparse/spaceloads/__init__.py | TfedUD/eqparse | ab1fba5b4995bed3f5fa2f77cdf505bb613c7e71 | [
"MIT"
] | null | null | null | eqparse/spaceloads/__init__.py | TfedUD/eqparse | ab1fba5b4995bed3f5fa2f77cdf505bb613c7e71 | [
"MIT"
] | 3 | 2020-11-18T20:22:00.000Z | 2021-07-14T18:55:31.000Z | from .spaceloads import * | 25 | 25 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ad0a91316f80ba2f9a71f515c6569203c3867373 | 11,388 | py | Python | demos/HFL/example/pytorch/hugging_face/local_bert_text_classifier/dataset.py | monadyn/fedlearn-algo | c4459d421139b0bb765527d636fff123bf17bda4 | [
"Apache-2.0"
] | 86 | 2021-07-20T01:54:21.000Z | 2021-10-06T04:02:40.000Z | demos/HFL/example/pytorch/hugging_face/local_bert_text_classifier/dataset.py | fedlearnAI/fedlearnalgo | 63d9ceb64d331ff2b5103ae49e54229cad7e2095 | [
"Apache-2.0"
] | 5 | 2021-07-23T21:22:16.000Z | 2021-09-12T15:48:35.000Z | demos/HFL/example/pytorch/hugging_face/local_bert_text_classifier/dataset.py | fedlearnAI/fedlearnalgo | 63d9ceb64d331ff2b5103ae49e54229cad7e2095 | [
"Apache-2.0"
] | 28 | 2021-07-20T07:15:33.000Z | 2021-08-22T20:04:57.000Z | # Copyright 2021 Fedlearn 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 in writi... | 40.671429 | 185 | 0.648402 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,163 | 0.36556 |
ad0e9389830044b275eaeda53fb94fe0bd3d6df6 | 55 | py | Python | egtaonline/__init__.py | egtaonline/egtaonline-api | a450aad43f5828ab1bc74def7237018b2de9647e | [
"Apache-2.0"
] | null | null | null | egtaonline/__init__.py | egtaonline/egtaonline-api | a450aad43f5828ab1bc74def7237018b2de9647e | [
"Apache-2.0"
] | null | null | null | egtaonline/__init__.py | egtaonline/egtaonline-api | a450aad43f5828ab1bc74def7237018b2de9647e | [
"Apache-2.0"
] | 1 | 2019-03-09T11:45:55.000Z | 2019-03-09T11:45:55.000Z | """Module for egta online api"""
__version__ = '0.8.7'
| 18.333333 | 32 | 0.654545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.709091 |
ad11d47033d4af835763923edb8fa478546cbbc5 | 1,897 | py | Python | views.py | wbellman/Python-Fate-Example | a764d3d386b60d4ecfbb59837321e6c30f1c4249 | [
"MIT"
] | null | null | null | views.py | wbellman/Python-Fate-Example | a764d3d386b60d4ecfbb59837321e6c30f1c4249 | [
"MIT"
] | null | null | null | views.py | wbellman/Python-Fate-Example | a764d3d386b60d4ecfbb59837321e6c30f1c4249 | [
"MIT"
] | null | null | null | import time
import settings
from printLibs import printl, printc
from inputLibs import get_number
def print_character(character):
print()
printc(character["realname"],"-",40)
print()
print( character["name"] + " (" + character["role"] + ") -- " + character["pole"].title() + ":" + str(character["number"]) )
... | 22.05814 | 126 | 0.634686 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 300 | 0.158144 |
ad12130ce9f4ea80edd96982e4874aa4efd37547 | 4,473 | py | Python | recipes/Python/578871_Simple_Tkinter_strip_chart/recipe-578871.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/578871_Simple_Tkinter_strip_chart/recipe-578871.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/578871_Simple_Tkinter_strip_chart/recipe-578871.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | # (c) MIT License Copyright 2014 Ronald H Longo
# Please reuse, modify or distribute freely.
from collections import OrderedDict
import tkinter as tk
class StripChart( tk.Frame ):
def __init__( self, parent, scale, historySize, trackColors, *args, **opts ):
# Initialize
super().__init__( parent, *args,... | 33.886364 | 81 | 0.56338 | 3,030 | 0.677398 | 0 | 0 | 0 | 0 | 0 | 0 | 886 | 0.198077 |
ad142cceab8899fa59076896998cb49029523f11 | 2,793 | py | Python | sendmail.py | jvadair/simpleforum | d1e602841e64130c0059c7390ac2fbe7950feb89 | [
"MIT"
] | null | null | null | sendmail.py | jvadair/simpleforum | d1e602841e64130c0059c7390ac2fbe7950feb89 | [
"MIT"
] | null | null | null | sendmail.py | jvadair/simpleforum | d1e602841e64130c0059c7390ac2fbe7950feb89 | [
"MIT"
] | null | null | null | import smtplib, ssl
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
SMTP_URL = "example.com"
def send_verification_code(recipient, recipient_name, verification_code):
sender_email = "simpleforum@jvadair.com"
with open('.smtp_passwd') as password_file:
p... | 36.75 | 74 | 0.668815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 992 | 0.355174 |
ad14b5c195d0bd8131b0b4d5f2f280f2ab66ece5 | 3,474 | py | Python | research/compression/entropy_coder/lib/block_util.py | Dzinushi/models_1_4 | d7e72793a68c1667d403b1542c205d1cd9b1d17c | [
"Apache-2.0"
] | null | null | null | research/compression/entropy_coder/lib/block_util.py | Dzinushi/models_1_4 | d7e72793a68c1667d403b1542c205d1cd9b1d17c | [
"Apache-2.0"
] | null | null | null | research/compression/entropy_coder/lib/block_util.py | Dzinushi/models_1_4 | d7e72793a68c1667d403b1542c205d1cd9b1d17c | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 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 applicab... | 34.058824 | 81 | 0.658031 | 2,599 | 0.748129 | 0 | 0 | 0 | 0 | 0 | 0 | 2,111 | 0.607657 |
ad159cd804674520f14ca7bf3672f76b7911e56a | 10,068 | py | Python | core/models.py | ditttu/gymkhana-Nominations | 2a0e993c1b8362c456a9369b0b549d1c809a21df | [
"MIT"
] | 3 | 2018-02-27T13:48:28.000Z | 2018-03-03T21:57:50.000Z | core/models.py | ditttu/gymkhana-Nominations | 2a0e993c1b8362c456a9369b0b549d1c809a21df | [
"MIT"
] | 6 | 2020-02-12T00:07:46.000Z | 2022-03-11T23:25:59.000Z | core/models.py | ditttu/gymkhana-Nominations | 2a0e993c1b8362c456a9369b0b549d1c809a21df | [
"MIT"
] | 1 | 2019-03-26T20:19:57.000Z | 2019-03-26T20:19:57.000Z | from django.db import models
from django.contrib.auth.models import User
from .choices import *
from datetime import datetime,date
from django.dispatch import receiver
from django.db.models.signals import post_save
from django.utils import timezone
def default_end_date():
now = datetime.now()
end = now.replace... | 38.723077 | 129 | 0.708482 | 8,394 | 0.833731 | 0 | 0 | 844 | 0.08383 | 0 | 0 | 646 | 0.064164 |
ad185864b0257450aa7c1d7f4d336d5631a276f2 | 1,232 | py | Python | tests/test/search/test_references_searcher_db_files.py | watermelonwolverine/fvttmv | 8689d47d1f904dd2bf0a083de515fda65713c460 | [
"MIT"
] | 1 | 2022-03-30T19:12:14.000Z | 2022-03-30T19:12:14.000Z | tests/test/search/test_references_searcher_db_files.py | watermelonwolverine/fvttmv | 8689d47d1f904dd2bf0a083de515fda65713c460 | [
"MIT"
] | null | null | null | tests/test/search/test_references_searcher_db_files.py | watermelonwolverine/fvttmv | 8689d47d1f904dd2bf0a083de515fda65713c460 | [
"MIT"
] | null | null | null | from fvttmv.search.__references_searcher_db_files import ReferencesSearcherDbFiles
from test.common import TestCase, AbsPaths, References
class ReferencesSearcherDbFilesTest(TestCase):
def test_search_for_references_in_db_files1(self):
print("test_search_for_references_in_db_files1")
expected = ... | 42.482759 | 113 | 0.57224 | 1,091 | 0.885552 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.12987 |
ad1ab51f8499f1d4ded5f9bd2c0db3404d94ac2b | 8,956 | py | Python | apps/quiver/views.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 2 | 2018-05-18T08:38:29.000Z | 2018-05-22T08:26:09.000Z | apps/quiver/views.py | IT-PM-OpenAdaptronik/Webapp | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 118 | 2017-10-31T13:45:09.000Z | 2018-02-24T20:51:42.000Z | apps/quiver/views.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | null | null | null | from apps.quiver.models import AnalyticsService, AnalyticsServiceExecution
from django.shortcuts import render, HttpResponseRedirect
from django.core.exceptions import PermissionDenied
from django.views.generic import FormView, CreateView, ListView, DetailView, UpdateView
from django.contrib.auth.mixins import LoginRe... | 41.082569 | 135 | 0.704891 | 2,262 | 0.252568 | 0 | 0 | 3,028 | 0.338097 | 0 | 0 | 2,062 | 0.230237 |
ad1aeb9442720992cb51bbedc547de7f9083c3fa | 1,102 | py | Python | boml/load_data/experiment.py | LongMa319/BOML | 8cbb5a557e93dabd858438efd67c0685402efa9e | [
"MIT"
] | 2 | 2021-12-20T03:24:27.000Z | 2022-01-10T14:16:21.000Z | boml/load_data/experiment.py | perseveranceLX/BOML | 8cbb5a557e93dabd858438efd67c0685402efa9e | [
"MIT"
] | null | null | null | boml/load_data/experiment.py | perseveranceLX/BOML | 8cbb5a557e93dabd858438efd67c0685402efa9e | [
"MIT"
] | 1 | 2022-03-29T13:21:20.000Z | 2022-03-29T13:21:20.000Z | """
Simple container for useful quantities for a supervised learning experiment, where data is managed
with feed dictionary
"""
import tensorflow as tf
class BOMLExperiment:
def __init__(self, datasets, dtype=tf.float32):
self.datasets = datasets
self.x = tf.placeholder(dtype, name="x", shape=self... | 36.733333 | 98 | 0.669691 | 947 | 0.859347 | 0 | 0 | 0 | 0 | 0 | 0 | 203 | 0.184211 |
ad1c4914c79a24918776134b469b340712c87fc6 | 11,873 | py | Python | pypy/translator/jvm/opcodes.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | 12 | 2016-01-06T07:10:28.000Z | 2021-05-13T23:02:02.000Z | pypy/translator/jvm/opcodes.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | null | null | null | pypy/translator/jvm/opcodes.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | 2 | 2016-07-29T07:09:50.000Z | 2016-10-16T08:50:26.000Z | """
Mapping from OOType opcodes to JVM MicroInstructions. Most of these
come from the oosupport directory.
"""
from pypy.translator.oosupport.metavm import \
PushArg, PushAllArgs, StoreResult, InstructionList, New, DoNothing, Call,\
SetField, GetField, DownCast, RuntimeNew, OOString, OOUnicode, \
Cas... | 44.137546 | 135 | 0.544176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,587 | 0.386339 |
ad1c7e0f78e361f8b94e7d3cccfcbd1e73831978 | 459 | py | Python | graph_explorer/structured_metrics/plugins/vmstat.py | farheenkaifee/dashboard_3 | bc557a6190a99182ec7a1c96dfdd33208a8575cd | [
"Apache-2.0"
] | 284 | 2015-01-03T05:35:18.000Z | 2022-01-19T08:30:31.000Z | graph_explorer/structured_metrics/plugins/vmstat.py | farheenkaifee/dashboard_3 | bc557a6190a99182ec7a1c96dfdd33208a8575cd | [
"Apache-2.0"
] | 9 | 2015-01-20T16:41:01.000Z | 2017-02-03T08:02:39.000Z | graph_explorer/structured_metrics/plugins/vmstat.py | isabella232/graph-explorer | bc557a6190a99182ec7a1c96dfdd33208a8575cd | [
"Apache-2.0"
] | 35 | 2015-02-05T13:03:51.000Z | 2022-01-19T08:31:15.000Z | from . import Plugin
class VmstatPlugin(Plugin):
targets = [
{
'match': '^servers\.(?P<server>[^\.]+)\.vmstat\.(?P<type>.*)$',
'target_type': 'rate',
'tags': {'unit': 'Page'}
}
]
def sanitize(self, target):
target['tags']['type'] = target['tags'... | 27 | 82 | 0.490196 | 414 | 0.901961 | 0 | 0 | 0 | 0 | 0 | 0 | 193 | 0.420479 |
ad1cabe254e2aa9697b539f3226adbf97155e405 | 819 | py | Python | 2018/day02.py | iKevinY/advent | d160fb711a0a4d671f53cbd61088117e7ff0276a | [
"MIT"
] | 11 | 2019-12-03T06:32:37.000Z | 2021-12-24T12:23:57.000Z | 2018/day02.py | iKevinY/advent | d160fb711a0a4d671f53cbd61088117e7ff0276a | [
"MIT"
] | null | null | null | 2018/day02.py | iKevinY/advent | d160fb711a0a4d671f53cbd61088117e7ff0276a | [
"MIT"
] | 1 | 2019-12-07T06:21:31.000Z | 2019-12-07T06:21:31.000Z | import fileinput
from collections import Counter
BOXES = [line.strip() for line in fileinput.input()]
DOUBLES = 0
TRIPLES = 0
COMMON = None
for box_1 in BOXES:
doubles = 0
triples = 0
for char, count in Counter(box_1).items():
if count == 2:
doubles += 1
elif count == 3:
... | 19.5 | 71 | 0.534799 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.078144 |
ad1e497bcf39064afc3262311487df49eca70a14 | 3,324 | py | Python | pyreindexer/tests/tests/test_sql.py | Restream/reindexer-py | 9a5925f167ac676f07ba39e32985cc6f6a0abebf | [
"Apache-2.0"
] | 2 | 2020-08-07T16:44:33.000Z | 2020-08-07T20:57:18.000Z | pyreindexer/tests/tests/test_sql.py | Restream/reindexer-py | 9a5925f167ac676f07ba39e32985cc6f6a0abebf | [
"Apache-2.0"
] | null | null | null | pyreindexer/tests/tests/test_sql.py | Restream/reindexer-py | 9a5925f167ac676f07ba39e32985cc6f6a0abebf | [
"Apache-2.0"
] | 3 | 2020-08-07T20:57:24.000Z | 2021-09-07T14:52:14.000Z | from hamcrest import *
from tests.helpers.sql import sql_query
class TestSqlQueries:
def test_sql_select(self, namespace, index, item):
# Given("Create namespace with item")
db, namespace_name = namespace
item_definition = item
# When ("Execute SQL query SELECT")
query = f... | 50.363636 | 137 | 0.659446 | 3,257 | 0.979844 | 0 | 0 | 0 | 0 | 0 | 0 | 1,360 | 0.409146 |
ad1e54977e7558a8f0c8a31c237e57a940caccfa | 184 | py | Python | app/auth/__init__.py | Muxi-Studio/ccnu-network-culture-festival | 3ff62b2a3052d1c0fcbc62df53f8985ea8bfd9d3 | [
"MIT"
] | 3 | 2016-12-01T07:38:17.000Z | 2016-12-17T14:37:24.000Z | examples/HelloAPI/app/auth/__init__.py | misakar/rest | 8bf7369aaa9da5cc4a300c625e4d7fea21f52681 | [
"MIT"
] | 7 | 2020-03-24T16:05:11.000Z | 2022-01-13T00:51:53.000Z | examples/HelloAPI/app/auth/__init__.py | misakar/rest | 8bf7369aaa9da5cc4a300c625e4d7fea21f52681 | [
"MIT"
] | 4 | 2015-12-11T03:20:27.000Z | 2016-02-03T04:47:52.000Z | # coding: utf-8
from flask import Blueprint
auth = Blueprint(
'auth',
__name__,
template_folder = 'templates',
static_folder = 'static'
)
from . import views, forms
| 14.153846 | 34 | 0.663043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.217391 |
ad1e748da5fe246fe028cfff71db337937c5eff0 | 4,800 | py | Python | generator/paperplane.py | isikdogan/paperplane | 4f1e3510ef88ede0d0c6b5d3fc19e91ad48b66df | [
"MIT"
] | 3 | 2019-03-23T03:26:15.000Z | 2021-05-09T01:20:52.000Z | generator/paperplane.py | isikdogan/paperplane | 4f1e3510ef88ede0d0c6b5d3fc19e91ad48b66df | [
"MIT"
] | 1 | 2019-03-24T05:22:42.000Z | 2019-03-24T17:42:04.000Z | generator/paperplane.py | isikdogan/paperplane | 4f1e3510ef88ede0d0c6b5d3fc19e91ad48b66df | [
"MIT"
] | 4 | 2015-12-07T11:51:17.000Z | 2019-03-24T04:26:28.000Z | # -*- coding: utf-8 -*-
""" PaperPlane: a very simple, flat-file, static blog generator.
Created on Sat Feb 21 2015
Author: Leo Isikdogan
"""
import codecs, unicodedata
import dateutil.parser
import os, re, glob
import markdown
import jinja2
class Page:
def __init__(self, markdown_file):
self._read_markdo... | 38.4 | 107 | 0.606875 | 4,547 | 0.947292 | 0 | 0 | 662 | 0.137917 | 0 | 0 | 897 | 0.186875 |
ad1e941439ad470245712f61db2a8e49fea80a56 | 9,723 | py | Python | app/recepie/tests/test_recepie_api.py | TheMysteryPuzzles/recepie-app-api | a62f3104ead34f40b310b12e7cecfde4c248c2fc | [
"Apache-2.0"
] | null | null | null | app/recepie/tests/test_recepie_api.py | TheMysteryPuzzles/recepie-app-api | a62f3104ead34f40b310b12e7cecfde4c248c2fc | [
"Apache-2.0"
] | null | null | null | app/recepie/tests/test_recepie_api.py | TheMysteryPuzzles/recepie-app-api | a62f3104ead34f40b310b12e7cecfde4c248c2fc | [
"Apache-2.0"
] | null | null | null | import tempfile
import os
from PIL import Image
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Recepie, Tag, Ingredient
from recepie.serializers impor... | 34.97482 | 79 | 0.635709 | 8,487 | 0.872879 | 0 | 0 | 0 | 0 | 0 | 0 | 1,303 | 0.134012 |
ad1eb8418e4c93dbcc4f80cc958dc638df52a380 | 809 | py | Python | scrap_single_news.py | pralhad88/Web_scraping | c40c2dcf0549cb8a0b18a981a583db3caaec5213 | [
"MIT"
] | 1 | 2020-04-14T08:31:35.000Z | 2020-04-14T08:31:35.000Z | scrap_single_news.py | pralhad88/Web_scraping | c40c2dcf0549cb8a0b18a981a583db3caaec5213 | [
"MIT"
] | null | null | null | scrap_single_news.py | pralhad88/Web_scraping | c40c2dcf0549cb8a0b18a981a583db3caaec5213 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import urllib.request
article = []
data_storage = {}
source = urllib.request.urlopen("https://www.ndtv.com/india-news/pm-modi-in-telangana-says-seek-your-support-blessings-for-bjp-in-coming-polls-1953954").read()
soup = BeautifulSoup(source,'lxml')
data_storage['Title'] = soup.h1.string
... | 31.115385 | 159 | 0.729295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 268 | 0.331273 |
ad1ec9e6f76fa6eefed47245dd47853b28775217 | 435 | py | Python | localstack/services/awslambda/multivalue_transformer.py | zonywhoop/localstack | 673e1a23374362c64606fb36c0746ee29cbf5553 | [
"Apache-2.0"
] | 1 | 2021-02-19T19:28:30.000Z | 2021-02-19T19:28:30.000Z | localstack/services/awslambda/multivalue_transformer.py | zonywhoop/localstack | 673e1a23374362c64606fb36c0746ee29cbf5553 | [
"Apache-2.0"
] | null | null | null | localstack/services/awslambda/multivalue_transformer.py | zonywhoop/localstack | 673e1a23374362c64606fb36c0746ee29cbf5553 | [
"Apache-2.0"
] | 1 | 2021-01-10T03:21:47.000Z | 2021-01-10T03:21:47.000Z | from collections import defaultdict
from localstack.utils.common import to_str
def multi_value_dict_for_list(elements):
temp_mv_dict = defaultdict(list)
for key in elements:
if isinstance(key, (list, tuple)):
key, value = key
else:
value = elements[key]
key = to... | 27.1875 | 63 | 0.648276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ad1f043741d903cb1b322256803ad59d9dd73fb5 | 3,601 | py | Python | code/dgp/dgp_sorf_optim.py | GiaLacTRAN/convolutional_deep_gp_random_features | 93330f3171ab4e9539f6bae0d4a68ae1f6a1e104 | [
"Apache-2.0"
] | 5 | 2019-09-16T10:51:49.000Z | 2020-10-13T14:44:29.000Z | code/dgp/dgp_sorf_optim.py | GiaLacTRAN/convolutional_deep_gp_random_features | 93330f3171ab4e9539f6bae0d4a68ae1f6a1e104 | [
"Apache-2.0"
] | 1 | 2020-08-09T06:33:46.000Z | 2020-08-20T03:11:50.000Z | code/dgp/dgp_sorf_optim.py | GiaLacTRAN/convolutional_deep_gp_random_features | 93330f3171ab4e9539f6bae0d4a68ae1f6a1e104 | [
"Apache-2.0"
] | 4 | 2019-05-06T03:57:13.000Z | 2020-04-24T13:37:40.000Z | ## Copyright 2019 Gia-Lac TRAN, Edwin V. Bonilla, John P. Cunningham, Pietro Michiardi, and Maurizio Filippone
##
## 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... | 46.766234 | 162 | 0.741461 | 2,835 | 0.787281 | 0 | 0 | 0 | 0 | 0 | 0 | 903 | 0.250764 |
ad2017893d41afb16c0e80e4020d3f6bd20849ba | 109 | py | Python | tests/__init__.py | antoinebourayne/sd2c | c76a0c56d5836caba9e6b90cdf7235516e2dd694 | [
"Apache-2.0"
] | null | null | null | tests/__init__.py | antoinebourayne/sd2c | c76a0c56d5836caba9e6b90cdf7235516e2dd694 | [
"Apache-2.0"
] | null | null | null | tests/__init__.py | antoinebourayne/sd2c | c76a0c56d5836caba9e6b90cdf7235516e2dd694 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Ceci est un module avec les tests unitaires et les tests d'intégrations.
"""
| 21.8 | 76 | 0.633028 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.981818 |
ad201c7e5400ff477533d2ab2495459d41d30028 | 7,534 | py | Python | Tutorial 2 - Data Navigation/PlugIns/experimental/scripts/MultiEELS.py | paradimdata/Cornell_EM_SummerSchool_2021 | 9f3583e1b85a9cdd86e1b91800027966d501ce96 | [
"MIT"
] | 8 | 2021-06-13T20:02:12.000Z | 2022-03-24T09:19:23.000Z | Tutorial 2 - Data Navigation/PlugIns/experimental/scripts/MultiEELS.py | paradimdata/Cornell_EM_SummerSchool_2021 | 9f3583e1b85a9cdd86e1b91800027966d501ce96 | [
"MIT"
] | null | null | null | Tutorial 2 - Data Navigation/PlugIns/experimental/scripts/MultiEELS.py | paradimdata/Cornell_EM_SummerSchool_2021 | 9f3583e1b85a9cdd86e1b91800027966d501ce96 | [
"MIT"
] | 1 | 2021-07-16T20:12:28.000Z | 2021-07-16T20:12:28.000Z | import numpy
import uuid
from nion.data import Calibration
from nion.data import DataAndMetadata
from nion.data import xdata_1_0 as xd
from nion.utils import Registry
def acquire_multi_eels(interactive, api):
# first grab the stem controller object by asking the Registry
stem_controller = Registry.get_componen... | 47.987261 | 163 | 0.719273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,685 | 0.356384 |
ad21ba75d05a89c78aac426e67b6209c152b8f74 | 3,571 | py | Python | torch_connectomics/data/augmentation/rotation.py | al093/pytorch_connectomics | 52821951233b061102380fc0d2521843652c580a | [
"MIT"
] | 2 | 2019-11-16T23:14:00.000Z | 2020-09-25T09:51:46.000Z | torch_connectomics/data/augmentation/rotation.py | al093/pytorch_connectomics | 52821951233b061102380fc0d2521843652c580a | [
"MIT"
] | 1 | 2020-09-22T08:49:04.000Z | 2020-09-22T08:49:04.000Z | torch_connectomics/data/augmentation/rotation.py | al093/pytorch_connectomics | 52821951233b061102380fc0d2521843652c580a | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from .augmentor import DataAugment
import math
class Rotate(DataAugment):
"""
Continuous rotatation.
The sample size for x- and y-axes should be at least sqrt(2) times larger
than the input size to make sure there is no non-valid region after center-crop.
Args:
... | 39.241758 | 116 | 0.541865 | 3,493 | 0.978157 | 0 | 0 | 0 | 0 | 0 | 0 | 581 | 0.1627 |
ad21e1a931641e8b434612db21482b74d41ff9af | 1,073 | py | Python | constants.py | LuisHernandez96/Pichon | 7c7a1da6a404eae216b919dc2140ee4ca6624901 | [
"MIT"
] | 1 | 2018-03-12T00:23:37.000Z | 2018-03-12T00:23:37.000Z | constants.py | LuisHernandez96/Pichon | 7c7a1da6a404eae216b919dc2140ee4ca6624901 | [
"MIT"
] | null | null | null | constants.py | LuisHernandez96/Pichon | 7c7a1da6a404eae216b919dc2140ee4ca6624901 | [
"MIT"
] | null | null | null | import re
# Used to access the DATA_TYPES dictionary
INT = "INT"
FLOAT = "FLOAT"
BOOLEAN = "BOOLEAN"
INT_LIST = "INT_LIST"
FLOAT_LIST = "FLOAT_LIST"
BOOLEAN_LIST = "BOOLEAN_LIST"
VOID = "VOID"
OBJECT = "OBJECT"
SEMANTIC_ERROR = 99
# Regular expressiones to match data types
REGEX_BOOLEAN = r'true|false'
regex_boolean ... | 17.590164 | 48 | 0.571295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 392 | 0.365331 |
ad229f171cc9684921e7ee20ce7549cff09359f6 | 204 | py | Python | server/app/__init__.py | mrchipzhou/simple-android-demo | 69b7f40924b8e62fab6cc2fcccb89f3e728e6ef4 | [
"MIT"
] | null | null | null | server/app/__init__.py | mrchipzhou/simple-android-demo | 69b7f40924b8e62fab6cc2fcccb89f3e728e6ef4 | [
"MIT"
] | null | null | null | server/app/__init__.py | mrchipzhou/simple-android-demo | 69b7f40924b8e62fab6cc2fcccb89f3e728e6ef4 | [
"MIT"
] | null | null | null | from flask import Flask
from . import user
from . import attendance
app = Flask(__name__)
app.register_blueprint(user.bp, url_prefix='/User')
app.register_blueprint(attendance.bp, url_prefix='/Attend')
| 22.666667 | 59 | 0.784314 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.078431 |
ad2372f4683a8e3edf11b3a342a6152ebfa81c44 | 3,877 | py | Python | SimCalorimetry/EcalSelectiveReadoutProducers/python/ecalDigis_craft_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | SimCalorimetry/EcalSelectiveReadoutProducers/python/ecalDigis_craft_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | SimCalorimetry/EcalSelectiveReadoutProducers/python/ecalDigis_craft_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
simEcalDigis = cms.EDProducer("EcalSelectiveReadoutProducer",
# Label of input EB and EE digi collections
digiProducer = cms.string('simEcalUnsuppressedDigis'),
# Instance name of input EB digi collections
EBdigiCollection = cms.string(''),
# Instance name... | 36.233645 | 79 | 0.685324 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,161 | 0.55739 |
ad248d2fae3558935a3c28c5b44d8c20fef9db65 | 33,264 | py | Python | HDXer/methods.py | TMB-CSB/HDXer | f1e860427a0db2caccb37d630bc85de4a247c0cc | [
"BSD-3-Clause"
] | 3 | 2022-01-28T03:50:00.000Z | 2022-02-01T11:04:55.000Z | HDXer/methods.py | TMB-CSB/HDXer | f1e860427a0db2caccb37d630bc85de4a247c0cc | [
"BSD-3-Clause"
] | 1 | 2022-03-31T20:41:31.000Z | 2022-03-31T22:07:50.000Z | HDXer/methods.py | Lucy-Forrest-Lab/HDXer | 6ad1d73931f6a53922c3c960e6c3f67ebcbd7161 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Class for HDX trajectories, inherited from MDTraj
#
import mdtraj as md
import numpy as np
import os, glob, copy
from .dfpred import DfPredictor
from .errors import HDX_Error
from . import functions
class BV(DfPredictor):
"""Class for Best/Vendruscolo-style analysis. Subclass of DfPredict... | 52.21978 | 185 | 0.616432 | 32,987 | 0.991673 | 0 | 0 | 1,722 | 0.051768 | 0 | 0 | 16,909 | 0.508327 |
ad24ff76711efc4ad761466ca54751008e0bd6ce | 1,176 | py | Python | datasource/interface.py | YAmikep/datasource | 6c8d72bd299aa0a9e2880228f0f39d2b8721b146 | [
"MIT"
] | 1 | 2018-06-16T11:33:56.000Z | 2018-06-16T11:33:56.000Z | datasource/interface.py | YAmikep/datasource | 6c8d72bd299aa0a9e2880228f0f39d2b8721b146 | [
"MIT"
] | 1 | 2020-03-24T17:32:45.000Z | 2020-03-24T17:32:45.000Z | datasource/interface.py | YAmikep/datasource | 6c8d72bd299aa0a9e2880228f0f39d2b8721b146 | [
"MIT"
] | 2 | 2018-06-16T11:37:34.000Z | 2020-07-30T17:56:54.000Z | MAX_MEMORY = 5 * 1024 * 2 ** 10 # 5 MB
BUFFER_SIZE = 1 * 512 * 2 ** 10 # 512 KB
class DataSourceInterface(object):
"""Provides a uniform API regardless of how the data should be fetched."""
def __init__(self, target, preload=False, **kwargs):
raise NotImplementedError()
@property
def is_loa... | 30.153846 | 127 | 0.62415 | 1,092 | 0.928571 | 0 | 0 | 70 | 0.059524 | 0 | 0 | 667 | 0.567177 |
ad2588d5d21fa5a0ab0624f48b923896aa205c21 | 214 | py | Python | python/mock_patch/test_topathch.py | amitsaha/playground | 82cb5ac02ac90d3fa858a5153b0a5705187c14ce | [
"Unlicense"
] | 4 | 2018-04-14T16:28:39.000Z | 2021-11-14T12:08:02.000Z | python/mock_patch/test_topathch.py | amitsaha/playground | 82cb5ac02ac90d3fa858a5153b0a5705187c14ce | [
"Unlicense"
] | 3 | 2022-02-14T10:38:51.000Z | 2022-02-27T16:01:16.000Z | python/mock_patch/test_topathch.py | amitsaha/playground | 82cb5ac02ac90d3fa858a5153b0a5705187c14ce | [
"Unlicense"
] | 4 | 2015-07-07T01:01:27.000Z | 2019-04-12T05:38:26.000Z | from mock import patch
@patch('topatch.afunction')
class TestToPatch():
def test_afunction(self, mock_afunction):
mock_afunction('foo', 'bar')
mock_afunction.assert_any_call('foo', 'bar')
| 23.777778 | 52 | 0.682243 | 161 | 0.752336 | 0 | 0 | 189 | 0.883178 | 0 | 0 | 39 | 0.182243 |
ad276315f893a288238d66dae8d8e08290828c3c | 85,143 | py | Python | pyjsg/parser/jsgParser.py | hsolbrig/pyjsg | 5ef46d9af6a94a0cd0e91ebf8b22f61c17e78429 | [
"CC0-1.0"
] | 3 | 2017-07-23T11:11:23.000Z | 2020-11-30T15:36:51.000Z | pyjsg/parser/jsgParser.py | hsolbrig/pyjsg | 5ef46d9af6a94a0cd0e91ebf8b22f61c17e78429 | [
"CC0-1.0"
] | 15 | 2018-01-05T17:18:34.000Z | 2021-12-13T17:40:25.000Z | try2/lib/python3.9/site-packages/pyjsg/parser/jsgParser.py | diatomsRcool/eco-kg | 4251f42ca2ab353838a39b640cb97593db76d4f4 | [
"BSD-3-Clause"
] | 1 | 2021-01-18T10:32:56.000Z | 2021-01-18T10:32:56.000Z | # Generated from jsgParser.g4 by ANTLR 4.9
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
from typing import TextIO
else:
from typing.io import TextIO
def serializedATN():
with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u77... | 34.429034 | 299 | 0.566318 | 73,649 | 0.865004 | 0 | 0 | 0 | 0 | 0 | 0 | 10,239 | 0.120257 |
ad2a6e5fc9f7663e6a63e74433c09fbbe508fe41 | 4,568 | py | Python | Nokore/scripts/main-simon-transfer.py | algorine/nokware | 709c7d7061082f73fc2b3d4e0897d451a5fbbbd8 | [
"MIT"
] | null | null | null | Nokore/scripts/main-simon-transfer.py | algorine/nokware | 709c7d7061082f73fc2b3d4e0897d451a5fbbbd8 | [
"MIT"
] | null | null | null | Nokore/scripts/main-simon-transfer.py | algorine/nokware | 709c7d7061082f73fc2b3d4e0897d451a5fbbbd8 | [
"MIT"
] | null | null | null | import time
import numpy as np
import pandas as pd
import random
from Simon import Simon
from Simon.Encoder import Encoder
from Simon.LengthStandardizer import DataLengthStandardizerRaw
start_time = time.time()
### Read-in the emails and print some basic statistics
# Enron
EnronEmails = pd.read_csv('data/enron_em... | 35.968504 | 147 | 0.768827 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,092 | 0.457968 |
ad2d2edbe5cd065fd478d317524918fed089d282 | 1,111 | py | Python | example/familytree.py | realistschuckle/pyvisitor | f08bd50f5ca5ff4288f00d9045ca406e278ed306 | [
"MIT"
] | 15 | 2015-01-30T21:08:28.000Z | 2022-02-03T18:00:56.000Z | example/familytree.py | realistschuckle/pyvisitor | f08bd50f5ca5ff4288f00d9045ca406e278ed306 | [
"MIT"
] | 2 | 2016-10-03T21:33:29.000Z | 2019-02-05T13:06:05.000Z | example/familytree.py | realistschuckle/pyvisitor | f08bd50f5ca5ff4288f00d9045ca406e278ed306 | [
"MIT"
] | 7 | 2016-09-16T07:34:50.000Z | 2022-02-03T18:03:01.000Z | from __future__ import print_function
import sys
import os
# Put the path to the visitor module on the search path
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src'))
if not path in sys.path:
sys.path.insert(1, path)
import visitor
class Person(object):
def __init__(self, name):
self.na... | 19.491228 | 76 | 0.688569 | 843 | 0.758776 | 0 | 0 | 344 | 0.309631 | 0 | 0 | 85 | 0.076508 |
ad2d3fa37ba1868e4e2a135fb9535b7aef051f1f | 234 | py | Python | bgui/server/server/config.py | monash-emu/Legacy-AuTuMN | 513bc14b4ea8c29c5983cc90fb94284e6a003515 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | bgui/server/server/config.py | monash-emu/Legacy-AuTuMN | 513bc14b4ea8c29c5983cc90fb94284e6a003515 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | bgui/server/server/config.py | monash-emu/Legacy-AuTuMN | 513bc14b4ea8c29c5983cc90fb94284e6a003515 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | SQLALCHEMY_DATABASE_URI = 'sqlite:///database.sqlite'
SECRET_KEY = 'F12Zr47j\3yX R~X@H!jmM]Lwf/,?KT'
SAVE_FOLDER = '../../../projects'
SQLALCHEMY_TRACK_MODIFICATIONS = 'False'
PORT = '3000'
STATIC_FOLDER = '../../client/dist/static'
| 29.25 | 53 | 0.709402 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 118 | 0.504274 |
ad2e32d215791b8f6d838656d93aa2028c4b0dfd | 416 | py | Python | dentexchange/apps/location/tests/test_zip_code.py | hellhound/dentexchange | 58ae303e842404fc9e1860f294ec8044a332bef3 | [
"BSD-3-Clause"
] | 1 | 2017-11-09T23:09:51.000Z | 2017-11-09T23:09:51.000Z | dentexchange/apps/location/tests/test_zip_code.py | hellhound/dentexchange | 58ae303e842404fc9e1860f294ec8044a332bef3 | [
"BSD-3-Clause"
] | null | null | null | dentexchange/apps/location/tests/test_zip_code.py | hellhound/dentexchange | 58ae303e842404fc9e1860f294ec8044a332bef3 | [
"BSD-3-Clause"
] | 3 | 2015-08-11T16:58:47.000Z | 2021-01-04T08:23:51.000Z | # -*- coding:utf-8 -*-
import unittest
import mock
import decimal
from ..models import ZipCode
class ZipCodeTestCase(unittest.TestCase):
def test_unicode_should_return_code(self):
# setup
model = ZipCode()
code = '1.0'
model.code = decimal.Decimal(code)
# action
r... | 19.809524 | 46 | 0.637019 | 317 | 0.762019 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.120192 |
ad3017e922c09970a0f8a72fe88d8aaa1a57078a | 224,543 | py | Python | src/Intel_Project (1).py | Lance-Dsilva/Intel-Image-Classification-Using-CNN-91-Accuracy- | e5b729dddaa3671337c6c5019b69fc6ca2c868c0 | [
"Unlicense"
] | null | null | null | src/Intel_Project (1).py | Lance-Dsilva/Intel-Image-Classification-Using-CNN-91-Accuracy- | e5b729dddaa3671337c6c5019b69fc6ca2c868c0 | [
"Unlicense"
] | null | null | null | src/Intel_Project (1).py | Lance-Dsilva/Intel-Image-Classification-Using-CNN-91-Accuracy- | e5b729dddaa3671337c6c5019b69fc6ca2c868c0 | [
"Unlicense"
] | null | null | null |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://github.githubassets.com">
<link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
<link rel="dns-prefetch" href... | 68.291667 | 2,554 | 0.634956 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 115,832 | 0.515751 |
ad306fcfd7d3c8210a18c93a19c2085a8ed5bde6 | 1,523 | py | Python | spaces/utils.py | jgillick/Spaces | 96247701d530a017f10a0bd0ac6cf241d621be11 | [
"MIT"
] | 1 | 2018-08-12T23:43:45.000Z | 2018-08-12T23:43:45.000Z | spaces/utils.py | jgillick/Spaces | 96247701d530a017f10a0bd0ac6cf241d621be11 | [
"MIT"
] | 3 | 2016-01-13T10:12:51.000Z | 2016-01-13T10:13:15.000Z | spaces/utils.py | jgillick/Spaces | 96247701d530a017f10a0bd0ac6cf241d621be11 | [
"MIT"
] | null | null | null |
import re
import os
import uuid
from datetime import date
from django.conf import settings
def normalize_path(path):
"""
Normalizes a path:
* Removes extra and trailing slashes
* Converts special characters to underscore
"""
if path is None:
return ""
path = re.sub(r'/+', '/',... | 23.075758 | 58 | 0.594879 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 486 | 0.319107 |
ad31e247da8cf855b63a1a735072233c2abea496 | 3,608 | py | Python | babyname_parser.py | jongtaeklho/swpp-hw1-jongtaeklho | 1f0d2e4d4af985f83cbf3a9ee7548fecee68d346 | [
"Apache-2.0"
] | null | null | null | babyname_parser.py | jongtaeklho/swpp-hw1-jongtaeklho | 1f0d2e4d4af985f83cbf3a9ee7548fecee68d346 | [
"Apache-2.0"
] | null | null | null | babyname_parser.py | jongtaeklho/swpp-hw1-jongtaeklho | 1f0d2e4d4af985f83cbf3a9ee7548fecee68d346 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
# Modified by Alchan Kim at SNU Software Platform Lab for
# SWPP fall 2020 lecture.
import s... | 33.100917 | 119 | 0.636918 | 1,875 | 0.519678 | 0 | 0 | 1,288 | 0.356984 | 0 | 0 | 2,388 | 0.661863 |
ad322b052b2b88031cf1b45b1db093b00f0d7cf1 | 8,137 | py | Python | tests/test_position_stk_short.py | nwillemse/nctrader | 4754ccdeae465ef4674a829f35fc3f78cf1d3ea4 | [
"MIT"
] | 1 | 2019-11-13T06:38:12.000Z | 2019-11-13T06:38:12.000Z | tests/test_position_stk_short.py | nwillemse/nctrader | 4754ccdeae465ef4674a829f35fc3f78cf1d3ea4 | [
"MIT"
] | null | null | null | tests/test_position_stk_short.py | nwillemse/nctrader | 4754ccdeae465ef4674a829f35fc3f78cf1d3ea4 | [
"MIT"
] | 1 | 2021-05-11T11:24:08.000Z | 2021-05-11T11:24:08.000Z | import unittest
from datetime import datetime
from nctrader.position2 import Position
from nctrader.price_parser import PriceParser
class TestShortRoundTripSPYPosition(unittest.TestCase):
"""
Test a round-trip trade in SPY ETF where the initial
trade is a buy/long of 100 shares of SPY, at a price of
... | 54.610738 | 177 | 0.665233 | 7,953 | 0.977387 | 0 | 0 | 0 | 0 | 0 | 0 | 1,028 | 0.126336 |
ad32a03d43ea33a557f3e2f1e814ed32989f10d1 | 1,280 | py | Python | app/services/bgm_tv/bgm_tv.py | renovate-tests/pol | dca9aa4ce34273575d69a140dc3bb1d2ac14ecbf | [
"MIT"
] | 5 | 2019-05-11T05:14:44.000Z | 2019-09-07T10:22:53.000Z | app/services/bgm_tv/bgm_tv.py | renovate-tests/pol | dca9aa4ce34273575d69a140dc3bb1d2ac14ecbf | [
"MIT"
] | 161 | 2019-09-09T07:30:25.000Z | 2022-03-14T19:52:43.000Z | app/services/bgm_tv/bgm_tv.py | renovate-tests/pol | dca9aa4ce34273575d69a140dc3bb1d2ac14ecbf | [
"MIT"
] | 3 | 2019-09-07T13:15:05.000Z | 2020-05-06T04:30:46.000Z | from typing import Optional
import requests
from app.core import config
from app.services.bgm_tv.model import UserInfo, SubjectWithEps
class BgmApi:
def __init__(self, mirror=False):
self.session = requests.Session()
if mirror:
self.host = "mirror.api.bgm.rin.cat"
self.se... | 29.767442 | 82 | 0.640625 | 1,140 | 0.890625 | 0 | 0 | 83 | 0.064844 | 0 | 0 | 140 | 0.109375 |
ad32a493dcd06ab200267b7f9637b1ea5be35b2c | 1,164 | py | Python | backend_thread.py | HusseinLezzaik/Stock-Market-Prediction | 03f6b835466ebee9d4ee5ad217c4ed5c57b60a30 | [
"MIT"
] | null | null | null | backend_thread.py | HusseinLezzaik/Stock-Market-Prediction | 03f6b835466ebee9d4ee5ad217c4ed5c57b60a30 | [
"MIT"
] | null | null | null | backend_thread.py | HusseinLezzaik/Stock-Market-Prediction | 03f6b835466ebee9d4ee5ad217c4ed5c57b60a30 | [
"MIT"
] | null | null | null | import time
import numpy as np
import yahoo_fin.stock_info as si
from PyQt5.QtCore import QThread, pyqtSignal
from data_processing.download_data import download_data
class GetLivePrice(QThread):
# 产生信号, 用于传输数据和通知UI进行更改
update_data = pyqtSignal(list)
# 从本地读取etf名称
# Haifei: etfs = np.load('./Data/etfs.... | 27.069767 | 63 | 0.603952 | 1,071 | 0.862319 | 0 | 0 | 0 | 0 | 0 | 0 | 338 | 0.272142 |
ad344532336002200ed3df2295a2d40ee97f93bb | 2,183 | py | Python | csp_observer/settings.py | flxn/django-csp-observer | a7848085c94c53c06b523096a384118a1deae3e3 | [
"MIT"
] | 1 | 2020-08-26T13:58:10.000Z | 2020-08-26T13:58:10.000Z | csp_observer/settings.py | flxn/django-csp-observer | a7848085c94c53c06b523096a384118a1deae3e3 | [
"MIT"
] | null | null | null | csp_observer/settings.py | flxn/django-csp-observer | a7848085c94c53c06b523096a384118a1deae3e3 | [
"MIT"
] | null | null | null | from django.conf import settings
from .models import StoredConfig
NAMESPACE = getattr(settings, 'CSP_OBSERVER_NAMESPACE' , 'CSPO')
def ns_getattr(object, name, default=None):
return getattr(settings, '_'.join([NAMESPACE, name]), default)
REPORT_ONLY = ns_getattr(settings, 'REPORT_ONLY', True)
ENABLED_PATHS = ns_g... | 33.584615 | 137 | 0.737975 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 631 | 0.289052 |
ad357f0d42f5dc8811eeedd1a1ffd8d72bef3528 | 585 | py | Python | examples/gemini examples/basic_private_api_usage.py | wiqram/robin_stocks | 4e5dcf6515659e7f3f571ffa5e18e44afe3ab8a5 | [
"MIT"
] | null | null | null | examples/gemini examples/basic_private_api_usage.py | wiqram/robin_stocks | 4e5dcf6515659e7f3f571ffa5e18e44afe3ab8a5 | [
"MIT"
] | null | null | null | examples/gemini examples/basic_private_api_usage.py | wiqram/robin_stocks | 4e5dcf6515659e7f3f571ffa5e18e44afe3ab8a5 | [
"MIT"
] | null | null | null | ''' The most basic way to use the Private API. I recommend renaming the file .env
to .env and filling out the gemini api key information. The dotenv package loads the .env (or .env)
file and the os.environ() function reads the values from the file.ß
'''
import os
import robin_stocks.gemini as g
from dotenv import load... | 30.789474 | 99 | 0.748718 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 341 | 0.581911 |
ad35d6c682f13b8a035b9d728de67d944b584d36 | 420 | py | Python | cozens_circles_beams.py | hattfe/Math | 7957c31a830071195d11a206ce2eea9f21d62f98 | [
"MIT"
] | null | null | null | cozens_circles_beams.py | hattfe/Math | 7957c31a830071195d11a206ce2eea9f21d62f98 | [
"MIT"
] | null | null | null | cozens_circles_beams.py | hattfe/Math | 7957c31a830071195d11a206ce2eea9f21d62f98 | [
"MIT"
] | null | null | null | import turtle
t = turtle.Pen()
t.speed(10)
x1 = []
y1 = []
for i in range(0, 36):
t.circle(200,10)
x, y =(t.pos())
x1.append(int(x))
y1.append(int(y))
print(x1, y1)
x11 = x1[0]
y11 = y1[0]
def basagit(node, adım):
t.penup()
t.goto(x1[node],y1[node])
t.pendown()
t.goto(x1[node+no... | 15.555556 | 50 | 0.519048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ad3655bbbb52c012300bf70990dabf83a7394946 | 1,808 | py | Python | mysite/stocktrader/models.py | bennett39/stocktrader | c56a72f7a22367241d7126f8ed5b17f8d50a93db | [
"MIT"
] | 1 | 2020-10-09T03:19:10.000Z | 2020-10-09T03:19:10.000Z | mysite/stocktrader/models.py | bennett39/stocktrader | c56a72f7a22367241d7126f8ed5b17f8d50a93db | [
"MIT"
] | null | null | null | mysite/stocktrader/models.py | bennett39/stocktrader | c56a72f7a22367241d7126f8ed5b17f8d50a93db | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.core.validators import MinValueValidator
# Create your models here.
class Profile(models.Model):
""" Extend built-in Django User model with cash v... | 25.828571 | 65 | 0.654867 | 1,155 | 0.638827 | 0 | 0 | 401 | 0.221792 | 0 | 0 | 395 | 0.218473 |
ad375040d6b6884d5223dc6bfe23eb549e651e7b | 322 | py | Python | sql/mysql_demo.py | garyhu1/first-python | 01731d419a64aec9683b450d0e8e233f4b5cc9a7 | [
"Apache-2.0"
] | 1 | 2019-09-03T11:42:38.000Z | 2019-09-03T11:42:38.000Z | sql/mysql_demo.py | garyhu1/first-python | 01731d419a64aec9683b450d0e8e233f4b5cc9a7 | [
"Apache-2.0"
] | null | null | null | sql/mysql_demo.py | garyhu1/first-python | 01731d419a64aec9683b450d0e8e233f4b5cc9a7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'Mysql 连接数据库'
__author__ = 'garyhu'
import mysql.connector;
# 数据库连接
conn = mysql.connector.connect(user='root',password='****',database='websites');
s = conn.cursor();
s.execute('select * from users where id = %s',(7,))
value = s.fetchall();
print(value);
s.close();... | 15.333333 | 80 | 0.642857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.438596 |
ad379fc8f1e12b0d1ebe0428591ed665c7bd1cdd | 1,017 | py | Python | plugins/remind/plugin.py | CrushAndRun/Automata | fb16f2e4e985e22adcd244b8a81387f2678f68be | [
"MIT"
] | null | null | null | plugins/remind/plugin.py | CrushAndRun/Automata | fb16f2e4e985e22adcd244b8a81387f2678f68be | [
"MIT"
] | null | null | null | plugins/remind/plugin.py | CrushAndRun/Automata | fb16f2e4e985e22adcd244b8a81387f2678f68be | [
"MIT"
] | null | null | null | from twisted.internet import reactor
class RemindPlugin(object):
def remind(self, cardinal, user, channel, msg):
message = msg.split(None, 2)
if len(message) < 3:
cardinal.sendMsg(channel, "Syntax: .remind <minutes> <message>")
return
try:
reacto... | 42.375 | 115 | 0.627335 | 938 | 0.922321 | 0 | 0 | 0 | 0 | 0 | 0 | 334 | 0.328417 |
ad37a81771adfbf9c4a7bbfe30efdf3df704ada9 | 1,436 | py | Python | kkutil/loader/loader.py | kaka19ace/kkutils | 1ac449488d85ba2c6b18c5dc9cf77a0bc36579b1 | [
"MIT"
] | 1 | 2015-12-13T18:42:52.000Z | 2015-12-13T18:42:52.000Z | kkutil/loader/loader.py | kaka19ace/kkutil | 1ac449488d85ba2c6b18c5dc9cf77a0bc36579b1 | [
"MIT"
] | null | null | null | kkutil/loader/loader.py | kaka19ace/kkutil | 1ac449488d85ba2c6b18c5dc9cf77a0bc36579b1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
import threading
import logging
class Loader(object):
_config = NotImplemented
_config_cache_map = {}
_lock = threading.RLock()
@classmethod
def set_config(cls, config):
"""
:param config: kkutils.config.Config instance
"""
... | 25.192982 | 98 | 0.608635 | 1,288 | 0.896936 | 0 | 0 | 1,157 | 0.80571 | 0 | 0 | 345 | 0.240251 |
ad3a349f295eb61db842675383d6912392309c0a | 3,879 | py | Python | bdt2cpp/XGBoostParser.py | bixel/bdt2cpp | bffd94d777181a3a3bba81a8173ca57ead65c27c | [
"MIT"
] | 3 | 2017-10-01T15:25:10.000Z | 2021-04-10T18:42:19.000Z | bdt2cpp/XGBoostParser.py | bixel/bdt2cpp | bffd94d777181a3a3bba81a8173ca57ead65c27c | [
"MIT"
] | 3 | 2020-02-25T17:02:56.000Z | 2021-05-04T06:49:49.000Z | bdt2cpp/XGBoostParser.py | bixel/bdt2cpp | bffd94d777181a3a3bba81a8173ca57ead65c27c | [
"MIT"
] | null | null | null | import re
from .Node import Node
class XGBoostNode(Node):
FLOAT_REGEX = '[+-]?\d+(\.\d+)?([eE][+-]?\d+)?'
BRANCH_REGEX = re.compile(f'(?P<branch>\d+):\[(?P<feature>\w+)(?P<comp><)(?P<value>{FLOAT_REGEX})\]')
LEAF_REGEX = re.compile(f'(?P<leaf>\d+):leaf=(?P<value>{FLOAT_REGEX})')
FEATURE_REGEX = re.c... | 35.916667 | 105 | 0.588812 | 1,841 | 0.474607 | 0 | 0 | 0 | 0 | 0 | 0 | 947 | 0.244135 |
ad3b4e7ac7bf858225d06af83d3f9f52e0bd5d3f | 2,896 | py | Python | Backend/ChatBot/model.py | paucutrina/RareHacks_Chatbot | c7ecfef693bf2f477d090629d6eecf7b0bf57872 | [
"MIT"
] | null | null | null | Backend/ChatBot/model.py | paucutrina/RareHacks_Chatbot | c7ecfef693bf2f477d090629d6eecf7b0bf57872 | [
"MIT"
] | null | null | null | Backend/ChatBot/model.py | paucutrina/RareHacks_Chatbot | c7ecfef693bf2f477d090629d6eecf7b0bf57872 | [
"MIT"
] | null | null | null | import pickle
import json
import random
# NLP stuff
import nltk
# nltk.download('punkt')
from nltk.stem.lancaster import LancasterStemmer
# TensorFlow stuff
import numpy as np
import tflearn
import tensorflow as tf
import os
import time
stemmer = LancasterStemmer()
intents_dict = dict()
folder_entities = "entitie... | 24.965517 | 74 | 0.696133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 835 | 0.288329 |
ad3bbfaab9acdd38aa4c59baaeda66231af95942 | 3,658 | py | Python | .tmpl/python_scripts/batch_cmd_py/batch_cmd.py | githeim/wh_tmpl | cb869cb241fbe4b66bb0ed5b08a4a4e2dad0ed89 | [
"MIT"
] | 3 | 2020-10-08T11:32:16.000Z | 2021-08-11T09:47:29.000Z | .tmpl/python_scripts/batch_cmd_py/batch_cmd.py | githeim/wh_tmpl | cb869cb241fbe4b66bb0ed5b08a4a4e2dad0ed89 | [
"MIT"
] | null | null | null | .tmpl/python_scripts/batch_cmd_py/batch_cmd.py | githeim/wh_tmpl | cb869cb241fbe4b66bb0ed5b08a4a4e2dad0ed89 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import subprocess
import os
import sys
import unittest
import enum
import datetime
def Get_Parent_Dir():
return os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
def Get_Current_Dir():
return os.path.abspath(os.path.dirname(__file__))
# :x: example
def Get_Working_Dir():
return Get_C... | 26.128571 | 95 | 0.603062 | 268 | 0.073264 | 0 | 0 | 0 | 0 | 0 | 0 | 1,055 | 0.288409 |
ad3e3b47f7469d7f8af94e97611d088863a579cd | 2,753 | py | Python | {{cookiecutter.repo_name}}/src/evaluate.py | nussl/cookiecutter | 5df8512592778ea7155b05e3e4b54676227968b0 | [
"MIT"
] | null | null | null | {{cookiecutter.repo_name}}/src/evaluate.py | nussl/cookiecutter | 5df8512592778ea7155b05e3e4b54676227968b0 | [
"MIT"
] | null | null | null | {{cookiecutter.repo_name}}/src/evaluate.py | nussl/cookiecutter | 5df8512592778ea7155b05e3e4b54676227968b0 | [
"MIT"
] | null | null | null | import nussl
import os
import json
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor
import tqdm
import gin
from .helpers import build_dataset
import logging
@gin.configurable
def evaluate(output_folder, separation_algorithm, eval_class,
block_on_gpu, num_workers, seed, debug=False):... | 35.753247 | 74 | 0.648384 | 0 | 0 | 0 | 0 | 2,572 | 0.934254 | 0 | 0 | 319 | 0.115874 |
ad3e9b467042b664880d401cd499df829e241e47 | 260 | py | Python | ballpark/cashflows/admin.py | keyvanm/ballpark | 90ca6ac355319f159fa0836f30df487ee8e72ddd | [
"MIT"
] | null | null | null | ballpark/cashflows/admin.py | keyvanm/ballpark | 90ca6ac355319f159fa0836f30df487ee8e72ddd | [
"MIT"
] | null | null | null | ballpark/cashflows/admin.py | keyvanm/ballpark | 90ca6ac355319f159fa0836f30df487ee8e72ddd | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(GenericOnetimeIncome)
admin.site.register(GenericRecurringIncome)
admin.site.register(GenericOnetimeExpense)
admin.site.register(GenericRecurringExpense)
| 26 | 44 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.107692 |