hexsha stringlengths 40 40 | size int64 10 1.01M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 5 113 | max_stars_repo_head_hexsha stringlengths 40 41 | max_stars_repo_licenses list | max_stars_count int64 1 95.2k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 237 | max_issues_repo_name stringlengths 5 113 | max_issues_repo_head_hexsha stringlengths 40 41 | max_issues_repo_licenses list | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 237 | max_forks_repo_name stringlengths 5 113 | max_forks_repo_head_hexsha stringlengths 40 41 | max_forks_repo_licenses list | max_forks_count int64 1 33.1k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 10 1.01M | avg_line_length float64 2.26 46k | max_line_length int64 3 990k | alphanum_fraction float64 0.1 1 | label int64 0 2 | cost float64 0 5.77 | embedding list |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
245f4bc38e13de9cf166aa2c56f878ad96394a84 | 826 | py | Python | ProjectSimulator/Labels.py | awzdevelopers/SimulatorOfAWZ | 772108ed086066095dcd0c895b82b9b0bcb43a77 | [
"MIT"
] | null | null | null | ProjectSimulator/Labels.py | awzdevelopers/SimulatorOfAWZ | 772108ed086066095dcd0c895b82b9b0bcb43a77 | [
"MIT"
] | null | null | null | ProjectSimulator/Labels.py | awzdevelopers/SimulatorOfAWZ | 772108ed086066095dcd0c895b82b9b0bcb43a77 | [
"MIT"
] | null | null | null | import pygame as py
def TitleOfSim(title,displayGame):
font=py.font.SysFont("B-Zar",25)
text=font.render(title,True,(50,200,155))
displayGame.blit(text,(50,50))
def Messages(title,displayGame):
font=py.font.SysFont("B-Zar",25)
text=font.render(title,True,(50,0,155))
displayGame.blit(text,(300,... | 30.592593 | 58 | 0.680387 | 1 | 1.0011 | [
0.0009256788762286305,
0.02402370050549507,
0.007765668444335461,
-0.0005252735572867095,
0.005437039770185947,
-0.0010657014790922403,
-0.01046667154878378,
0.0010979835642501712,
-0.007297059521079063,
0.003252744674682617,
0.002160777570679784,
0.0044159297831356525,
0.0059607685543596745... |
24604a4f9f632756925e48db8b2f6f25d32b4532 | 4,833 | py | Python | pre-benchmarks/Lisp_interpreter/interpreter/Tests/Test_Interpreter.py | nuprl/retic_performance | 621211c2f40251ce5364c33e72e4067e34a32013 | [
"MIT"
] | 3 | 2018-08-03T02:41:29.000Z | 2021-03-19T03:18:47.000Z | pre-benchmarks/Lisp_interpreter/interpreter/Tests/Test_Interpreter.py | nuprl/retic_performance | 621211c2f40251ce5364c33e72e4067e34a32013 | [
"MIT"
] | 3 | 2018-02-04T17:53:56.000Z | 2018-11-10T17:06:57.000Z | pre-benchmarks/Lisp_interpreter/interpreter/Tests/Test_Interpreter.py | nuprl/retic_performance | 621211c2f40251ce5364c33e72e4067e34a32013 | [
"MIT"
] | 1 | 2018-08-04T00:14:12.000Z | 2018-08-04T00:14:12.000Z | import pytest
import sys
sys.path.insert(0, '/Users/zeinamigeed/Lisp_interpreter/interpreter/BSL_Expr')
sys.path.insert(0, '/Users/zeinamigeed/Lisp_interpreter/interpreter/Other')
from Variable import Variable
from BSLError import BSLError
from Num import Num
from Boolean import Boolean
from Constants import Constant... | 37.757813 | 208 | 0.717567 | 1 | 2.4036 | [
-0.024264192208647728,
0.051849644631147385,
0.015823613852262497,
0.044611167162656784,
0.01152907032519579,
0.02445814572274685,
-0.03403443843126297,
-0.0103489700704813,
-0.076751209795475,
0.019622165709733963,
0.007154358085244894,
0.06742304563522339,
-0.007880429737269878,
-0.01624... |
2460b1eeba4d8bba3d137222afee8b389db282fe | 953 | py | Python | Perro/main.py | SebaB29/Python | 8fe7b375e200d2a629e3ef83a2356002621267a6 | [
"MIT"
] | null | null | null | Perro/main.py | SebaB29/Python | 8fe7b375e200d2a629e3ef83a2356002621267a6 | [
"MIT"
] | null | null | null | Perro/main.py | SebaB29/Python | 8fe7b375e200d2a629e3ef83a2356002621267a6 | [
"MIT"
] | null | null | null | from os import system
from estado import estado
from mochila import mochila
from tienda import comprar
from alimento import alimentar
from acciones import pasear, jugar, truco, nuevos_trucos, dormir
class Perro:
def __init__(self, energia=100, hambre=100, felicidad=100, experiencia=0):
self.energia = energia
se... | 20.717391 | 75 | 0.677859 | 1 | 1.0701 | [
0.0015231461729854345,
0.024923479184508324,
0.008436795324087143,
-0.0015159185277298093,
0.003997604828327894,
-0.004704087506979704,
-0.010838745161890984,
0.0017745819641277194,
-0.007711463607847691,
0.0006478667492046952,
0.000546477735042572,
0.008878836408257484,
0.008723574690520763... |
2462bb9b8ce0bfd343822e1f4af979fc397548f6 | 781 | py | Python | converted.py | Bmillidgework/Misc-Maths | 4e186920fbc6e3592bee57a64d56ad3a7c5bd178 | [
"MIT"
] | null | null | null | converted.py | Bmillidgework/Misc-Maths | 4e186920fbc6e3592bee57a64d56ad3a7c5bd178 | [
"MIT"
] | null | null | null | converted.py | Bmillidgework/Misc-Maths | 4e186920fbc6e3592bee57a64d56ad3a7c5bd178 | [
"MIT"
] | null | null | null | from kaffe.tensorflow import Network
class (Network):
def setup(self):
(self.feed('input')
.conv(1, 1, 3, 1, 1, group=3, relu=False, name='data_lab')
.conv(11, 11, 96, 4, 4, padding='VALID', name='conv1')
.max_pool(3, 3, 2, 2, padding='VALID', name='pool1')
... | 48.8125 | 71 | 0.491677 | 1 | 1.0866 | [
0.0007205025176517665,
0.02495386078953743,
0.008318238891661167,
0.0020483017433434725,
0.004359089303761721,
-0.007755884900689125,
-0.0092852134257555,
0.0059227654710412025,
-0.0033295212779194117,
0.0018424264853820205,
0.004861959721893072,
0.0036514794919639826,
0.011139863170683384,
... |
24654b29f775cf7531e441acc1b26e8d1235f77b | 524 | py | Python | tartiflette_middleware/middleware.py | daveoconnor/tartiflette-middleware | f7ae1833156ec920703312dd4c10f9815e0de263 | [
"MIT"
] | null | null | null | tartiflette_middleware/middleware.py | daveoconnor/tartiflette-middleware | f7ae1833156ec920703312dd4c10f9815e0de263 | [
"MIT"
] | null | null | null | tartiflette_middleware/middleware.py | daveoconnor/tartiflette-middleware | f7ae1833156ec920703312dd4c10f9815e0de263 | [
"MIT"
] | null | null | null | class Middleware:
def __init__(self, context_manager, server_middleware):
"""
:param BaseMiddleware Your custom middleware
:param package Middleware from the middleware package
"""
self._service = context_manager
self._middleware = server_middleware.get_hooks_service_... | 27.578947 | 74 | 0.660305 | 1 | 0.7701 | [
-0.0016511279391124845,
0.02290930226445198,
0.006240416783839464,
-0.0018926187185570598,
0.002944154432043433,
-0.0057549928314983845,
-0.014925437979400158,
0.0034286114387214184,
-0.009214596822857857,
0.005349838640540838,
0.0005498217069543898,
0.0033818024676293135,
0.0097601786255836... |
24671278c6a6905c5e07554b85ebe9c03e3cdb21 | 618 | py | Python | pynex/hello_msg.py | Pixelsuft/pynex | c129244d4b8148a4b155425c1f7207892d51aaeb | [
"MIT"
] | null | null | null | pynex/hello_msg.py | Pixelsuft/pynex | c129244d4b8148a4b155425c1f7207892d51aaeb | [
"MIT"
] | null | null | null | pynex/hello_msg.py | Pixelsuft/pynex | c129244d4b8148a4b155425c1f7207892d51aaeb | [
"MIT"
] | null | null | null | import os
import sys
is_already_inited = sys.modules.get('pygame') is not None
hide_msg = os.getenv('PYGAME_HIDE_SUPPORT_PROMPT') is not None
if is_already_inited:
if not hide_msg:
print('pynex integrated')
elif not hide_msg:
os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = 'True'
import pygame # type:... | 32.526316 | 84 | 0.687702 | 1 | 0.8736 | [
0.002476699184626341,
0.026875637471675873,
0.004500098526477814,
0.0001860116026364267,
0.005686220247298479,
-0.003353038104251027,
-0.010885132476687431,
0.005568723659962416,
-0.007706178817898035,
0.0001024840894388035,
0.0013499956112354994,
0.006305065471678972,
0.005560105666518211,
... |
2468486ff188686d22ae22e54007a22ada9d6359 | 5,631 | py | Python | MakeCartoonImage.py | scottstewart1234/MakeCartoonImage | fd203d9da5d9c989c35c2ba1cd311a954ad3f9c5 | [
"MIT"
] | 2 | 2022-03-09T19:01:29.000Z | 2022-03-12T22:19:46.000Z | MakeCartoonImage.py | scottstewart1234/MakeCartoonImage | fd203d9da5d9c989c35c2ba1cd311a954ad3f9c5 | [
"MIT"
] | null | null | null | MakeCartoonImage.py | scottstewart1234/MakeCartoonImage | fd203d9da5d9c989c35c2ba1cd311a954ad3f9c5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 9 10:49:07 2022
@author: Scott Stewart
License: MIT
"""
import cv2
import numpy as np
import signal
import sys
def sigint_handler(signal, frame):
print ('KeyboardInterrupt. Program Exiting')
vral = False
globals()["v_all"] = False
... | 38.306122 | 138 | 0.630971 | 1 | 2.2596 | [
-0.005811797920614481,
0.008382805623114109,
0.009403875097632408,
-0.07061706483364105,
0.030084427446126938,
0.06858454644680023,
-0.05920254811644554,
-0.014681387692689896,
-0.03610315918922424,
0.05892227962613106,
0.03148331120610237,
0.0024169182870537043,
0.048811085522174835,
-0.0... |
24685b30213095d743426aa770857e4be1603753 | 5,654 | py | Python | tests/util/test_default.py | idomic/ploomber | 89b5e544b0540cf2cbb6bcd09946537198115d17 | [
"Apache-2.0"
] | null | null | null | tests/util/test_default.py | idomic/ploomber | 89b5e544b0540cf2cbb6bcd09946537198115d17 | [
"Apache-2.0"
] | null | null | null | tests/util/test_default.py | idomic/ploomber | 89b5e544b0540cf2cbb6bcd09946537198115d17 | [
"Apache-2.0"
] | null | null | null | import os
from pathlib import Path
import pytest
from ploomber.util import default
from ploomber.exceptions import DAGSpecNotFound
@pytest.fixture
def pkg_location():
parent = Path('src', 'package_a')
parent.mkdir(parents=True)
pkg_location = (parent / 'pipeline.yaml')
pkg_location.touch()
retur... | 26.669811 | 79 | 0.642554 | 1 | 1.9851 | [
0.028049414977431297,
0.015251928009092808,
0.039069149643182755,
0.06181824207305908,
-0.004715939983725548,
-0.024240322411060333,
-0.006436079274863005,
-0.010647638700902462,
-0.01980738341808319,
-0.014236589893698692,
0.006105050444602966,
0.02982962131500244,
0.023076221346855164,
0... |
246ac2c1a7d374c87b6d65d1fb436d4605f74dfd | 444 | py | Python | users/migrations/0002_endworker_group.py | heolin123/funcrowd | 20167783de208394c09ed0429a5f02ec6dd79c42 | [
"MIT"
] | null | null | null | users/migrations/0002_endworker_group.py | heolin123/funcrowd | 20167783de208394c09ed0429a5f02ec6dd79c42 | [
"MIT"
] | 11 | 2019-11-12T23:26:45.000Z | 2021-06-10T17:37:23.000Z | users/migrations/0002_endworker_group.py | heolin123/funcrowd | 20167783de208394c09ed0429a5f02ec6dd79c42 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.8 on 2018-12-16 12:59
from django.db import migrations, models
import users.models.utils.utils
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='endworker',
... | 22.2 | 89 | 0.630631 | 1 | 0.7656 | [
0.0038064427208155394,
0.02263796515762806,
0.006811747793108225,
0.003430404467508197,
0.0030504523310810328,
-0.003036362584680319,
-0.010042773559689522,
0.003900304436683655,
-0.007356471847742796,
0.004203604068607092,
0.0033127586357295513,
0.006834608037024736,
0.005504141096025705,
... |
246ad5806211abe8d32f41ca908a5744b6021779 | 147 | py | Python | Squaring Spiral.py | Pallav277/Python_Turtle_Graphics | 3e0d4fd6160b0aa5fbde8757051a85a81b7652d9 | [
"Apache-2.0"
] | null | null | null | Squaring Spiral.py | Pallav277/Python_Turtle_Graphics | 3e0d4fd6160b0aa5fbde8757051a85a81b7652d9 | [
"Apache-2.0"
] | null | null | null | Squaring Spiral.py | Pallav277/Python_Turtle_Graphics | 3e0d4fd6160b0aa5fbde8757051a85a81b7652d9 | [
"Apache-2.0"
] | null | null | null | import turtle
turtle.bgcolor("black")
sq = turtle.Turtle()
sq.speed(20)
sq.color("white")
for i in range(500):
sq.forward(i)
sq.left(91)
| 13.363636 | 23 | 0.659864 | 1 | 0.6846 | [
0.0013419887982308865,
0.02675699070096016,
0.007809069007635117,
-0.001841826131567359,
0.008534351363778114,
-0.0032243637833744287,
-0.011151360347867012,
0.001016350812278688,
-0.004431531298905611,
0.0017128074541687965,
0.0010075863683596253,
0.006147484295070171,
0.005893521010875702,... |
246aff3e261729ad83354493ab3c63b7a7a2bfdd | 599 | py | Python | routes.py | fndiaz/conferencia | 946389992f4ac2b9213abf1780c7b12229ff1325 | [
"BSD-3-Clause"
] | null | null | null | routes.py | fndiaz/conferencia | 946389992f4ac2b9213abf1780c7b12229ff1325 | [
"BSD-3-Clause"
] | null | null | null | routes.py | fndiaz/conferencia | 946389992f4ac2b9213abf1780c7b12229ff1325 | [
"BSD-3-Clause"
] | null | null | null | routers = dict(
# base router
BASE=dict(
default_application='projeto',
applications=['projeto', 'admin',]
),
projeto=dict(
default_controller='initial',
default_function='principal',
controllers=['initial', 'manager'],
functions=['home', 'contact', 'about', 'user', '... | 28.52381 | 78 | 0.622705 | 1 | 0.8661 | [
0.0012894917745143175,
0.027329010888934135,
0.005714405328035355,
-0.0002387545828241855,
0.0027096273843199015,
-0.00794203206896782,
-0.014141726307570934,
0.008282470516860485,
-0.007115792017430067,
0.0010111805750057101,
0.00565020926296711,
0.0003593984292820096,
0.006904012523591518,... |
79e21e3228c6415468cb2f001a97551f2eaf8633 | 780 | py | Python | Object oriented programming.py | fatimatswanya/fatimaCSC102 | cab70bd696d39a9e16bcb57e0180e872be4f49bc | [
"MIT"
] | null | null | null | Object oriented programming.py | fatimatswanya/fatimaCSC102 | cab70bd696d39a9e16bcb57e0180e872be4f49bc | [
"MIT"
] | null | null | null | Object oriented programming.py | fatimatswanya/fatimaCSC102 | cab70bd696d39a9e16bcb57e0180e872be4f49bc | [
"MIT"
] | null | null | null | class Coffee:
coffeecupcounter =0
def __init__(self, themilk, thesugar, thecoffeemate):
self.milk = themilk
self.sugar = thesugar
self.coffeemate = thecoffeemate
Coffee.coffeecupcounter=Coffee.coffeecupcounter+1
print(f'You now have your coffee with {self.milk} milk, {s... | 45.882353 | 114 | 0.74359 | 1 | 0.9771 | [
0.0003963156195823103,
0.026387672871351242,
0.009141971357166767,
-0.001213469309732318,
0.004377633333206177,
-0.0034283692948520184,
-0.013231409713625908,
0.001822486286982894,
-0.00792662799358368,
0.002751006279140711,
0.0010166848078370094,
0.007770758122205734,
0.005262450315058231,
... |
79e3663287bde47d14ef4958760bf930e89ab747 | 7,636 | py | Python | crawl_all_sites.py | VETURISRIRAM/smart-search | 0352f265f2f7cd557559e22d9573fbc581ad22da | [
"MIT"
] | 4 | 2021-10-01T06:35:27.000Z | 2022-02-27T17:34:24.000Z | crawl_all_sites.py | VETURISRIRAM/smart-search | 0352f265f2f7cd557559e22d9573fbc581ad22da | [
"MIT"
] | null | null | null | crawl_all_sites.py | VETURISRIRAM/smart-search | 0352f265f2f7cd557559e22d9573fbc581ad22da | [
"MIT"
] | 4 | 2021-09-14T14:10:44.000Z | 2021-12-05T16:24:29.000Z | """
@author: Sriram Veturi
@title: SmartSearch - An Intelligent Search Engine.
@date: 05/06/2019
"""
import requests
from uuid import uuid4
from bs4 import BeautifulSoup
from urllib.parse import urlsplit
DOMAIN = "uic.edu"
def check_goodness(url):
"""
Function to check if the url is a dead end (pds, doc, do... | 29.596899 | 120 | 0.58879 | 1 | 2.0751 | [
-0.010363456793129444,
0.021993396803736687,
-0.031132012605667114,
0.011826216243207455,
-0.046092793345451355,
0.03065919317305088,
0.027523590251803398,
-0.016978692263364792,
0.014578902162611485,
0.03916172310709953,
-0.008393370546400547,
-0.0008738901233300567,
0.03737930580973625,
... |
79e9fc1e7ebc8b590cd839ce2e1a5fb924b90f95 | 456 | py | Python | 923-3sum-with-multiplicity/923-3sum-with-multiplicity.py | felirox/DS-Algos-Python | 835ebc71dec5b2416f73f5b34d2bb50f447e8b27 | [
"MIT"
] | null | null | null | 923-3sum-with-multiplicity/923-3sum-with-multiplicity.py | felirox/DS-Algos-Python | 835ebc71dec5b2416f73f5b34d2bb50f447e8b27 | [
"MIT"
] | null | null | null | 923-3sum-with-multiplicity/923-3sum-with-multiplicity.py | felirox/DS-Algos-Python | 835ebc71dec5b2416f73f5b34d2bb50f447e8b27 | [
"MIT"
] | null | null | null | class Solution:
def threeSumMulti(self, arr, target):
c = Counter(arr)
ans, M = 0, 10**9 + 7
for i, j in permutations(c, 2):
if i < j < target - i - j:
ans += c[i]*c[j]*c[target - i - j]
for i in c:
if 3*i != target:
ans += c[i... | 30.4 | 55 | 0.377193 | 1 | 0.8256 | [
0.008637337945401669,
0.025940971449017525,
0.010525485500693321,
-0.0001746851921780035,
0.007752866018563509,
-0.00406654691323638,
-0.02599930949509144,
0.008593984879553318,
-0.000850845652166754,
0.006312828045338392,
-0.003218278754502535,
0.0005900583928450942,
0.007861753925681114,
... |
79ea38391a90bb0eca808de5c913fa167bebde50 | 5,612 | py | Python | BaseCollector.py | durcar86/vrops-exporter | 1a7b4d6b1fcc33b50060ef13fdb9edd044f74324 | [
"Apache-2.0"
] | null | null | null | BaseCollector.py | durcar86/vrops-exporter | 1a7b4d6b1fcc33b50060ef13fdb9edd044f74324 | [
"Apache-2.0"
] | null | null | null | BaseCollector.py | durcar86/vrops-exporter | 1a7b4d6b1fcc33b50060ef13fdb9edd044f74324 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
import requests
import time
import os
class BaseCollector(ABC):
@abstractmethod
def collect(self):
pass
def get_vcenters(self):
current_iteration = self.get_iteration()
url = "http://localhost:8000/vcenters/{}".format(current_iteration)
... | 36.441558 | 83 | 0.622951 | 1 | 1.8936 | [
-0.008027342148125172,
0.018469084054231644,
-0.005333868321031332,
0.006742294877767563,
-0.004036054015159607,
0.009967389516532421,
-0.01891160011291504,
-0.009159259498119354,
0.0354766845703125,
0.02203248254954815,
0.021145466715097427,
0.030923951417207718,
0.05228094011545181,
0.00... |
79eadf3b508448e19059984dd16ada84ac647a63 | 2,730 | py | Python | pip_services3_commons/convert/MapConverter.py | pip-services-python/pip-services-commons-python | ecfe0aab2b1442ed3b550115dd2c2472537452de | [
"MIT"
] | null | null | null | pip_services3_commons/convert/MapConverter.py | pip-services-python/pip-services-commons-python | ecfe0aab2b1442ed3b550115dd2c2472537452de | [
"MIT"
] | null | null | null | pip_services3_commons/convert/MapConverter.py | pip-services-python/pip-services-commons-python | ecfe0aab2b1442ed3b550115dd2c2472537452de | [
"MIT"
] | 2 | 2020-03-11T21:41:13.000Z | 2020-03-14T00:26:20.000Z | # -*- coding: utf-8 -*-
"""
pip_services3_commons.convert.MapConverter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Map conversion utilities
:copyright: Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details.
:license: MIT, see LICENSE for more details.
"""
from typing impor... | 32.117647 | 92 | 0.587179 | 1 | 1.5096 | [
0.00016649019380565733,
0.024024598300457,
0.007264760322868824,
0.0008491490734741092,
0.003710902528837323,
-0.0021810976322740316,
-0.00863316748291254,
0.002893085591495037,
-0.005571076180785894,
0.004216319881379604,
0.0037652391474694014,
0.00508784269914031,
0.007474634330719709,
-... |
79eefc760f8945ba2885412298af6a091be247cb | 3,717 | py | Python | python/misc/frequencies_map/frequencies_map_test.py | TGITS/programming-workouts | 799e805ccf3fd0936ec8ac2417f7193b8e9bcb55 | [
"MIT"
] | null | null | null | python/misc/frequencies_map/frequencies_map_test.py | TGITS/programming-workouts | 799e805ccf3fd0936ec8ac2417f7193b8e9bcb55 | [
"MIT"
] | 16 | 2020-05-30T12:38:13.000Z | 2022-02-19T09:23:31.000Z | python/misc/frequencies_map/frequencies_map_test.py | TGITS/programming-workouts | 799e805ccf3fd0936ec8ac2417f7193b8e9bcb55 | [
"MIT"
] | null | null | null | import unittest
from frequencies_map import frequencies_map_with_comprehension_from, frequencies_map_with_for_from, frequencies_map_with_map_from, frequencies_map_with_counter_from
class FrequenciesMapWithForTest(unittest.TestCase):
def test_empty_list(self):
self.assertEqual(frequencies_map_with_for_fro... | 41.3 | 164 | 0.622814 | 1 | 2.1846 | [
-0.018733486533164978,
0.06105012446641922,
0.017481962218880653,
0.032115306705236435,
-0.02851518616080284,
0.005492592230439186,
-0.047939084470272064,
0.005377897992730141,
0.02172205224633217,
-0.0067728604190051556,
-0.0013921504141762853,
-0.016569478437304497,
0.04035763442516327,
... |
79f17b0dc466449847bea66546af6c9d958315f5 | 876 | py | Python | Python 3 exercises/44 python answers/Ordem 3) Par Impar.py | Matheus-R-Sena/Python | c047288ad126e8d14c3186a912f1a1aa5a8a55d6 | [
"MIT"
] | 2 | 2022-03-18T00:04:42.000Z | 2022-03-25T11:45:37.000Z | Python 3 exercises/44 python answers/Ordem 3) Par Impar.py | Matheus-R-Sena/Python | c047288ad126e8d14c3186a912f1a1aa5a8a55d6 | [
"MIT"
] | null | null | null | Python 3 exercises/44 python answers/Ordem 3) Par Impar.py | Matheus-R-Sena/Python | c047288ad126e8d14c3186a912f1a1aa5a8a55d6 | [
"MIT"
] | null | null | null | n = int(input())
P = [] #pares
I = [] #ímpares
V = [] #Vetor principal
t = 0
for i in range (n):
V.append(int(input()))
for i in range(len(V)): #dividindo o vetor em 2 vetores menores (Par e Impar)
if V[i]%2==0:
P.append(V[i]) #dividindo para par
else:
I.append(V[i]) #dividindo para impar
... | 20.372093 | 77 | 0.449772 | 1 | 1.0371 | [
0.0003077028086408973,
0.0277100782841444,
0.00683602737262845,
-0.00010796752030728385,
0.004675297532230616,
-0.005572693422436714,
-0.012457260861992836,
0.004958498291671276,
-0.005522845312952995,
0.0016615245258435607,
0.0026508888695389032,
0.0029141718987375498,
0.008945373818278313,... |
79f1ff92ec1e6acd3c59af6c5fe99bb9e7be57fe | 49 | py | Python | src/spc/__init__.py | whbrewer/spc | 859f15e0fcb3f5f7d84d420f4757ae0a42c5837a | [
"MIT"
] | 12 | 2017-01-25T02:13:34.000Z | 2020-03-11T18:22:31.000Z | src/spc/__init__.py | whbrewer/spc | 859f15e0fcb3f5f7d84d420f4757ae0a42c5837a | [
"MIT"
] | 1 | 2018-01-08T19:21:24.000Z | 2018-01-08T19:21:24.000Z | src/spc/__init__.py | whbrewer/spc | 859f15e0fcb3f5f7d84d420f4757ae0a42c5837a | [
"MIT"
] | 2 | 2017-06-14T04:29:14.000Z | 2018-01-28T20:25:54.000Z | __author__ = 'Wesley Brewer'
__license__ = 'MIT'
| 16.333333 | 28 | 0.734694 | 1 | 0.6456 | [
0.003312203334644437,
0.02446885034441948,
0.0071031805127859116,
0.0001897615729831159,
0.003954698331654072,
-0.007116187363862991,
-0.01197860948741436,
0.005576551891863346,
-0.00505610229447484,
0.0026089020539075136,
0.0010945970425382257,
0.004549348261207342,
0.005338117480278015,
... |
79f218067fdd93862616a413ed28a8ec76a9e160 | 5,555 | py | Python | streaming/jobs/twitter-in.py | andrewreece/cs205-final-project | adcbf6f6e40b8eafa92d81f1adcb68864cf0a226 | [
"Unlicense"
] | null | null | null | streaming/jobs/twitter-in.py | andrewreece/cs205-final-project | adcbf6f6e40b8eafa92d81f1adcb68864cf0a226 | [
"Unlicense"
] | null | null | null | streaming/jobs/twitter-in.py | andrewreece/cs205-final-project | adcbf6f6e40b8eafa92d81f1adcb68864cf0a226 | [
"Unlicense"
] | null | null | null |
from kafka import SimpleProducer, KafkaClient
from os.path import expanduser
import requests
from requests_oauthlib import OAuth1
import urllib, datetime, time, json, sys, boto3
import creds # we made this module for importing twitter api creds
client = boto3.client('emr')
s3res = boto3.resource('s3')
bucket_name ... | 35.158228 | 102 | 0.725833 | 0 | 0 | [
-0.06476738303899765,
0.039381179958581924,
0.015925996005535126,
0.051877979189157486,
0.003541514975950122,
0.004460960626602173,
0.0006834010710008442,
-0.012416976504027843,
-0.017667321488261223,
0.029331011697649956,
0.011374027468264103,
0.018565332517027855,
0.055577054619789124,
0... |
79f341254989c1de1633a76ef3bacd7b9765c8b1 | 2,303 | py | Python | docs/examples/tutorial/clibraries/queue3.py | johannes-mueller/cython | b75af38ce5c309cd84c1835220932e53e9a9adb6 | [
"Apache-2.0"
] | 6,663 | 2015-01-02T06:06:43.000Z | 2022-03-31T10:35:02.000Z | docs/examples/tutorial/clibraries/queue3.py | johannes-mueller/cython | b75af38ce5c309cd84c1835220932e53e9a9adb6 | [
"Apache-2.0"
] | 3,094 | 2015-01-01T15:44:13.000Z | 2022-03-31T19:49:57.000Z | docs/examples/tutorial/clibraries/queue3.py | scoder/cython | ddaaa7b8bfe9885b7bed432cd0a5ab8191d112cd | [
"Apache-2.0"
] | 1,425 | 2015-01-12T07:21:27.000Z | 2022-03-30T14:10:40.000Z | from cython.cimports import cqueue
from cython import cast
@cython.cclass
class Queue:
"""A queue class for C integer values.
>>> q = Queue()
>>> q.append(5)
>>> q.peek()
5
>>> q.pop()
5
"""
_c_queue = cython.declare(cython.pointer(cqueue.Queue))
def __cinit__(self):
se... | 33.376812 | 90 | 0.637429 | 1 | 1.4931 | [
0.0013700315030291677,
0.025360949337482452,
0.006081599276512861,
0.000733241206035018,
0.006081523839384317,
-0.002002628520131111,
-0.010142347775399685,
0.0016373632242903113,
-0.006141774822026491,
0.002300497842952609,
0.002503386465832591,
0.007137790322303772,
0.005296966526657343,
... |
79f43a8f6884032a20fe0a60cced7538e505cc13 | 2,059 | py | Python | tests/test_intset.py | popravich/rdbtools3 | c2b097f58e7d3a3b12e6671aa413c263c1fb96cf | [
"MIT"
] | 3 | 2016-01-12T23:14:47.000Z | 2019-07-10T05:36:22.000Z | tests/test_intset.py | popravich/rdbtools3 | c2b097f58e7d3a3b12e6671aa413c263c1fb96cf | [
"MIT"
] | null | null | null | tests/test_intset.py | popravich/rdbtools3 | c2b097f58e7d3a3b12e6671aa413c263c1fb96cf | [
"MIT"
] | null | null | null | import unittest
from rdbtools3.intset import unpack_intset
from rdbtools3.exceptions import RDBValueError
class TestIntset(unittest.TestCase):
def test_3x2bytes(self):
val = (b'\x02\x00\x00\x00' # int size
b'\x03\x00\x00\x00' # set length
b'\x01\x00' # item 1
... | 30.279412 | 70 | 0.507528 | 1 | 1.5156 | [
0.0005528226029127836,
0.024651434272527695,
0.007953451946377754,
0.0022223172709345818,
0.005312629509717226,
-0.001303090830333531,
-0.010678362101316452,
0.004893488250672817,
-0.004086248576641083,
0.0020753294229507446,
0.0038428055122494698,
0.005077197216451168,
0.00801361259073019,
... |
79f49f9545db79e83b04dd7329404e7aa61e96fa | 2,267 | py | Python | scripts/python/quality_control.py | josegcpa/haemorasis | f662ab909676e7e4be9ce94cd635f2005a891bff | [
"Apache-2.0"
] | null | null | null | scripts/python/quality_control.py | josegcpa/haemorasis | f662ab909676e7e4be9ce94cd635f2005a891bff | [
"Apache-2.0"
] | null | null | null | scripts/python/quality_control.py | josegcpa/haemorasis | f662ab909676e7e4be9ce94cd635f2005a891bff | [
"Apache-2.0"
] | null | null | null | """
Predicts which tiles are of good quality in WBS.
Usage:
python3 quality_control.py --help
"""
import argparse
from tqdm import tqdm
import tensorflow as tf
from tensorflow import keras
from glob import glob
from quality_net_utilities import *
from image_generator import *
n_channels = 3
if __name__ == "__m... | 37.783333 | 74 | 0.620203 | 1 | 1.3221 | [
-0.0019004472997039557,
0.02210555598139763,
0.009524453431367874,
0.003156860824674368,
0.006840865593403578,
-0.005591609049588442,
-0.004441341385245323,
-0.002244415460154414,
-0.0069579207338392735,
0.003705287352204323,
0.003025434445589781,
0.0035372579004615545,
0.006345188710838556,... |
79f5c1ff548624a5a5ad8d02f81f602e531bf77f | 3,816 | py | Python | examples/three_bit_memory.py | FedeClaudi/pyrnn | a3b6a32b0d00d8d732c484f4a35cf581f345b4b0 | [
"MIT"
] | 4 | 2020-11-01T10:30:26.000Z | 2021-04-10T00:20:26.000Z | examples/three_bit_memory.py | FedeClaudi/pyrnn | a3b6a32b0d00d8d732c484f4a35cf581f345b4b0 | [
"MIT"
] | null | null | null | examples/three_bit_memory.py | FedeClaudi/pyrnn | a3b6a32b0d00d8d732c484f4a35cf581f345b4b0 | [
"MIT"
] | 1 | 2022-01-11T20:57:06.000Z | 2022-01-11T20:57:06.000Z | import numpy as np
from numpy import random as rnd
import matplotlib.pyplot as plt
import torch
from myterial import salmon, light_green_dark, indigo_light
from pyrnn._plot import clean_axes
import torch.utils.data as data
import sys
from rich.progress import track
"""
3 bit memory task
input is a 3xN tens... | 27.257143 | 79 | 0.53957 | 1 | 2.0196 | [
-0.048636093735694885,
0.003676308784633875,
0.005714212544262409,
0.03987698256969452,
0.010739891789853573,
0.013645193539559841,
-0.03587600588798523,
-0.005728974938392639,
-0.0037548269610852003,
0.009348200634121895,
0.020064685493707657,
0.006920745596289635,
0.0005680156755261123,
... |
79f795acd7334901e349edf17ca173e0a41ee59c | 2,329 | py | Python | core/feature/activity/import_model_files.py | MD2Korg/CerebralCortex-DataAnalysis | 73f5ea2430bc7c23de422dccb7b65ef9f8917595 | [
"BSD-2-Clause"
] | 1 | 2018-04-24T18:11:24.000Z | 2018-04-24T18:11:24.000Z | core/feature/activity/import_model_files.py | Boris69bg/CerebralCortex-DataAnalysis | 49565bdff348d69153bd5d3a37e73f1645f82b32 | [
"BSD-2-Clause"
] | 10 | 2018-03-13T19:04:09.000Z | 2018-05-12T01:40:03.000Z | core/feature/activity/import_model_files.py | Boris69bg/CerebralCortex-DataAnalysis | 49565bdff348d69153bd5d3a37e73f1645f82b32 | [
"BSD-2-Clause"
] | 42 | 2017-12-07T17:08:14.000Z | 2019-06-02T08:25:12.000Z | # Copyright (c) 2018, MD2K Center of Excellence
# - Sayma Akther <sakther@memphis.edu>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above co... | 36.968254 | 87 | 0.769429 | 1 | 1.3596 | [
0.0003074422129429877,
0.020675530657172203,
0.007889325730502605,
0.0034024242777377367,
0.004657341632992029,
-0.002762735588476062,
-0.010157283395528793,
-0.00013324276369530708,
-0.006943766493350267,
0.0019799841102212667,
0.0017414757749065757,
0.0045699565671384335,
0.006703158374875... |
79f8669db0f2282db62b75929103051edb7792c1 | 4,831 | py | Python | src/stk/molecular/topology_graphs/cof/square.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | src/stk/molecular/topology_graphs/cof/square.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | src/stk/molecular/topology_graphs/cof/square.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | """
Square
======
"""
import numpy as np
from ..topology_graph import Edge
from .cof import Cof
from .vertices import LinearVertex, NonLinearVertex
class Square(Cof):
"""
Represents a sqaure COF topology graph.
Unoptimized construction
.. moldoc::
import moldoc.molecule as molecule
... | 30.006211 | 69 | 0.492031 | 0 | 0 | [
-0.03941458836197853,
0.04343181848526001,
-0.015372800640761852,
0.0023452292662113905,
-0.0014081924455240369,
0.02089136652648449,
-0.005341554991900921,
-0.013153464533388615,
0.0069242212921381,
0.006635009311139584,
0.02961149625480175,
0.031419675797224045,
0.021342165768146515,
0.0... |
79fb7c77c3290bb45e8e4735b3254d5b64741a7b | 753 | py | Python | Miscellaneous/List appender.py | TausifAnsari/PyHub | f6c949dc6a3974f57d7d146708443d0ceeb4418f | [
"MIT"
] | 1 | 2020-09-30T19:31:20.000Z | 2020-09-30T19:31:20.000Z | Miscellaneous/List appender.py | TanviSutar/PyHub | 6281e9f515674fb51f0d0862c26ec18020fa7d83 | [
"MIT"
] | null | null | null | Miscellaneous/List appender.py | TanviSutar/PyHub | 6281e9f515674fb51f0d0862c26ec18020fa7d83 | [
"MIT"
] | null | null | null | """
Program Description :
List appender is a simple program that allows you to append data, either a single word or a sequence of words,
to a list. To stop adding elements, type !quit. It helps create lists easily when the number of elements
is a lot.
"""
def List_appender():
print("Start entering data to be appen... | 32.73913 | 110 | 0.584329 | 1 | 0.8961 | [
-0.0006962019251659513,
0.025968801230192184,
0.010736222378909588,
0.0002313271106686443,
0.005058330949395895,
-0.004274606704711914,
-0.012038331478834152,
0.006166363600641489,
-0.005860780365765095,
0.0025663923006504774,
0.0004499944916460663,
0.005203824024647474,
0.009134138934314251... |
79fb9e19ccd46f5e429a214eba993e7f4b00b0b8 | 32,159 | py | Python | versions/2.0/karma/python/atf-scripts.py | Lituta/dig-alignment | 812ab0e4a181953d23024ef9df92eec1d40559cb | [
"Apache-2.0"
] | 5 | 2015-04-26T19:39:44.000Z | 2018-12-24T13:17:42.000Z | versions/2.0/karma/python/atf-scripts.py | Lituta/dig-alignment | 812ab0e4a181953d23024ef9df92eec1d40559cb | [
"Apache-2.0"
] | 7 | 2016-03-23T16:52:32.000Z | 2018-07-24T03:08:05.000Z | versions/2.0/karma/python/atf-scripts.py | Lituta/dig-alignment | 812ab0e4a181953d23024ef9df92eec1d40559cb | [
"Apache-2.0"
] | 28 | 2015-04-08T22:39:07.000Z | 2021-12-25T22:16:36.000Z | # Scripts for modeling ATF data.
def atf_article_uri(url, post_id):
return get_url_hash(url)+"/"+post_id
def atf_thread_uri(url):
return get_url_hash(url)
test_date = "Wed Feb 11, 2015 10:31 am"
def atf_date_created(date, format="%a %b %d, %Y %I:%M %p"):
"""Put the date in ISO format"""
return iso86... | 24.399848 | 168 | 0.603066 | 1 | 1.9941 | [
0.015035225078463554,
0.0031816367991268635,
0.0046104686334729195,
0.017637239769101143,
0.02437586337327957,
-0.016207890585064888,
0.05240623280405998,
0.003450488205999136,
0.026489922776818275,
0.020361533388495445,
-0.006514230743050575,
0.006019557360559702,
0.007272262126207352,
0.... |
79fc1faaa40ddef6ee21f157035fc4e0c3b878f7 | 5,218 | py | Python | tests/test_model.py | hattya/ayame | e8bb2b0ace79cd358b1384270cb9c5e809e12b5d | [
"MIT"
] | 1 | 2022-03-05T03:21:13.000Z | 2022-03-05T03:21:13.000Z | tests/test_model.py | hattya/ayame | e8bb2b0ace79cd358b1384270cb9c5e809e12b5d | [
"MIT"
] | 1 | 2021-08-25T13:41:34.000Z | 2021-08-25T13:41:34.000Z | tests/test_model.py | hattya/ayame | e8bb2b0ace79cd358b1384270cb9c5e809e12b5d | [
"MIT"
] | 1 | 2018-03-04T21:47:27.000Z | 2018-03-04T21:47:27.000Z | #
# test_model
#
# Copyright (c) 2011-2021 Akinori Hattori <hattya@gmail.com>
#
# SPDX-License-Identifier: MIT
#
import ayame
from ayame import model
from base import AyameTestCase
class ModelTestCase(AyameTestCase):
def test_model(self):
m = model.Model(None)
self.assertIsNone(m.object)
... | 31.624242 | 70 | 0.582599 | 0 | 0 | [
-0.041008539497852325,
0.022224852815270424,
-0.005688825622200966,
-0.02141779288649559,
-0.0035616299137473106,
0.015326769091188908,
-0.020298590883612633,
-0.05384311452507973,
-0.030053984373807907,
0.05500384792685509,
-0.0004852981073781848,
-0.0031933030113577843,
0.03150065243244171... |
79fcbdc1254d3a3bea2c490468ac77f676c228de | 2,322 | py | Python | DataStructuresInPython/tree/BinaryTree.py | rahamath2009/git-github.com-nishant-sethi-HackerRank | 14d9bd3e772a863aceba22d9a3361a8325cca4bc | [
"Apache-2.0"
] | 76 | 2018-06-28T04:29:14.000Z | 2022-03-21T01:57:27.000Z | DataStructuresInPython/tree/BinaryTree.py | rahamath2009/git-github.com-nishant-sethi-HackerRank | 14d9bd3e772a863aceba22d9a3361a8325cca4bc | [
"Apache-2.0"
] | 31 | 2018-10-01T09:12:05.000Z | 2022-03-08T23:39:01.000Z | DataStructuresInPython/tree/BinaryTree.py | rahamath2009/git-github.com-nishant-sethi-HackerRank | 14d9bd3e772a863aceba22d9a3361a8325cca4bc | [
"Apache-2.0"
] | 44 | 2018-07-09T11:31:20.000Z | 2022-01-12T19:21:20.000Z | '''
Created on Jun 4, 2018
@author: nishant.sethi
'''
class Node:
def __init__(self, data):
self.left = None
self.right = None
self.data = data
def insert(self, data):
# Compare the new value with the parent node
if self.data:
if data < self.... | 29.392405 | 60 | 0.497847 | 1 | 1.3431 | [
0.002698920900002122,
0.02306578867137432,
0.005164762958884239,
0.0012083016335964203,
0.005391357932239771,
-0.004218278452754021,
-0.005908577237278223,
0.0009217162732966244,
-0.007982783019542694,
0.004692608956247568,
0.002726223086938262,
0.00568748451769352,
0.0046486021019518375,
... |
79fcf62a1f352b071844ce1495996eda7af8f693 | 4,386 | py | Python | ahserver/server/protocol/__init__.py | ifplusor/ahserver | 26a6315d7a3b781d424c81bb3985016d9233e1b7 | [
"BSD-3-Clause"
] | 1 | 2019-10-08T07:57:32.000Z | 2019-10-08T07:57:32.000Z | ahserver/server/protocol/__init__.py | ifplusor/ahserver | 26a6315d7a3b781d424c81bb3985016d9233e1b7 | [
"BSD-3-Clause"
] | null | null | null | ahserver/server/protocol/__init__.py | ifplusor/ahserver | 26a6315d7a3b781d424c81bb3985016d9233e1b7 | [
"BSD-3-Clause"
] | null | null | null | # encoding=utf-8
__all__ = [
"HttpMethod",
"HttpVersion",
"HttpStatus",
"HttpHeader",
"PopularHeaders",
]
from enum import Enum
from ahserver.util.parser import FieldNameEnumParser, IntPairEnumParser
from . import httpheader as HttpHeader
@FieldNameEnumParser("http_method")
class HttpMethod(En... | 31.328571 | 79 | 0.654811 | 1 | 2.3526 | [
-0.02648751623928547,
0.02445211634039879,
0.0069503565318882465,
0.04766165837645531,
-0.016251353546977043,
0.004095964599400759,
-0.037511907517910004,
-0.016983073204755783,
-0.05477211996912956,
0.04700218886137009,
0.000651542330160737,
-0.013586465269327164,
0.018979353830218315,
0.... |
79fd8c6ce233d4c7c58007694fcc63d3fd30ed18 | 949 | py | Python | examples/HelloAPI/app/__init__.py | neo1218/rest | 8bf7369aaa9da5cc4a300c625e4d7fea21f52681 | [
"MIT"
] | 3 | 2015-12-05T20:57:04.000Z | 2017-04-26T03:02:43.000Z | examples/HelloAPI/app/__init__.py | misakar/rest | 8bf7369aaa9da5cc4a300c625e4d7fea21f52681 | [
"MIT"
] | 1 | 2015-12-09T18:27:26.000Z | 2015-12-10T16:19:30.000Z | examples/HelloAPI/app/__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 Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from config import config
app = Flask(__name__)
"""
config
-- 'default': DevelopmentConfig
-- 'develop': DevelopmentConfig
-- 'testing': TestingConfig
-- 'production': ProductionConfig
you can... | 19.770833 | 48 | 0.765016 | 1 | 0.9396 | [
0.004778122995048761,
0.023617791011929512,
0.008276579901576042,
0.0019557292107492685,
0.004493605811148882,
-0.0029754212591797113,
-0.011318146251142025,
0.0023824695963412523,
-0.0073671117424964905,
0.001527346670627594,
0.0030307043343782425,
0.00463124318048358,
0.00663425587117672,
... |
79fe46dfa7986350e052536c603f93ab8fffeca1 | 988 | py | Python | botc/gamemodes/sectsandviolets/Oracle.py | Xinverse/BOTC-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2020-06-21T17:20:17.000Z | 2020-06-21T17:20:17.000Z | botc/gamemodes/sectsandviolets/Oracle.py | BlueLenz/Blood-on-the-Clocktower-Storyteller-Discord-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2020-07-07T03:47:44.000Z | 2020-07-07T03:47:44.000Z | botc/gamemodes/sectsandviolets/Oracle.py | BlueLenz/Blood-on-the-Clocktower-Storyteller-Discord-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2022-02-18T00:42:19.000Z | 2022-02-18T00:42:19.000Z | """Contains the Oracle Character class"""
import json
from botc import Character, Townsfolk
from ._utils import SectsAndViolets, SnVRole
with open('botc/gamemodes/sectsandviolets/character_text.json') as json_file:
character_text = json.load(json_file)[SnVRole.oracle.value.lower()]
class Oracle(Townsfolk, Sects... | 32.933333 | 93 | 0.718623 | 1 | 0.9876 | [
0.0015697655035182834,
0.024024371057748795,
0.006549932062625885,
0.0038371721748262644,
0.006488466635346413,
-0.005074006039649248,
-0.00838540494441986,
0.003208631882444024,
-0.004859255626797676,
0.0024278583005070686,
0.001180386752821505,
0.0062847197987139225,
0.007758845575153828,
... |
79fec6efd58b3af8a43b2eeadf236a957d497f6c | 3,154 | py | Python | Elastic/ElasticPutDocs.py | mvdhoek/DSB-ReSeT | 746aa92cab795011494e09f4c27c5c2e673ba82c | [
"MIT"
] | null | null | null | Elastic/ElasticPutDocs.py | mvdhoek/DSB-ReSeT | 746aa92cab795011494e09f4c27c5c2e673ba82c | [
"MIT"
] | null | null | null | Elastic/ElasticPutDocs.py | mvdhoek/DSB-ReSeT | 746aa92cab795011494e09f4c27c5c2e673ba82c | [
"MIT"
] | null | null | null | # A python script to upload safety reports to Elasticsearch
import elasticsearch as es
from elasticsearch import helpers
import logging
import base64
from os import listdir
from os.path import isfile, join
import hashlib
import pandas as pd
# DEFINITIONS ----------------------------------------------------------
path... | 31.227723 | 164 | 0.606531 | 1 | 1.7601 | [
0.004149056971073151,
0.02078845165669918,
0.006410687696188688,
0.0031605542171746492,
0.004951931070536375,
0.00036384884151630104,
-0.005508268252015114,
0.0027420970145612955,
-0.006117095239460468,
0.003991722594946623,
0.002013269579038024,
0.006152321584522724,
0.005314534064382315,
... |
79ff7b8687e44250039535319562a18fcc77d579 | 2,661 | py | Python | tests/test_models.py | wecode12/TheBlog | f2ce56f0e7d95919e7a7b53892f303338fd2f1ab | [
"MIT"
] | null | null | null | tests/test_models.py | wecode12/TheBlog | f2ce56f0e7d95919e7a7b53892f303338fd2f1ab | [
"MIT"
] | null | null | null | tests/test_models.py | wecode12/TheBlog | f2ce56f0e7d95919e7a7b53892f303338fd2f1ab | [
"MIT"
] | null | null | null | import unittest
from app.models import User,Posts,Comments,Subscribe
class UserModelTest(unittest.TestCase):
def setUp(self):
self.new_user = User(password = 'banana')
def test_password_setter(self):
self.assertTrue(self.new_user.pass_secure is not None)
def test_no_access_passwo... | 26.61 | 96 | 0.636979 | 1 | 1.4151 | [
-0.00021167971135582775,
0.024201102554798126,
0.009259249083697796,
0.0004628058522939682,
0.003652765415608883,
-0.0035996073856949806,
-0.010964727960526943,
0.0011519233230501413,
-0.008024821057915688,
0.0021559372544288635,
0.003817415563389659,
0.00566564267501235,
0.00526018207892775... |
030069d163fd71136ab27b5e98b00d861da2c06b | 2,321 | py | Python | Tools/cvsTool/csvtool.py | codumpython/csv2DB | 87c5bbc03c77fb23d091f79796daa41c67e086a8 | [
"MIT"
] | null | null | null | Tools/cvsTool/csvtool.py | codumpython/csv2DB | 87c5bbc03c77fb23d091f79796daa41c67e086a8 | [
"MIT"
] | 1 | 2022-01-09T09:36:13.000Z | 2022-01-09T09:36:44.000Z | Tools/cvsTool/csvtool.py | codumpython/csv2DB | 87c5bbc03c77fb23d091f79796daa41c67e086a8 | [
"MIT"
] | 2 | 2022-01-09T09:21:17.000Z | 2022-01-09T09:24:48.000Z | import csv
import os
class csvReader:
def __init__(self, address) -> None:
self.address = address
self.data = []
def read(self, delimiter=",") -> None:
with open(self.address) as csvfile:
reader = csv.reader(csvfile, delimiter=delimiter)
self.fields = next(read... | 37.435484 | 67 | 0.479104 | 1 | 1.2531 | [
0.001389106037095189,
0.025028519332408905,
0.008344018831849098,
0.001670602709054947,
0.00503419479355216,
-0.002259834436699748,
-0.009693913161754608,
0.003439132124185562,
-0.006730323191732168,
0.004122398793697357,
0.002412683330476284,
0.005957878194749355,
0.008024385198950768,
-0... |
0301393563c20bb1fb3b01dfc8b08248dc0ce433 | 7,315 | py | Python | Python/Client/RasPi_coms.py | henrymidles/LidarBot | f67b5ed77671abad7267a86f425192fc6d5aad42 | [
"MIT"
] | null | null | null | Python/Client/RasPi_coms.py | henrymidles/LidarBot | f67b5ed77671abad7267a86f425192fc6d5aad42 | [
"MIT"
] | null | null | null | Python/Client/RasPi_coms.py | henrymidles/LidarBot | f67b5ed77671abad7267a86f425192fc6d5aad42 | [
"MIT"
] | null | null | null | import math
import time
from queue import Queue
HOST = 'raspberrypi' # The server's hostname or IP address
PORT = 65432 # The port used by the server
""" This thread gets data from the socket, parses it, and sends it to the queue to be displayed """
class RasPi_coms():
def __init__(self, s):
... | 34.023256 | 114 | 0.479016 | 1 | 2.1381 | [
-0.02853548154234886,
0.013880512677133083,
-0.0021872150246053934,
0.012108677998185158,
-0.006402169354259968,
-0.007433805614709854,
0.023248806595802307,
-0.013243314810097218,
-0.0069869039580225945,
-0.01595594547688961,
0.011630333960056305,
-0.022412095218896866,
0.00857254397124052,... |
0302b241acd1172ec90ed4dd194dc3daa580f308 | 546 | py | Python | wechat/content/__init__.py | windskyer/wechat | 8a193b6b364bd8e6942e9c676c0ff87ce8a6acb6 | [
"Apache-2.0"
] | 1 | 2016-04-20T07:01:46.000Z | 2016-04-20T07:01:46.000Z | wechat/content/__init__.py | windskyer/wechat | 8a193b6b364bd8e6942e9c676c0ff87ce8a6acb6 | [
"Apache-2.0"
] | null | null | null | wechat/content/__init__.py | windskyer/wechat | 8a193b6b364bd8e6942e9c676c0ff87ce8a6acb6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
import random
import logging
from wechat.content import hitokoto
from wechat.content import iciba
log = logging.getLogger('apscheduler.executors.default')
# 随机选择文库
def get_content(num=0):
if not num:
num = random.randint(0, 2)
if num and num == 1:
content = hitokoto.g... | 23.73913 | 56 | 0.642857 | 1 | 0.8646 | [
0.00205182284116745,
0.025908926501870155,
0.008580056950449944,
0.0011885148705914617,
0.0056784194894135,
-0.0028000776655972004,
-0.008715357631444931,
0.0025915971491485834,
-0.008014114573597908,
0.0011737433960661292,
0.002269134158268571,
0.004571570549160242,
0.008060107007622719,
... |
030361a3a07366fe3fca8925cb15ee416c8d5edc | 77 | py | Python | src/main.py | DMinghao/Stock_Trading_Bot | 67e510868fcb81fb1166e50a1ee4ad0face1f597 | [
"MIT"
] | 1 | 2021-01-30T04:21:17.000Z | 2021-01-30T04:21:17.000Z | src/main.py | DMinghao/Stock_Trading_Bot | 67e510868fcb81fb1166e50a1ee4ad0face1f597 | [
"MIT"
] | null | null | null | src/main.py | DMinghao/Stock_Trading_Bot | 67e510868fcb81fb1166e50a1ee4ad0face1f597 | [
"MIT"
] | 1 | 2021-11-25T15:39:43.000Z | 2021-11-25T15:39:43.000Z | from utility import util
CONN = util.connectAlpaca()
class algo:
pass
| 11 | 27 | 0.714286 | 1 | 0.6497 | [
0.00027728703571483493,
0.02594195492565632,
0.006014540791511536,
0.0013189776800572872,
0.0051534720696508884,
-0.004301483742892742,
-0.009412478655576706,
0.00520975049585104,
-0.007632536347955465,
0.00021024270972702652,
0.0016189748421311378,
0.005271905567497015,
0.007987788878381252... |
030555cbf9426dbf0f5ea08ed1283d06552e2fca | 2,220 | py | Python | application.py | dyphen12/vibra | 48d71958ab0498f2fa9d8b6633f5fc212b07879c | [
"MIT"
] | null | null | null | application.py | dyphen12/vibra | 48d71958ab0498f2fa9d8b6633f5fc212b07879c | [
"MIT"
] | null | null | null | application.py | dyphen12/vibra | 48d71958ab0498f2fa9d8b6633f5fc212b07879c | [
"MIT"
] | null | null | null | # Made by @dyphen12
from flask import Flask, request
from flask_cors import CORS
from flask_restful import reqparse, abort, Api, Resource
import json
import os
from vibra.api.core import api_version
from vibra.api.users import handler as uhd
app = Flask(__name__)
api = Api(app)
CORS(app)
class Hello(Resource):
... | 21.142857 | 81 | 0.602252 | 1 | 1.4361 | [
0.0020900305826216936,
0.022931847721338272,
0.008489969186484814,
0.0016052594874054193,
0.0034374308306723833,
-0.002761535346508026,
-0.007623184006661177,
0.000356325093889609,
-0.00678445678204298,
0.0026579678524285555,
0.0017571371281519532,
0.006558526773005724,
0.007861637510359287,... |
03067a69517d1ab99eec7d99b22f65fddf9f5b21 | 1,003 | py | Python | workers/libyear_worker/Libyear.py | ajhenry00/augur | 9f29c7d0375735d7a1941b41852dccd7eaf64378 | [
"MIT"
] | 2 | 2021-01-27T02:01:13.000Z | 2021-04-20T22:44:16.000Z | workers/libyear_worker/Libyear.py | ajhenry00/augur | 9f29c7d0375735d7a1941b41852dccd7eaf64378 | [
"MIT"
] | null | null | null | workers/libyear_worker/Libyear.py | ajhenry00/augur | 9f29c7d0375735d7a1941b41852dccd7eaf64378 | [
"MIT"
] | null | null | null | from pypi import get_lib_days, get_no_of_releases
from utils import load_requirements, get_requirement_files, get_requirement_name_and_version
class Libyear:
def __init__(self, config={}):
name = "libyear"
def get_libyear(self, path):
requirements = set()
requirements_files = list... | 29.5 | 92 | 0.586241 | 1 | 0.9171 | [
0.0010943269589915872,
0.022635530680418015,
0.008461568504571915,
-0.00301137357018888,
0.004451125860214233,
-0.006000989582389593,
-0.013111963868141174,
0.0054761553183197975,
-0.00840364396572113,
0.005552266258746386,
0.00004873118450632319,
0.00610587140545249,
0.012709038332104683,
... |
0307adfe3137c0f62c6abbb22e2e5bab9e3d0723 | 2,481 | py | Python | config/urls.py | Tvrsch/my_receipts | 0a905d2366cee3b62f2dd083af1622afeb648bef | [
"MIT"
] | null | null | null | config/urls.py | Tvrsch/my_receipts | 0a905d2366cee3b62f2dd083af1622afeb648bef | [
"MIT"
] | 11 | 2021-05-10T15:40:38.000Z | 2022-02-28T21:09:37.000Z | config/urls.py | Tvrsch/my_receipts | 0a905d2366cee3b62f2dd083af1622afeb648bef | [
"MIT"
] | 2 | 2021-09-18T18:49:58.000Z | 2021-11-17T12:29:13.000Z | from allauth.account.views import confirm_email as confirm_email_view
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path, re_path
from django.views import defaults as default_views
from django.views.generic import TemplateVi... | 33.986301 | 86 | 0.650544 | 1 | 1.4421 | [
0.002835694467648864,
0.02177566848695278,
0.00945521891117096,
0.003896500216796994,
0.002553026657551527,
0.00008083471766440198,
-0.005823324900120497,
0.0006927541689947248,
-0.00570277776569128,
0.0034096823073923588,
0.005010746419429779,
0.004344911780208349,
0.004604344256222248,
-... |
0309ca2de7206405c79a52c8d1fa62aa60e1cd29 | 1,974 | py | Python | jyserver/Flask.py | ftrias/jyserver | 84e96672686020dc5e75d44b5b29f33a24773a37 | [
"MIT"
] | 10 | 2020-05-11T11:36:29.000Z | 2021-09-14T06:00:06.000Z | jyserver/Flask.py | ftrias/jyserver | 84e96672686020dc5e75d44b5b29f33a24773a37 | [
"MIT"
] | 1 | 2021-11-25T13:20:11.000Z | 2021-11-25T13:20:11.000Z | jyserver/Flask.py | ftrias/jyserver | 84e96672686020dc5e75d44b5b29f33a24773a37 | [
"MIT"
] | 3 | 2020-05-11T11:36:34.000Z | 2022-03-09T06:17:31.000Z | '''
Module for using jyserver in Flask. This module provides to new
decorators.
Decorators
-----------
* @use
Link an application object to the Flask app
* @task
Helper that wraps a function inside a separate thread so that
it can execute concurrently.
Example
-------------
```html
<p id="time">TIME</... | 22.953488 | 77 | 0.604863 | 0 | 0 | [
-0.00039621663745492697,
0.023928405717015266,
0.009622217155992985,
-0.0005988229531794786,
0.004545354750007391,
-0.0017949675675481558,
-0.010654314421117306,
0.0012429928174242377,
-0.006054518278688192,
0.0027998166624456644,
0.0009332347544841468,
0.007868395186960697,
0.00940493959933... |
030bd06ce092e96c24d2de280987ee14a539477c | 12,533 | py | Python | venv/Lib/site-packages/json_tricks/nonp.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | 145 | 2016-04-12T19:38:36.000Z | 2022-01-08T14:47:13.000Z | venv/Lib/site-packages/json_tricks/nonp.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | 72 | 2015-11-06T00:23:35.000Z | 2022-03-13T05:25:42.000Z | venv/Lib/site-packages/json_tricks/nonp.py | mintzer/pupillometry-rf-back | cfa86fa984a49dce0123798f8de5b838c02e10d5 | [
"CC-BY-4.0"
] | 24 | 2016-06-24T13:26:07.000Z | 2021-07-03T21:07:27.000Z | import warnings
from json import loads as json_loads
from os import fsync
from sys import exc_info
from json_tricks.utils import is_py3, dict_default, gzip_compress, gzip_decompress, JsonTricksDeprecation
from .utils import str_type, NoNumpyException # keep 'unused' imports
from .comment import strip_comments # keep... | 46.247232 | 169 | 0.766536 | 1 | 2.1621 | [
-0.016116861253976822,
0.08122188597917557,
0.0021274688187986612,
0.0247110053896904,
-0.005859804805368185,
0.00825097132474184,
-0.012675314210355282,
0.011851019226014614,
0.015721112489700317,
0.007125296164304018,
0.006079593673348427,
0.014712393283843994,
0.05443945899605751,
0.009... |
030d744b5e81be4e6ddf3ab54eaa85b4f53c4a6a | 18,515 | py | Python | notion2pg.py | aaugustin/notion2pg | 9d6fcca7e7cc923ea0be68d6886118e1fde335d8 | [
"BSD-3-Clause"
] | 6 | 2022-02-23T12:01:02.000Z | 2022-03-23T10:38:16.000Z | notion2pg.py | aaugustin/notion2pg | 9d6fcca7e7cc923ea0be68d6886118e1fde335d8 | [
"BSD-3-Clause"
] | null | null | null | notion2pg.py | aaugustin/notion2pg | 9d6fcca7e7cc923ea0be68d6886118e1fde335d8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Notes on formulas
# -----------------
#
# There are four output types of formulas:
#
# 1. string
# 2. number
# 3. date — never a date range, unlike date properties
# 4. boolean
# Notes on rollups
# ----------------
#
# There are four signatures of rollup functions:
#
# 1. any -> array[any]
# ... | 32.368881 | 87 | 0.574561 | 0 | 0 | [
-0.030037371441721916,
0.03501589596271515,
0.020525287836790085,
0.01155940443277359,
-0.05092938616871834,
-0.013604482635855675,
-0.022245995700359344,
-0.02876114845275879,
0.02262195758521557,
-0.0032076528295874596,
0.0317540168762207,
-0.010068528354167938,
0.017137188464403152,
-0.... |
030d8bd65aecd2d5a8891598cfd87018038692a8 | 4,748 | py | Python | leo3ltb/scheduler/profiler.py | leoprover/ltb | e9550c596d36003eb6809d227f99604557c35b6a | [
"BSD-3-Clause"
] | null | null | null | leo3ltb/scheduler/profiler.py | leoprover/ltb | e9550c596d36003eb6809d227f99604557c35b6a | [
"BSD-3-Clause"
] | 2 | 2019-07-27T13:33:08.000Z | 2019-07-30T10:34:54.000Z | leo3ltb/scheduler/profiler.py | leoprover/ltb | e9550c596d36003eb6809d227f99604557c35b6a | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
import matplotlib.cm as cm
import numpy as np
import matplotlib.pyplot as plt
def plot(problemVariants, *, zero, outfile, numThreads):
columns = ['Problem', 'NotTriedYet', 'Scheduled', 'Success', 'Timeout', 'Stopped', 'Ended']
colors = ['w', 'tab:purple', 'tab:green', 'tab:orange', 'tab:red... | 36.244275 | 137 | 0.540227 | 0 | 0 | [
0.01706499606370926,
0.020554404705762863,
0.03699667751789093,
0.015825502574443817,
0.015478193759918213,
-0.012235953472554684,
0.009315322153270245,
-0.010450834408402443,
-0.009241984225809574,
0.01556373666971922,
-0.011825650930404663,
0.04195884242653847,
0.03624724596738815,
-0.04... |
030fd2dfb8a4fa6185ed55acabcf1eed72bf0ff0 | 2,347 | py | Python | rbk_shares_grab.py | adamrfox/rbk_nas_bulk_add | 4784e0671a7abcb2b03df4f25ee8977eb2666636 | [
"MIT"
] | 3 | 2019-04-29T20:54:49.000Z | 2022-03-23T18:11:53.000Z | rbk_shares_grab.py | adamrfox/rbk_nas_bulk_add | 4784e0671a7abcb2b03df4f25ee8977eb2666636 | [
"MIT"
] | null | null | null | rbk_shares_grab.py | adamrfox/rbk_nas_bulk_add | 4784e0671a7abcb2b03df4f25ee8977eb2666636 | [
"MIT"
] | null | null | null | #!/usr/bin/python
from __future__ import print_function
import sys
import rubrik_cdm
import getopt
import getpass
import urllib3
urllib3.disable_warnings()
def usage():
sys.stderr.write("Usage: rbk_share_grab.py [-h] [-c creds] [-p protocol] [-t token] [-o outfile] rubrik\n")
sys.stderr.write("-h | --help: P... | 30.089744 | 114 | 0.558585 | 1 | 1.5366 | [
0.0022853303235024214,
0.025072777643799782,
0.008278312161564827,
0.00038817376480437815,
0.004824833478778601,
-0.004274890758097172,
-0.009870894253253937,
0.002990370150655508,
-0.008466221392154694,
0.001331561361439526,
0.0025579093489795923,
0.005666816607117653,
0.007443889044225216,... |
03107adc71743725424b2361e5a9dcd1060c0b19 | 821 | py | Python | Pyton_Codes/Python Data Structures/3.Lists/ex_9.4.py | Bombjack88/Python-for-Everybody--PY4E- | 0dee57e015ed0c773bdb11e841ed4b2b639b5eca | [
"MIT"
] | null | null | null | Pyton_Codes/Python Data Structures/3.Lists/ex_9.4.py | Bombjack88/Python-for-Everybody--PY4E- | 0dee57e015ed0c773bdb11e841ed4b2b639b5eca | [
"MIT"
] | null | null | null | Pyton_Codes/Python Data Structures/3.Lists/ex_9.4.py | Bombjack88/Python-for-Everybody--PY4E- | 0dee57e015ed0c773bdb11e841ed4b2b639b5eca | [
"MIT"
] | null | null | null | name = input("Enter file:")
if len(name) < 1:
name = "mbox-short.txt"
handle = open(name)
hist=dict()
for line in handle:
if line.startswith('From:'):
words=line.split()
if words[1] not in hist:
hist[words[1]]=1
else:
hist[words[1]]=hist[words[1]]+1
#print(hist)
n... | 21.605263 | 45 | 0.588307 | 1 | 0.9816 | [
-0.001550752087496221,
0.024752115830779076,
0.009010250680148602,
0.0019828423392027617,
0.003809490939602256,
-0.002632112242281437,
-0.00913002248853445,
0.0014511621557176113,
-0.0066986968740820885,
0.004881787113845348,
0.0013236338272690773,
0.0051946076564490795,
0.00877075269818306,... |
0310a3f412e38098f32e0ef6e645cc58b02cafe4 | 440 | py | Python | Pacote/Python/teste.py | Rezende31/Primeiros-programas-em-Python | 69b4cdde36fdb2fa9193eac7c0f279fbeea21350 | [
"MIT"
] | null | null | null | Pacote/Python/teste.py | Rezende31/Primeiros-programas-em-Python | 69b4cdde36fdb2fa9193eac7c0f279fbeea21350 | [
"MIT"
] | null | null | null | Pacote/Python/teste.py | Rezende31/Primeiros-programas-em-Python | 69b4cdde36fdb2fa9193eac7c0f279fbeea21350 | [
"MIT"
] | null | null | null | maior = 0
menor = 0
totalPessoas = 10
for pessoa in range(1, 11):
idade = int(input("Digite a idade: "))
if idade >= 18:
maior += 1
else:
menor += 1
print("Quantidade de pessoas maior de idade: ", maior)
print("Quantidade de pessoas menor de idade: ", menor)
print("Porcentagem de pessoas menores de idad... | 29.333333 | 82 | 0.670455 | 1 | 0.8316 | [
-0.001114690792746842,
0.02628404088318348,
0.00870643649250269,
0.001823062659241259,
0.001959452172741294,
-0.005431163124740124,
-0.010256289504468441,
0.004862136673182249,
-0.00795811228454113,
0.0009174922597594559,
0.0019811054226011038,
0.0061151375994086266,
0.00855872593820095,
-... |
031333ba3988ef98fbd4715a4e62cc80ec83e8a6 | 20 | py | Python | BackpackTF/__init__.py | danocmx/BackpackTF | f72e3e469564bac3437e46b609295ed9682fa111 | [
"MIT"
] | null | null | null | BackpackTF/__init__.py | danocmx/BackpackTF | f72e3e469564bac3437e46b609295ed9682fa111 | [
"MIT"
] | null | null | null | BackpackTF/__init__.py | danocmx/BackpackTF | f72e3e469564bac3437e46b609295ed9682fa111 | [
"MIT"
] | null | null | null | name = "BackpackTF"
| 10 | 19 | 0.7 | 1 | 0.6306 | [
-0.0003459407889749855,
0.022963548079133034,
0.01191241666674614,
0.0005189558723941445,
0.004144429229199886,
-0.007077484857290983,
-0.009885726496577263,
0.008508708328008652,
-0.0024357084184885025,
0.000551657984033227,
0.0003999380860477686,
0.00472478149458766,
0.00770624540746212,
... |
03161323e20915da493ace89b2bc01368abbd868 | 5,180 | py | Python | soapfish/py2wsdl.py | jocassid/soapfish | 7926335089ec286d3f4f491f72d84ec7096c79c9 | [
"BSD-3-Clause"
] | null | null | null | soapfish/py2wsdl.py | jocassid/soapfish | 7926335089ec286d3f4f491f72d84ec7096c79c9 | [
"BSD-3-Clause"
] | 1 | 2018-02-19T22:40:44.000Z | 2018-02-19T22:40:44.000Z | soapfish/py2wsdl.py | jocassid/soapfish | 7926335089ec286d3f4f491f72d84ec7096c79c9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function
import argparse
import imp
import logging
import sys
import six
from lxml import etree
from . import namespaces as ns, xsd
from .py2xsd import generate_xsdspec
from .soap import SOAP_HTTP_Transport
from .utils impor... | 33.636364 | 88 | 0.662548 | 0 | 0 | [
-0.036470405757427216,
0.02260156162083149,
0.015783844515681267,
0.0530741848051548,
-0.026714054867625237,
-0.01764368824660778,
-0.042646486312150955,
0.0002522098948247731,
0.0036143080797046423,
-0.02568528801202774,
-0.005136766005307436,
0.03232140466570854,
0.012010335922241211,
0.... |
03165ba60d729661a58123673f53a2d1bcac3825 | 4,583 | py | Python | tests/test_realtime.py | nickgaya/redbucket | 820adbf32f0a37bd73832a1a82195cd966a469e4 | [
"MIT"
] | null | null | null | tests/test_realtime.py | nickgaya/redbucket | 820adbf32f0a37bd73832a1a82195cd966a469e4 | [
"MIT"
] | null | null | null | tests/test_realtime.py | nickgaya/redbucket | 820adbf32f0a37bd73832a1a82195cd966a469e4 | [
"MIT"
] | null | null | null | """Realtime rate limiting tests."""
import sched
import threading
import time
import pytest
from pytest import approx
from redbucket import (InMemoryRateLimiter, RedisScriptRateLimiter,
RedisTransactionalRateLimiter, RateLimit, Zone)
@pytest.fixture
def in_memory_rate_limiter():
return I... | 26.958824 | 79 | 0.60899 | 1 | 2.6721 | [
-0.0697430893778801,
0.04486812651157379,
0.03137169033288956,
0.0569857582449913,
-0.021191377192735672,
0.001954271225258708,
-0.012399554252624512,
-0.008952632546424866,
-0.008518374525010586,
0.01562986709177494,
0.02759389765560627,
-0.008525879122316837,
-0.00016000692266970873,
0.0... |
031719063b08e6d7aba0d2f8634fb56d4b2237bf | 5,660 | py | Python | napari/util/colormaps/colormaps.py | donovanr/napari | 580b5eab8cc40af53aef780a65adb9216d968a32 | [
"BSD-3-Clause"
] | null | null | null | napari/util/colormaps/colormaps.py | donovanr/napari | 580b5eab8cc40af53aef780a65adb9216d968a32 | [
"BSD-3-Clause"
] | null | null | null | napari/util/colormaps/colormaps.py | donovanr/napari | 580b5eab8cc40af53aef780a65adb9216d968a32 | [
"BSD-3-Clause"
] | null | null | null | import os
from .vendored import colorconv
import numpy as np
import vispy.color
_matplotlib_list_file = os.path.join(os.path.dirname(__file__),
'matplotlib_cmaps.txt')
with open(_matplotlib_list_file) as fin:
matplotlib_colormaps = [line.rstrip() for line in fin]
def _all_r... | 32.342857 | 93 | 0.601237 | 0 | 0 | [
-0.00031547510297968984,
0.05434488132596016,
-0.017416827380657196,
0.014524546451866627,
0.022075995802879333,
-0.022026441991329193,
0.05769769847393036,
0.043452851474285126,
0.005036348011344671,
-0.008627325296401978,
0.01671554148197174,
-0.0013693859800696373,
0.01680285483598709,
... |
03193daceb0294a6570e1e5c247887786113d92d | 6,908 | py | Python | pass.py | gabrielbiasi/password-finder | c4f010f93c1ba930150c27a5d0a0e4177390c141 | [
"MIT"
] | 1 | 2021-09-08T21:06:36.000Z | 2021-09-08T21:06:36.000Z | pass.py | josanjohnata/password-finder | c4f010f93c1ba930150c27a5d0a0e4177390c141 | [
"MIT"
] | null | null | null | pass.py | josanjohnata/password-finder | c4f010f93c1ba930150c27a5d0a0e4177390c141 | [
"MIT"
] | 1 | 2021-09-08T21:06:44.000Z | 2021-09-08T21:06:44.000Z | #!/usr/bin/env python3
"""
pass.py
Find hardcoded passwords on source code of your project.
python pass.py path/to/project
"""
import os
import sys
import re
import fnmatch
import json
from argparse import ArgumentParser
DEFAULT_BAD_WORDS = ['token', 'oauth', 'secret', 'pass', 'password', 'senha']
DEFAULT_ANALYZERS... | 32.739336 | 146 | 0.599739 | 1 | 1.9821 | [
-0.015211967751383781,
0.025858275592327118,
-0.0005070254555903375,
0.05901495739817619,
-0.017690200358629227,
0.038985930383205414,
0.005516645964235067,
0.0030616174917668104,
-0.002571532968431711,
0.05793536826968193,
-0.017391039058566093,
-0.018785890191793442,
-0.015414822846651077,... |
031c1bbdf2907809a6800767549c8b50f9abcffc | 1,660 | py | Python | api/test/test_authentication/test_authentication.py | ghalonso94/wswallet | 8f1f13a0d646166adad45b3872c2db6558d48f38 | [
"MIT"
] | null | null | null | api/test/test_authentication/test_authentication.py | ghalonso94/wswallet | 8f1f13a0d646166adad45b3872c2db6558d48f38 | [
"MIT"
] | null | null | null | api/test/test_authentication/test_authentication.py | ghalonso94/wswallet | 8f1f13a0d646166adad45b3872c2db6558d48f38 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase
from django.contrib.auth import authenticate
class AuthenticationUserTestCase(APITestCase):
def setUp(self):
self.list_url = reverse('Company-list')
... | 44.864865 | 77 | 0.735542 | 1 | 1.0716 | [
0.0007640449912287295,
0.022184912115335464,
0.011579095385968685,
0.0012814946239814162,
0.004725808743387461,
-0.002765950281172991,
-0.009699751622974873,
-0.0001406611263519153,
-0.007994033396244049,
0.004901271313428879,
0.004514464642852545,
0.0067436667159199715,
0.007846317254006863... |
031f8e68c6be1164545c38f2fc637c6974d63093 | 6,226 | py | Python | qcengine/compute.py | dsirianni/QCEngine | 45d639c59f26e25ad8d7ace6c7e2faca2a8909ac | [
"BSD-3-Clause"
] | null | null | null | qcengine/compute.py | dsirianni/QCEngine | 45d639c59f26e25ad8d7ace6c7e2faca2a8909ac | [
"BSD-3-Clause"
] | null | null | null | qcengine/compute.py | dsirianni/QCEngine | 45d639c59f26e25ad8d7ace6c7e2faca2a8909ac | [
"BSD-3-Clause"
] | null | null | null | """
Integrates the computes together
"""
from typing import Any, Dict, Optional, Union
from qcelemental.models import ComputeError, FailedOperation, Optimization, OptimizationInput, ResultInput
from .config import get_config
from .procedures import get_procedure, list_all_procedures, list_available_procedures
from .p... | 37.059524 | 106 | 0.681497 | 1 | 1.8801 | [
-0.05426531285047531,
0.06441190838813782,
0.05035468563437462,
-0.008101578801870346,
-0.0035839953925460577,
0.004530047532171011,
0.0036024346482008696,
-0.009339782409369946,
-0.03892435505986214,
0.053602270781993866,
0.0239829421043396,
-0.024150846526026726,
0.004012680612504482,
0.... |
032097b293e25c54965aa1b1ccac4d5f2d0b3a18 | 192 | py | Python | Logic/OR.py | Oumourin/Deep-Learning-Study | 85c3a04aaa3af2fcf6a335d9fd8db70c89527b39 | [
"MIT"
] | 1 | 2019-06-30T09:19:42.000Z | 2019-06-30T09:19:42.000Z | Logic/OR.py | Oumourin/Deep-Learning-Study | 85c3a04aaa3af2fcf6a335d9fd8db70c89527b39 | [
"MIT"
] | null | null | null | Logic/OR.py | Oumourin/Deep-Learning-Study | 85c3a04aaa3af2fcf6a335d9fd8db70c89527b39 | [
"MIT"
] | 2 | 2019-06-06T06:49:32.000Z | 2019-07-18T04:41:47.000Z | import numpy as np
def OR(x1, x2):
x = np.array([x1, x2])
y = np.array([0.5, 0.5])
b = -0.2
tmp = np.sum(x*y) + b
if tmp <= 0:
return 0
else:
return 1
| 16 | 28 | 0.447917 | 1 | 0.7386 | [
0.0030763428658246994,
0.026288175955414772,
0.007461709436029196,
0.0013867230154573917,
0.006525381468236446,
-0.003565203631296754,
-0.012653741054236889,
0.005298708565533161,
-0.005910737439990044,
0.002718307776376605,
0.0035584899596869946,
0.0019995965994894505,
0.00982583872973919,
... |
0321382973833ce42d92bf1b5c63c3c37fe27281 | 1,473 | py | Python | tweet/migrations/0002_auto_20190801_1335.py | destro6984/Twitecs | 9df81fd217107cd3437d15f9b49b6985a909ae14 | [
"MIT"
] | null | null | null | tweet/migrations/0002_auto_20190801_1335.py | destro6984/Twitecs | 9df81fd217107cd3437d15f9b49b6985a909ae14 | [
"MIT"
] | 12 | 2019-10-29T18:55:35.000Z | 2022-02-10T10:04:36.000Z | tweet/migrations/0002_auto_20190801_1335.py | destro6984/Twitecs | 9df81fd217107cd3437d15f9b49b6985a909ae14 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-08-01 13:35
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('tweet', '0001_initial'),
migrations.swappable_dependency(settin... | 33.477273 | 135 | 0.633401 | 1 | 1.0491 | [
0.0026977944653481245,
0.02441505715250969,
0.010049089789390564,
0.002915112767368555,
0.0029088163282722235,
-0.0020860563963651657,
-0.008442852646112442,
0.0019966047257184982,
-0.007273389492183924,
0.0047325496561825275,
0.0037246302235871553,
0.006601838860660791,
0.004042981658130884... |
0321d19423a315e4931f710e342abdee508698ef | 545 | py | Python | iroko/records/marshmallow/__init__.py | tocororo/iroko | e1cf08bbd565178c2d60244719aad6d288b48363 | [
"MIT"
] | null | null | null | iroko/records/marshmallow/__init__.py | tocororo/iroko | e1cf08bbd565178c2d60244719aad6d288b48363 | [
"MIT"
] | 14 | 2021-02-02T22:47:27.000Z | 2021-12-22T18:39:46.000Z | iroko/records/marshmallow/__init__.py | tocororo/iroko | e1cf08bbd565178c2d60244719aad6d288b48363 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021. Universidad de Pinar del Rio
# This file is part of SCEIBA (sceiba.cu).
# SCEIBA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
"""Schemas for marshmallow."""
from __future__ impo... | 32.058824 | 94 | 0.759633 | 0 | 0 | [
0.00034340727142989635,
0.023258594796061516,
0.008243068121373653,
0.0026079360395669937,
0.005056243855506182,
-0.004206547979265451,
-0.008285933174192905,
0.0032127622980624437,
-0.006475679576396942,
0.0010856512235477567,
0.0046479906886816025,
0.0050691720098257065,
0.0076263784430921... |
03232a1312dd329eaec49364e1227f3b04f0d86e | 570 | py | Python | wotpy/wot/dictionaries/filter.py | JKRhb/wot-py | 3eaa780189b686c82b7dbdea404fd8077bd3c9f9 | [
"MIT"
] | 24 | 2019-02-15T09:00:27.000Z | 2021-12-23T05:45:03.000Z | wotpy/wot/dictionaries/filter.py | JKRhb/wot-py | 3eaa780189b686c82b7dbdea404fd8077bd3c9f9 | [
"MIT"
] | 20 | 2020-03-17T09:41:51.000Z | 2021-07-14T12:29:02.000Z | wotpy/wot/dictionaries/filter.py | JKRhb/wot-py | 3eaa780189b686c82b7dbdea404fd8077bd3c9f9 | [
"MIT"
] | 5 | 2019-10-10T13:38:20.000Z | 2021-12-22T14:22:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Wrapper class for dictionaries to represent Thing filters.
"""
from wotpy.wot.dictionaries.base import WotBaseDict
from wotpy.wot.enums import DiscoveryMethod
class ThingFilterDict(WotBaseDict):
"""The ThingFilter dictionary that represents the
constraints f... | 21.111111 | 61 | 0.605263 | 0 | 0 | [
0.0005808286950923502,
0.022282622754573822,
0.0062979781068861485,
0.004060853272676468,
0.0056152320466935635,
-0.005210900213569403,
-0.005599362310022116,
0.002942259656265378,
-0.004054356832057238,
0.0021370165050029755,
0.003562974976375699,
0.003618152579292655,
0.007802565582096577,... |
03238ca23c3c7570a1e23790a0fd110cb3b831d7 | 407 | py | Python | discord/types/enums/stickerformattype.py | AA1999/Disthon | fcf4e550750938b87a1fb48ff3006bdeeecd73e3 | [
"MIT"
] | 14 | 2021-09-20T10:50:03.000Z | 2022-03-01T16:01:08.000Z | discord/types/enums/stickerformattype.py | Rashaad1268/Disthon | 50c191fc2750bcb28280006e1f9bbd1fa65bac33 | [
"MIT"
] | 25 | 2021-12-12T15:52:19.000Z | 2022-03-31T19:45:46.000Z | discord/types/enums/stickerformattype.py | Rashaad1268/Disthon | 50c191fc2750bcb28280006e1f9bbd1fa65bac33 | [
"MIT"
] | 12 | 2021-09-22T10:40:50.000Z | 2021-11-25T15:47:42.000Z | from __future__ import annotations
from enum import IntEnum
class StickerFormatType(IntEnum):
png = 1
apng = 2
lottie = 3
@property
def file_extension(self) -> str:
lookup: dict[StickerFormatType, str] = {
StickerFormatType.png: "png",
StickerFormatType.apng: "png... | 21.421053 | 48 | 0.611794 | 1 | 0.7806 | [
0.0019105385290458798,
0.024715255945920944,
0.009991847909986973,
0.0010749476496130228,
0.004399063531309366,
-0.005365604069083929,
-0.010190010070800781,
0.002889396622776985,
-0.006935401353985071,
0.002075359458103776,
0.003156414721161127,
0.006118277553468943,
0.010741999372839928,
... |
0323a06f1ee42ae880ce7059ecb63d0962974481 | 320 | py | Python | ch2_practice/13_pdf_word/00_decryptPDF/test.py | dreddsa5dies/automatePy | 2a24b38b8e0705a33b8bff0942079f30a0ab22d3 | [
"MIT"
] | 2 | 2019-10-09T13:11:03.000Z | 2020-03-20T23:01:45.000Z | ch2_practice/13_pdf_word/00_decryptPDF/test.py | dreddsa5dies/automatePy | 2a24b38b8e0705a33b8bff0942079f30a0ab22d3 | [
"MIT"
] | null | null | null | ch2_practice/13_pdf_word/00_decryptPDF/test.py | dreddsa5dies/automatePy | 2a24b38b8e0705a33b8bff0942079f30a0ab22d3 | [
"MIT"
] | 1 | 2020-03-20T23:01:46.000Z | 2020-03-20T23:01:46.000Z | #! python
import PyPDF2
pdf = open('encrypted.pdf', 'rb')
pdfRead = PyPDF2.PdfFileReader(pdf)
if pdfRead.isEncrypted:
# если зашифрован, то пароль
pdfRead.decrypt('rosebud')
for i in range(pdfRead.getNumPages()):
data = pdfRead.getPage(i)
print(data.extractText())
pdf.close()
| 22.857143 | 43 | 0.646875 | 1 | 0.7491 | [
0.001223947387188673,
0.02521120384335518,
0.007980572991073132,
0.000870323390699923,
0.005103121977299452,
-0.006882736459374428,
-0.0075164493173360825,
0.005104024428874254,
-0.0073852380737662315,
-0.0006813583895564079,
0.0019707046449184418,
0.0028053924906998873,
0.007852871902287006... |
0324d864acbec40fec8fa0aa86d9215de2424e81 | 1,895 | py | Python | lab4/part3.py | neo-mashiro/MRI | 62bef9f1e8e7d92e6f8027eceeb673e473cb727e | [
"CC0-1.0"
] | 2 | 2021-02-05T09:47:11.000Z | 2021-02-05T10:12:39.000Z | lab4/part3.py | Grindewald1900/MRI | 1305d3e5897b0e908e406927432223846ee11170 | [
"CC0-1.0"
] | null | null | null | lab4/part3.py | Grindewald1900/MRI | 1305d3e5897b0e908e406927432223846ee11170 | [
"CC0-1.0"
] | 6 | 2020-07-02T01:42:47.000Z | 2021-10-01T18:48:40.000Z | from dipy.denoise.nlmeans import nlmeans_3d, nlmeans
from dipy.denoise.noise_estimate import estimate_sigma
import cv2 as cv
import numpy as np
import nibabel as nib
def preprocess(nifti, name):
"""Preprocess the 3D MRI image before image segmentation"""
image = nifti.get_fdata()
sigma = estimate_sigma(im... | 38.673469 | 105 | 0.672296 | 1 | 1.4616 | [
0.00286922138184309,
0.024867452681064606,
0.008394953794777393,
-0.0011856096098199487,
0.004303695168346167,
-0.0037310027983039618,
-0.009440327063202858,
0.0015025672037154436,
-0.006973825395107269,
0.0015615054871886969,
0.004326878115534782,
0.005264444276690483,
0.008687788620591164,... |
0324d9ece5af63a368124e9fa17ba3a69c38e54b | 167 | py | Python | frites/dataset/ds_fmri.py | StanSStanman/frites | 53f4745979dc2e7b27145cd63eab6a82fe893ec7 | [
"BSD-3-Clause"
] | null | null | null | frites/dataset/ds_fmri.py | StanSStanman/frites | 53f4745979dc2e7b27145cd63eab6a82fe893ec7 | [
"BSD-3-Clause"
] | null | null | null | frites/dataset/ds_fmri.py | StanSStanman/frites | 53f4745979dc2e7b27145cd63eab6a82fe893ec7 | [
"BSD-3-Clause"
] | null | null | null | """Dataset representation of fMRI data."""
class DatasetFMRI(object):
"""docstring for DatasetFMRI."""
def __init__(self):
"""Init."""
pass
| 16.7 | 42 | 0.592814 | 0 | 0 | [
-0.0027882270514965057,
0.0229090116918087,
0.0074970354326069355,
-0.0015534766716882586,
0.005683192517608404,
-0.008810183964669704,
-0.007954713888466358,
0.007268648594617844,
-0.00628039101138711,
-0.0006620396161451936,
0.0031127831898629665,
0.0024533357936888933,
0.01134831923991441... |
03258bb27ecf65469783680d33009dc1d384c085 | 1,631 | py | Python | shiyanlougithub/shiyanlougithub/spiders/repositories.py | xizhongzhao/challenge10 | 5cde7722bd4ed4423325bdb4b979b0487b43a734 | [
"BSD-3-Clause"
] | null | null | null | shiyanlougithub/shiyanlougithub/spiders/repositories.py | xizhongzhao/challenge10 | 5cde7722bd4ed4423325bdb4b979b0487b43a734 | [
"BSD-3-Clause"
] | null | null | null | shiyanlougithub/shiyanlougithub/spiders/repositories.py | xizhongzhao/challenge10 | 5cde7722bd4ed4423325bdb4b979b0487b43a734 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
from shiyanlougithub.items import RepositoryItem
class RepositoriesSpider(scrapy.Spider):
name = 'repositories'
@property
def start_urls(self):
return ('https://github.com/shiyanlou?page={}&tab=repositories'.format(i) for i in range(1,5))
def parse(s... | 42.921053 | 116 | 0.573268 | 1 | 1.1841 | [
0.0019541592337191105,
0.027696212753653526,
0.008585049770772457,
0.0005048111197538674,
0.0031726763118058443,
-0.004806895274668932,
-0.009486569091677666,
0.0028443061746656895,
-0.009175901301205158,
0.003662251867353916,
0.0020524749998003244,
0.005999258253723383,
0.007335455156862736... |
0326a1642c11c61dec31a86e0466b9ade9a04445 | 69,686 | py | Python | run_pasta_gui.py | koditaraszka/pasta | 2f14d5ae5b256ce1cd6bc49e44cc84a7b25be7f9 | [
"Python-2.0",
"BSD-Source-Code",
"OLDAP-2.7"
] | 1 | 2018-06-22T03:27:55.000Z | 2018-06-22T03:27:55.000Z | run_pasta_gui.py | kodicollins/pasta | 2f14d5ae5b256ce1cd6bc49e44cc84a7b25be7f9 | [
"Python-2.0",
"BSD-Source-Code",
"OLDAP-2.7"
] | null | null | null | run_pasta_gui.py | kodicollins/pasta | 2f14d5ae5b256ce1cd6bc49e44cc84a7b25be7f9 | [
"Python-2.0",
"BSD-Source-Code",
"OLDAP-2.7"
] | null | null | null | """Main script for PASTA GUI on Windows/Mac/Linux
"""
# This file is part of PASTA which is forked from SATe
# PASTA, like SATe is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License... | 64.464385 | 20,662 | 0.632939 | 1 | 2.0751 | [
-0.008176973089575768,
0.015498965978622437,
0.0052944570779800415,
0.008281783200800419,
-0.000996782211586833,
0.026500869542360306,
-0.013817960396409035,
-0.01203600037842989,
-0.022027896717190742,
0.015985915437340736,
-0.008160781115293503,
0.008353961631655693,
0.006413427647203207,
... |
0327834d28dae6fa6a8dee4194786064fc5d39ca | 2,676 | py | Python | conanfile.py | odant/conan-pion | 42b8c2a4cd73572b3ed6b7fa30bb5f6cb8ca9013 | [
"MIT"
] | null | null | null | conanfile.py | odant/conan-pion | 42b8c2a4cd73572b3ed6b7fa30bb5f6cb8ca9013 | [
"MIT"
] | null | null | null | conanfile.py | odant/conan-pion | 42b8c2a4cd73572b3ed6b7fa30bb5f6cb8ca9013 | [
"MIT"
] | null | null | null | from conans import ConanFile, CMake, tools
class PionConan(ConanFile):
name = "pion"
version = "5.0.7+12"
license = "Boost Software License 1.0 - https://raw.githubusercontent.com/splunk/pion/develop/COPYING"
description = "C++ framework for building lightweight HTTP interfaces"
url = "https://git... | 39.940299 | 106 | 0.616592 | 1 | 1.6896 | [
-0.0006620187778025866,
0.02155047468841076,
0.007981296628713608,
0.0004536514461506158,
0.004379068035632372,
-0.0033274879679083824,
-0.007004855200648308,
0.0028204170521348715,
-0.008620237931609154,
0.0043725972063839436,
0.003798865247517824,
0.006135985255241394,
0.006752642802894115... |
0327e21481aa16a562b119df60a16c6b88f569b8 | 2,735 | py | Python | test/20200923_fungar_network.py | CITA-cph/deep-sight | 9c60183a5bd1f3b6b930cdba8632c33f38769c0b | [
"Apache-2.0"
] | null | null | null | test/20200923_fungar_network.py | CITA-cph/deep-sight | 9c60183a5bd1f3b6b930cdba8632c33f38769c0b | [
"Apache-2.0"
] | null | null | null | test/20200923_fungar_network.py | CITA-cph/deep-sight | 9c60183a5bd1f3b6b930cdba8632c33f38769c0b | [
"Apache-2.0"
] | 1 | 2021-12-05T21:59:49.000Z | 2021-12-05T21:59:49.000Z | '''
Copyright 2020 CITA
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distribute... | 26.047619 | 131 | 0.636929 | 1 | 1.8291 | [
0.002001430606469512,
0.023431917652487755,
0.00984966941177845,
-0.00035878742346540093,
0.0034421980381011963,
-0.002852527191862464,
-0.006413422059267759,
-0.0007289444329217076,
-0.005592372268438339,
0.0028101964853703976,
0.0014874519547447562,
0.006161620374768972,
0.0090655721724033... |
032a2f163f17517b205bff3b9e13c1fe8bff958e | 2,456 | py | Python | old/app/minixs.py | CoCongV/scheduler-service | c16ea8751b7259abe1b6bfa2e8e706aa2ea7e74a | [
"BSD-2-Clause"
] | 2 | 2019-11-18T14:25:04.000Z | 2020-08-01T13:16:40.000Z | old/app/minixs.py | CoCongV/scheduler-service | c16ea8751b7259abe1b6bfa2e8e706aa2ea7e74a | [
"BSD-2-Clause"
] | 2 | 2017-02-07T05:33:21.000Z | 2017-02-14T02:03:28.000Z | old/app/minixs.py | CoCongV/scheduler-service | c16ea8751b7259abe1b6bfa2e8e706aa2ea7e74a | [
"BSD-2-Clause"
] | 2 | 2017-01-08T08:28:38.000Z | 2021-07-20T07:44:36.000Z | from sqlalchemy.inspection import inspect
from . import db
class CRUDMixin(object):
"""Implements methods to create, read, update, and delete."""
@classmethod
def create(cls, commit=True, **kwargs):
instance = cls(**kwargs)
return instance.save(commit=commit)
@classmethod
def ge... | 29.238095 | 71 | 0.576954 | 1 | 1.3686 | [
0.001213087234646082,
0.023442773148417473,
0.0086669335141778,
0.0020452472381293774,
0.005031101405620575,
-0.0026347036473453045,
-0.009204862639307976,
0.0044124978594481945,
-0.006112720351666212,
0.004605405498296022,
0.0042205392383039,
0.005444626323878765,
0.00677835987880826,
-0.... |
032a63d36e0c2a21ce1dba31d81de9a446407ad8 | 2,333 | py | Python | decimate_mesh_blender.py | CarolineBao/mouse-brain-atlases_generator | a6e264b86de5fd561a9bfc46cd80c8ac0bb8dab1 | [
"MIT"
] | 8 | 2019-07-04T06:48:58.000Z | 2020-06-30T19:34:47.000Z | decimate_mesh_blender.py | CarolineBao/mouse-brain-atlases_generator | a6e264b86de5fd561a9bfc46cd80c8ac0bb8dab1 | [
"MIT"
] | 2 | 2018-11-15T16:59:29.000Z | 2019-02-20T20:25:15.000Z | decimate_mesh_blender.py | CarolineBao/mouse-brain-atlases_generator | a6e264b86de5fd561a9bfc46cd80c8ac0bb8dab1 | [
"MIT"
] | 5 | 2019-07-04T06:57:19.000Z | 2021-01-13T15:06:49.000Z | import bpy
import os
import sys
import argparse
## Example call from commandline: blender -b -P decimate_mesh_blender.py -- -f mesh.obj -o mesh_dec.obj -r 0.5 -i 2 -n 4 -l 0.5
## Blender will ignore all options after -- so parameters can be passed to python script.
# get the args passed to blender after "--", all of ... | 33.328571 | 127 | 0.747964 | 1 | 1.5051 | [
0.0028466894291341305,
0.024870719760656357,
0.008845437318086624,
-0.001543804188258946,
0.004460361786186695,
-0.0018105540657415986,
-0.009835460223257542,
0.0028821751475334167,
-0.006351544056087732,
0.0019013930577784777,
0.0023050138261169195,
0.00642413692548871,
0.007764808833599091... |
032b982d116fea61d2d02e4210388792536137b0 | 113 | py | Python | Q03__/51_Android_Unlock_Patterns/test.py | hsclinical/leetcode | 48a57f6a5d5745199c5685cd2c8f5c4fa293e54a | [
"Apache-2.0"
] | null | null | null | Q03__/51_Android_Unlock_Patterns/test.py | hsclinical/leetcode | 48a57f6a5d5745199c5685cd2c8f5c4fa293e54a | [
"Apache-2.0"
] | null | null | null | Q03__/51_Android_Unlock_Patterns/test.py | hsclinical/leetcode | 48a57f6a5d5745199c5685cd2c8f5c4fa293e54a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
from Solution import Solution
obj = Solution()
A = 1
B = 9
print(obj.numberOfPatterns(A, B)) | 12.555556 | 33 | 0.699115 | 1 | 0.6681 | [
0.0027551103848963976,
0.026017867028713226,
0.008609791286289692,
0.00145288510248065,
0.007209269795566797,
-0.005400203634053469,
-0.014043975621461868,
0.0050416733138263226,
-0.004100057762116194,
-0.00021757393551524729,
-0.00024246651446446776,
0.0048059262335300446,
0.010624194517731... |
032d6c600fbcdae76913b5fb1347461373aefd62 | 96 | py | Python | images/MER/create_lexicon.py | nleguillarme/snr_tools_and_methods | 0a62b411989289a72b2dbf8e3a60bcdc32306dae | [
"Apache-2.0"
] | 2 | 2021-08-24T14:57:26.000Z | 2022-02-07T19:46:48.000Z | images/MER/create_lexicon.py | nleguillarme/snr_tools_and_methods | 0a62b411989289a72b2dbf8e3a60bcdc32306dae | [
"Apache-2.0"
] | null | null | null | images/MER/create_lexicon.py | nleguillarme/snr_tools_and_methods | 0a62b411989289a72b2dbf8e3a60bcdc32306dae | [
"Apache-2.0"
] | null | null | null | import merpy
merpy.create_lexicon_from_file("ncbi.txt", "ncbi")
merpy.process_lexicon("ncbi")
| 16 | 50 | 0.78125 | 1 | 0.6636 | [
0.0006619825726374984,
0.02666107565164566,
0.007384368218481541,
-0.002019507810473442,
0.005488591734319925,
-0.00593498395755887,
-0.009363211691379547,
0.005261687096208334,
-0.006203564815223217,
0.0017863541143015027,
0.002681780606508255,
0.004180055111646652,
0.008342328481376171,
... |
032d7af571f68b175085eaef5dc82e7163ae00f8 | 2,195 | py | Python | numba/misc/inspection.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 6,620 | 2015-01-04T08:51:04.000Z | 2022-03-31T12:52:18.000Z | numba/misc/inspection.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 6,457 | 2015-01-04T03:18:41.000Z | 2022-03-31T17:38:42.000Z | numba/misc/inspection.py | luk-f-a/numba | 3a682bd827e416335e3574bc7b10f0ec69adb701 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 930 | 2015-01-25T02:33:03.000Z | 2022-03-30T14:10:32.000Z | """Miscellaneous inspection tools
"""
from tempfile import NamedTemporaryFile
def disassemble_elf_to_cfg(elf):
"""
Gets the CFG of the disassembly of an ELF object, elf, and renders it
appropriately depending on the execution environment (terminal/notebook).
"""
try:
import r2pipe
exce... | 35.983607 | 78 | 0.542597 | 1 | 1.3116 | [
-0.00035329555976204574,
0.025030339136719704,
0.006638629827648401,
-0.0011634009424597025,
0.0052700769156217575,
-0.0049650464206933975,
-0.010323064401745796,
0.0027512216474860907,
-0.007758427876979113,
0.0021086649503558874,
0.0013466707896441221,
0.006208381149917841,
0.0107375243678... |
032ffdd156f2bdf9468433191d431081b171a1df | 107 | py | Python | StatisticsFunctions/variance.py | mkm99/TeamProject_StatsCalculator | 81085c1af47f38d3e49b43d667e312016c44ad10 | [
"MIT"
] | null | null | null | StatisticsFunctions/variance.py | mkm99/TeamProject_StatsCalculator | 81085c1af47f38d3e49b43d667e312016c44ad10 | [
"MIT"
] | 7 | 2020-03-03T21:37:57.000Z | 2020-03-06T04:11:42.000Z | StatisticsFunctions/variance.py | mkm99/TeamProject_StatsCalculator | 81085c1af47f38d3e49b43d667e312016c44ad10 | [
"MIT"
] | null | null | null | import numpy as np
class Variance():
@staticmethod
def variance(data):
return np.var(data) | 17.833333 | 27 | 0.654206 | 1 | 0.6561 | [
-0.00007899295451352373,
0.02422141470015049,
0.006905382964760065,
0.0014207757776603103,
0.005495804361999035,
-0.008343042805790901,
-0.01257800031453371,
0.00654183654114604,
-0.008935925550758839,
0.0036326341796666384,
0.0034025325439870358,
0.003627561032772064,
0.010829536244273186,
... |
03330128825e316c2788c0f162c74ade80d2b98f | 1,515 | py | Python | dtc/message_types/open_orders_request.py | jseparovic/python-ws-dtc-client | fd3952cdaf7ab8c9d5a26ccf53b5e9acb3a9ea0f | [
"Apache-2.0"
] | 15 | 2020-04-26T05:25:53.000Z | 2022-02-11T19:38:42.000Z | dtc/message_types/open_orders_request.py | jseparovic/python-ws-dtc-client | fd3952cdaf7ab8c9d5a26ccf53b5e9acb3a9ea0f | [
"Apache-2.0"
] | 2 | 2021-01-08T19:58:08.000Z | 2021-11-29T06:08:48.000Z | dtc/message_types/open_orders_request.py | jseparovic/python-ws-dtc-client | fd3952cdaf7ab8c9d5a26ccf53b5e9acb3a9ea0f | [
"Apache-2.0"
] | 4 | 2020-11-23T13:38:01.000Z | 2021-12-27T13:21:06.000Z |
from dtc.enums.message_types import MessageTypes
from lib.base_message_type import BaseMessageType
class OpenOrdersRequest(BaseMessageType):
def __init__(self,
request_id=None,
request_all_orders=None,
server_order_id=None,
trade_account=None):
... | 32.234043 | 68 | 0.655446 | 1 | 1.0611 | [
0.00047347028157673776,
0.026847101747989655,
0.006946689914911985,
0.0024389480240643024,
0.00510500418022275,
-0.0030560449231415987,
-0.009196189232170582,
0.004256896674633026,
-0.007928009144961834,
0.0032205372117459774,
0.0035841972567141056,
0.0042253946885466576,
0.00976198725402355... |
0334bf455674f8ac3108f4846a7e2037686fb8f7 | 518 | py | Python | apps/decors/urls.py | gurnitha/django-torang-bisa-apa | 538c67944b86010832594ffa9558a3b2b41205eb | [
"Unlicense"
] | null | null | null | apps/decors/urls.py | gurnitha/django-torang-bisa-apa | 538c67944b86010832594ffa9558a3b2b41205eb | [
"Unlicense"
] | null | null | null | apps/decors/urls.py | gurnitha/django-torang-bisa-apa | 538c67944b86010832594ffa9558a3b2b41205eb | [
"Unlicense"
] | null | null | null | # apps/decors/urls.py
# Django modules
from django.urls import path
# Locals
from apps.decors import views
# Appname
app_name = 'decors'
urlpatterns = [
# SKILLS CRUD
path('create-skill/', views.create_skill, name='create_skill'),
path('update-skill/<str:pk>/', views.update_skill, name='update_skill'),
path('d... | 25.9 | 78 | 0.725869 | 1 | 0.8151 | [
0.0017447308637201786,
0.025670018047094345,
0.008858769200742245,
0.0026051863096654415,
0.0037469693925231695,
-0.005224586930125952,
-0.013016652315855026,
0.0023216118570417166,
-0.0068945675157010555,
0.001762709696777165,
0.00347049324773252,
0.003166893729940057,
0.00852956809103489,
... |
0334e651421abe1c3bbd784b6968c6b9f2211995 | 762 | py | Python | crits/exploits/urls.py | dutrow/crits | 6b357daa5c3060cf622d3a3b0c7b41a9ca69c049 | [
"MIT"
] | 738 | 2015-01-02T12:39:55.000Z | 2022-03-23T11:05:51.000Z | crits/exploits/urls.py | dutrow/crits | 6b357daa5c3060cf622d3a3b0c7b41a9ca69c049 | [
"MIT"
] | 605 | 2015-01-01T01:03:39.000Z | 2021-11-17T18:51:07.000Z | crits/exploits/urls.py | dutrow/crits | 6b357daa5c3060cf622d3a3b0c7b41a9ca69c049 | [
"MIT"
] | 316 | 2015-01-07T12:35:01.000Z | 2022-03-30T04:44:30.000Z | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^add/$', views.add_exploit, name='crits-exploits-views-add_exploit'),
url(r'^edit/cve/$', views.edit_exploit_cve, name='crits-exploits-views-edit_exploit_cve'),
url(r'^edit/name/(?P<id_>\S+)/$', views.edit_exploit_name, name='crits... | 54.428571 | 110 | 0.708661 | 1 | 0.9606 | [
0.0029058819636702538,
0.026417560875415802,
0.010033657774329185,
0.001137280254624784,
0.005012935027480125,
-0.004134439863264561,
-0.010514486581087112,
0.0014435199555009604,
-0.0059063490480184555,
0.0023806190583854914,
0.0051391455344855785,
0.004662173334509134,
0.006947867572307587... |
0337cfe49357e6f2ed4cb54f4c1e1167ba912c44 | 3,197 | py | Python | cs28_project/cs28/models/grade.py | desuderata/cs28_project | d8e84e2ee30f36ce964370580730396b8c211315 | [
"MIT"
] | null | null | null | cs28_project/cs28/models/grade.py | desuderata/cs28_project | d8e84e2ee30f36ce964370580730396b8c211315 | [
"MIT"
] | null | null | null | cs28_project/cs28/models/grade.py | desuderata/cs28_project | d8e84e2ee30f36ce964370580730396b8c211315 | [
"MIT"
] | 1 | 2021-04-29T15:40:57.000Z | 2021-04-29T15:40:57.000Z | """Grades Model
"""
from django.core.exceptions import ValidationError
from django.db import models
from cs28.models import Student
from ..convert_to_ttpt import to_ttpt
class Grade(models.Model):
courseCode = models.CharField("Course Code",
max_length=30)
matricNo = models... | 38.059524 | 78 | 0.426337 | 1 | 1.6296 | [
0.0013083876110613346,
0.02223498933017254,
0.007163962349295616,
0.0030457968823611736,
0.004837365355342627,
-0.004059279337525368,
-0.009321224875748158,
0.002915363758802414,
-0.005806963425129652,
0.00504355039447546,
0.004434739705175161,
0.004767765291035175,
0.006826392374932766,
-... |
03381189e2ef61ec33adddf77a23ff4319aaca5b | 2,341 | py | Python | install.py | Trick-17/arch-installer | 7759da8198ec11e695964253217a879d7455ab5f | [
"Unlicense"
] | 9 | 2017-02-18T17:52:31.000Z | 2021-03-20T16:42:19.000Z | install.py | Trick-17/arch-installer | 7759da8198ec11e695964253217a879d7455ab5f | [
"Unlicense"
] | 62 | 2017-01-01T20:39:52.000Z | 2018-02-16T09:39:16.000Z | install.py | GPMueller/arch-installer | 7759da8198ec11e695964253217a879d7455ab5f | [
"Unlicense"
] | 4 | 2017-06-12T15:12:55.000Z | 2020-08-06T04:05:36.000Z | """
Installs Arch-Linux when called from a live-iso
"""
import argparse
from pyscripts import s000_detect_hardware as hardware
from pyscripts import s00_user_input as user_input
from pyscripts import s01_partitions as partitions
from pyscripts import s02_basic_arch as basic_arch
from pyscripts import s03_package_m... | 36.015385 | 72 | 0.805639 | 1 | 1.3791 | [
-0.0006195031455717981,
0.021584317088127136,
0.009529114700853825,
0.0031486896332353354,
0.003610955784097314,
-0.0024686306715011597,
-0.008678070269525051,
-0.00118644954636693,
-0.005106295924633741,
0.0032057086937129498,
0.001556526985950768,
0.00888375286012888,
0.006357667967677116,... |
03382a55b841efd94eda18f63d1f8005f449368e | 3,276 | py | Python | platformio/exception.py | ufo2011/platformio-core | 0ceae62701731f8b32c34d7993a34dea34aea59c | [
"Apache-2.0"
] | null | null | null | platformio/exception.py | ufo2011/platformio-core | 0ceae62701731f8b32c34d7993a34dea34aea59c | [
"Apache-2.0"
] | null | null | null | platformio/exception.py | ufo2011/platformio-core | 0ceae62701731f8b32c34d7993a34dea34aea59c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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... | 23.73913 | 78 | 0.703907 | 0 | 0 | [
0.0035901416558772326,
0.02047218568623066,
0.007276528514921665,
0.004774125758558512,
0.002617016201838851,
-0.0020410825964063406,
-0.006728124339133501,
0.0010124131804332137,
-0.006933020893484354,
0.00289260339923203,
0.0008491381304338574,
0.005554111208766699,
0.004268399905413389,
... |
03385b75ab65a165d412456332fff78c2821cfeb | 310 | py | Python | matrix_inverse_using_numpy.py | 6895mahfuzgit/Linear_Algebra_for_Machine_Learning | 3f266391491d9ab99e53a3547900c6b1bd657af1 | [
"Apache-2.0"
] | null | null | null | matrix_inverse_using_numpy.py | 6895mahfuzgit/Linear_Algebra_for_Machine_Learning | 3f266391491d9ab99e53a3547900c6b1bd657af1 | [
"Apache-2.0"
] | null | null | null | matrix_inverse_using_numpy.py | 6895mahfuzgit/Linear_Algebra_for_Machine_Learning | 3f266391491d9ab99e53a3547900c6b1bd657af1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 15 23:57:35 2021
@author: Mahfuz_Shazol
"""
import numpy as np
X=np.array([[4,2],[-5,-3]])
X_inv=np.linalg.inv(X)
print('Inverse of X ',X_inv)
Y=np.array([4,-7])
#w=(X**-1)Y
result=np.dot(X_inv,Y)
print(result)
#Y=Xw
result_y=np.dot(X,result)
print(result_y) | 14.761905 | 35 | 0.63871 | 1 | 0.7866 | [
0.0008973926305770874,
0.020963534712791443,
0.0075376625172793865,
0.003016433911398053,
0.005461006425321102,
-0.0017257628496736288,
-0.008767158724367619,
0.00248546851798892,
-0.004997250624001026,
0.0030257385224103928,
0.000675210147164762,
0.003839308163151145,
0.006896201055496931,
... |
033abf5e8250b0746a37f8b779c20ccb2929c825 | 4,385 | py | Python | dglib/modules/sampler.py | billzhonggz/Transfer-Learning-Library | d7a6e4298e571d5101e05515a2ab1f171160ef89 | [
"MIT"
] | 1,474 | 2020-07-24T02:55:55.000Z | 2022-03-31T12:35:56.000Z | dglib/modules/sampler.py | mxliu/Transfer-Learning-Library | 7b0ccb3a8087ecc65daf4b1e815e5a3f42106641 | [
"MIT"
] | 70 | 2020-08-05T10:47:33.000Z | 2022-03-31T03:48:54.000Z | dglib/modules/sampler.py | mxliu/Transfer-Learning-Library | 7b0ccb3a8087ecc65daf4b1e815e5a3f42106641 | [
"MIT"
] | 312 | 2020-08-01T11:08:39.000Z | 2022-03-30T06:03:47.000Z | """
@author: Baixu Chen
@contact: cbx_99_hasta@outlook.com
"""
import random
import copy
import numpy as np
from torch.utils.data.dataset import ConcatDataset
from torch.utils.data.sampler import Sampler
class DefaultSampler(Sampler):
r"""Traverse all :math:`N` domains, randomly select :math:`K` samples in each d... | 38.464912 | 120 | 0.65496 | 0 | 0 | [
-0.011361809447407722,
0.01448221318423748,
0.007392380852252245,
-0.007060155272483826,
-0.004377584904432297,
-0.0018034703098237514,
0.0011714731808751822,
-0.023805711418390274,
-0.015850650146603584,
0.005654539447277784,
-0.00171373481862247,
0.003642139257863164,
0.04233291372656822,
... |
033b815efd46e0d1a664d3f11c268118691a5667 | 315 | py | Python | wol/views/pages.py | JleMyP/wol | 02693fe79df1628e9fa773bd677bf79114fd4868 | [
"WTFPL"
] | null | null | null | wol/views/pages.py | JleMyP/wol | 02693fe79df1628e9fa773bd677bf79114fd4868 | [
"WTFPL"
] | 1 | 2021-05-09T02:52:10.000Z | 2021-05-09T03:35:07.000Z | wol/views/pages.py | JleMyP/wol | 02693fe79df1628e9fa773bd677bf79114fd4868 | [
"WTFPL"
] | null | null | null | from flask import Blueprint, render_template
from ..logic.crud import get_all_targets
pages = Blueprint('web', __name__, template_folder='../templates')
@pages.route('/targets/', methods=['GET'])
def get_web_targets():
targets = get_all_targets()
return render_template('targets.html', targets=targets)
| 26.25 | 66 | 0.746032 | 1 | 0.7191 | [
0.004546806216239929,
0.025280067697167397,
0.009525497443974018,
0.0013771691592410207,
0.005442528054118156,
-0.002621500054374337,
-0.012901748530566692,
0.0013530062278732657,
-0.007928340695798397,
0.0004626919107977301,
0.0040402705781161785,
0.003438034560531378,
0.008505916222929955,... |
033d57641b58c038ae7cadfa710f0a8d215d7cc3 | 8,374 | py | Python | orderportal/designs.py | NationalGenomicsInfrastructure/OrderPortal | dc553f499c29dab61fd66622588bb058ee2d8d1f | [
"MIT"
] | 4 | 2018-06-18T15:23:36.000Z | 2022-03-09T09:23:26.000Z | orderportal/designs.py | pekrau/OrderPortal | c331d1e387a7de2a3d8235394e628278ee7313e6 | [
"MIT"
] | 876 | 2015-01-12T15:16:58.000Z | 2022-02-28T12:46:31.000Z | orderportal/designs.py | pekrau/OrderPortal | c331d1e387a7de2a3d8235394e628278ee7313e6 | [
"MIT"
] | 11 | 2015-01-13T14:19:56.000Z | 2022-03-10T13:14:31.000Z | "CouchDB design documents (view index definitions)."
import json
import logging
import couchdb2
from . import constants
from . import settings
DESIGNS = dict(
account=dict(
all=dict(reduce="_count", # account/all
map=
"""function(doc) {
if (doc.orderportal_doctype !== 'account') re... | 30.562044 | 82 | 0.57989 | 1 | 2.1846 | [
-0.03310517594218254,
0.030171362683176994,
-0.0064744893461465836,
-0.012359291315078735,
0.0078471964225173,
-0.0244204793125391,
-0.022037183865904808,
-0.002343585714697838,
-0.016230717301368713,
0.02125389128923416,
0.03645152971148491,
0.02970973029732704,
0.013555963523685932,
0.00... |
033ea47fa2e5daf9936636fbdb0490a19908fa20 | 604 | py | Python | foxylib/tools/socialmedia/naver/foxylib_naver.py | foxytrixy-com/foxylib | 94b8c5b9f8b12423393c68f7d9f910258840ed18 | [
"BSD-3-Clause"
] | null | null | null | foxylib/tools/socialmedia/naver/foxylib_naver.py | foxytrixy-com/foxylib | 94b8c5b9f8b12423393c68f7d9f910258840ed18 | [
"BSD-3-Clause"
] | 3 | 2019-12-12T05:17:44.000Z | 2022-03-11T23:40:50.000Z | foxylib/tools/socialmedia/naver/foxylib_naver.py | foxytrixy-com/foxylib | 94b8c5b9f8b12423393c68f7d9f910258840ed18 | [
"BSD-3-Clause"
] | 2 | 2019-10-16T17:39:34.000Z | 2020-02-10T06:32:08.000Z | import os
from functools import lru_cache
from foxylib.tools.function.function_tool import FunctionTool
class FoxylibNaver:
@classmethod
@FunctionTool.wrapper2wraps_applied(lru_cache(maxsize=1))
def client_id(cls):
return os.environ.get("NAVER_APP_ID")
@classmethod
@FunctionTool.wrapper2... | 27.454545 | 61 | 0.751656 | 1 | 0.8556 | [
0.0009897147538140416,
0.02387942187488079,
0.007949024438858032,
0.0012593980645760894,
0.004585653077811003,
-0.0015210021520033479,
-0.010092458687722683,
0.003238976001739502,
-0.0076160733588039875,
0.0034030687529593706,
0.0028347130864858627,
0.006848235614597797,
0.006795482244342565... |
033eee1601ff228fa065e21c10453e0401992b25 | 8,388 | py | Python | ensembl/datacheck/client.py | danstaines/ensembl-prodinf | 65c51ac7f2dd4fe12b051f417ca252979916798b | [
"Apache-2.0"
] | null | null | null | ensembl/datacheck/client.py | danstaines/ensembl-prodinf | 65c51ac7f2dd4fe12b051f417ca252979916798b | [
"Apache-2.0"
] | null | null | null | ensembl/datacheck/client.py | danstaines/ensembl-prodinf | 65c51ac7f2dd4fe12b051f417ca252979916798b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import argparse
import logging
import json
import re
from collections import defaultdict
from ensembl.rest_client import RestClient
from ensembl.server_utils import assert_mysql_uri, assert_mysql_db_uri
class DatacheckClient(RestClient):
"""Client for checking databases using the datacheck s... | 43.46114 | 112 | 0.602408 | 1 | 1.8801 | [
0.0001882203941931948,
0.02870865724980831,
-0.005749906878918409,
0.01906272955238819,
-0.02582288160920143,
0.0050569926388561726,
-0.04189238324761391,
-0.019843043759465218,
-0.02169979363679886,
0.022936847060918808,
0.03786042332649231,
-0.027818376198410988,
0.027424659579992294,
-0... |
034052e3e3d54baafeafaa4d2da6b4e8c641a704 | 3,867 | py | Python | osvc_python/osvc_python_connect.py | rajangdavis/osc_python | c67000d4df246764b0125a06734c926a23952693 | [
"MIT"
] | 7 | 2018-06-27T06:42:45.000Z | 2021-04-13T00:43:17.000Z | osvc_python/osvc_python_connect.py | rajangdavis/osc_python | c67000d4df246764b0125a06734c926a23952693 | [
"MIT"
] | 1 | 2018-05-27T09:38:37.000Z | 2018-05-27T09:38:37.000Z | osvc_python/osvc_python_connect.py | rajangdavis/osc_python | c67000d4df246764b0125a06734c926a23952693 | [
"MIT"
] | 1 | 2018-05-27T09:37:22.000Z | 2018-05-27T09:37:22.000Z | import requests
import json
from .osvc_python_file_handling import OSvCPythonFileHandler
from .osvc_python_config import OSvCPythonConfig
from .osvc_python_validations import OSvCPythonValidations
from .osvc_python_examples import CLIENT_NOT_DEFINED,CLIENT_NO_INTERFACE_SET_EXAMPLE,CLIENT_NO_USERNAME_SET_EXAMPLE,CLIENT_... | 37.182692 | 146 | 0.74347 | 1 | 2.0616 | [
-0.001826999126933515,
0.05848526954650879,
0.008274532854557037,
0.004082915838807821,
-0.005915376357734203,
0.03148883208632469,
-0.03829006850719452,
-0.0003544295614119619,
-0.027698766440153122,
0.004264118615537882,
-0.005592812318354845,
-0.003947930876165628,
0.0312083400785923,
-... |
03409362f0901598af4e50547a849c03202fac91 | 2,263 | py | Python | mes_examples/example_remeshing.py | Anthys/slam | 30605301b5c1eee2d7093e2343ffb9e3a99af1d7 | [
"MIT"
] | null | null | null | mes_examples/example_remeshing.py | Anthys/slam | 30605301b5c1eee2d7093e2343ffb9e3a99af1d7 | [
"MIT"
] | null | null | null | mes_examples/example_remeshing.py | Anthys/slam | 30605301b5c1eee2d7093e2343ffb9e3a99af1d7 | [
"MIT"
] | null | null | null | """
.. _example_remeshing:
===================================
Remeshing example in slam
===================================
"""
# Authors: Julien Barrès <julien.barres@etu.univ-amu.fr>
# License: BSD (3-clause)
# sphinx_gallery_thumbnail_number = 2
#################################################################... | 39.701754 | 79 | 0.541759 | 1 | 1.2441 | [
0.0016362202586606145,
0.024536075070500374,
0.009591961279511452,
-0.0017011930467560887,
0.005683824419975281,
-0.0017387833213433623,
-0.009309741668403149,
0.0016808855580165982,
-0.006341345142573118,
0.0019340533763170242,
0.00405483553186059,
0.0033421667758375406,
0.00882307998836040... |
03426266f83765606d5f857e286527434a18490d | 2,812 | py | Python | st2common/tests/unit/test_internal_trigger_types_registrar.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2020-11-21T10:11:25.000Z | 2020-11-21T10:11:25.000Z | st2common/tests/unit/test_internal_trigger_types_registrar.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2015-06-08T15:27:11.000Z | 2015-06-08T15:27:11.000Z | st2common/tests/unit/test_internal_trigger_types_registrar.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the 'License'); you may not use th... | 38 | 87 | 0.726885 | 1 | 1.5411 | [
0.0015059257857501507,
0.02167697250843048,
0.008355759084224701,
0.0039685931988060474,
0.003782032523304224,
-0.0007782227476127446,
-0.006653203163295984,
0.0007116753840819001,
-0.006824234500527382,
0.004024192690849304,
0.0033586060162633657,
0.00458380626514554,
0.004781616386026144,
... |
034307386c24988a91f1bd8dccaf719175b5c671 | 217 | py | Python | pypay/interfaces/PayInterface.py | huangxingx/pypay | 4f854554f14593c060d13dc00dfc894f24e60a2c | [
"MIT"
] | 1 | 2019-05-28T09:04:34.000Z | 2019-05-28T09:04:34.000Z | pypay/interfaces/PayInterface.py | huangxingx/pypay | 4f854554f14593c060d13dc00dfc894f24e60a2c | [
"MIT"
] | null | null | null | pypay/interfaces/PayInterface.py | huangxingx/pypay | 4f854554f14593c060d13dc00dfc894f24e60a2c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @author: x.huang
# @date:29/05/19
import abc
class PayInterface(metaclass=abc.ABCMeta):
@abc.abstractmethod
def pay(self, endpoint, payload):
pass
| 13.5625 | 42 | 0.635945 | 1 | 0.7176 | [
0.0025895729195326567,
0.023754669353365898,
0.008220665156841278,
0.002962194150313735,
0.006259624846279621,
-0.0019342928426340222,
-0.006941033061593771,
0.0036839109379798174,
-0.005330020096153021,
0.0005818965146318078,
-0.0001683868031250313,
0.00541449012234807,
0.008229782804846764... |
03451faab6c85709efd9d9c1e734436d39041762 | 29,735 | py | Python | sb3.py | monoclecat/SPFlow | 3acd8683f05cf1d850fe7d0ebb4e24496050adb4 | [
"Apache-2.0"
] | null | null | null | sb3.py | monoclecat/SPFlow | 3acd8683f05cf1d850fe7d0ebb4e24496050adb4 | [
"Apache-2.0"
] | null | null | null | sb3.py | monoclecat/SPFlow | 3acd8683f05cf1d850fe7d0ebb4e24496050adb4 | [
"Apache-2.0"
] | null | null | null | import stable_baselines3 as sb3
import gym
from stable_baselines3.sac.policies import SACPolicy
from stable_baselines3.sac.sac import SAC
from stable_baselines3.common.utils import polyak_update
from stable_baselines3.common.policies import BasePolicy, register_policy, ContinuousCritic, BaseModel
from stable_baselines3... | 43.727941 | 116 | 0.643383 | 1 | 2.0226 | [
-0.030852971598505974,
0.060818612575531006,
-0.005519746337085962,
0.01802670769393444,
-0.049311403185129166,
0.0021322586107999086,
-0.01401250809431076,
-0.022944223135709763,
0.01176503673195839,
-0.0005829787696711719,
-0.02572675608098507,
0.016343045979738235,
0.002110015135258436,
... |
0345f4f2923bee611d9743fd90090f87573648f8 | 5,914 | py | Python | src/integral_timber_joints/process/compute_process_assembly_tools.py | gramaziokohler/integral_timber_joints | 70e75a66e13b5ada580fcffc58879f5fcb8fce32 | [
"MIT"
] | 3 | 2021-09-16T13:08:32.000Z | 2022-02-21T17:20:21.000Z | src/integral_timber_joints/process/compute_process_assembly_tools.py | gramaziokohler/integral_timber_joints | 70e75a66e13b5ada580fcffc58879f5fcb8fce32 | [
"MIT"
] | 80 | 2021-09-06T09:55:38.000Z | 2022-03-22T18:44:24.000Z | src/integral_timber_joints/process/compute_process_assembly_tools.py | gramaziokohler/integral_timber_joints | 70e75a66e13b5ada580fcffc58879f5fcb8fce32 | [
"MIT"
] | null | null | null | try:
from typing import Dict, List, Optional, Tuple
from integral_timber_joints.process import RFLPathPlanner, RobotClampAssemblyProcess
except:
pass
import itertools
from copy import deepcopy
from compas.geometry import Frame
from integral_timber_joints.assembly import Assembly, BeamAssemblyMethod
from ... | 43.485294 | 168 | 0.723537 | 1 | 1.9641 | [
-0.03921692818403244,
0.015781143680214882,
-0.02136007510125637,
0.061018507927656174,
-0.022867567837238312,
-0.013827529735863209,
-0.007213466335088015,
0.0171644426882267,
-0.022165091708302498,
0.01533079706132412,
0.01599944941699505,
0.012806861661374569,
0.02614452689886093,
0.021... |
0346123d4e8b36b1a22364f3527038880f8016ac | 231 | py | Python | src/apis/image/image/restoration.py | theunifai/unifai-apis-core | 1f2a9051c1e3df1bd19a96f22e4a07767ef3973a | [
"MIT"
] | 2 | 2021-11-09T07:18:06.000Z | 2022-01-04T19:37:17.000Z | src/apis/image/image/restoration.py | theunifai/unifai-apis-core | 1f2a9051c1e3df1bd19a96f22e4a07767ef3973a | [
"MIT"
] | 4 | 2021-11-04T08:28:59.000Z | 2021-11-07T05:59:59.000Z | src/apis/image/image/restoration.py | theunifai/unifai-apis-core | 1f2a9051c1e3df1bd19a96f22e4a07767ef3973a | [
"MIT"
] | 1 | 2022-01-07T09:12:22.000Z | 2022-01-07T09:12:22.000Z | from fastapi import APIRouter
from gladia_api_utils.submodules import TaskRouter
router = APIRouter()
TaskRouter(
router=router,
input="image",
output="image",
default_model="bringing-old-photos-back-to-life",
)
| 17.769231 | 53 | 0.735931 | 1 | 0.7011 | [
0.003569961991161108,
0.022919563576579094,
0.012700212188065052,
0.00046866582124494016,
0.0037161523941904306,
-0.004324329551309347,
-0.010959233157336712,
0.002890590578317642,
-0.006396528799086809,
-0.0016382442554458976,
0.0028096139430999756,
0.002849587704986334,
0.00911199674010276... |
03472bc113607c9cce24676674e3bde57eee28aa | 435 | py | Python | path.py | jihuacao/Putil | b753fc94bea4cbda00f483681c55f0e9f54adef2 | [
"Apache-2.0"
] | 1 | 2018-12-09T06:09:29.000Z | 2018-12-09T06:09:29.000Z | path.py | jihuacao/Putil | b753fc94bea4cbda00f483681c55f0e9f54adef2 | [
"Apache-2.0"
] | null | null | null | path.py | jihuacao/Putil | b753fc94bea4cbda00f483681c55f0e9f54adef2 | [
"Apache-2.0"
] | null | null | null | import os
def touch_dir(wanted_dir):
not_exist_collection = []
while os.path.exists(wanted_dir) is not True and wanted_dir != '':
wanted_dir, step = os.path.split(wanted_dir)
not_exist_collection.append(step)
pass
while len(not_exist_collection) != 0:
step = not_exist_coll... | 27.1875 | 70 | 0.650575 | 1 | 0.7701 | [
0.0013691543135792017,
0.024740858003497124,
0.010046612471342087,
-0.00005116066677146591,
0.005044810939580202,
-0.00419901218265295,
-0.012650125660002232,
0.001631164806894958,
-0.0076811728067696095,
0.0038958811201155186,
0.0006798013928346336,
0.005330745596438646,
0.00910519994795322... |
0347d78cdbcf07e87eb4636ff1c0bcb164181fcc | 3,393 | py | Python | views/views_users.py | SideShowBoBGOT/EPAM-project | f96ce88c81a8c075daafc6f37b4df47186395320 | [
"Unlicense"
] | 1 | 2021-12-04T21:46:12.000Z | 2021-12-04T21:46:12.000Z | views/views_users.py | SideShowBoBGOT/EPAM-project | f96ce88c81a8c075daafc6f37b4df47186395320 | [
"Unlicense"
] | null | null | null | views/views_users.py | SideShowBoBGOT/EPAM-project | f96ce88c81a8c075daafc6f37b4df47186395320 | [
"Unlicense"
] | null | null | null | """
Module contains all functions working on users page.
Functions:
users_page()
edit_user(id)
delete_user(id)
check_session()
"""
import os
import sys
import urllib.parse
from flask_login import login_user, login_required
from flask import render_template, request, redirect, Blueprint, session
sys.pa... | 35.715789 | 126 | 0.639257 | 1 | 1.7991 | [
0.0020523506682366133,
0.023303695023059845,
0.008223021402955055,
0.0026374508161097765,
0.004136141389608383,
-0.000998715520836413,
-0.009460262954235077,
0.0026462064124643803,
-0.007460854947566986,
0.003692686790600419,
0.0037697849329560995,
0.005669439677149057,
0.0062126158736646175... |
0348b3151492f1bf80185687c781237ee59205a5 | 1,722 | py | Python | polls/migrations/0001_initial.py | zzZ5/compost | 00cc2cbc74df6626e07072c8c1e638ffd9bac8f1 | [
"MIT"
] | 1 | 2020-11-28T00:06:06.000Z | 2020-11-28T00:06:06.000Z | polls/migrations/0001_initial.py | zzZ5/compost | 00cc2cbc74df6626e07072c8c1e638ffd9bac8f1 | [
"MIT"
] | null | null | null | polls/migrations/0001_initial.py | zzZ5/compost | 00cc2cbc74df6626e07072c8c1e638ffd9bac8f1 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-11-23 11:30
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('account', '0003_confirmstring'),
]
operations = [
migrations.CreateModel(
n... | 35.875 | 116 | 0.542973 | 1 | 1.1076 | [
0.001657217857427895,
0.02420753426849842,
0.008188731037080288,
0.0028818584978580475,
0.0042692977003753185,
-0.00413945596665144,
-0.010573682375252247,
0.003453819779679179,
-0.00845385529100895,
0.004092347342520952,
0.004491850733757019,
0.006518353708088398,
0.006531968712806702,
-0... |
0348d60d31e7478967314ca6fb318726da997b7d | 2,644 | py | Python | models/python/hypothalamus/dynamical/miro_experiments/recurrent_3_mot.py | ABRG-Models/MammalBot | 0b153232b94197c7a65156c1c3451ab2b9f725ae | [
"MIT"
] | null | null | null | models/python/hypothalamus/dynamical/miro_experiments/recurrent_3_mot.py | ABRG-Models/MammalBot | 0b153232b94197c7a65156c1c3451ab2b9f725ae | [
"MIT"
] | null | null | null | models/python/hypothalamus/dynamical/miro_experiments/recurrent_3_mot.py | ABRG-Models/MammalBot | 0b153232b94197c7a65156c1c3451ab2b9f725ae | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
N = 100
T = 20000
# nonlinearilties
qg= 0.950997659088
xg= 26.594968159566278
bg= 0.2818239551304378
A= 3.5505937843746906
qf= 0.8274882807912485
xf= 26.594968159566278
bf= 0.2818239551304378
# Presynaptic nonlinearity
def f(x):
return 0.5*(2*qf-1.+np.tanh(bf*(x... | 22.793103 | 109 | 0.541982 | 1 | 2.3421 | [
-0.022046800702810287,
0.011258496902883053,
0.027721522375941277,
0.007446809206157923,
-0.020137088373303413,
-0.0030727561097592115,
-0.023532887920737267,
-0.01097644679248333,
0.000880375097040087,
-0.006842015776783228,
-0.003218889469280839,
0.005716548766940832,
0.04707293584942818,
... |
034a4644f850ec4608521c4cd8964398f1f171f6 | 7,094 | py | Python | laceworksdk/api/v2/vulnerability_policies.py | alannix-lw/python-sdk | 2f4f189de6aa5e6a2cfd27314d69d8a27814d6c0 | [
"MIT"
] | 2 | 2020-09-08T20:42:05.000Z | 2020-09-09T14:27:55.000Z | laceworksdk/api/v2/vulnerability_policies.py | alannix-lw/lacework-python-sdk | 2f4f189de6aa5e6a2cfd27314d69d8a27814d6c0 | [
"MIT"
] | null | null | null | laceworksdk/api/v2/vulnerability_policies.py | alannix-lw/lacework-python-sdk | 2f4f189de6aa5e6a2cfd27314d69d8a27814d6c0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Lacework VulnerabilityPolicies API wrapper.
"""
from laceworksdk.api.crud_endpoint import CrudEndpoint
class VulnerabilityPoliciesAPI(CrudEndpoint):
def __init__(self, session):
"""
Initializes the VulnerabilityPoliciesAPI object.
:param session: An instance ... | 38.765027 | 104 | 0.591063 | 1 | 1.7571 | [
-0.06470642238855362,
0.07488406449556351,
0.01638295315206051,
0.027381354942917824,
-0.0062132845632731915,
0.0022435251157730818,
-0.01939959079027176,
0.009013482369482517,
0.00472397543489933,
0.030918678268790245,
0.047873906791210175,
0.0052536833100020885,
0.02271987684071064,
-0.0... |
034b34fdf1049f91f02d84b8a1eb633f22e1bc51 | 2,044 | py | Python | fabfile.py | clemsos/fabric-node-deploy | 496ea7373db4303d41c9da9b0d5bee9c76fdfc94 | [
"CC0-1.0"
] | null | null | null | fabfile.py | clemsos/fabric-node-deploy | 496ea7373db4303d41c9da9b0d5bee9c76fdfc94 | [
"CC0-1.0"
] | null | null | null | fabfile.py | clemsos/fabric-node-deploy | 496ea7373db4303d41c9da9b0d5bee9c76fdfc94 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from fabric.api import *
from fabric.contrib import files
import os
from settings import *
# create
RUN_DIR=os.path.join(HOME_DIR, "run")
LOG_DIR=os.path.join(HOME_DIR, "log")
REMOTE_REPO_DIR = os.path.join(HOME_DIR, APP_NAME)
OUT_LOG_FILE = os.path.join(LOG_DIR, 'out.lo... | 25.55 | 128 | 0.624266 | 1 | 1.4226 | [
0.002357879653573036,
0.02431575395166874,
0.007906084880232811,
0.0007225283188745379,
0.0032466419506818056,
-0.00020048771693836898,
-0.008076783269643784,
0.00014896458014845848,
-0.008005172945559025,
0.0035063279792666435,
0.0014237486757338047,
0.007313253358006477,
0.0053446274250745... |
034b5a11a5878a75f302c173807ce0e05e487714 | 23,482 | py | Python | fhir/resources/STU3/tests/test_contract.py | mmabey/fhir.resources | cc73718e9762c04726cd7de240c8f2dd5313cbe1 | [
"BSD-3-Clause"
] | null | null | null | fhir/resources/STU3/tests/test_contract.py | mmabey/fhir.resources | cc73718e9762c04726cd7de240c8f2dd5313cbe1 | [
"BSD-3-Clause"
] | null | null | null | fhir/resources/STU3/tests/test_contract.py | mmabey/fhir.resources | cc73718e9762c04726cd7de240c8f2dd5313cbe1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Profile: http://hl7.org/fhir/StructureDefinition/Contract
Release: STU3
Version: 3.0.2
Revision: 11917
Last updated: 2019-10-24T11:53:00+11:00
"""
import io
import json
import os
import unittest
import pytest
from .. import contract
from ..fhirdate import FHIRDate
from .fixtures import fo... | 41.052448 | 115 | 0.609744 | 1 | 1.9971 | [
-0.025946009904146194,
0.040791794657707214,
0.025345249101519585,
-0.01382528431713581,
0.007602368481457233,
-0.011936739087104797,
-0.010668152943253517,
-0.0017004432156682014,
-0.03463348001241684,
0.06528116017580032,
0.0021229241974651814,
-0.015762487426400185,
0.018584713339805603,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.