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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9a2921aafee477055d03e47abb30d023e2f9b7df | 2,645 | py | Python | 2017/day06/redistribution.py | kmcginn/advent-of-code | 96a8d7d723f6f222d431fd9ede88d0a303d86761 | [
"MIT"
] | null | null | null | 2017/day06/redistribution.py | kmcginn/advent-of-code | 96a8d7d723f6f222d431fd9ede88d0a303d86761 | [
"MIT"
] | null | null | null | 2017/day06/redistribution.py | kmcginn/advent-of-code | 96a8d7d723f6f222d431fd9ede88d0a303d86761 | [
"MIT"
] | null | null | null | """
from: http://adventofcode.com/2017/day/6
--- Day 6: Memory Reallocation ---
A debugger program here is having an issue: it is trying to repair a memory reallocation routine,
but it keeps getting stuck in an infinite loop.
In this area, there are sixteen memory banks; each memory bank can hold any number of blocks.... | 56.276596 | 100 | 0.761815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,473 | 0.934972 |
9a29485e3ae58c67b4c0c486240c276c76016ab2 | 3,328 | py | Python | redress/tests/test_geometries.py | maximlamare/REDRESS | a6caa9924d0f6df7ed49f188b35a7743fde1486e | [
"MIT"
] | 1 | 2021-09-16T08:03:31.000Z | 2021-09-16T08:03:31.000Z | redress/tests/test_geometries.py | maximlamare/REDRESS | a6caa9924d0f6df7ed49f188b35a7743fde1486e | [
"MIT"
] | null | null | null | redress/tests/test_geometries.py | maximlamare/REDRESS | a6caa9924d0f6df7ed49f188b35a7743fde1486e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Unittests for the GDAl tools.
This file is part of the REDRESS algorithm
M. Lamare, M. Dumont, G. Picard (IGE, CEN).
"""
import pytest
from geojson import Polygon, Feature, FeatureCollection, dump
from redress.geospatial.gdal_ops import (build_poly_from_coords,
... | 36.571429 | 73 | 0.60607 | 2,305 | 0.692608 | 0 | 0 | 582 | 0.17488 | 0 | 0 | 930 | 0.279447 |
9a2995b77fe8a7759abd5fe12be41e28897fa1b0 | 112 | py | Python | output/models/ms_data/regex/letterlike_symbols_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/regex/letterlike_symbols_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/regex/letterlike_symbols_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ms_data.regex.letterlike_symbols_xsd.letterlike_symbols import Doc
__all__ = [
"Doc",
]
| 18.666667 | 85 | 0.776786 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.044643 |
9a2ad5d8f34b4182942a86d8ef3f197c1b06c12e | 1,296 | py | Python | test.py | MarkMurillo/python_ctype_structure_example | 9e889cc4cbdeab8433c396262f086071bb961e13 | [
"MIT"
] | null | null | null | test.py | MarkMurillo/python_ctype_structure_example | 9e889cc4cbdeab8433c396262f086071bb961e13 | [
"MIT"
] | null | null | null | test.py | MarkMurillo/python_ctype_structure_example | 9e889cc4cbdeab8433c396262f086071bb961e13 | [
"MIT"
] | null | null | null | """test.py
Python3
Test script that demonstrates the passing of an
initialized python structure to C and retrieving
the structure back.
"""
import testMod
from ctypes import *
class TESTSTRUCT(Structure):
pass
TESTSTRUCT._fields_ = [
("name", c_char_p),
("next", POINTER(TESTSTRUCT), #We can use a ... | 31.609756 | 88 | 0.73534 | 37 | 0.028549 | 0 | 0 | 0 | 0 | 0 | 0 | 597 | 0.460648 |
9a2bcb820df0cd2448d9d527aa5328ae749fbcf6 | 246 | py | Python | calculations.py | DikshaAGowda/Project3 | 675d4d80ad4b44b3a49e8962c9f85709898d0a94 | [
"MIT"
] | null | null | null | calculations.py | DikshaAGowda/Project3 | 675d4d80ad4b44b3a49e8962c9f85709898d0a94 | [
"MIT"
] | null | null | null | calculations.py | DikshaAGowda/Project3 | 675d4d80ad4b44b3a49e8962c9f85709898d0a94 | [
"MIT"
] | null | null | null | def addition(num1, num2):
return num1 + num2
def subtraction(num1, num2):
return num1 - num2
def multiplication(num1, num2):
return num1 * num2
def division(num1, num2):
if num2 == 0:
return None
return num1 / num2
| 17.571429 | 31 | 0.642276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9a2cec396ceac73b9f9e17a3fefcecf0959ae15d | 33,258 | py | Python | utility/visualize.py | richban/behavioral.neuroevolution | bb850bda919a772538dc86a9624a6e86623f9b80 | [
"Apache-2.0"
] | null | null | null | utility/visualize.py | richban/behavioral.neuroevolution | bb850bda919a772538dc86a9624a6e86623f9b80 | [
"Apache-2.0"
] | 2 | 2020-03-31T01:45:13.000Z | 2020-09-25T23:39:43.000Z | utility/visualize.py | richban/behavioral.neuroevolution | bb850bda919a772538dc86a9624a6e86623f9b80 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import os
import csv
import graphviz
import numpy as np
import plotly.graph_objs as go
import plotly
import plotly.plotly as py
import matplotlib.pyplot as plt
import matplotlib.pylab as pylab
import copy
import warnings
import matplotlib as mpl
from plotly.offline import download... | 25.7017 | 115 | 0.500992 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,167 | 0.185429 |
9a2d4e4783b1e8d97223132070735cfa9ed1e2ca | 1,683 | py | Python | CUMCM2014/Problem-A/2014-A-Python_SC/梯度图.py | Amoiensis/Mathmatic_Modeling_CUMCM | c64ec097d764ec3ae14e26e840bf5642be372d7c | [
"Apache-2.0"
] | 27 | 2019-08-30T07:09:53.000Z | 2021-08-29T07:37:24.000Z | CUMCM2014/Problem-A/2014-A-Python_SC/梯度图.py | Amoiensis/Mathmatic_Modeling_CUMCM | c64ec097d764ec3ae14e26e840bf5642be372d7c | [
"Apache-2.0"
] | 2 | 2020-08-10T03:11:32.000Z | 2020-08-24T13:39:24.000Z | CUMCM2014/Problem-A/2014-A-Python_SC/梯度图.py | Amoiensis/Mathmatic_Modeling_CUMCM | c64ec097d764ec3ae14e26e840bf5642be372d7c | [
"Apache-2.0"
] | 28 | 2019-12-14T03:54:42.000Z | 2022-03-12T14:38:22.000Z | # -*- coding: utf-8 -*-
"""
---------------------------------------------
File Name: 粗避障
Desciption:
Author: fanzhiwei
date: 2019/9/5 9:58
---------------------------------------------
Change Activity: 2019/9/5 9:58
-------------------------------------... | 29.017241 | 65 | 0.633393 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 434 | 0.256047 |
9a2d7ee04fd9497228365f3b015187758913933a | 965 | py | Python | models.py | curieos/Django-Blog-TDD | ba40b285d87c88aa33b1e2eb3d4bda014a88a319 | [
"MIT"
] | null | null | null | models.py | curieos/Django-Blog-TDD | ba40b285d87c88aa33b1e2eb3d4bda014a88a319 | [
"MIT"
] | 8 | 2019-04-14T13:53:55.000Z | 2019-07-11T18:06:57.000Z | models.py | curieos/Django-Blog-TDD | ba40b285d87c88aa33b1e2eb3d4bda014a88a319 | [
"MIT"
] | null | null | null | from django.utils.text import slugify
from django_extensions.db.fields import AutoSlugField
from django.db import models
from datetime import datetime
def get_current_date_time():
return datetime.now()
# Create your models here.
class Post(models.Model):
title = models.CharField(max_length=50)
slug = AutoSlugFi... | 29.242424 | 101 | 0.78342 | 727 | 0.753368 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.082902 |
9a2e437ae8b03063acc62700c14efeca6658092a | 145 | py | Python | brl_gym/estimators/learnable_bf/__init__.py | gilwoolee/brl_gym | 9c0784e9928f12d2ee0528c79a533202d3afb640 | [
"BSD-3-Clause"
] | 2 | 2020-08-07T05:50:44.000Z | 2022-03-03T08:46:10.000Z | brl_gym/estimators/learnable_bf/__init__.py | gilwoolee/brl_gym | 9c0784e9928f12d2ee0528c79a533202d3afb640 | [
"BSD-3-Clause"
] | null | null | null | brl_gym/estimators/learnable_bf/__init__.py | gilwoolee/brl_gym | 9c0784e9928f12d2ee0528c79a533202d3afb640 | [
"BSD-3-Clause"
] | null | null | null | from brl_gym.estimators.learnable_bf.learnable_bf import LearnableBF
#from brl_gym.estimators.learnable_bf.bf_dataset import BayesFilterDataset
| 36.25 | 74 | 0.889655 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.510345 |
9a337713256137d5fcba2e7758391c4a3d42f204 | 4,156 | py | Python | scripts/figures/kernels.py | qbhan/sample_based_MCdenoising | 92f5220802ef0668105cdee5fd7e2af8a66201db | [
"Apache-2.0"
] | 78 | 2019-10-02T01:34:46.000Z | 2022-03-21T11:18:04.000Z | scripts/figures/kernels.py | qbhan/sample_based_MCdenoising | 92f5220802ef0668105cdee5fd7e2af8a66201db | [
"Apache-2.0"
] | 17 | 2019-10-04T17:04:00.000Z | 2021-05-17T19:02:12.000Z | scripts/figures/kernels.py | qbhan/sample_based_MCdenoising | 92f5220802ef0668105cdee5fd7e2af8a66201db | [
"Apache-2.0"
] | 18 | 2019-10-03T05:02:21.000Z | 2021-06-22T15:54:15.000Z | import os
import argparse
import logging
import numpy as np
import torch as th
from torch.utils.data import DataLoader
from torchvision import transforms
import ttools
from ttools.modules.image_operators import crop_like
import rendernet.dataset as dset
import rendernet.modules.preprocessors as pre
import rendernet.... | 31.24812 | 113 | 0.677334 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 526 | 0.126564 |
9a33a34b59f215b243d9da922749fa4b6ad17b64 | 1,002 | py | Python | code/analytics/models.py | harryface/url-condenser | 800b573a82f41dd4900c8264007c1a0260a1a8b4 | [
"MIT"
] | null | null | null | code/analytics/models.py | harryface/url-condenser | 800b573a82f41dd4900c8264007c1a0260a1a8b4 | [
"MIT"
] | null | null | null | code/analytics/models.py | harryface/url-condenser | 800b573a82f41dd4900c8264007c1a0260a1a8b4 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
from shortener.models import CondenseURL
class UrlViewedManager(models.Manager):
def create_event(self, condensed_object, ip_address):
if isinstance(condensed_object, CondenseURL):
obj, created = self.get_or_create(url=condensed_object)
... | 31.3125 | 69 | 0.653693 | 901 | 0.899202 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.080838 |
9a3726435cdad9b9e21619560262a26d9cbff99c | 299 | py | Python | scripts/alan/clean_pycache.py | Pix-00/olea | 98bee1fd8866a3929f685a139255afb7b6813f31 | [
"Apache-2.0"
] | 2 | 2020-06-18T03:25:52.000Z | 2020-06-18T07:33:45.000Z | scripts/alan/clean_pycache.py | Pix-00/olea | 98bee1fd8866a3929f685a139255afb7b6813f31 | [
"Apache-2.0"
] | 15 | 2021-01-28T07:11:04.000Z | 2021-05-24T07:11:37.000Z | scripts/alan/clean_pycache.py | Pix-00/olea | 98bee1fd8866a3929f685a139255afb7b6813f31 | [
"Apache-2.0"
] | null | null | null | def clean_pycache(dir_, ignores=''):
import shutil
for path in dir_.glob('**/__pycache__'):
if ignores and path.match(ignores):
continue
shutil.rmtree(path)
if __name__ == "__main__":
from pathlib import Path
clean_pycache(Path(__file__).parents[2])
| 19.933333 | 44 | 0.638796 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.093645 |
9a3a8f8810da891a7c03436b0f8a519f17f8d1e7 | 212 | py | Python | orb_simulator/orbsim_language/orbsim_ast/tuple_creation_node.py | dmguezjaviersnet/IA-Sim-Comp-Project | 8165b9546efc45f98091a3774e2dae4f45942048 | [
"MIT"
] | 1 | 2022-01-19T22:49:09.000Z | 2022-01-19T22:49:09.000Z | orb_simulator/orbsim_language/orbsim_ast/tuple_creation_node.py | dmguezjaviersnet/IA-Sim-Comp-Project | 8165b9546efc45f98091a3774e2dae4f45942048 | [
"MIT"
] | 15 | 2021-11-10T14:25:02.000Z | 2022-02-12T19:17:11.000Z | orb_simulator/orbsim_language/orbsim_ast/tuple_creation_node.py | dmguezjaviersnet/IA-Sim-Comp-Project | 8165b9546efc45f98091a3774e2dae4f45942048 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import List
from orbsim_language.orbsim_ast.expression_node import ExpressionNode
@dataclass
class TupleCreationNode(ExpressionNode):
elems: List[ExpressionNode] | 30.285714 | 69 | 0.858491 | 72 | 0.339623 | 0 | 0 | 83 | 0.391509 | 0 | 0 | 0 | 0 |
9a4004b98dc117b5e58a273f30a560e340d87721 | 1,345 | py | Python | csv_merge_col.py | adrianpope/VelocityCompression | eb35f586b18890da93a7ad2e287437118c0327a2 | [
"BSD-3-Clause"
] | null | null | null | csv_merge_col.py | adrianpope/VelocityCompression | eb35f586b18890da93a7ad2e287437118c0327a2 | [
"BSD-3-Clause"
] | null | null | null | csv_merge_col.py | adrianpope/VelocityCompression | eb35f586b18890da93a7ad2e287437118c0327a2 | [
"BSD-3-Clause"
] | null | null | null | import sys
import numpy as np
import pandas as pd
def df_add_keys(df):
ax = df['fof_halo_angmom_x']
ay = df['fof_halo_angmom_y']
az = df['fof_halo_angmom_z']
mag = np.sqrt(ax**2 + ay**2 + az**2)
dx = ax/mag
dy = ay/mag
dz = az/mag
df['fof_halo_angmom_dx'] = dx
df['fof_halo_angmom_d... | 24.907407 | 104 | 0.594052 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.208178 |
9a409844ea8ff87b62a343aba1bddbe1b4acc686 | 649 | py | Python | Toolkits/VCS/mygulamali__repo-mine/mine/helpers.py | roscopecoltran/SniperKit-Core | 4600dffe1cddff438b948b6c22f586d052971e04 | [
"MIT"
] | null | null | null | Toolkits/VCS/mygulamali__repo-mine/mine/helpers.py | roscopecoltran/SniperKit-Core | 4600dffe1cddff438b948b6c22f586d052971e04 | [
"MIT"
] | null | null | null | Toolkits/VCS/mygulamali__repo-mine/mine/helpers.py | roscopecoltran/SniperKit-Core | 4600dffe1cddff438b948b6c22f586d052971e04 | [
"MIT"
] | null | null | null | from sys import stdout
def print_action(action):
def print_action_decorator(function):
def puts(string):
stdout.write(string)
stdout.flush()
def function_wrapper(*args, **kwargs):
puts("{0}... ".format(action))
return_value = function(*args, **kwargs... | 27.041667 | 52 | 0.628659 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.086287 |
9a4099a116dd4efb8f2b5619fb34ffe71a578a58 | 1,845 | py | Python | scripts/check-silknow-urls.py | silknow/crawler | d2632cea9b98ab64a8bca56bc70b34edd3c2de31 | [
"Apache-2.0"
] | 1 | 2019-04-21T07:09:52.000Z | 2019-04-21T07:09:52.000Z | scripts/check-silknow-urls.py | silknow/crawler | d2632cea9b98ab64a8bca56bc70b34edd3c2de31 | [
"Apache-2.0"
] | 35 | 2019-01-21T23:53:52.000Z | 2022-02-12T04:28:17.000Z | scripts/check-silknow-urls.py | silknow/crawler | d2632cea9b98ab64a8bca56bc70b34edd3c2de31 | [
"Apache-2.0"
] | null | null | null | import argparse
import csv
import os
parser = argparse.ArgumentParser()
parser.add_argument('-i', '--input', help="Input path of the missing urls CSV file")
parser.add_argument('-o', '--output', help="Output directory where the new CSV files will be stored")
parser.add_argument('-q', '--quiet', action='store_true', he... | 38.4375 | 105 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 336 | 0.182114 |
9a40c18aa2fcf755b162532d605ac1593ac74650 | 2,302 | py | Python | Trabajo 3/auxFunc.py | francaracuel/UGR-GII-CCIA-4-VC-Vision_por_computador-17-18-Practicas | cb801eb5dfc4a8ea0300eae66a3b9bb2943fe8ab | [
"Apache-2.0"
] | 1 | 2019-01-28T09:43:41.000Z | 2019-01-28T09:43:41.000Z | Trabajo 3/auxFunc.py | francaracuel/UGR-GII-CCIA-4-VC-Vision_por_computador-17-18-Practicas | cb801eb5dfc4a8ea0300eae66a3b9bb2943fe8ab | [
"Apache-2.0"
] | null | null | null | Trabajo 3/auxFunc.py | francaracuel/UGR-GII-CCIA-4-VC-Vision_por_computador-17-18-Practicas | cb801eb5dfc4a8ea0300eae66a3b9bb2943fe8ab | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Nov 21 11:20:06 2017
@author: NPB
"""
import cv2
import pickle
def loadDictionary(filename):
with open(filename,"rb") as fd:
feat=pickle.load(fd)
return feat["accuracy"],feat["labels"], feat["dictionary"]
def loadAux(filename, flagPatches):
if flagPatch... | 26.45977 | 69 | 0.613814 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 695 | 0.301911 |
9a417a0a839c157704c0bb9c7d9a86e16b358f3e | 22,087 | py | Python | pdb_profiling/processors/uniprot/api.py | NatureGeorge/pdb-profiling | b29f93f90fccf03869a7a294932f61d8e0b3470c | [
"MIT"
] | 5 | 2020-10-27T12:02:00.000Z | 2021-11-05T06:51:59.000Z | pdb_profiling/processors/uniprot/api.py | NatureGeorge/pdb-profiling | b29f93f90fccf03869a7a294932f61d8e0b3470c | [
"MIT"
] | 9 | 2021-01-07T04:47:58.000Z | 2021-09-22T13:20:35.000Z | pdb_profiling/processors/uniprot/api.py | NatureGeorge/pdb-profiling | b29f93f90fccf03869a7a294932f61d8e0b3470c | [
"MIT"
] | null | null | null | # @Created Date: 2019-12-08 06:46:49 pm
# @Filename: api.py
# @Email: 1730416009@stu.suda.edu.cn
# @Author: ZeFeng Zhu
# @Last Modified: 2020-02-16 10:54:32 am
# @Copyright (c) 2020 MinghuiGroup, Soochow University
from typing import Iterable, Iterator, Optional, Union, Generator, Dict, List
from time import perf_coun... | 42.55684 | 186 | 0.55467 | 5,772 | 0.26133 | 1,846 | 0.083579 | 3,949 | 0.178793 | 2,342 | 0.106035 | 16,434 | 0.744058 |
9a41e415317ae7c881f36ab4cbf51cbe613df940 | 9,409 | py | Python | hep_spt/stats/poisson.py | mramospe/hepspt | 11f74978a582ebc20e0a7765dafc78f0d1f1d5d5 | [
"MIT"
] | null | null | null | hep_spt/stats/poisson.py | mramospe/hepspt | 11f74978a582ebc20e0a7765dafc78f0d1f1d5d5 | [
"MIT"
] | null | null | null | hep_spt/stats/poisson.py | mramospe/hepspt | 11f74978a582ebc20e0a7765dafc78f0d1f1d5d5 | [
"MIT"
] | 1 | 2021-11-03T03:36:15.000Z | 2021-11-03T03:36:15.000Z | '''
Function and classes representing statistical tools.
'''
__author__ = ['Miguel Ramos Pernas']
__email__ = ['miguel.ramos.pernas@cern.ch']
from hep_spt.stats.core import chi2_one_dof, one_sigma
from hep_spt.core import decorate, taking_ndarray
from hep_spt import PACKAGE_PATH
import numpy as np
import os
from scip... | 27.755162 | 103 | 0.636199 | 0 | 0 | 0 | 0 | 2,553 | 0.271336 | 0 | 0 | 5,981 | 0.635668 |
9a43ea16514e92431028e9e426f7d3c0a8b72e9b | 3,088 | py | Python | src/octopus/core/framework/__init__.py | smaragden/OpenRenderManagement | cf3ab356f96969d7952b60417b48e941955e435c | [
"BSD-3-Clause"
] | 35 | 2015-02-23T23:13:13.000Z | 2021-01-03T05:56:39.000Z | src/octopus/core/framework/__init__.py | smaragden/OpenRenderManagement | cf3ab356f96969d7952b60417b48e941955e435c | [
"BSD-3-Clause"
] | 15 | 2015-01-12T12:58:29.000Z | 2016-03-30T13:10:19.000Z | src/octopus/core/framework/__init__.py | mikrosimage/OpenRenderManagement | 6f9237a86cb8e4b206313f9c22424c8002fd5e4d | [
"BSD-3-Clause"
] | 20 | 2015-03-18T06:57:13.000Z | 2020-07-01T15:09:36.000Z | import tornado
import logging
import httplib
try:
import simplejson as json
except ImportError:
import json
from octopus.core.framework.wsappframework import WSAppFramework, MainLoopApplication
from octopus.core.framework.webservice import MappingSet
from octopus.core.communication.http import Http400
from oc... | 29.409524 | 85 | 0.663536 | 2,378 | 0.770078 | 0 | 0 | 77 | 0.024935 | 0 | 0 | 403 | 0.130505 |
9a4542a7758b9c15cb5e2c79c2e2a38319b81b96 | 127 | py | Python | provstore/__init__.py | vinisalazar/provstore-api | 0dd506b4f0e00623b95a52caa70debe758817179 | [
"MIT"
] | 5 | 2015-03-09T20:07:08.000Z | 2018-07-26T19:59:11.000Z | provstore/__init__.py | vinisalazar/provstore-api | 0dd506b4f0e00623b95a52caa70debe758817179 | [
"MIT"
] | 2 | 2016-03-16T06:13:59.000Z | 2020-11-06T20:53:28.000Z | provstore/__init__.py | vinisalazar/provstore-api | 0dd506b4f0e00623b95a52caa70debe758817179 | [
"MIT"
] | 2 | 2016-09-01T09:09:05.000Z | 2020-11-06T22:13:58.000Z | from provstore.document import Document
from provstore.bundle_manager import BundleManager
from provstore.bundle import Bundle
| 31.75 | 50 | 0.88189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9a45c1430c4ad59b5117e98f3291087d7df4a619 | 834 | py | Python | print-server/src/auth/Singleton.py | Multi-Agent-io/feecc-io-consolidated | 9ba60176346ca9e15b22c09c2d5f1e1a5ac3ced6 | [
"Apache-2.0"
] | null | null | null | print-server/src/auth/Singleton.py | Multi-Agent-io/feecc-io-consolidated | 9ba60176346ca9e15b22c09c2d5f1e1a5ac3ced6 | [
"Apache-2.0"
] | 2 | 2021-11-27T09:31:12.000Z | 2022-03-23T13:15:57.000Z | print-server/src/auth/Singleton.py | Multi-Agent-io/feecc-io-consolidated | 9ba60176346ca9e15b22c09c2d5f1e1a5ac3ced6 | [
"Apache-2.0"
] | 2 | 2021-12-09T13:23:17.000Z | 2022-03-23T13:04:41.000Z | from __future__ import annotations
import typing as tp
from loguru import logger
class SingletonMeta(type):
"""
The Singleton class ensures there is always only one instance of a certain class that is globally available.
This implementation is __init__ signature agnostic.
"""
_instances: tp.Dic... | 33.36 | 113 | 0.655875 | 749 | 0.898082 | 0 | 0 | 0 | 0 | 0 | 0 | 382 | 0.458034 |
9a467e6fc069bf386281b9a110e435f9e100a70b | 139 | py | Python | exercises/spotify/auth_data.py | introprogramming/exercises | 8e52f3fa87d29a14ddcf00e8d87598d0721a41f6 | [
"MIT"
] | 2 | 2018-08-20T22:44:40.000Z | 2018-09-14T17:03:35.000Z | exercises/spotify/auth_data.py | introprogramming/exercises | 8e52f3fa87d29a14ddcf00e8d87598d0721a41f6 | [
"MIT"
] | 31 | 2015-08-06T16:25:57.000Z | 2019-06-11T12:22:35.000Z | exercises/spotify/auth_data.py | introprogramming/exercises | 8e52f3fa87d29a14ddcf00e8d87598d0721a41f6 | [
"MIT"
] | 1 | 2016-08-15T15:06:40.000Z | 2016-08-15T15:06:40.000Z | # Login to https://developer.spotify.com/dashboard/, create an application and fill these out before use!
client_id = ""
client_secret = "" | 46.333333 | 105 | 0.755396 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.784173 |
9a47729e5dc9d9a2649d73a1b1f6d29309683f2b | 7,871 | py | Python | augmentation.py | Harlequln/C1M18X-Behavioural_Cloning | 0c49ad2432b2694848a7b83fddeea04c3306aa80 | [
"MIT"
] | null | null | null | augmentation.py | Harlequln/C1M18X-Behavioural_Cloning | 0c49ad2432b2694848a7b83fddeea04c3306aa80 | [
"MIT"
] | null | null | null | augmentation.py | Harlequln/C1M18X-Behavioural_Cloning | 0c49ad2432b2694848a7b83fddeea04c3306aa80 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import matplotlib.image as mpimg
from pathlib import Path
from model import *
CAMERA_STEERING_CORRECTION = 0.2
def image_path(sample, camera="center"):
""" Transform the sample path to the repository structure.
Args:
sample: a sample (row) of the data d... | 35.138393 | 81 | 0.632575 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,465 | 0.567272 |
9a483acc0e1727f56a550dc2b790cfba50c01c45 | 4,848 | py | Python | test_zeroshot.py | airbert-vln/airbert | a4f667db9fb4021094c738dd8d23739aee3785a5 | [
"MIT"
] | 17 | 2021-07-30T14:08:24.000Z | 2022-03-30T13:57:02.000Z | test_zeroshot.py | airbert-vln/airbert | a4f667db9fb4021094c738dd8d23739aee3785a5 | [
"MIT"
] | 4 | 2021-09-09T03:02:18.000Z | 2022-03-24T13:55:55.000Z | test_zeroshot.py | airbert-vln/airbert | a4f667db9fb4021094c738dd8d23739aee3785a5 | [
"MIT"
] | 2 | 2021-08-30T11:51:16.000Z | 2021-09-03T09:18:50.000Z | import json
import logging
from typing import List
import os
import sys
import numpy as np
import torch
from torch.utils.data import DataLoader
from tqdm import tqdm
from transformers import AutoTokenizer, BertTokenizer
from vilbert.vilbert import BertConfig
from utils.cli import get_parser
from utils.dataset.commo... | 27.545455 | 88 | 0.65821 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,034 | 0.213284 |
9a49459be97466ed19cf1a661276df8eb41c082e | 3,184 | py | Python | refp.py | jon2718/ipycool_2.0 | 34cf74ee99f4a725b997c50a7742ba788ac2dacd | [
"MIT"
] | null | null | null | refp.py | jon2718/ipycool_2.0 | 34cf74ee99f4a725b997c50a7742ba788ac2dacd | [
"MIT"
] | null | null | null | refp.py | jon2718/ipycool_2.0 | 34cf74ee99f4a725b997c50a7742ba788ac2dacd | [
"MIT"
] | null | null | null | from modeledcommandparameter import *
from pseudoregion import *
class Refp(ModeledCommandParameter, PseudoRegion):
"""
Reference particle
"""
begtag = 'REFP'
endtag = ''
models = {
'model_descriptor': {'desc': 'Phase model',
'name': 'phmodref',
... | 38.829268 | 139 | 0.451005 | 3,117 | 0.978957 | 0 | 0 | 0 | 0 | 0 | 0 | 1,471 | 0.461997 |
9a4a243b2c4f9a84354c254f16486d8c603e8178 | 10,620 | py | Python | utils/dataloaders.py | sinahmr/parted-vae | 261f0654de605c6a260784e47e9a17a737a1a985 | [
"MIT"
] | 5 | 2021-06-26T07:45:50.000Z | 2022-03-31T11:41:29.000Z | utils/dataloaders.py | sinahmr/parted-vae | 261f0654de605c6a260784e47e9a17a737a1a985 | [
"MIT"
] | null | null | null | utils/dataloaders.py | sinahmr/parted-vae | 261f0654de605c6a260784e47e9a17a737a1a985 | [
"MIT"
] | 1 | 2021-11-26T09:14:03.000Z | 2021-11-26T09:14:03.000Z | import numpy as np
import torch
from torch.nn import functional as F
from torch.utils.data import Dataset, DataLoader
from torchvision import datasets, transforms
from torchvision.utils import save_image
from utils.fast_tensor_dataloader import FastTensorDataLoader
def get_mnist_dataloaders(batch_size=128, path_to_d... | 44.06639 | 177 | 0.645104 | 6,632 | 0.624482 | 0 | 0 | 0 | 0 | 0 | 0 | 2,127 | 0.200282 |
9a4a26f9a634d7ab72a8a79970898804d2a1b1c4 | 1,780 | py | Python | posts.py | girish97115/anonymail | f2eb741464ce7b780e4de6de6043c6eed1e13b9a | [
"MIT"
] | null | null | null | posts.py | girish97115/anonymail | f2eb741464ce7b780e4de6de6043c6eed1e13b9a | [
"MIT"
] | null | null | null | posts.py | girish97115/anonymail | f2eb741464ce7b780e4de6de6043c6eed1e13b9a | [
"MIT"
] | null | null | null | from flask import (
Blueprint,session, flash, g, redirect, render_template, request, url_for
)
from werkzeug.exceptions import abort
from anonymail.auth import login_required
from anonymail.db import get_db
import datetime
now = datetime.datetime.now()
current_year = now.year
bp = Blueprint('posts', __name__)
@b... | 28.253968 | 78 | 0.580337 | 0 | 0 | 0 | 0 | 1,458 | 0.819101 | 0 | 0 | 424 | 0.238202 |
9a4a94c02a87e8e977bec5709e692ef62684b7c3 | 959 | py | Python | app.py | pic-metric/data-science | 89bf6e3733a3595220c945269b66befcaf82a3be | [
"MIT"
] | null | null | null | app.py | pic-metric/data-science | 89bf6e3733a3595220c945269b66befcaf82a3be | [
"MIT"
] | null | null | null | app.py | pic-metric/data-science | 89bf6e3733a3595220c945269b66befcaf82a3be | [
"MIT"
] | 3 | 2020-01-31T22:34:00.000Z | 2020-03-06T01:56:06.000Z | # from python-decouple import config
from flask import Flask, request, jsonify
from .obj_detector import object_detection
# from flask_sqlalchemy import SQLAlchemy
from dotenv import load_dotenv
load_dotenv()
def create_app():
app = Flask(__name__)
@app.route('/img_summary', methods=['GET'])
... | 28.205882 | 78 | 0.607925 | 0 | 0 | 0 | 0 | 262 | 0.273201 | 0 | 0 | 532 | 0.554745 |
9a4bcff10fc3fa7d7e56bb3812a166c957678a62 | 2,579 | py | Python | src/subroutines/array_subroutine.py | cyrilico/aoco-code-correction | 3a780df31eea6caaa37213f6347fb71565ce11e8 | [
"MIT"
] | 4 | 2020-08-30T08:56:57.000Z | 2020-08-31T21:32:03.000Z | src/subroutines/array_subroutine.py | cyrilico/aoco-code-correction | 3a780df31eea6caaa37213f6347fb71565ce11e8 | [
"MIT"
] | null | null | null | src/subroutines/array_subroutine.py | cyrilico/aoco-code-correction | 3a780df31eea6caaa37213f6347fb71565ce11e8 | [
"MIT"
] | 1 | 2020-10-01T22:15:33.000Z | 2020-10-01T22:15:33.000Z | from .subroutine import subroutine
from parameters.string_parameter import string_parameter as String
from parameters.numeric_parameter import numeric_parameter as Numeric
from parameters.array_parameter import array_parameter as Array
from ast import literal_eval
class array_subroutine(subroutine):
"""Subroutine... | 47.759259 | 154 | 0.606437 | 2,311 | 0.896084 | 0 | 0 | 0 | 0 | 0 | 0 | 345 | 0.133773 |
9a4cab617527bcae29b76af4b2c39e67572e4127 | 1,164 | py | Python | auth.py | nivw/onna_test | 518c726a656493a5efd7ed6f548f68b2f5350260 | [
"BSD-2-Clause"
] | null | null | null | auth.py | nivw/onna_test | 518c726a656493a5efd7ed6f548f68b2f5350260 | [
"BSD-2-Clause"
] | null | null | null | auth.py | nivw/onna_test | 518c726a656493a5efd7ed6f548f68b2f5350260 | [
"BSD-2-Clause"
] | 1 | 2020-06-24T16:52:59.000Z | 2020-06-24T16:52:59.000Z | import requests
import json
from config import config
from logbook import Logger, StreamHandler
import sys
StreamHandler(sys.stdout).push_application()
log = Logger('auth')
class Auth(object):
def __init__(self):
self.config = config
self.auth_code = self.token =None
def get_auth_code(self):... | 31.459459 | 83 | 0.629725 | 987 | 0.847938 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.079038 |
9a4d61b4c436761ff6069be2e39ac836e18b0130 | 1,540 | py | Python | tests/regressions/python/942_lazy_fmap.py | NanmiaoWu/phylanx | 295b5f82cc39925a0d53e77ba3b6d02a65204535 | [
"BSL-1.0"
] | 83 | 2017-08-27T15:09:13.000Z | 2022-01-18T17:03:41.000Z | tests/regressions/python/942_lazy_fmap.py | NanmiaoWu/phylanx | 295b5f82cc39925a0d53e77ba3b6d02a65204535 | [
"BSL-1.0"
] | 808 | 2017-08-27T15:35:01.000Z | 2021-12-14T17:30:50.000Z | tests/regressions/python/942_lazy_fmap.py | NanmiaoWu/phylanx | 295b5f82cc39925a0d53e77ba3b6d02a65204535 | [
"BSL-1.0"
] | 55 | 2017-08-27T15:09:22.000Z | 2022-03-25T12:07:34.000Z | # Copyright (c) 2019 Bita Hasheminezhad
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
# #942: `fold_left`, `fold_right` and `fmap` do not work with a lazy function
import numpy as np
from phylanx import Phyl... | 24.0625 | 79 | 0.670779 | 0 | 0 | 0 | 0 | 166 | 0.107792 | 0 | 0 | 393 | 0.255195 |
9a4f44e640692a4adea1bc6d6ea01c4fe9188da3 | 644 | py | Python | main.py | DanTheBow/Fibonacci | 6b2b694174041c59c1cc151f775772056d88749b | [
"Unlicense"
] | 1 | 2022-01-02T19:50:55.000Z | 2022-01-02T19:50:55.000Z | main.py | DanTheBow/Fibonacci | 6b2b694174041c59c1cc151f775772056d88749b | [
"Unlicense"
] | null | null | null | main.py | DanTheBow/Fibonacci | 6b2b694174041c59c1cc151f775772056d88749b | [
"Unlicense"
] | null | null | null | # Die Fibonacci-Folge ist die unendliche Folge natürlicher Zahlen, die (ursprünglich) mit zweimal der Zahl 1 beginnt
# oder (häufig, in moderner Schreibweise) zusätzlich mit einer führenden Zahl 0 versehen ist.
# Im Anschluss ergibt jeweils die Summe zweier aufeinanderfolgender Zahlen die unmittelbar danach folgende Za... | 58.545455 | 116 | 0.706522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 570 | 0.874233 |
9a51a2dfb9ee0eb5c3e19b169561bb01b5b7ae90 | 4,063 | py | Python | application/api/generate_label.py | Florian-Barthel/stylegan2 | 4ef87038bf9370596cf2b729e1d1a1bc3ebcddd8 | [
"BSD-Source-Code"
] | null | null | null | application/api/generate_label.py | Florian-Barthel/stylegan2 | 4ef87038bf9370596cf2b729e1d1a1bc3ebcddd8 | [
"BSD-Source-Code"
] | null | null | null | application/api/generate_label.py | Florian-Barthel/stylegan2 | 4ef87038bf9370596cf2b729e1d1a1bc3ebcddd8 | [
"BSD-Source-Code"
] | null | null | null | import numpy as np
import dnnlib.tflib as tflib
from training import dataset
tflib.init_tf()
class LabelGenerator:
def __init__(self, tfrecord_dir: str = None):
if tfrecord_dir:
self.training_set = dataset.TFRecordDataset(tfrecord_dir, shuffle_mb=0)
self.labels_available = True
... | 35.330435 | 99 | 0.502092 | 3,965 | 0.97588 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.037903 |
9a51f5406e8b8b4afa3d8bc309049e92a8011b92 | 3,333 | py | Python | tests/test_urls.py | LaudateCorpus1/apostello | 1ace89d0d9e1f7a1760f6247d90a60a9787a4f12 | [
"MIT"
] | 69 | 2015-10-03T20:27:53.000Z | 2021-04-06T05:26:18.000Z | tests/test_urls.py | LaudateCorpus1/apostello | 1ace89d0d9e1f7a1760f6247d90a60a9787a4f12 | [
"MIT"
] | 73 | 2015-10-03T17:53:47.000Z | 2020-10-01T03:08:01.000Z | tests/test_urls.py | LaudateCorpus1/apostello | 1ace89d0d9e1f7a1760f6247d90a60a9787a4f12 | [
"MIT"
] | 29 | 2015-10-23T22:00:13.000Z | 2021-11-30T04:48:06.000Z | from collections import namedtuple
import pytest
from rest_framework.authtoken.models import Token
from tests.conftest import twilio_vcr
from apostello import models
StatusCode = namedtuple("StatusCode", "anon, user, staff")
@pytest.mark.slow
@pytest.mark.parametrize(
"url,status_code",
[
("/", Sta... | 40.646341 | 105 | 0.615362 | 1,551 | 0.465347 | 0 | 0 | 3,099 | 0.929793 | 0 | 0 | 909 | 0.272727 |
9a52f446636c4417f93211b5960e9ec09c902310 | 2,491 | py | Python | guestbook/main.py | bradmontgomery/mempy-flask-tutorial | 8113562460cfa837e7b26df29998e0b6950dd46f | [
"MIT"
] | 1 | 2018-01-10T17:54:18.000Z | 2018-01-10T17:54:18.000Z | guestbook/main.py | bradmontgomery/mempy-flask-tutorial | 8113562460cfa837e7b26df29998e0b6950dd46f | [
"MIT"
] | null | null | null | guestbook/main.py | bradmontgomery/mempy-flask-tutorial | 8113562460cfa837e7b26df29998e0b6950dd46f | [
"MIT"
] | null | null | null | """
A *really* simple guestbook flask app. Data is stored in a SQLite database that
looks something like the following:
+------------+------------------+------------+
| Name | Email | signed_on |
+============+==================+============+
| John Doe | jdoe@example.com | 2012-05-28 |
+------... | 29.654762 | 106 | 0.609394 | 0 | 0 | 0 | 0 | 492 | 0.197511 | 0 | 0 | 1,419 | 0.569651 |
9a555159031db4d7f16f4b7224046ffb7dcc0810 | 25,673 | py | Python | lingvodoc/scripts/lingvodoc_converter.py | SegFaulti4/lingvodoc | 8b296b43453a46b814d3cd381f94382ebcb9c6a6 | [
"Apache-2.0"
] | 5 | 2017-03-30T18:02:11.000Z | 2021-07-20T16:02:34.000Z | lingvodoc/scripts/lingvodoc_converter.py | SegFaulti4/lingvodoc | 8b296b43453a46b814d3cd381f94382ebcb9c6a6 | [
"Apache-2.0"
] | 15 | 2016-02-24T13:16:59.000Z | 2021-09-03T11:47:15.000Z | lingvodoc/scripts/lingvodoc_converter.py | Winking-maniac/lingvodoc | f037bf0e91ccdf020469037220a43e63849aa24a | [
"Apache-2.0"
] | 22 | 2015-09-25T07:13:40.000Z | 2021-08-04T18:08:26.000Z | import sqlite3
import base64
import requests
import json
import hashlib
import logging
from lingvodoc.queue.client import QueueClient
def get_dict_attributes(sqconn):
dict_trav = sqconn.cursor()
dict_trav.execute("""SELECT
dict_name,
dict_identificator,
... | 51.346 | 159 | 0.569158 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,547 | 0.293692 |
9a56a9cb8a9973d77c62dc8bff13ecc6a5a858c1 | 1,550 | py | Python | tests/test_all.py | euranova/DAEMA | 29fec157c34afcc9abe95bc602a3012615b3c36b | [
"MIT"
] | 6 | 2021-09-17T02:09:29.000Z | 2022-03-20T04:15:15.000Z | tests/test_all.py | Jason-Xu-Ncepu/DAEMA | 29fec157c34afcc9abe95bc602a3012615b3c36b | [
"MIT"
] | null | null | null | tests/test_all.py | Jason-Xu-Ncepu/DAEMA | 29fec157c34afcc9abe95bc602a3012615b3c36b | [
"MIT"
] | 4 | 2021-06-29T22:57:18.000Z | 2022-03-09T09:19:17.000Z | """ Tests the code. """
from torch.utils.data import DataLoader
from models import MODELS
from pipeline import argument_parser
from pipeline.datasets import DATASETS, get_dataset
from run import main
def test_datasets():
""" Tests all the datasets defined in pipeline.datasets.DATASETS. """
for ds_name in DA... | 38.75 | 113 | 0.614839 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 534 | 0.344516 |
9a586ac04d9d83458edb9f23d9cb90fb787462de | 2,185 | py | Python | src/preprocessing.py | Wisteria30/GIM-RL | 085ba3b8c10590f82226cd1675ba96c5f90740f3 | [
"Apache-2.0"
] | 3 | 2021-10-15T00:57:05.000Z | 2021-12-16T13:00:05.000Z | src/preprocessing.py | Wisteria30/GIM-RL | 085ba3b8c10590f82226cd1675ba96c5f90740f3 | [
"Apache-2.0"
] | null | null | null | src/preprocessing.py | Wisteria30/GIM-RL | 085ba3b8c10590f82226cd1675ba96c5f90740f3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import random
import os
import sys
import torch
from src.agent import (
EpsilonGreedyAgent,
MaxAgent,
RandomAgent,
RandomCreateBVAgent,
ProbabilityAgent,
QAgent,
QAndUtilityAgent,
MultiEpsilonGreedyAgent,
MultiMaxAgent,
MultiProbabilit... | 27.3125 | 74 | 0.644851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 290 | 0.132723 |
9a599c01b7e7a6eb5de9e8bf5a694c44420b04db | 101 | py | Python | python/testData/editing/spaceDocStringStubInFunction.after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/editing/spaceDocStringStubInFunction.after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/editing/spaceDocStringStubInFunction.after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | def func(x, y, z):
"""
:param x: <caret>
:param y:
:param z:
:return:
""" | 14.428571 | 21 | 0.386139 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 0.772277 |
9a5ad370a80119a4cd36243d371bcf4ccf37a3ae | 1,439 | py | Python | src/leaf/file_tools.py | Pix-00/olea-v2_flask_1_ | 7ddfa83a7a2a7dfbe55b78da002c1193f38781c0 | [
"Apache-2.0"
] | null | null | null | src/leaf/file_tools.py | Pix-00/olea-v2_flask_1_ | 7ddfa83a7a2a7dfbe55b78da002c1193f38781c0 | [
"Apache-2.0"
] | null | null | null | src/leaf/file_tools.py | Pix-00/olea-v2_flask_1_ | 7ddfa83a7a2a7dfbe55b78da002c1193f38781c0 | [
"Apache-2.0"
] | null | null | null | from hashlib import sha3_256
import magic
from enums import Dep, MangoType
MIME_MTYPE = {
'text/plain': MangoType.text,
'audio/flac': MangoType.audio_flac,
'audio/wav': MangoType.audio_wav,
'image/png': MangoType.picture_png,
'image/jpeg': MangoType.picture_jpg,
'video/x-matroska': MangoType.... | 24.810345 | 73 | 0.635858 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.081306 |
9a5cc32eb8d423266537616c2fd2072b4114deb3 | 2,258 | py | Python | fabric_cm/credmgr/swagger_server/__main__.py | fabric-testbed/CredentialManager | da8ce54ab78544ff907af81d8cd7723ff48f6652 | [
"MIT"
] | 1 | 2021-05-24T17:20:07.000Z | 2021-05-24T17:20:07.000Z | fabric_cm/credmgr/swagger_server/__main__.py | fabric-testbed/CredentialManager | da8ce54ab78544ff907af81d8cd7723ff48f6652 | [
"MIT"
] | 4 | 2021-06-07T16:18:45.000Z | 2021-06-29T20:13:21.000Z | fabric_cm/credmgr/swagger_server/__main__.py | fabric-testbed/CredentialManager | da8ce54ab78544ff907af81d8cd7723ff48f6652 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2020 FABRIC Testbed
#
# 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 ... | 32.724638 | 80 | 0.724978 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,390 | 0.615589 |
9a5d1a5d6e04e787d275225f739fe6d7102b20fa | 1,529 | py | Python | backendapi/icon/migrations/0001_initial.py | fredblade/Pictogram | d5cc4a25f28b6d80facf51fa9528e8ff969f7c46 | [
"MIT"
] | null | null | null | backendapi/icon/migrations/0001_initial.py | fredblade/Pictogram | d5cc4a25f28b6d80facf51fa9528e8ff969f7c46 | [
"MIT"
] | null | null | null | backendapi/icon/migrations/0001_initial.py | fredblade/Pictogram | d5cc4a25f28b6d80facf51fa9528e8ff969f7c46 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2022-02-27 17:59
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import versatileimagefield.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(setting... | 41.324324 | 177 | 0.646828 | 1,336 | 0.873774 | 0 | 0 | 0 | 0 | 0 | 0 | 203 | 0.132767 |
9a5f6f4fdf92f5d8e97feaed00a42aa430e9c51a | 424,971 | py | Python | src/fmiprot.py | tanisc/FMIPROT | 9035b5f89768e1028edd08dc7568b3208552f164 | [
"Apache-2.0"
] | 4 | 2019-02-25T11:53:55.000Z | 2021-03-16T20:16:56.000Z | src/fmiprot.py | tanisc/FMIPROT | 9035b5f89768e1028edd08dc7568b3208552f164 | [
"Apache-2.0"
] | 2 | 2021-09-14T09:54:42.000Z | 2021-11-12T13:30:10.000Z | src/fmiprot.py | tanisc/FMIPROT | 9035b5f89768e1028edd08dc7568b3208552f164 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# python version 2.7
# Cemal Melih Tanis (C)
###############################################################################
import os
import shutil
import datetime
from pytz import timezone
from uuid import uuid4
from definitions import *
import fetchers
import cal... | 64.15625 | 917 | 0.714124 | 423,288 | 0.99604 | 0 | 0 | 0 | 0 | 0 | 0 | 85,433 | 0.201033 |
9a61264c94a41a473e6cc008dcf849ae78b0596c | 898 | py | Python | akamai/cache_buster/bust_cache.py | famartinrh/cloud-services-config | 7dd4fe24fc09a62f360e3407629b1c2567a10260 | [
"MIT"
] | 11 | 2019-06-25T17:01:12.000Z | 2022-01-21T18:53:13.000Z | akamai/cache_buster/bust_cache.py | famartinrh/cloud-services-config | 7dd4fe24fc09a62f360e3407629b1c2567a10260 | [
"MIT"
] | 253 | 2019-05-24T12:48:32.000Z | 2022-03-29T11:00:25.000Z | akamai/cache_buster/bust_cache.py | famartinrh/cloud-services-config | 7dd4fe24fc09a62f360e3407629b1c2567a10260 | [
"MIT"
] | 93 | 2019-04-17T09:22:43.000Z | 2022-03-21T18:53:28.000Z | import sys
import subprocess
def main():
edgeRcPath = sys.argv[1]
branch = sys.argv[2]
navlist = sys.argv[3:]
domain = 'https://console.stage.redhat.com'
if 'prod' in branch:
domain = 'https://console.redhat.com'
if 'beta' in branch:
domain += '/beta'
purgeAssets = ['fed-mod... | 30.965517 | 105 | 0.615813 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 271 | 0.301782 |
9a61c54ca6366d9eef60d2491aa686f033543efd | 3,261 | py | Python | GAparsimony/util/config.py | misantam/GAparsimony | 0241092dc5d7741b5546151ff829167588e4f703 | [
"MIT"
] | null | null | null | GAparsimony/util/config.py | misantam/GAparsimony | 0241092dc5d7741b5546151ff829167588e4f703 | [
"MIT"
] | 1 | 2021-12-05T10:24:55.000Z | 2021-12-05T11:01:25.000Z | GAparsimony/util/config.py | misantam/GAparsimony | 0241092dc5d7741b5546151ff829167588e4f703 | [
"MIT"
] | null | null | null | #################################################
#****************LINEAR MODELS******************#
#################################################
CLASSIF_LOGISTIC_REGRESSION = {"C":{"range": (1., 100.), "type": 1},
"tol":{"range": (0.0001,0.9999), "type": 1}}
... | 40.259259 | 90 | 0.340693 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,739 | 0.533272 |
9a620af02d14a583cea144484597abc9077f8497 | 6,300 | py | Python | gryphon/dashboards/handlers/status.py | qiquanzhijia/gryphon | 7bb2c646e638212bd1352feb1b5d21536a5b918d | [
"Apache-2.0"
] | 1,109 | 2019-06-20T19:23:27.000Z | 2022-03-20T14:03:43.000Z | gryphon/dashboards/handlers/status.py | qiquanzhijia/gryphon | 7bb2c646e638212bd1352feb1b5d21536a5b918d | [
"Apache-2.0"
] | 63 | 2019-06-21T05:36:17.000Z | 2021-05-26T21:08:15.000Z | gryphon/dashboards/handlers/status.py | qiquanzhijia/gryphon | 7bb2c646e638212bd1352feb1b5d21536a5b918d | [
"Apache-2.0"
] | 181 | 2019-06-20T19:42:05.000Z | 2022-03-21T13:05:13.000Z | # -*- coding: utf-8 -*-
from datetime import timedelta
import logging
from delorean import Delorean
import tornado.web
from gryphon.dashboards.handlers.admin_base import AdminBaseHandler
from gryphon.lib.exchange import exchange_factory
from gryphon.lib.models.order import Order
from gryphon.lib.models.exchange impor... | 33.157895 | 87 | 0.623968 | 5,729 | 0.909365 | 0 | 0 | 1,074 | 0.170476 | 0 | 0 | 543 | 0.08619 |
9a63239cdeadf5547e515d79f10a494c6c3288e7 | 4,897 | py | Python | setup.py | Hydar-Zartash/TF_regression | ac7cef4c1f248664b57139ae40c582ec80b2355f | [
"MIT"
] | null | null | null | setup.py | Hydar-Zartash/TF_regression | ac7cef4c1f248664b57139ae40c582ec80b2355f | [
"MIT"
] | null | null | null | setup.py | Hydar-Zartash/TF_regression | ac7cef4c1f248664b57139ae40c582ec80b2355f | [
"MIT"
] | null | null | null | import yfinance as yf
import numpy as np
import pandas as pd
class StockSetup():
"""
The object of this class includes a dataframe, a classifier trained on it
and some associated test and prediction stats
"""
def __init__(self, ticker: str, target:int) -> None:
"""Initialize the ob... | 44.926606 | 195 | 0.596488 | 4,708 | 0.961405 | 0 | 0 | 0 | 0 | 0 | 0 | 2,615 | 0.534 |
9a636c8c285701e4e227ff48aaa2926973c39b10 | 1,893 | py | Python | netsuitesdk/api/custom_records.py | wolever/netsuite-sdk-py | 1b1c21e2a8a532fdbf54915e7e9d30b8b5fc2d08 | [
"MIT"
] | 47 | 2019-08-15T21:36:36.000Z | 2022-03-18T23:44:59.000Z | netsuitesdk/api/custom_records.py | wolever/netsuite-sdk-py | 1b1c21e2a8a532fdbf54915e7e9d30b8b5fc2d08 | [
"MIT"
] | 52 | 2019-06-17T09:43:04.000Z | 2022-03-22T05:00:53.000Z | netsuitesdk/api/custom_records.py | wolever/netsuite-sdk-py | 1b1c21e2a8a532fdbf54915e7e9d30b8b5fc2d08 | [
"MIT"
] | 55 | 2019-06-02T22:18:01.000Z | 2022-03-29T07:20:31.000Z | from collections import OrderedDict
from .base import ApiBase
import logging
logger = logging.getLogger(__name__)
class CustomRecords(ApiBase):
SIMPLE_FIELDS = [
'allowAttachments',
'allowInlineEditing',
'allowNumberingOverride',
'allowQuickSearch',
'altName',
'au... | 25.581081 | 77 | 0.59588 | 1,774 | 0.937137 | 0 | 0 | 0 | 0 | 0 | 0 | 758 | 0.400423 |
9a64215513cbe7b2b8f68643b42ce0ea2da19bba | 147 | py | Python | api/schema/__init__.py | wepickheroes/wepickheroes.github.io | 032c2a75ef058aaceb795ce552c52fbcc4cdbba3 | [
"MIT"
] | 3 | 2018-02-15T20:04:23.000Z | 2018-09-29T18:13:55.000Z | api/schema/__init__.py | wepickheroes/wepickheroes.github.io | 032c2a75ef058aaceb795ce552c52fbcc4cdbba3 | [
"MIT"
] | 5 | 2018-01-31T02:01:15.000Z | 2018-05-11T04:07:32.000Z | api/schema/__init__.py | prattl/wepickheroes | 032c2a75ef058aaceb795ce552c52fbcc4cdbba3 | [
"MIT"
] | null | null | null | import graphene
from schema.queries import Query
from schema.mutations import Mutations
schema = graphene.Schema(query=Query, mutation=Mutations)
| 24.5 | 57 | 0.836735 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9a6446896e65dc764ddad3e136039fc438fa2758 | 1,710 | py | Python | airbox/commands/__init__.py | lewisjared/airbox | 56bfdeb3e81bac47c80fbf249d9ead31c94a2139 | [
"MIT"
] | null | null | null | airbox/commands/__init__.py | lewisjared/airbox | 56bfdeb3e81bac47c80fbf249d9ead31c94a2139 | [
"MIT"
] | null | null | null | airbox/commands/__init__.py | lewisjared/airbox | 56bfdeb3e81bac47c80fbf249d9ead31c94a2139 | [
"MIT"
] | null | null | null | """
This module contains a number of other commands that can be run via the cli.
All classes in this submodule which inherit the baseclass `airbox.commands.base.Command` are automatically included in
the possible commands to execute via the commandline. The commands can be called using their `name` property.
"""
from... | 26.307692 | 118 | 0.729825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 706 | 0.412865 |
9a67bbeeb8843ddedf058092d195c66fcbe342a3 | 1,881 | py | Python | waveguide/waveguide_test.py | DentonGentry/gfiber-platform | 2ba5266103aad0b7b676555eebd3c2061ddb8333 | [
"Apache-2.0"
] | 8 | 2017-09-24T03:11:46.000Z | 2021-08-24T04:29:14.000Z | waveguide/waveguide_test.py | DentonGentry/gfiber-platform | 2ba5266103aad0b7b676555eebd3c2061ddb8333 | [
"Apache-2.0"
] | null | null | null | waveguide/waveguide_test.py | DentonGentry/gfiber-platform | 2ba5266103aad0b7b676555eebd3c2061ddb8333 | [
"Apache-2.0"
] | 1 | 2017-10-05T23:04:10.000Z | 2017-10-05T23:04:10.000Z | #!/usr/bin/python
# Copyright 2015 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 by appli... | 28.938462 | 74 | 0.696438 | 146 | 0.077618 | 0 | 0 | 1,009 | 0.536417 | 0 | 0 | 817 | 0.434343 |
9a67d0c9f6bb396b9d590ca653e1ee83e64bff97 | 3,421 | py | Python | ava/actives/shell_injection.py | indeedsecurity/ava-ce | 4483b301034a096b716646a470a6642b3df8ce61 | [
"Apache-2.0"
] | 2 | 2019-03-26T15:37:48.000Z | 2020-01-03T03:47:30.000Z | ava/actives/shell_injection.py | indeedsecurity/ava-ce | 4483b301034a096b716646a470a6642b3df8ce61 | [
"Apache-2.0"
] | 2 | 2021-03-25T21:27:09.000Z | 2021-06-01T21:20:04.000Z | ava/actives/shell_injection.py | indeedsecurity/ava-ce | 4483b301034a096b716646a470a6642b3df8ce61 | [
"Apache-2.0"
] | null | null | null | import re
from ava.common.check import _ValueCheck, _TimingCheck
from ava.common.exception import InvalidFormatException
# metadata
name = __name__
description = "checks for shell injection"
class ShellInjectionCheck(_ValueCheck):
"""
Checks for Shell Injection by executing the 'id' command. The payload use... | 31.385321 | 117 | 0.501315 | 3,222 | 0.94183 | 0 | 0 | 0 | 0 | 0 | 0 | 1,828 | 0.534347 |
7bd4127115e5637b5b3d7a956f2d5a45c70e9ad5 | 5,536 | py | Python | matlab/FRCNN/For_LOC/python/Generate_Trecvid_Data.py | xyt2008/frcnn | 32a559e881cceeba09a90ff45ad4aae1dabf92a1 | [
"BSD-2-Clause"
] | 198 | 2018-01-07T13:44:29.000Z | 2022-03-21T12:06:16.000Z | matlab/FRCNN/For_LOC/python/Generate_Trecvid_Data.py | xyt2008/frcnn | 32a559e881cceeba09a90ff45ad4aae1dabf92a1 | [
"BSD-2-Clause"
] | 18 | 2018-02-01T13:24:53.000Z | 2021-04-26T10:51:47.000Z | matlab/FRCNN/For_LOC/python/Generate_Trecvid_Data.py | xyt2008/frcnn | 32a559e881cceeba09a90ff45ad4aae1dabf92a1 | [
"BSD-2-Clause"
] | 82 | 2018-01-06T14:21:43.000Z | 2022-02-16T09:39:58.000Z | import os
import xml.etree.ElementTree as ET
import numpy as np
import scipy.sparse
import scipy.io as sio
import cPickle
import subprocess
import uuid
def Get_Class_Ind(Class_INT):
concepts = []
concepts.append(('Animal', [
'n01443537', 'n01503061', 'n01639765', 'n01662784', 'n01674464', 'n01726692'... | 37.659864 | 194 | 0.588873 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,872 | 0.33815 |
7bd4c7d5599bd575e062c27d1c3e19928097f821 | 5,967 | py | Python | train.py | ProfessorHuang/2D-UNet-Pytorch | b3941e8dc0ac3e76b6eedb656f943f1bd66fa799 | [
"MIT"
] | 11 | 2020-12-09T10:38:47.000Z | 2022-03-07T13:12:48.000Z | train.py | lllllllllllll-llll/2D-UNet-Pytorch | b3941e8dc0ac3e76b6eedb656f943f1bd66fa799 | [
"MIT"
] | 3 | 2020-11-24T02:23:02.000Z | 2021-04-18T15:31:51.000Z | train.py | ProfessorHuang/2D-UNet-Pytorch | b3941e8dc0ac3e76b6eedb656f943f1bd66fa799 | [
"MIT"
] | 2 | 2021-04-07T06:17:46.000Z | 2021-11-11T07:41:46.000Z | import argparse
import logging
import os
import sys
import numpy as np
from tqdm import tqdm
import time
import torch
import torch.nn as nn
from torch import optim
from torch.utils.tensorboard import SummaryWriter
from torch.utils.data import DataLoader
from models.unet import UNet
from models.nested_unet import Nest... | 37.062112 | 121 | 0.622256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,113 | 0.186526 |
7bd5134da373e6ab71f1575fcac61884fd8fa7f9 | 41 | py | Python | bot/run.py | anhhanuman/python-selenium | 6dbb169282c44c50189447a1c9a303ae1a790a8b | [
"Apache-2.0"
] | null | null | null | bot/run.py | anhhanuman/python-selenium | 6dbb169282c44c50189447a1c9a303ae1a790a8b | [
"Apache-2.0"
] | 5 | 2021-09-02T13:02:25.000Z | 2021-09-20T04:58:37.000Z | bot/run.py | anhhanuman/python-selenium | 6dbb169282c44c50189447a1c9a303ae1a790a8b | [
"Apache-2.0"
] | null | null | null | from booking.constants import myConstant
| 20.5 | 40 | 0.878049 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7bd7021be4efb1d2b67a9ea0b8c76a83b68b38ed | 411 | py | Python | geoxml.py | ssubramanian90/UMich-Python-coursera | 35aa6b7d939852e7e9f1751d6a7b369910c5a572 | [
"bzip2-1.0.6"
] | null | null | null | geoxml.py | ssubramanian90/UMich-Python-coursera | 35aa6b7d939852e7e9f1751d6a7b369910c5a572 | [
"bzip2-1.0.6"
] | null | null | null | geoxml.py | ssubramanian90/UMich-Python-coursera | 35aa6b7d939852e7e9f1751d6a7b369910c5a572 | [
"bzip2-1.0.6"
] | null | null | null | import urllib
import xml.etree.ElementTree as ET
address = raw_input('Enter location: ')
url = address
print 'Retrieving', url
uh = urllib.urlopen(url)
data = uh.read()
print 'Retrieved',len(data),'characters'
tree = ET.fromstring(data)
sumcount=count=0
counts = tree.findall('.//count')
for i in counts:
co... | 17.125 | 40 | 0.690998 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 0.192214 |
7bd7513f32c35775cd41faee3dba10cf9bfca50a | 882 | py | Python | app/mod_tweepy/controllers.py | cbll/SocialDigger | 177a7b5bb1b295722e8d281a8f33678a02bd5ab0 | [
"Apache-2.0"
] | 3 | 2016-01-28T20:35:46.000Z | 2020-03-08T08:49:07.000Z | app/mod_tweepy/controllers.py | cbll/SocialDigger | 177a7b5bb1b295722e8d281a8f33678a02bd5ab0 | [
"Apache-2.0"
] | null | null | null | app/mod_tweepy/controllers.py | cbll/SocialDigger | 177a7b5bb1b295722e8d281a8f33678a02bd5ab0 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from flask.ext.tweepy import Tweepy
app = Flask(__name__)
app.config.setdefault('TWEEPY_CONSUMER_KEY', 'sve32G2LtUhvgyj64J0aaEPNk')
app.config.setdefault('TWEEPY_CONSUMER_SECRET', '0z4NmfjET4BrLiOGsspTkVKxzDK1Qv6Yb2oiHpZC9Vi0T9cY2X')
app.config.setdefault('TWEEPY_ACCESS_TOKEN_KEY', '1425531373-... | 38.347826 | 102 | 0.794785 | 0 | 0 | 0 | 0 | 392 | 0.444444 | 0 | 0 | 393 | 0.445578 |
7bd7c0bcead87f462866473027496b7fc3302170 | 128 | py | Python | sftp_sync/__init__.py | bluec0re/python-sftpsync | f68a8cb47ff38cdf883d93c448cf1bcc9df7f532 | [
"MIT"
] | 3 | 2017-06-09T09:23:03.000Z | 2021-12-10T00:52:27.000Z | sftp_sync/__init__.py | bluec0re/python-sftpsync | f68a8cb47ff38cdf883d93c448cf1bcc9df7f532 | [
"MIT"
] | null | null | null | sftp_sync/__init__.py | bluec0re/python-sftpsync | f68a8cb47ff38cdf883d93c448cf1bcc9df7f532 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from .__main__ import main
from .sftp import *
from .sync import *
__version__ = '0.6'
| 16 | 38 | 0.765625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.039063 |
7bd8ac16582450f85a23c7ef200dbfd91aa09837 | 2,636 | py | Python | core/predictor/RF/rf_predict.py | LouisYZK/dds-avec2019 | 9a0ee86bddf6c23460a689bde8d75302f1d5aa45 | [
"BSD-2-Clause"
] | 8 | 2020-02-28T04:04:30.000Z | 2021-12-28T07:06:06.000Z | core/predictor/RF/rf_predict.py | LouisYZK/dds-avec2019 | 9a0ee86bddf6c23460a689bde8d75302f1d5aa45 | [
"BSD-2-Clause"
] | 1 | 2021-04-18T09:35:13.000Z | 2021-04-18T09:35:13.000Z | core/predictor/RF/rf_predict.py | LouisYZK/dds-avec2019 | 9a0ee86bddf6c23460a689bde8d75302f1d5aa45 | [
"BSD-2-Clause"
] | 2 | 2020-03-26T21:42:15.000Z | 2021-09-09T12:50:41.000Z | """Simple predictor using random forest
"""
import pandas as pd
import numpy as np
import math
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import RandomForestClassifier
from sklearn import preprocessing
from sklearn.metrics import mean_absolute_error
from sklearn.metrics import f1_score
fr... | 30.651163 | 90 | 0.638088 | 1,916 | 0.726859 | 0 | 0 | 0 | 0 | 0 | 0 | 398 | 0.150986 |
7bd8f52d214214860defef756924562c2d718956 | 2,135 | py | Python | speed/__init__.py | Astrochamp/speed | e17b2d1de6590d08e5cfddf875b4445f20c1e08a | [
"MIT"
] | 1 | 2022-02-12T18:43:43.000Z | 2022-02-12T18:43:43.000Z | speed/__init__.py | Astrochamp/speed | e17b2d1de6590d08e5cfddf875b4445f20c1e08a | [
"MIT"
] | null | null | null | speed/__init__.py | Astrochamp/speed | e17b2d1de6590d08e5cfddf875b4445f20c1e08a | [
"MIT"
] | null | null | null | def showSpeed(func, r, *args):
'''Usage: showSpeed(function, runs)
You can also pass arguments into <function> like so:
showSpeed(function, runs, <other>, <args>, <here> ...)
showSpeed() prints the average execution time of <function> over <runs> runs
'''
def formatted(f):
import re
... | 31.865672 | 92 | 0.562061 | 540 | 0.252927 | 0 | 0 | 0 | 0 | 0 | 0 | 576 | 0.269789 |
7bd9a84e5c6f84dbd90d1bc72cc33fccf0f2c06c | 9,106 | py | Python | polygonize.py | yaramohajerani/GL_learning | aa8d644024e48ba3e68398050f259b61d0660a2e | [
"MIT"
] | 7 | 2021-03-04T15:43:21.000Z | 2021-07-08T08:42:23.000Z | polygonize.py | yaramohajerani/GL_learning | aa8d644024e48ba3e68398050f259b61d0660a2e | [
"MIT"
] | null | null | null | polygonize.py | yaramohajerani/GL_learning | aa8d644024e48ba3e68398050f259b61d0660a2e | [
"MIT"
] | 2 | 2021-03-11T12:04:42.000Z | 2021-04-20T16:33:31.000Z | #!/usr/bin/env python
u"""
polygonize.py
Yara Mohajerani (Last update 09/2020)
Read output predictions and convert to shapefile lines
"""
import os
import sys
import rasterio
import numpy as np
import getopt
import shapefile
from skimage.measure import find_contours
from shapely.geometry import Polygon,LineString,Poin... | 32.992754 | 121 | 0.647595 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,544 | 0.389194 |
7bdb2f5c5a190e7161ceacb56d31dd8753fd3925 | 4,573 | py | Python | test_autofit/graphical/regression/test_linear_regression.py | rhayes777/AutoFit | f5d769755b85a6188ec1736d0d754f27321c2f06 | [
"MIT"
] | null | null | null | test_autofit/graphical/regression/test_linear_regression.py | rhayes777/AutoFit | f5d769755b85a6188ec1736d0d754f27321c2f06 | [
"MIT"
] | null | null | null | test_autofit/graphical/regression/test_linear_regression.py | rhayes777/AutoFit | f5d769755b85a6188ec1736d0d754f27321c2f06 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
from autofit.graphical import (
EPMeanField,
LaplaceOptimiser,
EPOptimiser,
Factor,
)
from autofit.messages import FixedMessage, NormalMessage
np.random.seed(1)
prior_std = 10.
error_std = 1.
a = np.array([[-1.3], [0.7]])
b = np.array([-0.5])
n_obs = 100
n_features,... | 26.9 | 84 | 0.659086 | 0 | 0 | 0 | 0 | 1,726 | 0.377433 | 0 | 0 | 117 | 0.025585 |
7bdbfbdb118df696ee04cd30b0904cea6a77354a | 1,716 | py | Python | src/linear/linear.py | RaulMurillo/cpp-torch | 30d0ee38c20f389e4b996d821952a48cccc70789 | [
"MIT"
] | null | null | null | src/linear/linear.py | RaulMurillo/cpp-torch | 30d0ee38c20f389e4b996d821952a48cccc70789 | [
"MIT"
] | null | null | null | src/linear/linear.py | RaulMurillo/cpp-torch | 30d0ee38c20f389e4b996d821952a48cccc70789 | [
"MIT"
] | null | null | null | import math
from torch import nn
import torch
import torch.nn.functional as F
import linear_cpu as linear
class LinearFunction(torch.autograd.Function):
@staticmethod
def forward(ctx, input, weights, bias, params):
is_bias = int(params[0])
outputs = linear.forward(input, weights, bias, is_bi... | 29.586207 | 79 | 0.666084 | 1,604 | 0.934732 | 0 | 0 | 636 | 0.370629 | 0 | 0 | 0 | 0 |
7bdf6ec04e7754ae150125e027e057b6d43b24d9 | 11,907 | py | Python | object_files_api/files_api.py | ndlib/mellon-manifest-pipeline | aa90494e73fbc30ce701771ac653d28d533217db | [
"Apache-2.0"
] | 1 | 2021-06-27T15:16:13.000Z | 2021-06-27T15:16:13.000Z | object_files_api/files_api.py | ndlib/marble-manifest-pipeline | abc036e4c81a8a5e938373a43153e2492a17cbf8 | [
"Apache-2.0"
] | 8 | 2019-11-05T18:58:23.000Z | 2021-09-03T14:54:42.000Z | object_files_api/files_api.py | ndlib/mellon-manifest-pipeline | aa90494e73fbc30ce701771ac653d28d533217db | [
"Apache-2.0"
] | null | null | null | """ Files API """
import boto3
import os
import io
from datetime import datetime, timedelta
import json
import time
from s3_helpers import write_s3_json, read_s3_json, delete_s3_key
from api_helpers import json_serial
from search_files import crawl_available_files, update_pdf_fields
from dynamo_helpers import add_file_... | 62.340314 | 259 | 0.646342 | 11,219 | 0.942219 | 0 | 0 | 0 | 0 | 0 | 0 | 2,857 | 0.239943 |
7be095f1c9c4b3f5f33d92d1c96cc497d62846c5 | 40,240 | py | Python | sampledb/frontend/projects.py | NicolasCARPi/sampledb | d6fd0f4d28d05010d7e0c022fbf2576e25435077 | [
"MIT"
] | null | null | null | sampledb/frontend/projects.py | NicolasCARPi/sampledb | d6fd0f4d28d05010d7e0c022fbf2576e25435077 | [
"MIT"
] | null | null | null | sampledb/frontend/projects.py | NicolasCARPi/sampledb | d6fd0f4d28d05010d7e0c022fbf2576e25435077 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
"""
import flask
import flask_login
import json
from flask_babel import _
from . import frontend
from .. import logic
from ..logic.object_permissions import Permissions
from ..logic.security_tokens import verify_token
from ..logic.languages import get_languages, get_language, get_language_by_lang... | 56.437588 | 256 | 0.675149 | 0 | 0 | 0 | 0 | 39,453 | 0.980442 | 0 | 0 | 5,972 | 0.14841 |
7be58215b629ccdaed1b12b4ee8ac016d5bf374b | 1,474 | py | Python | setup.py | caalle/caaalle | 3653155338fefde73579508ee83905a8ad8e3924 | [
"Apache-2.0"
] | null | null | null | setup.py | caalle/caaalle | 3653155338fefde73579508ee83905a8ad8e3924 | [
"Apache-2.0"
] | 4 | 2021-04-26T18:42:38.000Z | 2021-04-26T18:42:41.000Z | setup.py | caalle/caaalle | 3653155338fefde73579508ee83905a8ad8e3924 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import codecs
import os
import re
from setuptools import setup
with open('README.md', 'r') as f:
readme = f.read()
here = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
with codecs.open(os.path.join(here, *parts), 'r') as fp:
return fp.read()
def find_version(*f... | 26.321429 | 68 | 0.643148 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 459 | 0.311398 |
7be7ae3f178cdb0ca2b090e6df4678e140e34e75 | 311 | py | Python | Assets/Code/Python/src/python.py | Ross-Morgan/Logic-Gate-Visualisation | 01976248ef66837ec2009f18533fd0aab090a8b9 | [
"BSD-3-Clause"
] | null | null | null | Assets/Code/Python/src/python.py | Ross-Morgan/Logic-Gate-Visualisation | 01976248ef66837ec2009f18533fd0aab090a8b9 | [
"BSD-3-Clause"
] | null | null | null | Assets/Code/Python/src/python.py | Ross-Morgan/Logic-Gate-Visualisation | 01976248ef66837ec2009f18533fd0aab090a8b9 | [
"BSD-3-Clause"
] | null | null | null | def or_gate(a:int, b:int):
return a | b
def and_gate(a:int, b:int):
return a & b
def nor_gate(a:int, b:int):
return 1 - (a | b)
def nand_gate(a:int, b:int):
return 1 - (a | b)
def xor_gate(a:int, b:int):
return a ^ b
def xnor_gate(a:int, b:int):
return 1 - (a ^ b)
| 17.277778 | 29 | 0.533762 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7be827f0693117abffb3e3ef853dcd8e6d5807a0 | 10,522 | py | Python | kevlar/tests/test_novel.py | johnsmith2077/kevlar | 3ed06dae62479e89ccd200391728c416d4df8052 | [
"MIT"
] | 24 | 2016-12-07T07:59:09.000Z | 2019-03-11T02:05:36.000Z | kevlar/tests/test_novel.py | johnsmith2077/kevlar | 3ed06dae62479e89ccd200391728c416d4df8052 | [
"MIT"
] | 325 | 2016-12-07T07:37:17.000Z | 2019-03-12T19:01:40.000Z | kevlar/tests/test_novel.py | standage/kevlar | 622d1869266550422e91a60119ddc7261eea434a | [
"MIT"
] | 8 | 2017-08-17T01:37:39.000Z | 2019-03-01T16:17:44.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# -----------------------------------------------------------------------------
# Copyright (c) 2016 The Regents of the University of California
#
# This file is part of kevlar (http://github.com/dib-lab/kevlar) and is
# licensed under the MIT license: see LICENSE.
# ----... | 37.180212 | 79 | 0.585535 | 0 | 0 | 0 | 0 | 1,481 | 0.140753 | 0 | 0 | 3,102 | 0.294811 |
7be972ac4586def48187bfcf50e95c9e16542c4d | 361 | py | Python | Python Advanced Retake Exam - 16 Dec 2020/Problem 3- Magic triangle - Pascal.py | DiyanKalaydzhiev23/Advanced---Python | ed2c60bb887c49e5a87624719633e2b8432f6f6b | [
"MIT"
] | null | null | null | Python Advanced Retake Exam - 16 Dec 2020/Problem 3- Magic triangle - Pascal.py | DiyanKalaydzhiev23/Advanced---Python | ed2c60bb887c49e5a87624719633e2b8432f6f6b | [
"MIT"
] | null | null | null | Python Advanced Retake Exam - 16 Dec 2020/Problem 3- Magic triangle - Pascal.py | DiyanKalaydzhiev23/Advanced---Python | ed2c60bb887c49e5a87624719633e2b8432f6f6b | [
"MIT"
] | null | null | null | def get_magic_triangle(n):
triangle = [[1], [1, 1]]
for _ in range(2, n):
row = [1]
last_row = triangle[-1]
for i in range(1, len(last_row)):
num = last_row[i-1] + last_row[i]
row.append(num)
row.append(1)
triangle.append(row)
ret... | 21.235294 | 46 | 0.509695 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7bea7db6a9ed79dea66853c2fd9ed8df8241cc8b | 1,353 | py | Python | bot.py | egor5q/pvp-combat | 42d0f9df14e35c408deb7a360a9f7544ceae7dd7 | [
"MIT"
] | null | null | null | bot.py | egor5q/pvp-combat | 42d0f9df14e35c408deb7a360a9f7544ceae7dd7 | [
"MIT"
] | null | null | null | bot.py | egor5q/pvp-combat | 42d0f9df14e35c408deb7a360a9f7544ceae7dd7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import telebot
import time
import random
import threading
from emoji import emojize
from telebot import types
from pymongo import MongoClient
import traceback
token = os.environ['TELEGRAM_TOKEN']
bot = telebot.TeleBot(token)
#client=MongoClient(os.environ['database'])
#db=client.
#u... | 22.932203 | 115 | 0.625277 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 250 | 0.182083 |
7beab3658ca8052cfa8c2cfea3b8cd3bd3c9a157 | 262 | py | Python | py4mc/__init__.py | capslock321/py4mc | aad43d33f2ab1d264f0b86a84c80823309677994 | [
"MIT"
] | null | null | null | py4mc/__init__.py | capslock321/py4mc | aad43d33f2ab1d264f0b86a84c80823309677994 | [
"MIT"
] | null | null | null | py4mc/__init__.py | capslock321/py4mc | aad43d33f2ab1d264f0b86a84c80823309677994 | [
"MIT"
] | null | null | null | from .api import MojangApi
from .dispatcher import Dispatch
from .exceptions import (
ApiException,
ResourceNotFound,
InternalServerException,
UserNotFound,
)
__version__ = "0.0.1a"
__license__ = "MIT"
__author__ = "capslock321"
| 17.466667 | 33 | 0.698473 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.099237 |
7bed1d2243d33ac3902ca09a4b56c1ae1c77465e | 553 | py | Python | server/players/query.py | kfields/django-arcade | 24df3d43dde2d69df333529d8790507fb1f5fcf1 | [
"MIT"
] | 1 | 2021-10-03T05:44:32.000Z | 2021-10-03T05:44:32.000Z | server/players/query.py | kfields/django-arcade | 24df3d43dde2d69df333529d8790507fb1f5fcf1 | [
"MIT"
] | null | null | null | server/players/query.py | kfields/django-arcade | 24df3d43dde2d69df333529d8790507fb1f5fcf1 | [
"MIT"
] | null | null | null | from loguru import logger
from channels.db import database_sync_to_async
from schema.base import query
from .models import Player
from .schemata import PlayerConnection
@query.field("allPlayers")
@database_sync_to_async
def resolve_all_players(root, info, after='', before='', first=0, last=0):
players = [p for ... | 24.043478 | 74 | 0.755877 | 0 | 0 | 0 | 0 | 376 | 0.679928 | 0 | 0 | 24 | 0.0434 |
7bee6b98a8502317f53e2986edd1dc16f78c2ac7 | 50,039 | py | Python | simleague/simleague.py | Kuro-Rui/flare-cogs | f739e3a4a8c65bf0e10945d242ba0b82f96c6d3d | [
"MIT"
] | 38 | 2021-03-07T17:13:10.000Z | 2022-02-28T19:50:00.000Z | simleague/simleague.py | Kuro-Rui/flare-cogs | f739e3a4a8c65bf0e10945d242ba0b82f96c6d3d | [
"MIT"
] | 44 | 2021-03-12T19:13:32.000Z | 2022-03-18T10:20:52.000Z | simleague/simleague.py | Kuro-Rui/flare-cogs | f739e3a4a8c65bf0e10945d242ba0b82f96c6d3d | [
"MIT"
] | 33 | 2021-03-08T18:59:59.000Z | 2022-03-23T10:57:46.000Z | import asyncio
import logging
import random
import time
from abc import ABC
from typing import Literal, Optional
import aiohttp
import discord
from redbot.core import Config, bank, checks, commands
from redbot.core.utils.chat_formatting import box
from redbot.core.utils.menus import DEFAULT_CONTROLS, menu
from tabulat... | 43.85539 | 142 | 0.428846 | 49,411 | 0.987371 | 0 | 0 | 43,885 | 0.876946 | 46,701 | 0.933217 | 4,994 | 0.099794 |
7befce5f0d88c105c0447661c3338248d03f3ae9 | 2,118 | py | Python | 7_neural_networks/4_DeepLearning2.py | edrmonteiro/DataSciencePython | 0a35fb085bc0b98b33e083d0e1b113a04caa3aac | [
"MIT"
] | null | null | null | 7_neural_networks/4_DeepLearning2.py | edrmonteiro/DataSciencePython | 0a35fb085bc0b98b33e083d0e1b113a04caa3aac | [
"MIT"
] | null | null | null | 7_neural_networks/4_DeepLearning2.py | edrmonteiro/DataSciencePython | 0a35fb085bc0b98b33e083d0e1b113a04caa3aac | [
"MIT"
] | null | null | null | """
Deep Learning
"""
import pandas as pd
from keras.models import Sequential
from keras.layers import Dense
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix
from sklearn.preprocessing import LabelEncoder, OneHotEncoder
from sklearn.preprocessing import StandardScaler
f... | 29.830986 | 119 | 0.767705 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 584 | 0.274178 |
7bf26d67b6d552692974b4958df2a46110802ae6 | 1,529 | py | Python | src/python_settings/python_settings.py | tomatze/opendihu-webapp | 0f08bdeb82348a1e30fa44db1ac3b9b1606f1da1 | [
"MIT"
] | 17 | 2018-11-25T19:29:34.000Z | 2021-09-20T04:46:22.000Z | src/python_settings/python_settings.py | tomatze/opendihu-webapp | 0f08bdeb82348a1e30fa44db1ac3b9b1606f1da1 | [
"MIT"
] | 1 | 2020-11-12T15:15:58.000Z | 2020-12-29T15:29:24.000Z | src/python_settings/python_settings.py | tomatze/opendihu-webapp | 0f08bdeb82348a1e30fa44db1ac3b9b1606f1da1 | [
"MIT"
] | 4 | 2018-10-17T12:18:10.000Z | 2021-05-28T13:24:20.000Z | import re
# import all settings-modules here, so we can only import this module to get them all
from python_settings.settings_activatable import *
from python_settings.settings_child_placeholder import *
from python_settings.settings_choice import *
from python_settings.settings_comment import *
from python_settings.s... | 39.205128 | 120 | 0.695226 | 860 | 0.562459 | 0 | 0 | 0 | 0 | 0 | 0 | 445 | 0.29104 |
7bf3d0583faad7a302993fc30d577771cb1e654a | 460 | py | Python | titan/abstracts/decorator.py | DeSireFire/titans | 9194950694084a7cbc6434dfec0ecb2e755f0cdf | [
"Apache-2.0"
] | 17 | 2020-03-14T01:08:07.000Z | 2020-12-26T08:20:14.000Z | titan/abstracts/decorator.py | DeSireFire/titans | 9194950694084a7cbc6434dfec0ecb2e755f0cdf | [
"Apache-2.0"
] | 4 | 2020-12-05T08:50:55.000Z | 2022-02-27T06:48:21.000Z | titan/abstracts/decorator.py | DeSireFire/titans | 9194950694084a7cbc6434dfec0ecb2e755f0cdf | [
"Apache-2.0"
] | 1 | 2020-05-24T06:57:03.000Z | 2020-05-24T06:57:03.000Z | # -*- coding: utf-8 -*-
import timeit
from functools import wraps
from titan.manages.global_manager import GlobalManager
def run_time_sum(func):
@wraps(func)
def wrapper(*args, **kwargs):
start = timeit.default_timer()
__func = func(*args, **kwargs)
end = timeit.default_timer()
... | 25.555556 | 70 | 0.630435 | 0 | 0 | 0 | 0 | 288 | 0.626087 | 0 | 0 | 39 | 0.084783 |
7bf5036dc7b11f3015385fa7ebed58f2c40e9c71 | 262 | py | Python | src/cs2mako/patterns.py | eventbrite/cs2mako | 163affcc764a574b4af543c3520b7f345992973a | [
"MIT"
] | null | null | null | src/cs2mako/patterns.py | eventbrite/cs2mako | 163affcc764a574b4af543c3520b7f345992973a | [
"MIT"
] | null | null | null | src/cs2mako/patterns.py | eventbrite/cs2mako | 163affcc764a574b4af543c3520b7f345992973a | [
"MIT"
] | 2 | 2015-04-03T05:35:36.000Z | 2021-09-08T11:48:27.000Z | # Copyright (c) 2014 Eventbrite, Inc. All rights reserved.
# See "LICENSE" file for license.
import re
open_r_str = r'\<\?cs\s*([a-zA-Z]+)([:]|\s)'
close_r_str = r'\<\?cs\s*/([a-zA-Z]+)\s*\?\>'
open_r = re.compile(open_r_str)
close_r = re.compile(close_r_str)
| 26.2 | 58 | 0.637405 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.583969 |
7bf5401a73cd65b2b3dab4a303b9fc867d22f877 | 3,142 | py | Python | presta_connect.py | subteno-it/presta_connect | 7cc8f2f915b28ada40a03573651a3558e6503004 | [
"MIT"
] | null | null | null | presta_connect.py | subteno-it/presta_connect | 7cc8f2f915b28ada40a03573651a3558e6503004 | [
"MIT"
] | null | null | null | presta_connect.py | subteno-it/presta_connect | 7cc8f2f915b28ada40a03573651a3558e6503004 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Subteno IT
# License MIT License
import requests
import xmltodict
import string
import random
import io
class PrestaConnectError(RuntimeError):
pass
class PrestaConnect:
_BOUNDARY_CHARS = string.digits + string.ascii_letters
_STATUSES = (200, 201)
def __ini... | 34.911111 | 131 | 0.579885 | 2,991 | 0.951941 | 0 | 0 | 0 | 0 | 0 | 0 | 621 | 0.197645 |
7bf8224c1d14572f51a3d9141d24b9fbd1be25c1 | 2,884 | py | Python | blender/SCAFFOLDER_settings.py | nodtem66/Scaffolder | c2b89e981192f61b028e1e8780a01894b1e34494 | [
"MIT"
] | 8 | 2019-12-24T17:28:03.000Z | 2022-03-23T02:49:28.000Z | blender/SCAFFOLDER_settings.py | nodtem66/Scaffolder | c2b89e981192f61b028e1e8780a01894b1e34494 | [
"MIT"
] | 9 | 2019-12-27T18:10:05.000Z | 2021-08-04T15:18:47.000Z | blender/SCAFFOLDER_settings.py | nodtem66/Scaffolder | c2b89e981192f61b028e1e8780a01894b1e34494 | [
"MIT"
] | null | null | null | import bpy
from bpy.types import Panel
from bpy.props import *
import math
default_surface_names = [
("bcc", "bcc", "", 1),
("schwarzp", "schwarzp", "", 2),
("schwarzd", "schwarzd", "", 3),
("gyroid", "gyroid", "", 4),
("double-p", "double-p", "", 5),
("double-d", "double-d", "", 6),
("doub... | 40.055556 | 106 | 0.645631 | 2,201 | 0.763176 | 0 | 0 | 0 | 0 | 0 | 0 | 609 | 0.211165 |
7bf8ba88150b609b31fa7978009e2b6cda410d96 | 1,702 | py | Python | examples/run_burgers.py | s274001/PINA | beb33f0da20581338c46f0c525775904b35a1130 | [
"MIT"
] | 4 | 2022-02-16T14:52:55.000Z | 2022-03-17T13:31:42.000Z | examples/run_burgers.py | s274001/PINA | beb33f0da20581338c46f0c525775904b35a1130 | [
"MIT"
] | 3 | 2022-02-17T08:57:42.000Z | 2022-03-28T08:41:53.000Z | examples/run_burgers.py | s274001/PINA | beb33f0da20581338c46f0c525775904b35a1130 | [
"MIT"
] | 7 | 2022-02-13T14:35:00.000Z | 2022-03-28T08:51:11.000Z | import argparse
import torch
from torch.nn import Softplus
from pina import PINN, Plotter
from pina.model import FeedForward
from problems.burgers import Burgers1D
class myFeature(torch.nn.Module):
"""
Feature: sin(pi*x)
"""
def __init__(self, idx):
super(myFeature, self).__init__()
s... | 28.366667 | 79 | 0.636898 | 245 | 0.143948 | 0 | 0 | 0 | 0 | 0 | 0 | 230 | 0.135135 |
7bf92b8ac984ff1d4af8bc11028ce720f6dccb7d | 2,072 | py | Python | questions/cousins-in-binary-tree/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 141 | 2017-12-12T21:45:53.000Z | 2022-03-25T07:03:39.000Z | questions/cousins-in-binary-tree/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 32 | 2015-10-05T14:09:52.000Z | 2021-05-30T10:28:41.000Z | questions/cousins-in-binary-tree/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 56 | 2015-09-30T05:23:28.000Z | 2022-03-08T07:57:11.000Z | """
In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1.
Two nodes of a binary tree are cousins if they have the same depth, but have different parents.
We are given the root of a binary tree with unique values, and the values x and y of two different nodes in the tree.
Re... | 28 | 117 | 0.531853 | 1,121 | 0.539461 | 0 | 0 | 0 | 0 | 0 | 0 | 948 | 0.456208 |
7bfad01ae563f31b06389bcaffa8bf4fb786658a | 456 | py | Python | utility_ai/models/action.py | TomasMaciulis/Utility-AI-API | 29144e4b5dc038854335bd11ed3b072ba1231ebc | [
"MIT"
] | null | null | null | utility_ai/models/action.py | TomasMaciulis/Utility-AI-API | 29144e4b5dc038854335bd11ed3b072ba1231ebc | [
"MIT"
] | null | null | null | utility_ai/models/action.py | TomasMaciulis/Utility-AI-API | 29144e4b5dc038854335bd11ed3b072ba1231ebc | [
"MIT"
] | null | null | null | from .configuration_entry import ConfigurationEntry
from utility_ai.traits.utility_score_trait import UtilityScoreTrait
class Action(ConfigurationEntry, UtilityScoreTrait):
def __init__(self, name: str, description: dict):
ConfigurationEntry.__init__(self, name, description)
UtilityScoreTrait.__i... | 30.4 | 67 | 0.699561 | 333 | 0.730263 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.050439 |
7bfb0d85a9d2727156196fca82066ec05a53a3a0 | 1,119 | py | Python | widdy/styles.py | ubunatic/widdy | 1e5923d90010f27e352ad3eebb670c09752dd86b | [
"MIT"
] | 2 | 2018-05-30T17:23:46.000Z | 2019-08-29T20:32:27.000Z | widdy/styles.py | ubunatic/widdy | 1e5923d90010f27e352ad3eebb670c09752dd86b | [
"MIT"
] | null | null | null | widdy/styles.py | ubunatic/widdy | 1e5923d90010f27e352ad3eebb670c09752dd86b | [
"MIT"
] | null | null | null | from collections import namedtuple
Style = namedtuple('Style', 'name fg bg')
default_pal = {
Style('inv-black', 'black', 'light gray'),
Style('green-bold', 'dark green,bold', ''),
Style('red-bold', 'dark red,bold', ''),
Style('blue-bold', 'dark blue,bold', ''),
St... | 29.447368 | 61 | 0.489723 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 470 | 0.420018 |
7bfb8c398b66afff9f9537190851684dffe009d8 | 189 | py | Python | basics.py | c25l/longmont_data_science_tensorflow | 78302ab5b76a1e4632deda164615b4861c21f534 | [
"MIT"
] | null | null | null | basics.py | c25l/longmont_data_science_tensorflow | 78302ab5b76a1e4632deda164615b4861c21f534 | [
"MIT"
] | null | null | null | basics.py | c25l/longmont_data_science_tensorflow | 78302ab5b76a1e4632deda164615b4861c21f534 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import tensorflow as tf
x=tf.Variable(0.5)
y = x*x
sess = tf.Session()
sess.run(tf.global_variables_initializer())
print("x =",sess.run(x))
print("y =",sess.run(y))
| 18.9 | 43 | 0.687831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.169312 |
7bfc0a90c6e361e602b8b4fb5d3bb23952ab70e8 | 3,468 | py | Python | nist_tools/combine_images.py | Nepherhotep/roboarchive-broom | a60c6038a5506c19edc6b74dbb47de525b246d2a | [
"MIT"
] | null | null | null | nist_tools/combine_images.py | Nepherhotep/roboarchive-broom | a60c6038a5506c19edc6b74dbb47de525b246d2a | [
"MIT"
] | null | null | null | nist_tools/combine_images.py | Nepherhotep/roboarchive-broom | a60c6038a5506c19edc6b74dbb47de525b246d2a | [
"MIT"
] | null | null | null | import os
import random
import cv2
import numpy as np
from gen_textures import add_noise, texture, blank_image
from nist_tools.extract_nist_text import BaseMain, parse_args, display
class CombineMain(BaseMain):
SRC_DIR = 'blurred'
DST_DIR = 'combined_raw'
BG_DIR = 'backgrounds'
SMPL_DIR = 'combined... | 31.527273 | 94 | 0.625144 | 3,160 | 0.911188 | 0 | 0 | 0 | 0 | 0 | 0 | 282 | 0.081315 |
7bfe07fff56233f17c17498061812fd747efa684 | 1,205 | py | Python | auto_funcs/look_for_date.py | rhysrushton/testauto | 9c32f40640f58703a0d063afbb647855fb680a61 | [
"MIT"
] | null | null | null | auto_funcs/look_for_date.py | rhysrushton/testauto | 9c32f40640f58703a0d063afbb647855fb680a61 | [
"MIT"
] | null | null | null | auto_funcs/look_for_date.py | rhysrushton/testauto | 9c32f40640f58703a0d063afbb647855fb680a61 | [
"MIT"
] | null | null | null | # this function looks for either the encounter date or the patient's date of birth
# so that we can avoid duplicate encounters.
import time
def look_for_date (date_string, driver):
print('looking for date')
date_present = False
for div in driver.find_elements_by_class_name('card.my-4.patient-card.assessme... | 30.125 | 99 | 0.637344 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 501 | 0.415768 |
7bfefe9a585dfb51817f970316b20305a606310a | 1,047 | py | Python | app/api/apis/token_api.py | boceckts/ideahub | fbd48c53a5aaf7252a5461d0c0d2fe9d4eef9aed | [
"BSD-3-Clause"
] | null | null | null | app/api/apis/token_api.py | boceckts/ideahub | fbd48c53a5aaf7252a5461d0c0d2fe9d4eef9aed | [
"BSD-3-Clause"
] | null | null | null | app/api/apis/token_api.py | boceckts/ideahub | fbd48c53a5aaf7252a5461d0c0d2fe9d4eef9aed | [
"BSD-3-Clause"
] | null | null | null | from flask import g
from flask_restplus import Resource, marshal
from app import db
from app.api.namespaces.token_namespace import token_ns, token
from app.api.security.authentication import basic_auth, token_auth
@token_ns.route('', strict_slashes=False)
@token_ns.response(401, 'Unauthenticated')
@token_ns.response... | 32.71875 | 67 | 0.700096 | 695 | 0.663801 | 0 | 0 | 829 | 0.791786 | 0 | 0 | 186 | 0.17765 |
7bff9b4a9c838befc20c601a3d326698664e8b5d | 1,025 | py | Python | quickSort.py | pflun/learningAlgorithms | 3101e989488dfc8a56f1bf256a1c03a837fe7d97 | [
"MIT"
] | null | null | null | quickSort.py | pflun/learningAlgorithms | 3101e989488dfc8a56f1bf256a1c03a837fe7d97 | [
"MIT"
] | null | null | null | quickSort.py | pflun/learningAlgorithms | 3101e989488dfc8a56f1bf256a1c03a837fe7d97 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# low --> Starting index, high --> Ending index
class Solution(object):
def quickSort(self, arr, low, high):
if low < high:
pi = self.partition(arr, low, high)
self.quickSort(arr, low, pi - 1)
self.quickSort(arr, pi + 1, high)
return a... | 29.285714 | 66 | 0.520976 | 982 | 0.866726 | 0 | 0 | 0 | 0 | 0 | 0 | 424 | 0.374228 |
d0003ec058228de9777e23294e4fbffc93d7d212 | 4,816 | py | Python | docker_multiarch/tool.py | CynthiaProtector/helo | ad9e22363a92389b3fa519ecae9061c6ead28b05 | [
"Apache-2.0"
] | 399 | 2017-05-30T05:12:48.000Z | 2022-01-29T05:53:08.000Z | docker_multiarch/tool.py | greenpea0104/incubator-mxnet | fc9e70bf2d349ad4c6cb65ff3f0958e23a7410bf | [
"Apache-2.0"
] | 58 | 2017-05-30T23:25:32.000Z | 2019-11-18T09:30:54.000Z | docker_multiarch/tool.py | greenpea0104/incubator-mxnet | fc9e70bf2d349ad4c6cb65ff3f0958e23a7410bf | [
"Apache-2.0"
] | 107 | 2017-05-30T05:53:22.000Z | 2021-06-24T02:43:31.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 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 Licen... | 30.871795 | 108 | 0.65054 | 315 | 0.065407 | 0 | 0 | 0 | 0 | 0 | 0 | 1,892 | 0.392857 |
d001b6743e397b1ed7c3a5a49549452902031c2c | 150 | py | Python | integrate/test/test_samples/sample_norun.py | Requirement-Engineers/default-coding-Bo2 | f51e4e17af4fff077aebe2f3611c363da9ed9871 | [
"Unlicense"
] | null | null | null | integrate/test/test_samples/sample_norun.py | Requirement-Engineers/default-coding-Bo2 | f51e4e17af4fff077aebe2f3611c363da9ed9871 | [
"Unlicense"
] | null | null | null | integrate/test/test_samples/sample_norun.py | Requirement-Engineers/default-coding-Bo2 | f51e4e17af4fff077aebe2f3611c363da9ed9871 | [
"Unlicense"
] | null | null | null | import json
def dummy_function():
return []
def test_norun():
this shall not run
if __name__ == '__main__':
test_norun()
| 11.538462 | 27 | 0.593333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.066667 |
d003fb1f6605d874e72c3a666281e62431d7b2a8 | 3,283 | py | Python | 02module/module_containers.py | mayi140611/szzy_pytorch | 81978d75513bc9a1b85aec05023d14fa6f748674 | [
"Apache-2.0"
] | null | null | null | 02module/module_containers.py | mayi140611/szzy_pytorch | 81978d75513bc9a1b85aec05023d14fa6f748674 | [
"Apache-2.0"
] | null | null | null | 02module/module_containers.py | mayi140611/szzy_pytorch | 81978d75513bc9a1b85aec05023d14fa6f748674 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
# @file name : module_containers.py
# @author : tingsongyu
# @date : 2019-09-20 10:08:00
# @brief : 模型容器——Sequential, ModuleList, ModuleDict
"""
import torch
import torchvision
import torch.nn as nn
from collections import OrderedDict
# ============================ Sequenti... | 22.486301 | 76 | 0.540664 | 2,362 | 0.716844 | 0 | 0 | 0 | 0 | 0 | 0 | 743 | 0.225493 |
d00408e74248e82eceb28ea83155d9b67a8bad9f | 2,124 | py | Python | tests/test_sample_images.py | olavosamp/semiauto-video-annotation | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | [
"MIT"
] | null | null | null | tests/test_sample_images.py | olavosamp/semiauto-video-annotation | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | [
"MIT"
] | 20 | 2019-07-15T21:49:29.000Z | 2020-01-09T14:35:03.000Z | tests/test_sample_images.py | olavosamp/semiauto-video-annotation | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | [
"MIT"
] | null | null | null | import pytest
import shutil as sh
import pandas as pd
from pathlib import Path
from glob import glob
import libs.dirs as dirs
from libs.iteration_manager import SampleImages
from libs.utils import copy_files, replace_symbols
class Te... | 34.819672 | 91 | 0.677966 | 1,812 | 0.853107 | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 0.147834 |
d0056587271ff8ce0d2628ab99ab1c7bc8e2f7e9 | 558 | py | Python | data/Carp.py | shebang-sh/npb-ouenka-bot | 6fc6f7c1717632c3845496c309560233a9c73d8e | [
"MIT"
] | null | null | null | data/Carp.py | shebang-sh/npb-ouenka-bot | 6fc6f7c1717632c3845496c309560233a9c73d8e | [
"MIT"
] | 14 | 2022-03-29T09:07:31.000Z | 2022-03-30T02:37:07.000Z | data/Carp.py | shebang-sh/npb-ouenka-bot | 6fc6f7c1717632c3845496c309560233a9c73d8e | [
"MIT"
] | null | null | null | data={
"田中広輔":"赤く燃え上がる 夢見たこの世界で 研ぎ澄ませそのセンス 打てよ広輔",
"長野久義":"歓声を背に受け 頂をみつめて 紅一筋に 突き進め長野",
"安部友裕":"新しい時代に 今手を伸ばせ 終わらぬ夢の先に 導いてくれ",
"堂林翔太":"光り輝く その道を 翔けぬけて魅せろ 堂林SHOW TIME!",
"會澤翼":"いざ大空へ翔ばたけ 熱い想い乗せ 勝利へ導く一打 決めろよ翼",
"菊池涼介":"【前奏:始まりの鐘が鳴る 広島伝説】\n光を追い越して メーター振りきり駆け抜けろ 止まらないぜ 韋駄天菊池",
"野間峻祥":"鋭い打球飛ばせ 自慢... | 42.923077 | 77 | 0.691756 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,229 | 0.935312 |
d0057db4b4f167cbdeebfbc062e049713a913fcb | 42 | py | Python | source/constants.py | sideround/predict-revenue-new-releases | b6b597cfed328d6b7981917477ceb6f0630aee49 | [
"MIT"
] | null | null | null | source/constants.py | sideround/predict-revenue-new-releases | b6b597cfed328d6b7981917477ceb6f0630aee49 | [
"MIT"
] | 11 | 2020-05-21T17:52:04.000Z | 2020-06-08T03:33:28.000Z | source/constants.py | sideround/predict-revenue-new-releases | b6b597cfed328d6b7981917477ceb6f0630aee49 | [
"MIT"
] | 2 | 2020-06-02T13:14:16.000Z | 2020-06-11T17:46:05.000Z | BASE_URL = 'https://api.themoviedb.org/3'
| 21 | 41 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.714286 |
d00676794b322b39517d8082c8b83c61f4836359 | 284 | py | Python | Unit 2/2.16/2.16.5 Black and White Squares.py | shashwat73/cse | 60e49307e57105cf9916c7329f53f891c5e81fdb | [
"MIT"
] | 1 | 2021-04-08T14:02:49.000Z | 2021-04-08T14:02:49.000Z | Unit 2/2.16/2.16.5 Black and White Squares.py | shashwat73/cse | 60e49307e57105cf9916c7329f53f891c5e81fdb | [
"MIT"
] | null | null | null | Unit 2/2.16/2.16.5 Black and White Squares.py | shashwat73/cse | 60e49307e57105cf9916c7329f53f891c5e81fdb | [
"MIT"
] | null | null | null | speed(0)
def make_square(i):
if i % 2 == 0:
begin_fill()
for i in range(4):
forward(25)
left(90)
end_fill()
penup()
setposition(-100, 0)
pendown()
for i in range (6):
pendown()
make_square(i)
penup()
forward(35)
| 14.947368 | 23 | 0.503521 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d0075df444476cd69e92bd3d5f61f5eff5a35b08 | 771 | py | Python | Q1/read.py | arpanmangal/Regression | 06969286d7db65a537e89ac37905310592542ca9 | [
"MIT"
] | null | null | null | Q1/read.py | arpanmangal/Regression | 06969286d7db65a537e89ac37905310592542ca9 | [
"MIT"
] | null | null | null | Q1/read.py | arpanmangal/Regression | 06969286d7db65a537e89ac37905310592542ca9 | [
"MIT"
] | null | null | null | """
Module for reading data from 'linearX.csv' and 'linearY.csv'
"""
import numpy as np
def loadData (x_file="ass1_data/linearX.csv", y_file="ass1_data/linearY.csv"):
"""
Loads the X, Y matrices.
Splits into training, validation and test sets
"""
X = np.genfromtxt(x_file)
Y = np.genfromtxt(y_... | 25.7 | 78 | 0.639429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.312581 |
d00814276e589d5ea8bb86b5cdc709673c74e2be | 331 | py | Python | apps/experiments/forms.py | Intellia-SME/OptiPLANT | 1d40b62f00b3fff940499fa27d0c2d59e7e6dd4c | [
"Apache-2.0"
] | 1 | 2022-01-26T18:07:22.000Z | 2022-01-26T18:07:22.000Z | apps/experiments/forms.py | Intellia-SME/OptiPLANT | 1d40b62f00b3fff940499fa27d0c2d59e7e6dd4c | [
"Apache-2.0"
] | null | null | null | apps/experiments/forms.py | Intellia-SME/OptiPLANT | 1d40b62f00b3fff940499fa27d0c2d59e7e6dd4c | [
"Apache-2.0"
] | 1 | 2022-01-26T18:07:26.000Z | 2022-01-26T18:07:26.000Z | from django import forms
from .models import Experiment
class CreateExperimentForm(forms.ModelForm):
class Meta:
model = Experiment
fields = ['name', 'description', 'dataset']
def save(self, commit=True):
self.instance.experimenter = self.request.user
return super().save(comm... | 23.642857 | 54 | 0.679758 | 271 | 0.818731 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.084592 |
d0089b5c467aacb771cc69018d2b7e9da7c6f7d7 | 3,377 | py | Python | Giveme5W1H/extractor/tools/timex.py | bkrrr/Giveme5W | 657738781fe387d76e6e0da35ed009ccf81f4290 | [
"Apache-2.0"
] | 410 | 2018-05-02T12:53:02.000Z | 2022-03-28T16:11:34.000Z | Giveme5W1H/extractor/tools/timex.py | bkrrr/Giveme5W | 657738781fe387d76e6e0da35ed009ccf81f4290 | [
"Apache-2.0"
] | 51 | 2018-05-02T13:53:19.000Z | 2022-03-22T00:16:39.000Z | Giveme5W1H/extractor/tools/timex.py | TU-Berlin/Giveme5W1H | b1586328393a50acde86015d22f78a4c15bf2f34 | [
"Apache-2.0"
] | 81 | 2018-05-29T14:03:27.000Z | 2022-02-08T08:59:38.000Z | from datetime import datetime
from dateutil.relativedelta import relativedelta
class Timex:
"""
Simply represents a Timex object. Main reason for this class is that the datetime class (and other Python
equivalents) do not allow to reflect a month or a day but only a single point in time.
"""
_dat... | 35.547368 | 112 | 0.638733 | 3,294 | 0.975422 | 0 | 0 | 1,743 | 0.516139 | 0 | 0 | 771 | 0.228309 |
d008c5731d8fedc349d8c20f7b0bc4f197dfbb75 | 1,172 | py | Python | utils/get_dic_question_id.py | Pxtri2156/M4C_inforgraphicsVQA | 8846ea01a9be726de03e8944c746203936334bc9 | [
"BSD-3-Clause"
] | 1 | 2022-02-15T14:46:15.000Z | 2022-02-15T14:46:15.000Z | utils/get_dic_question_id.py | Pxtri2156/M4C_inforgraphicsVQA | 8846ea01a9be726de03e8944c746203936334bc9 | [
"BSD-3-Clause"
] | null | null | null | utils/get_dic_question_id.py | Pxtri2156/M4C_inforgraphicsVQA | 8846ea01a9be726de03e8944c746203936334bc9 | [
"BSD-3-Clause"
] | 1 | 2022-02-13T11:15:11.000Z | 2022-02-13T11:15:11.000Z | import argparse
import json
from os import openpty
def create_dic_question_id(path):
set_name = ['train', 'val', 'test']
dic_qid = {}
for i in range(len(set_name)):
print("Processing, ", set_name[i])
annot_path = path.replace("change", set_name[i])
annot_fi = open(annot_path)
... | 29.3 | 96 | 0.595563 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.145904 |