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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d3b867a84b7ec1498b9439163f4796d0f8570319 | 2a71a577dd2a4f235a70b6e54cdfff9c38764081 | /code_extractors/modscan.py | b3a7ce44f1a7236929d33aa407e0392c9af32171 | [
"MIT"
] | permissive | mkorman90/VolatilityBot | 0ad8ca9f50196b1f92616de7e8b739745bf9deda | b31ef29e42fa820d2e1afc99e9e7c318174bb591 | refs/heads/master | 2021-06-19T13:13:37.347055 | 2021-06-15T05:31:06 | 2021-06-15T05:31:06 | 30,304,847 | 275 | 64 | null | 2021-06-15T05:31:06 | 2015-02-04T15:13:46 | Python | UTF-8 | Python | false | false | 3,406 | py | modscan.py | import json
import logging
import os
from conf.config import VOLATILITYBOT_HOME
from lib.common.pe_utils import get_strings
from lib.common.utils import get_workdir_path, calc_md5, calc_sha256, calc_ephash, calc_imphash
from lib.core.database import DataBaseConnection
from lib.core.memory_utils import execute_volatili... |
ee317f71905c0cce5d0b259a5a529f0e68ce0943 | 6f1034b17b49f373a41ecf3a5a8923fb4948992b | /pychron/spectrometer/base_detector.py | 01e6f1c38e0526f13c45d3dc9fedb48c239756be | [
"Apache-2.0"
] | permissive | NMGRL/pychron | a6ec1854488e74eb5d3ff53eee8537ecf98a6e2f | 8cfc8085393ace2aee6b98d36bfd6fba0bcb41c6 | refs/heads/main | 2023-08-30T07:00:34.121528 | 2023-06-12T17:43:25 | 2023-06-12T17:43:25 | 14,438,041 | 38 | 28 | Apache-2.0 | 2023-08-09T22:47:17 | 2013-11-15T23:46:10 | Python | UTF-8 | Python | false | false | 3,242 | py | base_detector.py | # ===============================================================================
# Copyright 2016 Jake Ross
#
# 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... |
0c19a1b4b22c98941273c4a65c5bdabc6bb7c135 | 12c13b82d683189442b71a9c64bf3a451a7dc8b3 | /satellite/db/migrations/env.py | f40d84fe85380e0024864bd943be3a1bb2ab6fa2 | [
"Apache-2.0"
] | permissive | aslepakurov/vgs-satellite | baad5cfef67d2505dd518e5f7874bfd289347a2a | fd4b72127058e6a89456a3f7fbed80a1d3bfd217 | refs/heads/master | 2022-10-26T21:47:35.465019 | 2022-09-08T15:55:16 | 2022-09-08T15:55:16 | 249,564,624 | 0 | 0 | null | 2020-03-23T23:12:43 | 2020-03-23T23:12:43 | null | UTF-8 | Python | false | false | 783 | py | env.py | from logging.config import fileConfig
from alembic import context
from satellite import db
from satellite.config import configure as sat_configure
from satellite.db.models import Base
alembic_cfg = context.config
engine = db.get_engine()
if engine is None:
sat_config = sat_configure()
db.configure(sat_conf... |
e41d4c5095db347ee7fa48c705dd4017306fea3e | e224a8680496757bfaad411181062a81ca1824a2 | /FizzBuzz.py | fe2b3e1eac03022b5a47b5bd211670a695a68961 | [] | no_license | Tech-Learner07/DS-Algo | ab9329cf2212363b83b4f086f56c7a65b33c9fe2 | d92694040dedfa903afc3b1637c7a1969decd57b | refs/heads/main | 2023-02-24T11:20:00.344056 | 2021-02-02T11:33:19 | 2021-02-02T11:33:19 | 334,334,675 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 712 | py | FizzBuzz.py | '''
Question:
Write a program to print numbers from 1 to 100.
For the multiples of 3 print 'Fizz', for the
multiples of 5 print 'Buzz' and both multiples
3 & 5 print 'FizzBuzz'.
Key:
Knowing the modulo(%) operator that is
if n % 5 == 0
if n % 3 == 0
if n % 3 and n % 5 == 0
Solution:
'''
def fizzBuzz():
# prin... |
5e8666f09a92c31e0fa9f1e2ed2efdf12d79da4e | 83964e7fb41ee62e3084eef5d3deef07eecdd93e | /scripts/simulation/iterative_phase_estimation_qchem.py | f52ce54b63966956576d88a043b9b8b3995bfa1d | [
"BSD-2-Clause"
] | permissive | pbb59/ScaffCC | e0bee9e5b16a6f145224ad6b0b6eb32adb026f95 | 7d28d310063d147930ec4705aa5ebdf94ea8e924 | refs/heads/master | 2020-09-23T04:43:54.059923 | 2019-12-19T03:59:22 | 2019-12-19T03:59:22 | 225,405,289 | 0 | 1 | BSD-2-Clause | 2019-12-02T15:17:37 | 2019-12-02T15:17:36 | null | UTF-8 | Python | false | false | 1,464 | py | iterative_phase_estimation_qchem.py | #!/usr/bin/env python
import sys
import re
from subprocess import check_output
upper_sz = 6
estimate = 0
for iteration in range(0, upper_sz):
with open(sys.argv[1]) as infile, open(sys.argv[1]+'.ipe', 'w') as outfile:
for line in infile:
if "#define _upper_sz" in line:
line =... |
50e5d748098ee0a4cca2d3ab0045dc4c61ce4e52 | ed15e441d4cd7a54d989610b8070a5d14bfda4c8 | /git/3/5.py | 47e303b932b49c7de74715b0821d154d8df539f0 | [] | no_license | jmh9876/p1804_jmh | 24593af521749913b65685e21ffc37281c43998f | a52a6366c21ad7598e71d8e82aeee746ecee7c6b | refs/heads/master | 2020-03-15T23:30:02.769818 | 2018-08-02T09:10:20 | 2018-08-02T09:10:20 | 132,395,104 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 385 | py | 5.py | '''
1=剪刀
2=石头
3=布
'''
import random
while True:
吕布=int(input('请出拳:'))
貂蝉=random.randint(1,3)
print('吕布出%d'% 吕布)
print('貂蝉出%d'% 貂蝉)
if (吕布==1 and 貂蝉==2) or (吕布==2 and 貂蝉==3) or (吕布==3 and 貂蝉==1):
print('胜')
elif 吕布==貂蝉:
print('平局')
else:
print('输')
|
b0ff452a651a639dae5096011fa1d8930948071b | e5a20362b2f9b17055cb95d56dc8dea2059205fb | /g_prep/one_or_zero_edit_away.py | e09b229de4d22a4fe50c32276603f29e46e414bd | [] | no_license | uchenna-j-edeh/dailly_problems | 0c97d1ab3c91756abf625a04e3bb6e0cd6e3405c | 7bd47232704297851f8acdd9331f90da96c732af | refs/heads/master | 2023-08-17T12:27:00.640834 | 2023-08-07T17:03:00 | 2023-08-07T17:03:00 | 158,981,409 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,509 | py | one_or_zero_edit_away.py | """
There are three types of edits that can be performed on strings: insert a character, remove a character, or replace a character. Given two strings, write a function to check if they are one edit (or zero edits) away.
EXAMPLE
pale, ple true pales, pale -> true pale, bale -> true pale, bae -> false
"""
def replace_st... |
e9dc736b902309b7924871d050f26daeab930c36 | 3cd6cfba3b3505bd340d3a26a7b6d362c8621c08 | /software-eng-concepts/tests/test_firststeps.py | cc2da80ff59f5de74b98b4af71f4ab81a3cb39bc | [] | no_license | blackmamba22/python | 24a989363ebb68f9441007c796c0877d48556687 | 0b6b891ae2bc20521c27b008d007f69ea0664465 | refs/heads/master | 2020-12-24T06:19:03.950656 | 2016-07-25T20:04:45 | 2016-07-25T20:04:45 | 25,401,614 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,448 | py | test_firststeps.py | import sys
from os import path
sys.path.append( path.dirname( path.dirname( path.abspath(__file__) ) ) )
import unittest
from projects.FirstSteps import FirstSteps as fs
class RichterScaleTestCase(unittest.TestCase):
"""Tests for richter_scale()"""
def test_richter_known_values(self):
"""Tests alread... |
9312ed1578d232dbd75306d3960e81fe59a97bec | efa63ba2dff172210cd987029bbeed9692077adc | /ecs_cluster_deployer/lambdas/cleanup/cleanup.py | b8b3aafdb15e1cfc53f939188f20f81c59c2e97b | [
"MIT"
] | permissive | eugenestarchenko/ecs-cluster-deployer | 9564b5f073f6c3d619a27ef360366329347e7ef6 | 3c2e10e9ee55ff4592404e24e74a623bb0993688 | refs/heads/master | 2022-04-12T12:18:12.894764 | 2020-04-04T16:37:24 | 2020-04-04T16:37:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 438 | py | cleanup.py | """
This function will remove the stack from the event that has been sent.
"""
import logging
import boto3
logger = logging.getLogger()
logging.basicConfig()
logger.setLevel(logging.INFO)
def lambda_handler(event, context): #pylint: disable=W0613
"""
Lambda handler
"""
logger.info(event)
cf = boto... |
5266af39051bfa4360f0ab19720c6136d8f73db2 | 8af1b52aa558e1d1ccd61cf0e7a1d5b32c1ec7e8 | /basicPythonProgram/pythonShell.py | 5fd1dad1ec51c8eccb0ecc546aa7609289800c43 | [] | no_license | sandeepraj786/Fellowship_Python_Program | fa1f7662c3694228b6dd91d1e2480ddb522232c4 | d1e77fc3fb95c9b8cdbbf5c64a1d5883073e63de | refs/heads/master | 2023-02-11T06:29:06.715914 | 2021-01-17T11:52:29 | 2021-01-17T11:52:29 | 309,307,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 295 | py | pythonShell.py | """
author - sandeep raj
date - 04/11/2020
time - 22:43
problem statement -"Write a Python program to determine whether a Python shell is executing in 32bit or 64bit mode on OS?."
"""
# For 32 bit it will return 32 and for 64 bit it will return 64
import struct
print(struct.calcsize("P") * 8) |
1a26aaddba08f2400577bb32a14e71708e0074d4 | 107377f7caa6326c98ae9767997c14931eb24d53 | /Codes/Python_Ejercicios/Intro/mi_segundo_script_G3.py | 3c651c65c50efac23aa4139e9c67f6ea56483399 | [
"Apache-2.0"
] | permissive | SherylA/Fundamentos | 1b0c00d6025ae835a47b3002a92491f17a2c767f | 234e1c783c28fd9dc249f4e602681d88c6e09f52 | refs/heads/master | 2021-07-05T21:23:56.910866 | 2020-07-28T19:07:48 | 2020-07-28T19:07:48 | 142,626,434 | 0 | 0 | null | 2019-08-15T15:10:10 | 2018-07-27T21:50:07 | Jupyter Notebook | UTF-8 | Python | false | false | 678 | py | mi_segundo_script_G3.py | password = input("Ingrese la contraseña: ")
other_char = not password.isalnum()
print("¿Tiene espacios u otro carácter? " ,other_char)
is_len_more_8 = len(password)>=8
print("¿Tiene más de 8 caracteres?", is_len_more_8)
# 1 --> sea num + letras
# 2 --> no sea sólo num (num no tienen minus)
# 3 --> no todas sean m... |
50725b230cd3c0730d21f66621bc94b9858f2453 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /e3KZvJbSXeHXtJA7c_23.py | 1153d00fa841d3ed4606be500257b41efd98496d | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 100 | py | e3KZvJbSXeHXtJA7c_23.py |
def sum_missing_numbers(lst):
return sum(i for i in range(min(lst),max(lst),1) if i not in lst)
|
b30340b21953a07535396e00f619350fb4589300 | 34496d03aad6aabd01957b833314247641eb8a95 | /test_product_page.py | 0d75d556b6af01e38f2a3b0de40943529b16b788 | [] | no_license | EllenSshi/stepik_final_project | cf2e1e376cea48e7581ec827b403435d2238f7c1 | 570ecd17fdb7c54ac55f29c5cf9be9433313e335 | refs/heads/master | 2021-06-18T15:49:13.674595 | 2019-10-24T13:38:22 | 2019-10-24T13:38:22 | 216,750,106 | 0 | 0 | null | 2021-06-02T00:34:33 | 2019-10-22T07:28:28 | Python | UTF-8 | Python | false | false | 3,831 | py | test_product_page.py | from .pages.product_page import ProductPage
from .pages.basket_page import BasketPage
from .pages.login_page import LoginPage
import pytest
import time
@pytest.mark.test_user
class TestUserAddToBasketFromProductPage:
@pytest.fixture(scope="function", autouse=True)
def setup(self, browser):
link = "htt... |
dc663a41dfb76e7586c719f70bf0f141f9e4d105 | c1390e2bc4c006411abd627519b9859f3cb37c0a | /countries/models.py | 77530df8a54f7ce13f246a116a6cd8aa2d261c2f | [] | no_license | vnay-krshn/REST-API-training | cd1052e936e46612bee88a77649927b43c4785ab | d4a0e98ea2c30514da07e31e50ffd6c3f57c8ccc | refs/heads/master | 2022-12-20T02:27:59.742432 | 2020-10-07T16:21:17 | 2020-10-07T16:21:17 | 302,062,485 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | models.py | from django.db import models
# Create your models here.
class Countries(models.Model):
name = models.CharField(max_length = 70, blank = False, default = '')
capital = models.CharField(max_length = 70, blank = False, default = '')
def __str__(self):
return self.name
class SortAsc:
ord... |
1eab83ce07dfcb4e5182124fee250f5c8335f5c1 | 0200b39572ffadc819733914b44a86a4f181355a | /RecipeFinder/specialCase.py | cdcd5540bbb1365acc41d4b54f5f01c9b16ab50f | [] | no_license | JiamengCen/recipeFinder | 64a6fa33d3dd20af545a644feca9490d8054a544 | 3210042ec6a48ebf0a257bf8fa038bbcb4334e68 | refs/heads/master | 2020-03-22T07:46:07.126838 | 2018-07-04T13:18:06 | 2018-07-04T13:18:06 | 139,723,556 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,783 | py | specialCase.py | import datetime
'''
This class is for project notes. Considering the special cases,
whether the items is outdated or not, whether there are the items
in the fridge or not and so on.
@version 1.0 03 July 2018
@author Jiameng Cen '''
class SpecialCase:
def __init__(self, preprocessFridge, ... |
d2e40e2a0c2b0932ab012d40c8f1a4805624ecee | 70fde3a1f3ce7c258359e0fbc49149740e7484d8 | /unet/dataset.py | dc4b5acee466faacd50c3a0e34a64fb540102794 | [
"MIT"
] | permissive | viethungluu/flood-mapping | e8933f03167092fd24445d5cfa65c88ea6bff5dc | 553a5d869f494f088344017442fcd8d87b120b7c | refs/heads/master | 2020-06-05T13:18:38.916228 | 2019-09-04T03:59:22 | 2019-09-04T03:59:22 | 192,448,857 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,848 | py | dataset.py | import os
import glob
import numpy as np
import random
from PIL import Image
import tifffile as tiff
import torch
import torch.nn as nn
from torch.utils.data.dataset import Dataset
import torchvision.transforms.functional as TF
from pre_processing import apply_transform, adjust_transform_for_image, normalize_image,... |
5f99ce3b30ac70cfb494468ac5a64035f9d2d43f | e46e1fd1e6c0841a4d340a57a56661b6f6ddeed0 | /scripts/train_classification.py | 55b50ec302d471a9b30f057cebecf074eaefaa1c | [] | no_license | denilv/people-with-glasses-classifier | 9e100eeb8151d55a5c966941c40a0da0cc8bbde2 | 39f8076b8d55d5748bc78569357a60d0222a76ad | refs/heads/master | 2022-04-09T09:34:54.707516 | 2020-03-17T02:54:45 | 2020-03-17T02:54:45 | 247,840,678 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,605 | py | train_classification.py | TRAIN_IMAGES = 'data/crops'
TRAIN_CSV = 'data/all.csv'
TRAIN_FOLDS = (0, 1, 2,)
VALID_FOLDS = (3,)
EPOCHS = 25
LR = 1e-3
BATCH_SIZE = 256
CUDA_VISIBLE_DEVICES = '1'
ENCODER = 'mobilenetv2'
ACTIVATION = 'sigmoid'
BINARY = True
MODE = 'multiclass' # or 'multilabel'
CONTINUE = None
LOGDIR = f'logs/{ENCODER}'
import... |
33760851592af1cef86d347c0eb9dcf509486678 | e8331e8dcc9e2e75ddc37913eb606ecee993f0d6 | /OHSU_Winter_2019/EE582/HW5/Submission/q_5_14.py | a2f3bc85a85b824f70d89b0ba5648859fb8344a4 | [] | no_license | Eric-D-Stevens/OHSU | 35d1b085e7da5fb7579229b9e3871d545d3350c2 | 2ded61191a5e5ec215ec187c468a1f1ae1adf412 | refs/heads/master | 2020-04-01T00:24:15.948914 | 2020-02-04T07:28:05 | 2020-02-04T07:28:05 | 152,695,233 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,278 | py | q_5_14.py |
# coding: utf-8
# In[1]:
import numpy as np
import matplotlib.pyplot as plt
get_ipython().run_line_magic('matplotlib', 'inline')
# ## 5.14 a
# In[30]:
def quantize_signal(frequency=1./50., bits=4):
# build axix for system
axis = np.array((range(100)))
# create sinwave from axis
x_n =... |
542d0ef42fb8ef6245b7788b55ecbbfc684900fc | a1e6b71e62d855894a4a2a699ac2479a71b3eba5 | /employee.py | ed4cb0215e230773a71c4e0e63300c346f7187ed | [] | no_license | j-concepcion/parking-system | 54b0415f4be01f681299f7131ad517bfe1cd5409 | fe434ce2fba9acba9260e6ed094e96986edfbf91 | refs/heads/master | 2023-03-09T19:55:08.712831 | 2021-02-17T03:06:42 | 2021-02-17T03:06:42 | 339,593,825 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 309 | py | employee.py |
class Employee:
def __init__(self, name: str, rate: float) -> None:
self.name = name
self.rate = rate
def __str__(self) -> str:
return self.name
def calculate_pay(self, price: float ) -> float:
"Calculates employee's comission"
return self.rate * price
|
7ba877f2f40d4729b3a1bf69bfa1ad9a9b23f3b7 | 08448a48b6c2ba7c9b3c247ef24bc74fd6b10079 | /Day_9/pickjson1.py | ac337e85f85f30e0d9d184fd9966c454017def0e | [] | no_license | nirmalrajkumar/python_training | 882708e51a41a8a973111e891abcba895a0ac502 | aa081530051660017415c1016ee20ac7d60993f8 | refs/heads/master | 2021-01-19T12:03:25.399693 | 2017-02-17T09:40:29 | 2017-02-17T09:40:29 | 82,278,636 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 135 | py | pickjson1.py | import json
my_dict = {'name':'nirm','office':'asm','pack':['pyhton','AJS','HTML']}
print json.dumps(my_dict,indent=4,sorted_key=True)
|
00af91438c38b59eb5d194040eaaaf9cc9e3d6cd | ed7badfc7ecd738001f4d3e9945cce3a2d8b059d | /removeAdjacentDuplicatesStringII.py | a1e9193db9bf7898fb6852f1a67f3d6e1edc9390 | [] | no_license | tanjingjing123/LeetcodeAlgorithms | ab41f20bfca1305d07af00ae8db725fef6d059b8 | 2bb2881824cc4e84ab6afad6085e02e1b682c96d | refs/heads/master | 2023-02-04T12:22:52.665477 | 2020-01-01T00:11:20 | 2020-01-01T00:11:20 | 284,194,379 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 445 | py | removeAdjacentDuplicatesStringII.py | def removeDuplicates(s, k):
stack = []
for i, ch in enumerate(s):
if not stack or stack[-1][0] != ch:
stack.append((ch, 1))
else:
val, count = stack.pop()
if count + 1 != k:
stack.append((val, count + 1))
res = []
for ch, count in stack... |
0bbf2c891bd876c400580006d5c50f1ac636f577 | 705ce51a3a74612c96b3660921477c6e3111b63c | /project/app/views.py | 3a8a7a12e2a9e1b7e0b41f1fd3872336cad75f5a | [] | no_license | rgilman33/django_shell | 955fcd34130d0742ae0fc061f57387f734584c34 | 1971e4650147f120f49e7aa3960775d180066f6d | refs/heads/master | 2020-08-04T16:24:08.427989 | 2020-04-05T01:35:54 | 2020-04-05T01:35:54 | 212,201,591 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 545 | py | views.py | from django.shortcuts import render, redirect
from django.http import HttpResponse, JsonResponse
from django.views.decorators.cache import cache_control, never_cache
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth.decorators import login_required
from django.contrib.auth import logout, log... |
bc99f20117016b9bb14b708a12bc456c37722a73 | 9947d1e328a3262a35a61385dc537c3dc557ab7d | /多任务编程/wait.py | bc62e4a1ecfd59e0aaece6785e4985a26413c7c3 | [] | no_license | nuass/lzh | d0a7c74a3295523d1fe15eeaa73997fc04469f06 | 3cb1cf1e448b88ade226d113a7da4eab7bbb5c09 | refs/heads/master | 2021-02-06T06:10:32.772831 | 2019-06-10T08:54:49 | 2019-06-10T08:54:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 217 | py | wait.py | import os
from time import sleep
pid=os.fork()
if pid < 0:
print("Error")
elif pid == 0:
print("Child %d process exit"%os.getpid())
os._exit(2)
else:
pid,status=os.wait()
while True:
pass |
47b868eb8393f4611625cb2efe724238f38b1c2f | e7a43dcec071e11ee3b5ecfd475d6cfa45280dc5 | /src/main.py | 93cd70a24ce70f7b133f01a97020dfee22526020 | [] | no_license | sigmakappa/sorting-simulator | 8fcc78037cd5a59f2ede5a03a4a519a30a8fd239 | 0e84ecf32f7c8b77b1a212c3e301d574d9fc27d1 | refs/heads/main | 2023-07-17T18:44:02.619565 | 2021-08-31T03:17:50 | 2021-08-31T03:17:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 534 | py | main.py | import sys
import pygame
from generate import generate_random_array
from menu import get_selection
def main():
array = generate_random_array()
done = False
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
... |
0f8625a82147ce11835fc175b4cf74152a3f5409 | 1654571422ae946ee7484d808a419aea8e4cb2eb | /glava9_classes/Classes.py | 562e1079beef539668a7a632672009f26b8f8527 | [] | no_license | Bearspirit/all_lessons | 5788e5be06c336feea9e3ce93188e479a6396a56 | 9e353e6688b1f30950ca1d6078303466ad0113b8 | refs/heads/main | 2023-03-10T22:56:19.399213 | 2021-02-25T20:55:36 | 2021-02-25T20:55:36 | 338,640,762 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,273 | py | Classes.py | """Класс Privileges определяем без атрибута, атрибут определяется ниже.
Обрати внимание, что как определяется метод - табуляция на одном уровне
"""
class Privileges():
def __init__(self):
self.privileges = [
'разрешено добавлять сообщения',
'разрешено удалять пользователей',
'разрешено банить ... |
6ca4c4e525355f58f1626725246dbb18f58b929f | a1b70e5e9b25658545b6770b0791f1c6588853b7 | /QuadTree.py | 08d3151a104c1766cdf29dc35e9a4a94b82bb4f1 | [] | no_license | GeneralZero/pygine | 95307a18056d5041e2af7b8f190fda57fda0d6f7 | d74710fb16c67dacbbbe8636600f45bdf198dfb4 | refs/heads/master | 2021-01-18T17:25:43.135125 | 2012-11-14T15:38:26 | 2012-11-14T15:38:26 | 4,165,337 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,426 | py | QuadTree.py | from pygame import draw
class QuadTree(object):
def __init__(self, box, current_level, max_level=4):# box (top_left_x, top_left_y, size_x, size_y)
self.location = (box[0], box[1])
self.size = (box[2], box[3])
self.current_level = current_level
self.max_level = max_level
self.objects = []
self... |
1bdee10230841c8545b23cc89d989cbb0745e245 | 82f37154146f56bb23922ef6ba0e8b0934b7ad66 | /lesson_8/for_dict.py | cdcafd36ddebe8e0a66222e1eba7cf52ed132841 | [] | no_license | dm-fedorov/python3_intro | 453e6d54df8cc7012fad6f00bc4fd3b802f6ec7d | e5ea9fbe686a28557f4b5cf5962c391c52c5c492 | refs/heads/master | 2021-06-24T23:43:02.275953 | 2020-11-08T16:53:05 | 2020-11-08T16:53:05 | 161,996,673 | 13 | 22 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | for_dict.py | # for_dict.py
res = []
for x in range(5):
if x%2 == 0:
for y in range(5):
if y%2 == 1:
res.append((x, y))
print(res)
|
e41b1dbb96607950b264e29a48005435987db797 | e9d8e3705acb14410cf008db68f851a11e9436f2 | /utils/preprocessing.py | 40cd503761e8f1fca4244d85a04bf4c1c1cbab53 | [] | no_license | Chgall/char_cnn_lstm | 145bc9bcd621e6823a080668a89d16887fbe30a8 | d42341f3d653a7f6c96bcc61099915e8aa27c8d0 | refs/heads/master | 2021-01-27T09:29:44.276735 | 2020-02-27T08:56:22 | 2020-02-27T08:56:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,477 | py | preprocessing.py | import pickle
import shutil
import torch
from collections import namedtuple
import os
import json
import re
from zipfile import ZipFile
Tokens = namedtuple("Tokens", "zero_padding unk_w eos")
tokens = Tokens(zero_padding=" ", unk_w="__", eos="|")
def replace_token(word):
if word == "<unk>":
return token... |
2054fc0ee98ac268f71744f7c2d8933d67eabee9 | 6b39b5025f528fb4a0c55c079610695ed8af0565 | /Vertex/vertex/_unfortunate_defer_hack.py | 395dc1a2ea093b04ba08013452809ef3540a4dd6 | [
"MIT"
] | permissive | feitianyiren/divmod.org | b3d525406ef9565d16d96922c2cc3a7c4e488f78 | bf9c26051e8dfd1325bdc63aab1c560dbad7f6b7 | refs/heads/master | 2020-04-08T08:37:57.324370 | 2011-03-17T11:03:42 | 2011-03-17T11:03:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,907 | py | _unfortunate_defer_hack.py |
from twisted.internet.defer import Deferred
try:
from twisted.internet.defer import FirstError
except:
class FirstError(Exception):
"""omgwtf
"""
from twisted.python import failure
class NoFailure(Exception):
""" This is a placeholder exception used by DeferredList to indicate that there
... |
74bee5fde0c54ee4a18384e6985de3f917d740c9 | 998bea3e9b3308d8b6f8967b192f6358011ef0ff | /tests/__init__.py | d4daa5944e5fae7e1b5a5be0bed9127708eeb91c | [
"MIT"
] | permissive | Mrjamy/KonekoBot | 52b591eea09cd6a747110d76040f60d2e2554f96 | 63cbb3e96d473b24ecc2928fd5e65ab0e4fec4a8 | refs/heads/main | 2022-12-23T19:48:09.225715 | 2022-04-15T06:21:59 | 2022-04-15T06:21:59 | 153,690,067 | 2 | 2 | MIT | 2022-12-19T13:01:11 | 2018-10-18T21:31:38 | Python | UTF-8 | Python | false | false | 232 | py | __init__.py | """Utility functions for testing."""
# Builtins
from urllib.parse import urlparse
def is_valid_url(url):
"""Check if the url is valid."""
result = urlparse(url)
return all([result.scheme, result.netloc, result.path])
|
51aaa8466cbd99d0967dba03d4936640a10d3c56 | 47d14d7714897a11d6efd05d4eae931e268595cb | /tests/test_link_in_page.py | 241ec84648d30c599ddb7c0261cdcd29b6983af2 | [] | no_license | mahbub095/python-selenium | 11f0256179a5fce58ce9560bc18e3e423de1f2de | 2ea6d9747eb0a0286e277b694c305880b89eb1fb | refs/heads/master | 2023-04-25T07:50:18.264347 | 2021-05-01T07:50:02 | 2021-05-01T07:50:02 | 363,053,728 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 476 | py | test_link_in_page.py | import unittest
from pages.link_page import LinkPage
from tests.base_test import BaseTest
from utils.test_cases import test_cases
# I am using python unittest for asserting cases.
# In this module, there should be test cases.
# If you want to run it, you should type: python <module-name.py>
class TestSignInPage(Ba... |
d7b69ab60471b484d5a1c0bb34e3934a8c2657f7 | 762834a5c085625261f6e48a07dd028d773ad504 | /pipe/extract.py | 552556d6dcdfeabc2b0f0ef2add26417a7035a42 | [] | no_license | VyunSergey/Fast_Sold_Post_Prediction | cc950d715f976b6a18e550cfc9582c9917316b35 | fdcd5937e7d2ee04bd97b12b02129c919d4cf0cd | refs/heads/master | 2020-05-30T14:01:18.754893 | 2019-06-10T20:25:52 | 2019-06-10T20:25:52 | 189,777,116 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 632 | py | extract.py | from operator import itemgetter
from typing import List
from sklearn.pipeline import Pipeline, make_pipeline
from sklearn.preprocessing import FunctionTransformer
def feature_single_getter(feature: str):
return FunctionTransformer(itemgetter(feature), validate=False)
def features_getter(features: List):
re... |
2bc557d669caa91a9e352a2a6affe9556aac5291 | 39164ede111f154b31cbb61663ea837f16f8aa4f | /odps/models/tests/test_xflows.py | 5aaee06b9eaf2cd21112e116924ecdba6308afb2 | [
"Apache-2.0"
] | permissive | aliyun/aliyun-odps-python-sdk | 217631252e6d52e75354a2a19faab5b9ff40e272 | c5b897f03759b1a9851505eea3858a96d628f105 | refs/heads/master | 2023-08-16T22:42:12.441717 | 2023-07-19T06:28:25 | 2023-07-19T06:28:25 | 45,234,875 | 437 | 116 | Apache-2.0 | 2023-08-03T06:45:34 | 2015-10-30T07:07:59 | Python | UTF-8 | Python | false | false | 3,928 | py | test_xflows.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2022 Alibaba Group Holding Ltd.
#
# 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-... |
3d1bea235b0df4a73e25bd84bd72b3b3fd3beb9f | fac4256b4d9bcaa3b276029d61da75c75861fc6b | /Hotels/Hotels/Extra_files/GOBIBTotalci.py | 4c5ac8d77298c77afdc157aac06be1e49730a772 | [] | no_license | headrun/CT | 7f7ef9a43eca76ad119051ac3c0a6afdd17518bf | 6e67ab2c3b68ae2b65bcb9161032b283e2e39de1 | refs/heads/master | 2022-01-11T23:22:02.134114 | 2018-09-18T04:40:28 | 2018-09-18T04:40:28 | 99,084,205 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 647 | py | GOBIBTotalci.py | import json
d,cd='',''
dict_={}
with open('goMasterList.json') as json_data:
d = json.load(json_data)
with open('cities_statesgoib.json') as json_data3:
cd = json.load(json_data3)
import pdb;pdb.set_trace()
mmtid,cltpname='',''
for city_name, hotels in d.iteritems():
city_code= cd.get(city_name,'')
print city_na... |
7a60df47a035e3d9f23107836fd059e21a39634f | e1ea89a8b6b61b224362439d2d5885d45892d52f | /assignment2/consts.py | 8a55cb3e417c7ec5bdef3e29097b900776c3c6d7 | [] | no_license | fwkhan/Data-Science | 1de228487dcc08e15debd8f084025432665d5bb9 | 596d1d8f6ad96fb168448023f2c19c2a33cfc24a | refs/heads/main | 2023-04-18T15:07:46.377381 | 2021-05-05T15:46:59 | 2021-05-05T15:46:59 | 328,993,274 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,413 | py | consts.py | ############################ SENTIMENT ANALYSIS #################################################
SENTIMENT_TRAIN_TEXT = 'https://raw.githubusercontent.com/cardiffnlp/tweeteval/main/datasets/sentiment/train_text.txt'
SENTIMENT_VALIDATION_TEXT = 'https://raw.githubusercontent.com/cardiffnlp/tweeteval/main/datasets/sen... |
311cdec40442ccb9c58cb533824fd5c367839950 | 91defa10c945f0c625c1ea7e77e3d90c6c6d750c | /mnist/mnist_train.py | 3c9c13f70003dc0c77553f5a3ded322cf5b56e75 | [] | no_license | zdphpn/TensorFlow | 674ec9f3e32cc40fd3037817e2ab8a398d58eb62 | 24f86c482c6b43162defabf83bb14bd91dfe6f26 | refs/heads/master | 2020-05-26T19:26:35.593723 | 2019-05-24T04:03:33 | 2019-05-24T04:03:33 | 188,348,458 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,415 | py | mnist_train.py |
import os
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import mnist_inference
BATCH_SIZE=100
LEARNING_RATE_BASE=0.3
LEARNING_RATE_DECAY=0.999
REGULARAZTION_RATE=0.0001
TRAINING_STEPS=30000
MOVING_AVERAGE_DECAY=0.999
MODEL_SAVE_PATH="./model"
MODEL_NAME="model.c... |
d254cfe087888b193948528878f78eb225edc6d9 | 48a8849cebc1c9d35dc8f2f5b1a91cbb533ee294 | /webot/static/scan_count.py | ff9bbf04c8793286c8842b0d988f08c70f6a8033 | [] | no_license | varwey/project | d5b3a3a0bfc35abf45004f95305d4b1a916718d7 | b1fe6a3774757aa48d1bbdcc763ec01500472ecf | refs/heads/master | 2021-01-13T01:27:01.142647 | 2014-06-05T11:02:58 | 2014-06-05T11:02:58 | 20,431,623 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 936 | py | scan_count.py | #!/usr/bin/python
#coding:utf-8
"""
将远程服务器上mysql数据按需求查询保存到本地mysql库
2013/10/23 www
"""
from __future__ import division
import MySQLdb
import time
now = time.strftime('%Y-%m-%d',time.localtime(time.time()))
conn = MySQLdb.connect(host='111.73.45.118',user='root',passwd='130809',db='proxy')
cur = conn.cursor()
scan = c... |
21844f492490cf761710a5e991d11f3e6948110b | 9241974e50a37303163303660f66f6b77cc5632a | /pre_commit/util.py | 4f8e8357dfad602d2403f013f0209faecde55a81 | [
"MIT"
] | permissive | pre-commit/pre-commit | c138e1bd540c7515c10f0d61f3d7a4ef66d5bf0a | a1f1d1915646865be2fe84d04633ba964feb0ba0 | refs/heads/main | 2023-08-19T08:07:21.342724 | 2023-08-15T14:19:29 | 2023-08-15T14:19:29 | 17,689,377 | 10,804 | 912 | MIT | 2023-09-12T00:06:21 | 2014-03-13T00:39:38 | Python | UTF-8 | Python | false | false | 6,645 | py | util.py | from __future__ import annotations
import contextlib
import errno
import importlib.resources
import os.path
import shutil
import stat
import subprocess
import sys
from types import TracebackType
from typing import Any
from typing import Callable
from typing import Generator
from pre_commit import parse_shebang
def ... |
b0fa33275a8957e584b9f80e1198b6eb86b7b920 | 280697319275e5ee311b442b8c4916183c3479be | /sciencebeam_trainer_grobid_tools/annotation/line_number_annotator.py | b92030972f921c3c8017b01325578d2803e4e865 | [
"MIT"
] | permissive | elifesciences/sciencebeam-trainer-grobid-tools | 63fa059186114ccc9d3a279a05f6103dbd2b863a | 1ec0e72c25baa6417963290ae2a894c2b4a331d8 | refs/heads/develop | 2022-05-23T11:11:48.430960 | 2022-03-28T17:27:29 | 2022-03-28T17:27:29 | 183,603,764 | 0 | 0 | MIT | 2022-03-28T17:28:24 | 2019-04-26T09:51:38 | Python | UTF-8 | Python | false | false | 5,657 | py | line_number_annotator.py | import logging
from sciencebeam_trainer_grobid_tools.core.annotation.annotator import (
AbstractAnnotator
)
from sciencebeam_trainer_grobid_tools.structured_document.grobid_training_tei import (
GrobidTrainingTeiStructuredDocument
)
LOGGER = logging.getLogger(__name__)
DEFAULT_MIN_LINE_NUMBER_COUNT = 10
... |
6c196150e39872f9916a3c4cf5f514a142faf640 | 022aeadbfeffda927f2ba37fde24ad6b2103f25c | /betterbatch/tools/find_in_file.py | 27b154afad139c3d70299397cbfb23f751b907ed | [
"MIT"
] | permissive | ohio813/betterbatch | 2aab6a22d856b6cd117d441c057763ad478554af | 6410978f84eb80bc5632e2da61beb138d96f334e | refs/heads/master | 2021-01-13T02:15:21.340747 | 2011-09-26T02:21:34 | 2011-09-26T02:21:34 | 35,199,982 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,807 | py | find_in_file.py | """Script to search for text in a file"""
import re
import sys
from optparse import OptionParser
def GetArguments():
parser = OptionParser("$prog [-r] file text_to_find [text_to_find...]")
parser.add_option("-r", "--regex", default = False, action = "store_true",
help="search ... |
5bf5a5d969fabde58a3e6cbe3c1f95207084cf8c | c4e42eff79e1d7c7987bbd177d71aea871420a85 | /playground.py | 0511e4420030ab5048325ffbdb7d64a5231dc018 | [] | no_license | theShmoo/WorkshopDivision | e4c9accad813823262eb7daac617645fe2084527 | 016d633d986fd879d3fb923c561358b4a905157c | refs/heads/master | 2021-01-21T15:18:14.932603 | 2017-07-02T16:34:40 | 2017-07-02T16:34:40 | 95,381,171 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 356 | py | playground.py | from workshopdivision import WorkshopDivision
# start the workshop division
w = WorkshopDivision()
w.loadWorkshops("Workshops.csv")
# w.getWorkshopStatistics()
w.loadParticipants("Anmeldung.csv")
# w.getParticipantsStatistics()
w.startDivision()
w.exportDays("export_tage.csv")
w.exportWorkshops("export_workshop.csv")
... |
e25847130cadde1948d4948c6d6a5beababc9254 | e152344168d3ff2765696354d020a41ae00c8b17 | /Arrays/rearrage_negative_elems.py | 9b3bd8b9f850cae2a9d65dae143697da8265036a | [] | no_license | Sasha2508/Python-Codes | 298e176aee2ff4a737676b62e02bdf6df9063ced | d0da8ecd6d6045be29fe449011e8c69c2882cac3 | refs/heads/master | 2023-04-29T23:28:24.383711 | 2021-05-10T18:00:12 | 2021-05-10T18:00:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,161 | py | rearrage_negative_elems.py | """
source: https://www.geeksforgeeks.org/move-negative-numbers-beginning-positive-end-constant-extra-space/
"""
class Solution:
def segregateelements(self, arr, n):
# ------------ APPROACH WONT WORK IF QUESTION REQUIRES SHIFTING OF ELEMENTS ------------------
# j = n-1
# for i in range(n):
... |
a67b771dae08151804cbbb1aa0e6f6a9092e9525 | 5114fd48facfbf8e61fa70d6ccba20168c59a82f | /.py | ec611f9699c1572eacfae9373f19e9e70d99551e | [] | no_license | kaushiksatish2341/Breast-cancer-prediction | 5446891e8de454484caf22c5657cd878df250689 | fda6259f22e788a63818ad52e5086456c2aa5801 | refs/heads/master | 2020-09-24T01:59:02.581822 | 2019-12-03T14:08:00 | 2019-12-03T14:08:00 | 225,635,239 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 655 | py | .py | import numpy as np
import pandas as pd
from sklearn.linear_model import Ridge as linreg
from sklearn.model_selection import train_test_split
a=pd.read_csv('breast-cancer.csv')
a=a.fillna(method='ffill')
#print(a)
X=a[['radius_mean','texture_mean','perimeter_mean','area_mean']]
y=a['fractal_dimension_wor... |
fe6ef11c951022d21e49e8005e5e0bb76d8b805a | e5bac2f33a8a00b4d5d2a5f1f6c0e94a87f6f048 | /vae-dpc/vae_main.py | 6b3d1e0585fa36a288b95e8c3a7a87789d63f550 | [
"MIT"
] | permissive | lovish1234/TPC | 20de59ed46827107f61808fccd4eda26e1886b8c | 10e93eeb0e22e411579cfb9f94fac7870f6e2039 | refs/heads/master | 2022-12-31T14:48:11.517065 | 2020-10-20T21:04:29 | 2020-10-20T21:04:29 | 305,832,440 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 27,404 | py | vae_main.py | # Self-supervised pretraining using DPC with VAE
import os
import random
import sys
import time
import re
import argparse
import ntpath
import numpy as np
import pickle
from tqdm import tqdm
import copy
# visualization
from tensorboardX import SummaryWriter
import matplotlib.pyplot as plt
plt.switch_backend('agg')
s... |
9fecbb3dfa6702ee3c092bd97f4eea440b37aa29 | 381acc5ba1655d6a51e600e0b4348ec7b1fc538d | /map/data/Bottom Market/plotter.py | e43b6c73f81b1b040b96a3e598feae23a73a5554 | [] | no_license | chanchana/rush-server | 4fa2d817167a5d2ebd9f5b93f123ffbd0bcb421f | cf2eca166f99b21b43b58eb5532018268075ebbe | refs/heads/master | 2020-04-27T23:35:51.084963 | 2019-03-12T17:31:10 | 2019-03-12T17:31:10 | 174,781,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,197 | py | plotter.py | import json
lt = (120, 210)
rt = (620, 210)
shelf_height = 25
between_height = 14
l_count = 1
n_count = 1
nodes = {}
for x in range(8):
key = f'L{str(l_count).zfill(2)}'
s = (lt[0], lt[1] + ((shelf_height + between_height) * x))
nodes[key] = s
l_count += 1
key = f'L{str(l_count).zfill(2)}'
... |
f944fdf730503c0423b2d3ce7eda7b23dcf66c57 | e7031386a884ae8ed568d8c219b4e5ef1bb06331 | /processor/models.py | c9ac47a9650674c272041a9786cda87139ae54e2 | [] | no_license | ikbolpm/ultrashop-backend | a59c54b8c4d31e009704c3bf0e963085477092cf | 290fa0ecdad40ec817867a019bff2ce82f08d6fe | refs/heads/dev | 2022-11-30T21:49:17.965273 | 2020-09-24T10:16:12 | 2020-09-24T10:16:12 | 147,561,738 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 960 | py | models.py | from django.db import models
from processorBrand.models import ProcessorBrand
class Processor(models.Model):
name = models.CharField(max_length=255, help_text='К примеру: i7-7700HQ')
slug = models.SlugField(max_length=255)
brand = models.ForeignKey(ProcessorBrand, on_delete=models.CASCADE, )
min_frequ... |
a3e53c19a95747b6e9b9d0cd2a3cd2ee465894cd | 5baaa7fb405b505e98a071d9f7862e752180b0d5 | /linear_regression/linear_heart.py | a918a3637faa61b485ba63ff7bfbc38eae43e844 | [] | no_license | tdhiraj123/machine_learning | 49581313e4704c965c95d1c6f490555b69eeaf80 | c0c13a71b721ada1265e1a14664c05f80e4d80a1 | refs/heads/master | 2022-02-22T12:55:44.961517 | 2019-08-11T17:44:46 | 2019-08-11T17:44:46 | 198,225,559 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 858 | py | linear_heart.py | import numpy as np
import pandas as pd
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
from sklearn import metrics
data_path = "heart.csv"
data = pd.read_csv(data_path, index_col=0)
print(list(data.columns))
feature_names = ['sex', 'trestbps', 'cho... |
c6ca0db1587b63c3512675c7248b298d1cc4431a | 8867f067e7027dfd94386f694ac5975d8e1db24b | /SQL_Procedures_1218.py | 46b7c0d53a0dd7ce98aad73f6632c633ea1c84e1 | [] | no_license | jdeferio/psych_predict | 1ef19fc0b3c0951bf82d7ade03114f67c23cb07f | 1d40c7b6a3a7bc9852a3554d6a569c79f32ab152 | refs/heads/master | 2023-08-08T14:51:58.456200 | 2023-04-21T20:58:12 | 2023-04-21T20:58:12 | 202,457,175 | 0 | 0 | null | 2023-07-25T21:36:40 | 2019-08-15T02:09:47 | Python | UTF-8 | Python | false | false | 1,619 | py | SQL_Procedures_1218.py | import io
from util import SQL_Connect
def main():
cursor = SQL_Connect.connect_DB()
if not os.path.exists("data"):
os.mkdir("data")
output_file = "cdrn_all_procs_1218.csv"
# Selects all patient diagnoses that match the inclusion criteria: visit in 2012, 2013, 2014
sql = """
SEL... |
0c3e6326cee49405c87e8b110e6fb9b423f898ef | d5cdbccf58acadf0980c400435c7e5a2930bc490 | /сервер.py | 52699fa0392a8488205a19f3585266b38073f707 | [] | no_license | Victoria-Winner/learn_python | ec6293ca71bd1f7d208b6b74b5295331df463600 | 7a0c6b5ca5eb3364bace17cf4e07b236eb43e211 | refs/heads/master | 2021-09-13T08:48:24.259089 | 2018-04-27T08:11:02 | 2018-04-27T08:11:02 | 112,212,362 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 248 | py | сервер.py | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import socket
sock = socket.socket()
sock.bind(('', 9090))
sock.listen(1)
conn, addr = sock.accept()
while True:
data = conn.recv(1024)
if not data:
break
conn.send(data.upper())
conn.close() |
d439b527b734e45ffb7a59f27941a25794fa1185 | 8273cef9fe9bcf1b1d9fd2d46acd81c93ff986d3 | /Euler 56.py | b6d5a7c04e2e60c68448be046ddcb819401b07ad | [] | no_license | zbarton88/Python-Physics-Euler-Problems | 5c9880c9a355374bbcf2603995bd57233487e22a | aa63e94e68438d4a2562c2df90e636c53cf5e049 | refs/heads/master | 2020-03-15T01:32:45.034945 | 2018-05-10T00:24:05 | 2018-05-10T00:24:05 | 131,896,138 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 311 | py | Euler 56.py | def fiftysix():
answer = 0
for i in range(1,101):
number = 0
num = 0
for j in range(1,101):
number = i**j
num = sum(int(k) for k in str(number))
if answer<num:
answer = num
print (answer)
fiftysix()
|
84dcbd8d4499f7c8fbbdaaf2c7bf586b2e3e00ef | c02884894bdabfb7a10ac9bf661c14a9d4b9e7f5 | /Web/run.py | 0abbf444294b024403d8e3fb2a3288f46d355858 | [] | no_license | adityasharma1234/answersheetcorrection | 76ccbf1f41c2369791abf3a49581cc5e2a69792c | cfa34ab4da5612fff9ebcd939a5cdd3775f2f81f | refs/heads/master | 2021-05-21T03:14:32.738373 | 2021-03-22T13:10:24 | 2021-03-22T13:10:24 | 252,517,133 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 100 | py | run.py | from autograde import app
if __name__ == '__main__':
#app.init_db()
app.run(debug=True) |
0b7dfa5d9af69610f648a73829eedf2bcc5002d0 | 2af586ebb89a16d8c5ac383f1fc50c82708157bd | /Server/SearchHandler.py | 4a5d6caf90ffede4a3b1e925fbc2f6d5b990a8d4 | [] | no_license | sachink108/library | c1d6a16aaa3196f947ce757b26437a28ab873da1 | fe35af00d6183a3bcb87fef32b352ea9feb3bf45 | refs/heads/master | 2020-05-21T15:48:46.917662 | 2017-11-01T17:22:38 | 2017-11-01T17:22:38 | 84,632,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,443 | py | SearchHandler.py | import os
import tornado.websocket
import logging
import sqlite3
from URIParser import *
from elasticsearch import Elasticsearch
database_dir = "C:\\databases"
users_db = os.path.join(database_dir, "users.db")
gClient = Elasticsearch([{'host': 'localhost', 'port': 9200}])
gElasticIndex = "books"
class SearchHandler(t... |
4111bbd2bd81512f3a2d9f55898337bcd87691a4 | 642920d25db24cab5c54767dbfc67f5defebc96f | /21 May 2020/pandas-4.py | f9cdffa20515f778fd82efff6e4d9554a6524399 | [] | no_license | alvas-education-foundation/K.Muthu-courses | f57bc5e321132e8c2e0499a0cacaa1990c304698 | f7eeb56b46734c52b1cb44ee38ece91c332e22fa | refs/heads/master | 2022-11-24T13:14:51.221828 | 2020-07-23T13:37:53 | 2020-07-23T13:37:53 | 264,843,870 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 214 | py | pandas-4.py | """Python Pandas program to get the details of all the ST_NAME column"""
import numpy as np
import pandas as pd
data=pd.read_csv('property_data.csv')
print("All the details of ST_NAME : ")
print(data[['ST_NAME']]) |
71bcc1fdf714ba4aa78692fac9ffd1c90f5309a3 | b80e6447802af72ad86ff376014fa49cc398b67e | /pyCEvNS/flux.py | 266afb8a38a21be52eefbe3e36020589444e45dc | [] | no_license | aimer1016/pyCEvNS | ac50f6e711946428456e2c70102420b268664c1f | c05ba95363b3da0b9172b2623bc7b91f0c12b6dd | refs/heads/master | 2020-06-17T05:15:29.820722 | 2019-06-11T20:26:59 | 2019-06-11T20:26:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,007 | py | flux.py | """
flux related class and functions
"""
from scipy.integrate import quad
from .helper import *
from .oscillation import *
class Flux:
"""
flux class,
flux at source
"""
def __init__(self, fl_name, delimiter=',', fl_unc=0):
"""
initializing flux, can take in user provided flux
... |
3a554f264b3b9227f8d9020780e69b60282d8ea6 | 89382995b05b199de0b3bcd455bac8b52a94ca95 | /students_assignment_system/submit/views.py | 73272f588cd1953395cedea93282cb9758638641 | [] | no_license | krishna7745/ASSIGNMENT-PORTAL-FINAL | 37fb4e4e1593d40aa0731dd4547608f763cbec21 | 9a2914a1ddd3ef7a11a64aaa558713003b5361c8 | refs/heads/master | 2022-11-24T00:34:10.337512 | 2020-07-23T08:10:28 | 2020-07-23T08:10:28 | 282,166,981 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,413 | py | views.py | import json
import requests
from django.shortcuts import render
from django.apps import apps
from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt
# Create your views here.
@csrf_exempt
def sub(request):
response=False
regis=apps.get_model('login','regis')
ques=apps.get_... |
046bc01aef75d33daf9df25fb31a3acc552c3fb1 | 623110788eb7d7db8e2de4b7d53d309395ca35eb | /hdc_keras_cnn.py | 811e0bbb80f58bf15e014c152cf7cbc97e8ad02f | [] | no_license | Nicole-He/Handwriting-Digits-Classification | f7e66aaef8ea882ba4ec38cbdff04d6a68578772 | efa190338d703e6a1e0207e87361d0738f2ddc03 | refs/heads/master | 2020-04-03T00:34:41.858393 | 2018-10-27T02:10:40 | 2018-10-27T02:10:40 | 154,902,888 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,399 | py | hdc_keras_cnn.py | import keras
from keras.datasets import mnist
from keras.layers import Dense, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras.models import Sequential
import matplotlib.pylab as plt
batch_size = 128
num_classes = 10
epochs = 10
img_x, img_y = 28, 28
(x_train, y_train), (x_test, y_test) = mnist.load_... |
e1a5e456f4f03488fd23fb421d286a5f5159634c | f0fc98f3d47b1a0e58752f64613285300d7b2fd1 | /tests/test_matmul.py | 23fd8d5dfa05d3302930b9bd8512505bac0086a2 | [] | no_license | amcadmus/bedm | bd8542110115031dae65c9e1bd36265ae5b967de | db578ddb1f4cb5af6bb20bbc30ac3c9bc8fef7a4 | refs/heads/master | 2023-04-09T17:19:08.656631 | 2021-04-22T06:37:45 | 2021-04-22T06:37:45 | 360,195,312 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,553 | py | test_matmul.py | import numpy as np
from context import bedm
from bedm.tf import TF
from bedm.pd import PD
import unittest
class TestMatMul(unittest.TestCase):
def setUp(self):
self.m = 3
self.n = 4
self.k = 2
self.mat_0 = np.arange(0, self.m*self.k, dtype=float).reshape([self.m, self.k])
se... |
4f2bdaa1f84deca7b110b03a5bac54056eb495cf | 4d6975caece0acdc793a41e8bc6d700d8c2fec9a | /leetcode/1009.pancake-sorting/1009.pancake-sorting.py | 8dae85619eac649d8f0d6e6f9e538a851d013518 | [] | no_license | guiconti/workout | 36a3923f2381d6e7023e127100409b3a2e7e4ccb | 5162d14cd64b720351eb30161283e8727cfcf376 | refs/heads/master | 2021-08-03T10:32:02.108714 | 2021-07-26T04:38:14 | 2021-07-26T04:38:14 | 221,025,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 80 | py | 1009.pancake-sorting.py | class Solution:
def pancakeSort(self, arr: List[int]) -> List[int]:
|
b8c216eb9e5f1e447e09559dd6a15ed9ed2f81d6 | 74770724a7878bd2048c72d39db48d5ae469a2e5 | /11/11.py | 5f810eab65d9aeb2ccac3942ac8f4c5b00ce4367 | [] | no_license | Tushu19/python-4-everybody | 4c8478370ed29298614f9f00284d1e7caf26f5b6 | e18ee8b4e260903730e5b82f22f79f7e7a73d451 | refs/heads/master | 2022-12-20T03:28:40.420511 | 2020-10-01T00:03:22 | 2020-10-01T00:03:22 | 300,092,961 | 0 | 0 | null | 2020-10-01T00:01:15 | 2020-10-01T00:01:15 | null | UTF-8 | Python | false | false | 1,254 | py | 11.py | #importing regex to use re.search and re.findall functions
import re
fname = input("Enter file name: ")
#convenience by opening test.txt by just pressing Enter
if len(fname) < 1:
fname = "actual-data.txt"
#sanity check for file opening
try:
fh = open(fname)
except:
print("File did not open!")
quit()
tot... |
94c3d35728f3556cbc55f865738c9b69a69d3b82 | 8f509941dab959d7c18ad1d8ce594c006995de4b | /papermill-example.py | 131b9d182d8921192a5859854ef29dc8905bca3b | [] | no_license | KCollins/wwv-h-wg | 56e2cd829e37b6ca8651864bbb890c3a95791014 | 00ed12452dae528badc49e73e652fc5ad0fa19d9 | refs/heads/main | 2023-05-23T21:38:06.729815 | 2022-05-09T04:31:17 | 2022-05-09T04:31:17 | 468,049,035 | 6 | 3 | null | 2022-04-30T01:27:56 | 2022-03-09T18:34:01 | Jupyter Notebook | UTF-8 | Python | false | false | 882 | py | papermill-example.py | # Run the notebook multiple times against recordings from different stations.
import re
import papermill as pm
import yaml
input_notebook = 'sunrisefest.ipynb'
output_prefix = input_notebook.removesuffix('.ipynb')
# Separate each target with triple dots (...)
targets = """
---
# bogus data
input_filename: w2naf.c... |
fbff85dd5e7ecb36b469e735180dca7b4b0e4e3d | d50ca1fff304c8a67a3ce76bb86d393681391323 | /chapter03_basic_data_structures/test.py | a892255dd35a206322a5813a776c5386e8d34e2d | [] | no_license | freedream520/Problem-Solving-with-Algorithms-and-DataStructures | e3aef7d5a1b473d10091916e067fc61918fe3605 | bbc6a8e9554379d0856ac5ca680acf87f17e0515 | refs/heads/master | 2021-01-18T22:13:06.295087 | 2015-12-16T01:19:04 | 2015-12-16T01:19:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 332 | py | test.py | def isPal(s):
s = "".join(e for e in s if e.isalnum())
if len(s) <= 1:
return True
else:
return s[0] == s[-1] and isPal(s[1:-1])
print(isPal("reviled did I live, said I, as evil I did deliver"))
print(isPal("Go hang a salami; I'm a lasagna hog."))
print(isPal("radar"))
print(isPal(... |
0c067eb1abb361511fa4c14587aed4b58267d97e | 74965e70e72ec9f198c2b63120a368ead1e6c113 | /neurokit2/complexity/entropy_symbolicdynamic.py | 9c4e77ea58eeb64da06599356456cd47aaa07b12 | [
"MIT"
] | permissive | neuropsychology/NeuroKit | ceef2128296431d417bffee9a5dc177bd7b345f0 | 366583e1e22a4ea06a18e5e162675c2a33334a19 | refs/heads/master | 2023-08-24T02:33:31.035399 | 2023-07-09T07:03:43 | 2023-07-09T07:03:43 | 218,212,111 | 1,120 | 358 | MIT | 2023-09-12T10:11:39 | 2019-10-29T05:39:37 | Python | UTF-8 | Python | false | false | 5,303 | py | entropy_symbolicdynamic.py | import numpy as np
import pandas as pd
from .utils_complexity_embedding import complexity_embedding
from .utils_complexity_symbolize import complexity_symbolize
def entropy_symbolicdynamic(signal, dimension=3, symbolize="MEP", c=6, **kwargs):
"""**Symbolic Dynamic Entropy (SyDyEn) and its Multiscale variants (MS... |
b8f6708ebc93e89e033e820fd489012f97df019b | 1c30a21d08054f3b5ca5fc75a240aaa85c1026ed | /爬楼梯的最少成本.py | bdde1c1f47c45257e3f8c5e17696c065482b16ab | [] | no_license | saintifly/leetcode | a7aba2fd35118eb3c8e42e6900537904881a1d36 | 4b30dd6a3f683c8dc71a85f7b947232613a28dc1 | refs/heads/master | 2023-03-18T08:16:12.117453 | 2023-03-06T15:19:30 | 2023-03-06T15:19:30 | 218,947,692 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 374 | py | 爬楼梯的最少成本.py | class Solution(object):
def minCostClimbingStairs(self, cost):
"""
:type cost: List[int]
:rtype: int
"""
costLen = len(cost)
current = 0
past = 0
for i in range(2,costLen+1):
tmp = min(current+cost[i-1],past+cost[i-2])
past = cu... |
c45f39789a192fc429370386f933e806cd881f79 | 18e48f22f88fe80ce54d12fdbf9d05a7ca5bd65a | /0x07-python-test_driven_development/100-matrix_mul.py | 1eee71cf0af97d530c49dfc5b2b1a4f50bdb8283 | [] | no_license | SantiagoHerreG/holbertonschool-higher_level_programming | 426c4bc9bc080a81b72d2f740c8ed2eb365023eb | ca2612ef3be92a60764d584cf39de3a2ba310f84 | refs/heads/master | 2020-07-22T19:33:48.507287 | 2020-02-14T04:34:00 | 2020-02-14T04:34:00 | 207,305,022 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,036 | py | 100-matrix_mul.py | #!/usr/bin/python3
""" Module containing a function that multiplies 2 matrices
6- task in python Test-driven development project
"""
def matrix_mul(m_a, m_b):
""" Function that returns the multiplication of two matrices
Args:
m_a (list of lists): first matrix
m_b (list of lists): second ma... |
12b70a049c4d9b77f2358d4b595096768fdc7428 | 33c33dfc17039eb8410c3ae75815965d1ed7fc82 | /backend/api/models/Document.py | e3aaf1212dca05527ca353cdec190326d16d049b | [
"MIT"
] | permissive | MjAbuz/kiva-portfolio-tool | 3c0d945366f700f9c4bed308a985c7fb064a36b7 | c516d28e4f6c4cef0fe63488dc3fd6904ba7ccea | refs/heads/master | 2023-02-12T15:05:01.848378 | 2019-08-28T17:48:18 | 2019-08-28T17:48:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,789 | py | Document.py | from api.core import Mixin
from .base import db
import uuid
# Note that we use sqlite for our tests, so you can't use Postgres Arrays
class Document(Mixin, db.Model):
"""Document Table."""
__tablename__ = "documents"
id = db.Column(db.String, unique=True, primary_key=True)
fileID = db.Column(db.Stri... |
5cd605e490a95d41da35275aea8a61148de144c1 | f846d4f1213333c57e709c3ea8bc9a8bfe9daa17 | /step05_phoneBook.py | 888ad8f878f93bbad2aba3aacbb0fa6b5eb612f6 | [] | no_license | vjanandr/python | eb32914aa112b413c1472ccd55967aa07341591a | 32579cb09a7a7f3f08da756efd04aa463a3182ef | refs/heads/master | 2020-05-30T23:02:06.226364 | 2015-04-21T22:25:23 | 2015-04-21T22:25:23 | 34,367,577 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,184 | py | step05_phoneBook.py | phone_book = {}
def add_phone_book_entry ():
name = input("Enter the name of the person :")
if name in phone_book:
if not input("There is already an entry for this name overwrite [Yes/y] ? :").islower() == 'y':
print("Input {} ignored".format(name))
return
number = ... |
f83f722c8c68f29c005c92ad54251ce7e2d40664 | f0cd6866b745e7c4deddebd3fc74086aea7bed07 | /blog/forms.py | 9cabd87a3362daf81a94f6b3e5fb0e1247788611 | [] | no_license | wangmingxjtu/Hello-Blog-by-Django | 296dfe25d83db392771dd676ce043ae20964d069 | 37c3aec63b9c04f945d1aaebd5025f4f85eb84f1 | refs/heads/master | 2021-05-02T05:56:17.797101 | 2017-03-18T13:25:37 | 2017-03-18T13:25:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,006 | py | forms.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: LooEv
import datetime
import markdown
import random
import string
import re
from django import forms
from django.utils.text import slugify
from .models import Article, Category, Author, Tag
from django.utils.translation import ugettext, ugettext_lazy as _
from dj... |
dbf545191e114ce0a2e89b372e6ca3684901e32c | 29c64a890eec925508d8e45edf6f169b0675e4d0 | /train.py | fa48c64c905e97ac209665093d9dcb448f4761cb | [
"MIT"
] | permissive | wlwn/ML2017-lab-03 | ca15ebe7c00bb31464cd722b9d233776b82f0526 | 388d40cfc8abe6bed78e19a0420ed9ad4ba65ae4 | refs/heads/master | 2021-08-31T17:32:04.372907 | 2017-12-22T08:01:38 | 2017-12-22T08:01:38 | 115,073,874 | 0 | 0 | null | 2017-12-22T03:46:58 | 2017-12-22T03:46:57 | null | UTF-8 | Python | false | false | 2,029 | py | train.py | import os
from ensemble import *
from sklearn.metrics import classification_report
IMG_SIZE = 12 * 12
def get_path(path):
return [os.path.join(path,f) for f in os.listdir(path)]
def grayscale(src_path,dst_path):
#imgs = get_path(src_path)
for src in os.listdir(src_path):
dst = os.path... |
8376bd9ea76a7cf7de7320f1216c358f75732059 | 2433fbd480e507e2a189160674251c9ca9a7e95a | /courses/admin.py | 5f77e6319321277021613b38e8f74aff1f39d015 | [] | no_license | DanielNeris/to-do-py | 8bbdac0b99f87f57affacfaabb4c32c9c39100f8 | 6f66edf20ee392f1bd6bdfb9b1f6edfe4b09d98e | refs/heads/master | 2023-02-24T09:02:52.355841 | 2021-02-02T02:31:35 | 2021-02-02T02:31:35 | 334,758,439 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 414 | py | admin.py | from django.contrib import admin
# Register your models here.
from .models import Course, Review
@admin.register(Course)
class CourseAdmin(admin.ModelAdmin):
list_display = ('title', 'url', 'active', 'created_at', 'updated_at')
@admin.register(Review)
class ReviewAdmin(admin.ModelAdmin):
list_display = ('... |
4e668cbe563d2c3a57b945aa2508209af96c293d | a4ea525e226d6c401fdb87a6e9adfdc5d07e6020 | /src/azure-cli/azure/cli/command_modules/netappfiles/tests/latest/test_backup_commands.py | 306558046538cf201dc08355645c6efa164f067a | [
"MIT",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MPL-2.0",
"LGPL-2.1-only",
"Apache-2.0",
"LGPL-2.1-or-later",
"BSD-2-Clause"
] | permissive | Azure/azure-cli | 13340eeca2e288e66e84d393fa1c8a93d46c8686 | a40fd14ad0b6e89720a2e58d4d9be3a6ce1535ca | refs/heads/dev | 2023-08-17T06:25:37.431463 | 2023-08-17T06:00:10 | 2023-08-17T06:00:10 | 51,040,886 | 4,018 | 3,310 | MIT | 2023-09-14T11:11:05 | 2016-02-04T00:21:51 | Python | UTF-8 | Python | false | false | 15,111 | py | test_backup_commands.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
7f12b1f0191fa7c119cfaee0ee2f45865b524f5a | 3b637af1bca8e1bd25364c7f660204420ee63c3f | /HW5/HW5_0753524.py | f25823151df1d983d0ca822e9c81298c46e22877 | [] | no_license | laynotena/Artificial-Intelligence-and-Financial-Technology-Practice | 1d71a640e663b27d5daa8cde130b4213007e1d04 | 59eb0e2b373b5beca2edc525775e54879dd79eb5 | refs/heads/main | 2023-07-08T01:24:14.829605 | 2021-08-28T08:26:03 | 2021-08-28T08:26:03 | 400,711,400 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,183 | py | HW5_0753524.py | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 4 17:02:05 2019
@author: User
"""
import numpy as np
import matplotlib.pyplot as plt
data = np.load('data.npy')
plt.plot(data)
tc = 1158
β = 0.5
Φ = 3
ω = 11
def lppl(t,tc,β,Φ,ω,A,B,C):
return np.exp(A+B*((tc-t)**β)*(1+C*np.cos(ω*np.log(tc-t)+Φ)))
... |
6a158b031650a4eea9c42d711f4715d7b1a0f2e7 | ada355a073043748c9d55ca07103bb32b010f9dd | /views/course_users.py | c9410bfae9a2a39080ceca04b824090b9a764e54 | [] | no_license | destyjustc/wendo_backend | 638f233626e452fc4d86e559bdd0f5b52a93cdb9 | 35c1340be684139b90226e947796593713e5ff05 | refs/heads/master | 2022-12-12T12:23:41.974680 | 2018-04-19T22:40:03 | 2018-04-19T22:40:03 | 113,250,104 | 0 | 0 | null | 2022-12-07T23:43:43 | 2017-12-06T00:50:28 | Python | UTF-8 | Python | false | false | 4,993 | py | course_users.py | from database import db
from views.users import User, user_response_model, UserService
from views.courses import Course, course_response_model, CourseService
from views.roles import Role
from views.schools import School
from flask import jsonify, request
from flask_restplus import Namespace, Resource, fields
import uui... |
d166d09d6f595f883df56f7f07fe572ea232a5c4 | 132ef72cbb2d404d4520a2cb5e1b604835f70d8b | /tests/console/commands/self/utils.py | 793f36a021d93be1cc38ee4a5c3bd4655d8331b2 | [
"MIT"
] | permissive | tianhm/poetry | b5e6d70a9fedebde3529915f990560ccaa9ceda6 | 2b15ce10f02b0c6347fe2f12ae902488edeaaf7c | refs/heads/master | 2023-08-31T04:00:39.337388 | 2023-03-27T15:20:47 | 2023-03-27T15:20:47 | 240,429,186 | 0 | 0 | MIT | 2023-03-31T18:52:04 | 2020-02-14T04:39:43 | Python | UTF-8 | Python | false | false | 1,069 | py | utils.py | from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING
from poetry.factory import Factory
if TYPE_CHECKING:
from tomlkit.container import Table as TOMLTable
def get_self_command_dependencies(locked: bool = True) -> TOMLTable:
from poetry.console.commands.self.self_com... |
7751f82c1d47675ebc790a6836b0f69593dfa8de | d3af1ba237c02c4c38b34837f38e6613d9283444 | /Modules/player.py | f8a5378da87c641d49e1403ccc148ab604ef5ddd | [] | no_license | kwagogames/Game-Off-2020-Fruitshot | 629f8941ee3c8ddddcb2b2384ca5032442e3b323 | 216d767ba7615fd94eaf18c1964fdc7baf034d2a | refs/heads/main | 2023-03-23T20:15:35.999360 | 2021-03-11T00:15:17 | 2021-03-11T00:15:17 | 315,000,888 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,827 | py | player.py | #Initialize pygame
import pygame, math
pygame.init()
from pygame.locals import *
from Data.Modules.ball import Ball
from Data.Modules.entity import Entity
#OwO OwO It's the player class
class Player(Entity):
#Initialize the player class
def __init__(self, loc):
super().__init__(loc, 32, 64, None)
... |
764512bb1cf506d5c57ba2bb050f221514d16b29 | a40324cd7cb489819bec1b38329124853d646792 | /Question_55.py | eaf2661910c5422712f1dc86533a529e8a8a529a | [] | no_license | Arun-07/python_100_exercises | 07da04b8e000e9dd65f85a294038d05b837465bf | b2b1955dec0f85ccd25c455d483f60759cb30721 | refs/heads/main | 2023-07-31T11:59:41.365721 | 2021-09-16T04:48:05 | 2021-09-16T04:48:05 | 401,070,674 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 484 | py | Question_55.py | # Write a program which accepts a sequence of words separated by
# whitespace as input to print the words composed of digits only.
# Example: If the following words is given as input to the program: 2 cats and 3 dogs.
# Then, the output of the program should be: ['2', '3']
import re
user_input = input("Enter a sente... |
90729e6a483594dd3f3c58df9d868e32ad61556f | e89ceef24778527c48f41dc78d6da7e137407050 | /smach_ros/smach_ros/simple_action_state.py | 67ada371fd14406ae6df5b534517dc55de041b07 | [
"BSD-3-Clause"
] | permissive | ros/executive_smach | 1be7caa43c29b494644b3acbfd1c48a5eee79cbd | f14c51a949519a6532125cc1fa5d026e07e210a0 | refs/heads/ros2 | 2023-08-11T13:52:47.150717 | 2023-07-14T22:51:09 | 2023-07-14T22:51:09 | 6,479,522 | 147 | 114 | NOASSERTION | 2023-07-22T21:53:07 | 2012-10-31T19:32:12 | Python | UTF-8 | Python | false | false | 18,137 | py | simple_action_state.py | #!/usr/bin/env python3
import rclpy
import rclpy.time
from rclpy.duration import Duration
import rclpy.action
from rclpy.action.client import GoalStatus
import threading
import traceback
import smach
from .ros_state import RosState
__all__ = ['SimpleActionState']
class SimpleActionState(RosState):
"""Simple act... |
dbe132ce449eaa993108d414a85a76e54a5ea98a | 9e9e0985789b51210c7fe315ae98949de8b23469 | /tests/parser/syntax/test_concat.py | e128e7c6ae18fdc95ab1e3f43a493b1cb5cdd487 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | vyperlang/vyper | ea614230edccf3424aad746f66874e1f32c55c57 | 158099b9c1a49b5472293c1fb7a4baf3cd015eb5 | refs/heads/master | 2023-08-30T02:18:48.923346 | 2023-08-27T02:59:27 | 2023-08-27T02:59:27 | 73,461,676 | 2,359 | 469 | NOASSERTION | 2023-09-14T13:05:24 | 2016-11-11T08:56:41 | Python | UTF-8 | Python | false | false | 2,672 | py | test_concat.py | import pytest
from vyper import compiler
from vyper.exceptions import ArgumentException, InvalidType, TypeMismatch
fail_list = [
(
"""
@external
def cat(i1: Bytes[10], i2: Bytes[30]) -> Bytes[40]:
return concat(i1, i2, i1, i1)
""",
TypeMismatch,
),
(
"""
@external
def cat(i... |
39bf015e75f76e259cae32b43406617798b6fbfd | 1a935e313b7652acb2211bef62abc4faae497dfd | /Python/Dictionary and Sets/empty_sets.py | f0209b6e579bdd100d3add29a0a106f0fa1acafa | [] | no_license | Medini212/Hacktoberfest2021 | f0739572278743fe34b74d813b8c3d0ef60942ad | 47207b7e29c639667472c78e65b8e504586b8ceb | refs/heads/main | 2023-08-12T17:06:47.418786 | 2021-10-15T04:02:38 | 2021-10-15T04:02:38 | 417,841,434 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 588 | py | empty_sets.py | # important:this syntax is create the empty dictionary not an empty set
b={}
print(type(b))
# the empty set is created using the below syntax:
c=set()
print(type(c))
c.add(4)
c.add(5)
c.add(4) #adding a value repeatedly does not ch 1ange a set
c.add((4, 5, 6)) #add touples into the sets
# c.add({4:5}) # cannot a... |
b283d841485f872d9f247eda8c911a66b7990408 | a8f34c11e1923d3f96d37c59219ba91e48a5b6f2 | /data_processing/load_data.py | 61f7a0213ade7fa6cf34c1ed64ed33b9dafac966 | [] | no_license | manuel-lang/Hack-und-Hoernli | c53416286085ec3b9d997fd77435f36e8915bb7c | 32820cb857a6512933d9eab5cb7117c768867582 | refs/heads/main | 2023-03-21T22:19:20.036937 | 2021-03-20T22:53:37 | 2021-03-20T22:53:37 | 349,665,861 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,173 | py | load_data.py | import wapi
from matplotlib import pyplot as plt
from datetime import datetime
import pandas as pd
client_id = "kU4j3zAKMPOKK4dCVYh2t_tSjRKf2mYY"
client_secret = "ElZ9zXapi2quS6_.ciyRaBktTflNGLiU04EH5qM1Pm1zvMKpFoxTS4lnhL_ZfAl7KeDwx5fRENTJ9G58K2zWgcmItmSW_-kcQHPE"
def load_data() -> pd.DataFrame:
session = wapi.S... |
b35debb53c4502f1aa03b8e81f9a44dfc3f853fd | e21c82013436675c34fc4d24c6de0432993a2b3a | /cleverhans/devtools/mocks.py | 8e906fbf470595826f85023eeb7268b97242435e | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | yogeshbalaji/InvGAN | 998a001dffa082e0ce2010c31ccc5d76415c24a2 | bbe96757fa7daded0090b1d9a26b9c90d7d87c61 | refs/heads/master | 2022-12-11T10:53:31.947362 | 2019-12-04T18:45:47 | 2019-12-04T18:45:47 | 223,475,879 | 17 | 2 | Apache-2.0 | 2022-05-26T20:35:45 | 2019-11-22T19:51:27 | Python | UTF-8 | Python | false | false | 2,647 | py | mocks.py | """Utility functions for mocking up tests.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
import numpy as np
from cleverhans.dataset import Dataset, np_utils
def random_feed_dict(rng, placeholders):
"""
Returns random data to be us... |
6294be345912037e56a9761d56b06e52ba8cf640 | f45d50908f751067607d279e485ffd30ccdd7a57 | /bitgrayEKart/offices/models.py | a3c1ea14047132ad04db24d668e52b5e722a59b9 | [] | no_license | jaconsta/bitgray-bitcart | 8df1168e7ae17abbc7fe3583becb060f2f3c8a4a | c63470279f2b2a890f1710866779eef1e8bdc664 | refs/heads/master | 2021-01-10T10:31:07.715659 | 2015-11-09T06:22:37 | 2015-11-09T06:22:37 | 45,114,722 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 472 | py | models.py | from django.db import models
class Office(models.Model):
office = models.CharField(max_length=40, db_column='sede')
address = models.CharField(max_length=40, db_column='direccion')
def __unicode__(self):
return 'Office: %s, address: %s' % (office, address)
def toJson(self):
return {
... |
b0c9872834f9cd974a0c1ad62deebf4ea8758102 | 63519b144e8b2d881c8f6e99b9c61aae5ab408ca | /hill_compare_tongario_response.py | 41aaea0d9bff90f872030bad47d59e1e266804b7 | [] | no_license | kujaku11/sandbox_scripts | 667d260ef42c3fe90c9543e0a938fdb104368700 | 080003cdae3a14fec5178d3e7a854d142ef3948c | refs/heads/master | 2023-08-10T18:27:30.463398 | 2023-08-05T01:28:29 | 2023-08-05T01:28:29 | 75,033,125 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 8,228 | py | hill_compare_tongario_response.py | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 28 12:54:20 2016
@author: jpeacock
"""
import os
import matplotlib.pyplot as plt
import scipy.signal as sps
import mtpy.core.mt as mt
import numpy as np
from matplotlib.ticker import MultipleLocator, FormatStrFormatter
base_path = r"c:\Users\jpeacock\Documents\ShanesBug... |
204f3699ed0e8d0e5532c328822629b64c7455ce | aa382874e70ee2146465c3bf07535bcd1b799d0e | /leetcode_single_number.py | 60b21093e8a3c9dbc0bafc51266c7f0943f6eaba | [] | no_license | davidngu3/leetcode | 43660f2f0cebd7205734870b92ae3d87592b3071 | 6da4f81d474091fe0f735586f0474564d4014e9a | refs/heads/master | 2022-03-25T13:32:27.984531 | 2022-02-21T22:42:58 | 2022-02-21T22:42:58 | 235,228,556 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 502 | py | leetcode_single_number.py | # Given a non-empty array of integers nums, every element appears twice except for one. Find that single one.
# You must implement a solution with a linear runtime complexity and use only constant extra space.
class Solution:
def singleNumber(self, nums: List[int]) -> int:
hashset = set()
... |
71959d2ae09d627b8e2ea65dd87098a31f07a504 | 678fb3a2e9a3ca8cdcfc325cf1e8e11d4db74c9f | /main.py | 2cab43f3dbc94aa6969d25443089e6def316d671 | [] | no_license | Jpescudero/Golf-Ball-Simulator | fb9982bbd7bcf310ec348b0aa456e6af50ef7770 | 5674b5bfd21b9fcbab53ee4e86a85424fb624dce | refs/heads/master | 2020-03-17T14:32:33.829770 | 2018-05-16T14:20:42 | 2018-05-16T14:20:42 | 133,676,300 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,565 | py | main.py | import os
import numpy as np
import math
from scipy.integrate import odeint,RK45
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
## Constants
## ===========================================================
m = 0.045
A = 0.0014129
rho = 1.177
omega = np.array([0,-200,100])
d... |
a0458a5b0181ce95f506f3d4975fa6f6e263ede0 | a5efe3f7b3448c34a66189ba034c71c85a1fef07 | /Sindri/CubicEOS.py | 972c65d624b44289fde7cf678fb0861fab52a95e | [
"MIT"
] | permissive | marcusbfs/Sindri | ff702501a9d2106db21ed7ecfd0f9554389e2a02 | 17a5335aed17d4740c3bbd0ef828b0fc5dcea1da | refs/heads/master | 2023-07-23T06:40:21.664699 | 2020-05-07T22:17:25 | 2020-05-07T22:17:25 | 164,522,180 | 18 | 5 | MIT | 2023-07-06T21:34:15 | 2019-01-08T00:46:07 | Python | UTF-8 | Python | false | false | 6,802 | py | CubicEOS.py | import abc
import numpy as np
import sympy as sp
from numba import njit, cfunc, types
from scipy import LowLevelCallable
from scipy.integrate import quad
from Properties import DeltaProp
from constants import R_IG, DBL_EPSILON
from polyEqSolver import solve_cubic
class CubicEOS(object):
"""
This class is us... |
03931871b2690eafa598e1a64ec9d5c3ba3bc3b4 | b3ed9b09f3a067c4a264a06ed73bee87400d6e99 | /Server/database.py | 9de2b456449dc6a550db32e9237d6e70ad4d4800 | [] | no_license | IAlmostDeveloper/booking-rooms-application | 5b8ee0d7f04b13dad1cb2ed5ef4fa3cf8b0ada47 | fb57e96c7bf554e2d2844ec08af7f25535d57ed7 | refs/heads/master | 2021-05-19T11:44:40.133362 | 2020-06-28T21:22:02 | 2020-06-28T21:22:02 | 251,681,346 | 0 | 0 | null | 2020-04-16T07:47:19 | 2020-03-31T17:34:51 | Python | UTF-8 | Python | false | false | 10,349 | py | database.py | import sqlite3
conn = sqlite3.connect('hotels.db')
cursor = conn.cursor()
class DatabaseManager:
@staticmethod
def createTables():
if len(cursor.execute("""SELECT name FROM sqlite_master WHERE type='table';""").fetchall()) == 0:
cursor.execute("""create table hotels(
id intege... |
707cca7412d942d1b74e072521ace21a443bfd3d | 54ddab3d7432ea00e45bba8aaa97f2f7aff5813f | /tests/test_binary_search_tree.py | 955a0eceed9baffe3e33858585cfd0535b0aca8b | [
"MIT"
] | permissive | dosart/Binary-search-tree-using-Python | 9646f56900b8b3136f1b168e22ee3bb40666e527 | 627e624968655074da45ea057778a0bf4579b46c | refs/heads/main | 2023-06-19T06:31:39.356671 | 2021-07-11T07:50:09 | 2021-07-11T07:50:09 | 383,796,305 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,333 | py | test_binary_search_tree.py | '''Tests of binary search tree.'''
import pytest
from binary_search_tree.binary_serch_tree import BinaryTree
from binary_search_tree.node import Node
def test_make_node():
node = Node(10, 'Test')
assert str(node) == 'key: 10 value: Test'
def test_make_bst():
bst = BinaryTree()
assert bst.is_empt... |
9f0e7417207b3c9f15f7afb6538a86d47872251e | ecaba173879f92f24e3c951866fda23c0a4fc426 | /perfkitbenchmarker/windows_virtual_machine.py | 8aebbedcfea577b4de6213634fc9078481233bbc | [
"Classpath-exception-2.0",
"BSD-3-Clause",
"AGPL-3.0-only",
"MIT",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause"
] | permissive | GoogleCloudPlatform/PerfKitBenchmarker | 2f4917fd796db4eb90822c557d8fa08a497fbd48 | d0699f32998898757b036704fba39e5471641f01 | refs/heads/master | 2023-09-02T08:14:54.110308 | 2023-09-01T20:28:01 | 2023-09-01T20:28:38 | 21,950,910 | 1,923 | 567 | Apache-2.0 | 2023-09-13T22:37:42 | 2014-07-17T17:23:26 | Python | UTF-8 | Python | false | false | 29,945 | py | windows_virtual_machine.py | # Copyright 2015 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
8c40f5351b5ecf682a9e9b65fb583bc3b5f25ee0 | d0f706e3a96abcde374dbdfba72890fa34bbb1f9 | /TelecommandeEtudiant/basicKeyLogger/library/api/Setup.py | 29ee970cabaffedd1f825953fed5ba1795a5af2c | [] | no_license | plafourca004/Projet-S3-S4 | 3dfddb620b25778281b26ae3e9927be8b8b06e3f | b609a33ab9c3b9d7baba34d6eb77d697026c100e | refs/heads/master | 2022-04-17T16:24:22.518126 | 2020-04-15T12:55:11 | 2020-04-15T12:55:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,904 | py | Setup.py |
""" Class for installation & deinstallation
"""
import sys
import os
if sys.platform == "win32" :
from win32com.shell import shell
import win32api
import pythoncom
from api.Context import *
from gui.DialogBox import *
class Setup :
""" Class for installation & deinstallation... |
1e45e4594470563b746f71a26a6f9919e974ad72 | cc5ccf42f330b057b2e402584da7f3b04539b692 | /dqn_atari_target.py | a94a93d2812063187d87f58fa106081de20f86b1 | [] | no_license | wfraher/Dueling-Deep-Q-Learning | 992194f8bc8e08d3f05dcef78af48ad80566cfba | 54c6abfd0672ce5b2c3eea389fce0d43e03dbb6b | refs/heads/master | 2020-12-05T18:47:40.350311 | 2020-01-07T15:55:40 | 2020-01-07T15:55:40 | 232,214,165 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,939 | py | dqn_atari_target.py | #By William Fraher
import gym
import tensorflow as tf
import numpy as np
import random
from matplotlib import pyplot as plt
from collections import deque
import time
import baselines
from skimage.transform import resize
env = gym.make('PongDeterministic-v4')
env = baselines.wrap_deepmind(env, frame_stack=True)
lr = ... |
03f7fc894bb436dde22942bd10d0d9efc1e20411 | 9a0a53bb4b9f5d2bf0f281166ae335e541c2af09 | /Covariance/TOFCovPF_block.py | 161f207c7253cecc3df6ae50b41c75505f817e93 | [] | no_license | thomasbarillot/Data_Analysis | cc11f38d264823a2b6070dfeea7537e489a941d1 | a7c832a1a025cf2f136c29caf5da61431ab40437 | refs/heads/master | 2020-07-01T05:41:17.613103 | 2019-08-07T14:31:16 | 2019-08-07T14:31:16 | 201,064,469 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,105 | py | TOFCovPF_block.py | import numpy as np
import scipy.io as sio
import sys
import scipy.ndimage as im
import glob
import os
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--noe", help="enter number of events (shots) per files",type=int)
parser.add_argument("--nos", help="enter number of samples",type=int)
parser.ad... |
72e4569f7da00d7e85b8d8c40c98448a5b1aa436 | 9c81f434f5d1b696176c66dbc67bbe36c0f666c0 | /task4/__main__.py | 6594a217dc1ea721ebac19dd4a7ff234dad51643 | [
"MIT"
] | permissive | SN4KEBYTE/fundamentals_of_cryptography | dea5b3c906d641ec85c0a8b675d67ad9920a1cac | 49c1ab3f9b743eb9ce6454dce8560ab33dc8434b | refs/heads/master | 2023-02-09T07:13:02.871353 | 2020-12-26T20:48:39 | 2020-12-26T20:48:39 | 292,606,172 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 518 | py | __main__.py | from task4.aes.aes import AES
from task4.const import IMAGE_DIR, ENC_DIR, DEC_DIR
password = input('Enter password: ')
aes = AES(password)
# part I
aes.encrypt(in_path=IMAGE_DIR / 'br4.png', out_path=ENC_DIR / 'br4_enc_part1')
aes.decrypt(in_path=ENC_DIR / 'br4_enc_part1', out_path=DEC_DIR / 'br4_dec_part1.png')
# p... |
1240318949f239a401691b734de74bca31848821 | 48bcc337a39b41d2189468dc0e861fa569b14918 | /recurrent-attention-model/example/mnist.py | d5fdf703f30dc78dfad149508ad507e1f21bb586 | [
"MIT"
] | permissive | Rishipai34/neural-_network_for_yale_b_dataset | a6f09748016c44628e1118aacd778e13fce31b3b | 62e6af257b75d2635ce2971adb8b17d7b943351b | refs/heads/master | 2022-11-06T00:15:24.539407 | 2020-06-19T21:51:21 | 2020-06-19T21:51:21 | 272,406,338 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,551 | py | mnist.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: mnist_center.py
# Author: Qian Ge <geqian1001@gmail.com>
import sys
import numpy as np
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
import platform
import scipy.misc
import os
import argparse
import read_mnist as loader
sys.path.append... |
3d074acf1d8c2166fc8ef0a8b900730dd3bbbade | 01ac9e40052a468dd472a296df0003c4e629e2c9 | /news_all/spiders_ydyl/cnipagov_all.py | 0049c83811a75acc940d4f4c698864942d05f0e4 | [] | no_license | Pintrue/news_all | b5cee16584ed92e6574edd825b574214df65d917 | eb8c32c79bdacd8e2f76b88f27871c3cd0118006 | refs/heads/master | 2022-03-23T13:34:10.354029 | 2019-11-22T07:40:50 | 2019-11-22T07:40:50 | 223,058,997 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,869 | py | cnipagov_all.py | # -*- coding: utf-8 -*-
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import Rule
from news_all.spider_models import NewsRCSpider
class Cnipagov_allSpider(NewsRCSpider):
"""中央人民政府&国家知识产权局"""
name = 'zyrmzf'
mystart_urls = {
'http://www.gov.cn/guowuyuan/xinwen.htm': 7628, # ... |
35b693fa38b6855353bfbd98c3fee5a82208d026 | 3355a2f5ee198e9f0bb11d63257137f06576b9be | /app.py | 16de891e62bc5b4d26c77fe17812c9a6328b6eb2 | [
"MIT"
] | permissive | ManpreetBahl/Karma-Farma | f4b46200524214299855c29025a9ab6a0d7fbd45 | 51893f3224335d95e554c95f936bb1b4532550ce | refs/heads/master | 2022-12-12T04:32:03.466920 | 2018-08-15T21:02:22 | 2018-08-15T21:02:22 | 175,295,221 | 0 | 0 | MIT | 2022-12-08T02:30:17 | 2019-03-12T20:57:43 | Python | UTF-8 | Python | false | false | 2,910 | py | app.py | """
Copyright 2018 Manpreet Bahl
[This program is licensed under the "MIT License"]
Please see the file LICENSE in the source distribution
of this software for license terms.
"""
#======================Imports========================
from flask import Flask, render_template, request, redirect, url_for, jsonify
... |
67557c8564bd68160c9bfb04f1e41eaf981c5443 | 9e5d2d4e4c6819f8950683be8d2a79c7116fcae1 | /setup.py | 3a4cfb91c33b2f6e074da9976c7c62c6d0c2a795 | [] | no_license | jimad12/PythonCourseRegistry | ce0ff2391b9eb0c7007bef2c0de4ab7757149128 | c3aa50d67a23dd97defb1879a9864bb44d7b6c54 | refs/heads/master | 2020-04-06T07:09:48.218169 | 2015-03-13T16:53:50 | 2015-03-13T16:53:50 | 32,166,694 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 183 | py | setup.py | #!/usr/bin/python
from distutils.core import setup
setup(name ='Student Course Registry',
version='1.0',
description='A simple Course Register GUI',
py_modules=['CourseRegistry']
) |
2faa8a572ad9ad919d54ec776f7d7380e6395e03 | 7bf1fb89d13a4edce7280b3179bf8f36d3f0bd01 | /Predicting AD.py | d31cf28a56d68f6be8d4e023d4e4d8e4aa1ebe53 | [] | no_license | PandaPowell/Predicting-Alzhemiers-s-using-somalogic-data | f5fb5c30164d737ed2155103a89e3873965b855a | ec03307990e978afbb873f617e98890e21628d40 | refs/heads/master | 2020-08-24T13:34:51.943376 | 2019-10-22T15:24:51 | 2019-10-22T15:24:51 | 216,835,890 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,363 | py | Predicting AD.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 9 15:37:29 2019
@author: samuelghatan
"""
import pandas as pd
import numpy as np
import seaborn as sns
from sklearn.metrics import f1_score
from sklearn.ensemble import RandomForestClassifier
from sklearn.linear_model import LogisticRegression
fro... |
93bd988dca243ac0296b92136d12bdbf311bd916 | 80271cadb7f66729ec7cbd5baf910a6295ed415c | /tests/TestMarketDataService.py | 080ad85e758df034aed525fbffbdf2a1b9f3a816 | [
"MIT"
] | permissive | ARKlab/Artesian.SDK-Python | 984423ea5a20bc6d7b2d46b55a6a24125c231764 | 3f21cd6df806b9bb3b9a3391855c22be0a95ebac | refs/heads/master | 2023-05-30T10:45:33.605067 | 2023-05-29T16:43:30 | 2023-05-29T16:43:30 | 185,778,315 | 3 | 1 | MIT | 2023-08-21T15:01:54 | 2019-05-09T10:30:44 | Python | UTF-8 | Python | false | false | 6,749 | py | TestMarketDataService.py | from Artesian import ArtesianConfig
import responses
import unittest
from Artesian._ClientsExecutor.ArtesianJsonSerializer import artesianJsonSerialize
from Artesian.MarketData import *
cfg = ArtesianConfig("https://baseurl.com", "APIKey")
class TestMarketDataServiceMarketData(unittest.IsolatedAsyncioTestCase):
... |
c750b039de374213951df1e9ba3268282e57a162 | c8f2b5254d70cb9602b4e02630623a9b7687f8ff | /conductor.py | ff7afaa40ae260640af234ec44aa789dd3451120 | [] | no_license | NNemec/NNlib | 14583b45c4c925ebdf2be51b80322d627fde984b | bf00b170fa909a0725046ab29465dcc42819ba69 | refs/heads/master | 2021-01-19T07:03:27.166743 | 2010-08-18T14:04:10 | 2010-08-18T14:04:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,344 | py | conductor.py | from calc import *
from copy import deepcopy
from param import param
param.createdefault("DISORDER_TYPE", "diagonal")
# param.DISORDER_TYPE = "hopping"
param.createdefault("DO_CALC_CHANNELS", False)
param.createdefault("NO_DISORDER_IN_CONTACTS", False)
class conductor:
def __init__(self,xyz,H_int,H_hop):
... |
59efedc36be5294d11577ee2ae04e854bd350183 | d6e783e7f7693c2292ebcecee9e7b7a794b7f0b2 | /resultados/views.py | 956b48a4ebff257b2fe4a2835518cdcd58347c52 | [] | no_license | iha/gda | acc3fb2d4cf92c998f5557e0228125af94ff954a | 588ec28bc19de39343b2180221bb309d8444bae7 | refs/heads/master | 2020-04-03T11:31:26.153521 | 2010-08-16T01:25:48 | 2010-08-16T01:25:48 | 779,079 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,048 | py | views.py | # -*- coding: utf-8 -*-
from django.core.paginator import Paginator, InvalidPage, EmptyPage
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from sad.models import *
"""
Views para consulta das res... |