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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f1df823cd71b67808497275e615efc86cb58a0eb | e598a68c1bc8d5ef1a822a2fbb7f9fea341ecc2e | /QuickAndDirtySeleniumExample/test_cases.py | e0f903d2de2f084cee7d8ccec8439515843e62f7 | [] | no_license | mikearias3/QABoy | 4c294fd10dbd3da860945177eea99a797864a45b | 1a3597c5a4474e54e76b02f6b3a002a9ab27e8d6 | refs/heads/master | 2021-06-06T00:36:34.956979 | 2020-04-09T15:17:38 | 2020-04-09T15:17:38 | 117,373,016 | 13 | 15 | null | null | null | null | UTF-8 | Python | false | false | 748 | py | test_cases.py | import unittest
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
class QuickAndDirtySeleniumExample(unittest.TestCase):
def test_search_proper_tutorial(self):
driver = webdriver.Chrome()
driver.get("https://www.google.com/")
searchbox = driver.find_element_by... |
1da0dd8083a53a52c2cf58b425fe276fe002165c | 6456c8c787cac5a8412247a8f39be336ee55cc56 | /dockerApp.py | 286dc281554b864856b8e5bc81cc406ec073cc0e | [] | no_license | uzzal2k5/docker_python | 682e504cda774074ad9620bdf344bb4b355aa8e2 | 66d8e4aa78493ef6b3a05ecc1312602507373aab | refs/heads/master | 2020-03-18T15:45:16.807104 | 2018-03-10T12:34:23 | 2018-03-10T12:34:23 | 134,927,688 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 714 | py | dockerApp.py | from docker_python.dockerConnect import cli
from docker_python.dockerClass import DockerPythonClass as dpc
print("Detail OF A Container - \n")
container = cli.containers()
containerId = container[0]['Id']
print(containerId)
print("INSPECT CONTAINER :", containerId, "\n\n", dpc.inspectContainer(containerId))
# print... |
68f9b9548593dfe462ed55172bf8db1bbb080910 | 92cc4f0070c632830b433c2035b3bee245ce2605 | /projectEuler_template.py | d6286899267bb9b90cdd460431dbd33345ecd5da | [] | no_license | Melkemann84/ProjectEuler | 29a0af11b5e2925a420902da903955a96db99145 | cb1014b1e729c3bcd4b1f0dd8268f31941f555a5 | refs/heads/main | 2023-08-08T21:39:15.381686 | 2023-08-07T15:54:15 | 2023-08-07T15:54:15 | 313,328,362 | 0 | 0 | null | 2020-11-17T10:08:13 | 2020-11-16T14:29:59 | Python | UTF-8 | Python | false | false | 562 | py | projectEuler_template.py | import time
import pyperclip
# https://projecteuler.net/problem=
'''
'''
def main():
result = 0
return result
def showMe(answer,start_time): #returns answer in clipboard and calculates time used
print("----------------------------------")
print(f"The answer: {answer} has been copied to your clipboard... |
8f70c35891e00b892dc0863c76765284c47cf243 | 16a34ec7e642d3fa7a33edfd0e076d70fd8dc73e | /Python/Zelle/Chapter3_ComputingWithNumbers/ProgrammingExercises/17_SquareRootNewtonsMethod/squarerootNewtonsMethod.py | 7aeb2bc0e6e274c2f945105466c574d8ca4fedf3 | [
"MIT"
] | permissive | jeffvswanson/CodingPractice | 0c5a10a75d87e9d97dd5a0905d94f11554393bd5 | 9ea8e0dd504230cea0e8684b31ef22c3ed90d2fb | refs/heads/master | 2021-08-16T10:53:26.448968 | 2020-04-01T02:30:28 | 2020-04-01T02:30:28 | 143,548,448 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,123 | py | squarerootNewtonsMethod.py | # squarerootNewtonsMethod.py
# A program that attempts to find the square root of a number selected by the
# user by iterating Newton's method over a number of times selected by the user. The program then checks for accuracy.
"""You have seen that the math library contains a function that computes the
square root of nu... |
a9df18628c16d3639fbc1e8ea0bf054de378d1e0 | 7eb7f594a605790c40472a35cae9d0f6d020c9d4 | /src/train_blstm.py | 49b8236f333a547c29cf36702e0cd70eaad55a5a | [] | no_license | gaoyiyeah/TF-punctuator | e0f423d59af8f97abea5b06a01dec8e5eb1be819 | 48f87b260016a65d25e173f63463f7bd8ebea323 | refs/heads/master | 2021-08-06T23:37:20.835928 | 2017-11-07T06:21:48 | 2017-11-07T06:21:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,373 | py | train_blstm.py | import logging
import os
import numpy as np
import tensorflow as tf
import punc_input_blstm
import utils
from conf import *
from model import blstm
flags = tf.flags
flags.DEFINE_string("model", "test",
"A type of model. Possible options are: small, medium, large, test."
)
flags.DEFINE_string("data_path", None,
... |
ba7b8491e35217cd49040c6fa9f6b31d54715569 | 89420cda57f03791a5448ed4eeb967d06a4aade3 | /examples/matplotlib/mpl_plot_violin.py | a7c199f338cfb9c4b9c22a7dd6078f6dbc49bd65 | [
"Apache-2.0"
] | permissive | arviz-devs/arviz | fa2423e28f7a8c1b22986dbef317579c00744f75 | 24c260a0390d030e106943f21811652ea82aebc7 | refs/heads/main | 2023-09-03T12:22:12.075948 | 2023-07-18T22:29:35 | 2023-07-18T22:29:35 | 39,890,704 | 1,421 | 413 | Apache-2.0 | 2023-09-13T15:53:19 | 2015-07-29T11:51:10 | Python | UTF-8 | Python | false | false | 270 | py | mpl_plot_violin.py | """
Violin plot
===========
_gallery_category: Distributions
"""
import matplotlib.pyplot as plt
import arviz as az
az.style.use("arviz-doc")
data = az.load_arviz_data("non_centered_eight")
az.plot_violin(data, var_names=["mu", "tau"], figsize=(11.5, 5))
plt.show()
|
c16367878e05f3247be239fc8ce3198a6b1a0750 | 7754f41a7447010b8b596089dd188ea5f61fb391 | /base.py | fdfad1bdce419dd32cc5d3cb4c8b2bfd423f1236 | [] | no_license | zhouzhaoxin/g | 05645a0ff1f53e94079563a73cd467f26f8372f0 | 7bb45207ec17b7c18285cba7fe8d7800189bec0f | refs/heads/master | 2021-03-17T23:42:06.829201 | 2020-03-20T06:54:01 | 2020-03-20T06:54:01 | 247,027,353 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,175 | py | base.py | import collections
import difflib
import hashlib
import os
import re
import stat
import struct
import zlib
from functools import singledispatchmethod
from typing import List, Tuple
from lib import write_file, find_path, read_file
# .git/index 中索引的内容
IndexEntry = collections.namedtuple('IndexEntry', [
'ctime_s', '... |
4d403d9a00ea7d55b4aab915dc6ab904220a98a6 | bdb61d66df736343a1e657c46e1b29d40f52050c | /driveamerican/scrapingapp/web_scraping.py | 895cfdd61bbce68ee7942348bbbfae101a751167 | [] | no_license | viktor-orkush/driveamerican | 33ccf2d6a2962aeece3d839e6d0484dbaafe3ab9 | 4b4e0048951151e2f41e82032a58061b455af0ec | refs/heads/master | 2023-08-10T07:51:20.803203 | 2023-07-24T13:57:50 | 2023-07-24T13:57:50 | 238,725,538 | 0 | 0 | null | 2022-07-06T20:36:58 | 2020-02-06T15:53:10 | HTML | UTF-8 | Python | false | false | 9,778 | py | web_scraping.py | import math
import numbers
import sys, os
import random
from bs4 import BeautifulSoup
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
project_dir = os.path.join(os.path.dirname(BASE_DIR), "driveamerican")
sys.path.append(project_dir)
os.environ['DJANGO_SETTINGS_MODULE'] = 'driveamerican.setting... |
29a4daf879670e584ee841774d2df0a73569c737 | f004ccd10326cc5eb78dc3dfe0d88de343161ce5 | /frame_grabber.py | 4c5c3d59b1db54acc20a499009c40d8e5233773e | [
"MIT"
] | permissive | crazedrunner/mlUtils | d63d94bce9075a64728428a3a169d1cd512dd219 | 73714f4b27a128efc16c003c028937e029f66848 | refs/heads/master | 2020-03-27T22:25:56.539098 | 2018-09-16T01:50:53 | 2018-09-16T01:50:53 | 147,230,558 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,206 | py | frame_grabber.py | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 2 11:56:51 2018
@author: crazedrunner
"""
import argparse
import datetime
import cv2
import os
def main():
print('Entered main')
ap = argparse.ArgumentParser()
ap.add_argument('-s', '--source',type=str, help='Source of video files')
ap.add_argument('-d'... |
874579267cff50229f04212acb1236bc417c37ff | 7caf0b8c1ca17770f2d5f2b17e19eaeb4eae7449 | /traitementBot/models.py | 9d1317e64e4bf3ab6b49b3571ce1393af0996c00 | [] | no_license | Fourier1/ProjetARTCI | 252143a8d9479c37d7ef39421f636986f1361247 | 5cee0c1211e1c560b5cc412cf8cbdcefc014dd8f | refs/heads/master | 2021-07-05T05:25:03.148992 | 2017-09-28T09:48:50 | 2017-09-28T09:48:50 | 104,999,649 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,410 | py | models.py | # -*- coding:utf-8 -*-
from django.db import models
# Create your models here.
class Asn(models.Model):
"""
Table de stock des ASN
"""
name = models.CharField(max_length=150, verbose_name="ASN", unique=True)
code = models.IntegerField(verbose_name="Code ASN", unique=True)
class IP(models.Mod... |
08811848fcd81d61428c4a80cc8b411af268b2d9 | fc9df85e7d1f923b96b710916e6c85497a77cffa | /backend/api/urls.py | d1956d79d535ca0b589b96289840dbc86734540b | [] | no_license | Facu923/Ripio-Test-Fullstack---Backend | a965b2b0adefe5dde97b18a6fec2b7eedc85b150 | 04b4c79ac4d7ed2ae369b45725e19c5fffe0e484 | refs/heads/master | 2022-12-23T09:52:43.075704 | 2018-09-03T20:50:12 | 2018-09-03T20:50:12 | 147,051,435 | 0 | 1 | null | 2022-12-16T03:26:10 | 2018-09-02T03:31:37 | Python | UTF-8 | Python | false | false | 884 | py | urls.py | from django.conf.urls import url, include
from rest_framework import routers
from backend.api import views
from rest_framework.authtoken.views import ObtainAuthToken
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
router.register(r'clients', ... |
8fb943485fd273339e280f373d69fd335256a891 | a8ffba945b32a49a1223161510dad6e821ab15d6 | /airone/tests/test_ldap_login.py | 87ccc86ecfd4d0dcec4620789e665d53676deb64 | [
"MIT"
] | permissive | nakacya/airone | c26f63bca5b14e7c1dea6daa73f87a820e362ba4 | fba71425b94c53ed6f1846afb2435486cc994e96 | refs/heads/master | 2020-12-23T01:41:51.229493 | 2020-01-29T11:12:46 | 2020-01-29T11:12:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,291 | py | test_ldap_login.py | import ldap3
import mock
from django.test import override_settings
from airone.lib.test import AironeTestCase
from user.models import User
@override_settings(AUTHENTICATION_BACKENDS=('airone.auth.ldap.LDAPBackend',))
class ViewTest(AironeTestCase):
def test_local_authentication(self):
# When invalid use... |
13606f767fbcdee60f704493b4b868277651da18 | 72aa74b9bf23495fb4344e2c5c0a711b65c12a42 | /Text Reflow.py | be5e84c170d125cffef6e1cdc0c64c0708293c4e | [] | no_license | MisterSpencerBailey/Daily-Programmer | e0cb0703d6b0cee4c9dbe56a6128b53efdc76004 | 551982081b2a8c2eb9c01ff09c3483c93fdeece9 | refs/heads/master | 2021-01-19T13:08:03.388955 | 2017-09-06T07:32:35 | 2017-09-06T07:32:35 | 100,826,206 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 629 | py | Text Reflow.py | # Source: https://www.reddit.com/r/dailyprogrammer/comments/4ybbcz/20160818_challenge_279_intermediate_text_reflow/
def reflowed(file):
lines = open(file).read().split()
line_length = 0
reflowed = ''
for word in lines:
if len(word) + line_length <= 40:
reflowed += word
... |
d9591ce7d50d0d312e1bde77ec9ed2c505aa6464 | eca91a77af12c9022bd0e86caf8de3e8fa4f7ae6 | /apps/order/admin.py | 17957e9c5213d19738f596585128dbb3c2e215f8 | [
"BSD-2-Clause"
] | permissive | rivertoday/ecmexample | e096af02ec44a866cf15133a21ffcdd3cf572011 | 2ce0e0a6cc09dbcb02b48e010e268fad2b41aef6 | refs/heads/master | 2020-06-14T12:23:30.803686 | 2019-09-16T08:32:08 | 2019-09-16T08:32:08 | 195,003,321 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 761 | py | admin.py | from django.contrib import admin
from .models import OrderInfo, OrderGoods
# Register your models here.
class OrderGoodsInline(admin.TabularInline):
model = OrderGoods
extra = 0
verbose_name = u'订单商品'
class OrderInfoAdmin(admin.ModelAdmin):
"""订单模型admin管理类"""
fieldsets = [
(None, {'fields'... |
9805f83516d9478dcdf4196ff2c9c1ee9505b68e | d29444d69faa572db1462d4f78a30e0c7dece713 | /lib/Util.py | d151128d1eb5222930cde01e7c065081c1e213e7 | [] | no_license | YinGithub/DemoWallet | 57400a3f70c64c73503679a36c6e9e3532936f9a | 2733cdb03c2ada74d5f794d19ec680ff16406861 | refs/heads/master | 2021-01-10T14:38:53.413589 | 2016-02-16T08:53:15 | 2016-02-16T08:53:15 | 49,122,203 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 536 | py | Util.py | import random
from apptest import GP
import time
testAppletAid = 'A000000003'
def installTestApplet(card):
gp = GP.GP()
gp.Authentication(card, '01')
gp.Delete(testAppletAid, card)
gp.Install('A000000001', 'A000000003', testAppletAid , card) #card lock
def generateRnd(len):
return ''.join(['%02X... |
6e2553d4aa0279a408b6f8cf3e25210a1b4bcd32 | 3b7ef4d29c3d3733954febe47b09e092ab67362b | /test/unit/test_update_linkage_matrix.py | d957ee7433d5a88461d5438079873ed5f904b86b | [
"MIT-0",
"MIT"
] | permissive | KnowEnG-Research/KnowEnG_Pipelines_Library | 3559125663ba9311e0e1e81a9d33d4c94eed9181 | da2881777c47d40d5ad9758163eef09743946fb9 | refs/heads/master | 2021-01-12T05:30:04.816372 | 2018-08-01T21:13:50 | 2018-08-01T21:13:50 | 77,939,086 | 0 | 10 | null | 2018-06-01T15:32:43 | 2017-01-03T17:39:28 | Python | UTF-8 | Python | false | false | 1,342 | py | test_update_linkage_matrix.py | import numpy as np
import unittest
from unittest import TestCase
import knpackage.toolbox as kn
class TestUpdate_linkage_matrix(TestCase):
def test_update_linkage_matrix(self):
""" create a consensus matrix by sampling a synthesized set of clusters
assert that the clustering is equivalent
... |
c1512e611fe4e00d1933febc71c6170ff595da9d | 9789aaa94e4a321fed2a1f624ef180d938f1fe56 | /src/common/view/controllerview.py | f52dc1d464650b08e9a70f61efe2f193ce280653 | [] | no_license | fantascy/snsanalytics | 61ff6b8f384f0bd4be8f89a2a19101ad2cf1bc77 | 927f186c7f5a1d534e0ff7ce7aff46a0c1a36c51 | refs/heads/master | 2021-01-13T14:18:05.684839 | 2016-11-06T07:43:35 | 2016-11-06T07:43:35 | 72,827,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 844 | py | controllerview.py | from google.appengine.api import users
import conf
import context
from common import consts as common_const
class ControllerView(object):
def __init__(self):
self.dateFormat = common_const.UI_DATETIME_FORMAT
self.conf = conf
def ctx(self):
return context.get_context(raiseErrorIfNo... |
c29a35aedb3f53ae8ba2293b7efaabafee73c20e | 0ba2e5061577f6286ff9265ef1df9aca96769445 | /data_structures/Arrays/Python/intersection_of_two_arrays.py | bd243a1d312adb521a09ccf0f60a811225a40f62 | [
"CC0-1.0"
] | permissive | ZoranPandovski/al-go-rithms | 68d5d02f80a61de9baf8e50a81a52e7d0b3983a0 | 4ae6ba54e90af14af236e03e435eb0402dcac787 | refs/heads/master | 2023-09-04T16:04:04.321676 | 2023-06-06T15:22:16 | 2023-06-06T15:22:16 | 93,438,176 | 1,421 | 2,445 | CC0-1.0 | 2023-06-15T14:24:28 | 2017-06-05T19:20:20 | Jupyter Notebook | UTF-8 | Python | false | false | 1,273 | py | intersection_of_two_arrays.py | # LeetCode 349. Intersection of Two Arrays
# Given two integer arrays nums1 and nums2, return an array of their intersection.
# Each element in the result must be unique and you may return the result in any order.
# During an interview, one can mention brute force solution which is literally checking every element i... |
b3ebf368d0fbfb6225a25921eae6448954aa9b77 | 17d43076379ea7f63f949a18f294de4a89c40e15 | /dotasql/net.py | 4b56d29e27952984e149d9c05ff118ae86f4f48a | [] | no_license | mwstobo/dota-to-sqlite | d137ccb06b2c775b529f314fb321ba19086a5258 | be4bac2651149718b78d147774e69b0fe4fa255c | refs/heads/master | 2020-05-31T02:30:56.582048 | 2014-03-22T17:12:07 | 2014-03-22T17:12:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,850 | py | net.py | import urllib2
import json
import time
import dotasql.tools
import dotasql.matches
def gen_match_ids(account_id):
print "Generating match ids for account {0}...".format(account_id)
key = dotasql.tools.get_cfg("api-key")
last_match_id = ""
remaining, results = 1, 1
match_ids = []
while float(rem... |
6c081d13a3cb5b0fb113307f5b868ef361829c91 | ed3db4e261052f9948ef7d4c4f459f3ad6c76844 | /CVE-2017-5941-NodeJS-RCE.py | 9cf523d3d2166f5c58ad496e822363e989a6c17a | [] | no_license | Frivolous-scholar/CVE-2017-5941-NodeJS-RCE | 69bf2e04051399f686a1c8eb916c0ab8a6b34411 | ddd814c6a528329821caae47c797cfdd49467fd5 | refs/heads/master | 2022-07-30T08:15:22.807257 | 2020-05-12T07:38:12 | 2020-05-12T07:38:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,739 | py | CVE-2017-5941-NodeJS-RCE.py | #!/usr/bin/env python3
#-*- encoding:utf-8 -*-
import requests
import threading
import queue
import urllib3
import re
import random
import base64
urllib3.disable_warnings()
q=queue.Queue()
file=open('ip.txt')
for x in file.readlines():
q.put('http://'+x.strip())
q.put('https://'+x.strip())
def scan... |
e1e0097c0458ee2d5a21f12375cc5eef4d0dad7f | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02264/s882798843.py | f65742451e40e1a0528f83e857faad480c43c8e5 | [] | 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 | 622 | py | s882798843.py | n, q = [int(temp) for temp in input().split()]
tim = 0
dat = []
for mak in range(n) :
tem = [temp for temp in input().split()]
tem[1] = int(tem[1])
if tem[1] > q :
tim += q
dat.append(tem[0])
dat.append(tem[1] - q)
else :
tim += tem[1]
print(tem[0], tim)
while... |
dd4aff6614b2c595b10dbf7de7a386f18b58a0ad | 29033a51bac477d3fc85496c5db72d78956f1722 | /memo.py | e42366a04e07e4bb8725e0cb6167d23dbf48114c | [] | no_license | afcarl/python-algorithms-1 | baf1f371360d4fb20c5ca0340cb9aab3020cd5a2 | 9a21945735add7739b062be4cd016525c592f23d | refs/heads/master | 2020-08-31T04:49:41.937464 | 2014-06-29T23:15:41 | 2014-06-29T23:15:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 711 | py | memo.py | from functools import wraps
def memo(func):
"""A function that stores cached values from other functions.
Can be used as a decorator to avoid rewriting a function as a generator.
From Python Algorithms by Magnus Lie Hetland.
"""
cache = {} # Stored subproblem solutions
... |
9d926cbeae89ccfacb9d7164a5e02f211a7c8038 | f0cbe7d3c82377589f0c6acf36501a680d8361a9 | /configurer/manager.py | e7c0803f2d700c78376d213d73bebf098b132c48 | [
"Apache-2.0"
] | permissive | jamielennox/configurer | 8ad21a4de2901c154c3dcdce0c5271ebfd7a50a3 | 83edafc711aa15da534e90159aaca783ddbfbe56 | refs/heads/master | 2020-05-19T16:33:41.342895 | 2019-05-09T12:00:28 | 2019-05-09T12:00:28 | 185,113,307 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 373 | py | manager.py | from configurer.consts import NO_VALUE
class ConfigManager(object):
def __init__(self, readers):
self._readers = readers
def get(self, name, namespace=None, default=NO_VALUE):
for reader in self._readers:
value = reader.get(name, namespace)
if value is not NO_VALUE:
... |
2e431b67cf5d591a7b7fdb85742180d2de05ce01 | 14679f22b1df5e458374e6021a8fbb83b6089f4a | /tests/test_process_finished_games.py | 425b87413daa1f70599f59741c79c5be5b43893f | [] | no_license | alexandershov/pymash | 9c4c7338f7be7ad3409a40de33137e17987c1dec | 7c0a796a979e3683c06bf6198fda1a1c4e9a1782 | refs/heads/master | 2021-09-07T16:45:24.088445 | 2018-02-26T06:34:22 | 2018-02-26T06:34:22 | 104,709,292 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,300 | py | test_process_finished_games.py | import json
import typing as tp
from unittest import mock
import boto3
import pytest
from pymash import db
from pymash import events
from pymash import models
from pymash.scripts import process_finished_games
from pymash.tables import *
@pytest.mark.usefixtures('add_functions_and_repos')
def test_process_game_finis... |
ae66af4085100135fccfc50d544a48392bca0f3a | 65c905eecc25addaa3fac5b53e70ebc18078d5e4 | /django/samplepro/EmployeeManagementPortal/models.py | f83bd6306b76db3af930c1173ce62bba22f6e422 | [] | no_license | manitejadesetti/django_pro | 1b53aae7ec74b7c88938dd6db4a4b16d3479eea1 | c5c380a685af61a77a4947a8628a0e7767335875 | refs/heads/master | 2020-04-08T18:27:28.716829 | 2018-12-28T09:27:57 | 2018-12-28T09:27:57 | 159,608,910 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 317 | py | models.py | from __future__ import unicode_literals
from django.db import models
class AddEmployee(models.Model):
username = models.CharField(max_length=120)
emailId = models.EmailField(max_length=120,unique=True)
mobileNumber = models.CharField(max_length=10)
class Meta:
unique_together=["emailId"]
|
8a929e06a549a2b9b3b0bf4cc19ddda96ab454ad | f5b1fad277fafbbab82f6d7ad6340533787cde61 | /2019_Apr16/design_patterns/simple_test_functions.py | 4aaafa1dd0886cc4a6ba572d34549a09228e0433 | [] | no_license | animjain/PythonAdvancedTraining | 515233880e53be36d2258ee1334b5681f280773c | 9c69aece2fa82f72a418e26fbf069d71546845cd | refs/heads/master | 2020-05-09T20:37:04.373458 | 2019-04-18T07:10:23 | 2019-04-18T07:10:23 | 181,413,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | simple_test_functions.py | def greet():
return "Hello world"
def welcome():
return "Welcome..."
def test():
return "a test function"
__decorate__ = ["greet", "welcome"]
|
5add66cb875523fc3283daaf966ae8b281740d2a | 57de17ca25d9e52bf4bb0793ab1b29be9a34eb5f | /chiffre-cesar.py | afb4036a047148dc10ae23d40ff2fd10a33deeff | [] | no_license | FrancoHolimananjara/Chiffrement | 388a1e8ffe640e2130011c17b912340fab26b2f8 | f069128aeb7eb8599581133c9e655d083c89660d | refs/heads/main | 2023-06-16T17:07:56.502420 | 2021-07-12T20:42:53 | 2021-07-12T20:42:53 | 385,386,446 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 835 | py | chiffre-cesar.py | import os
def menu():
print("\t1-ROT13\n\t2-CESAR")
def decalage(p):
if p>122:
p=p-26
f=p
return f
elif p<=122:
f=p
return f
texte = input(f'Entrer le text clair : \n[{"Kofra"}]>')
menu()
choix = (int)(input(f'[{"Kofra"}]>'))
if(choix==1):
os.system("cls")
print("-------ROT13-------")
print("text... |
e18f2a3aff8c81eaddb0464f75ef6044dbd32c91 | 3015fabd04b2320045aef4b1e7f27fed2b13d9c3 | /testcase/test.py | 87c9413367839eb812bd4f37c28cbd818d9938ec | [] | no_license | MXblade/PythonStudy | 0469bd07b6494c6f432e790eca839f3f25cc85aa | a011b5e7a7d9647a5c00479e0c394c0417166768 | refs/heads/master | 2018-09-19T12:20:21.410364 | 2018-07-04T08:24:21 | 2018-07-04T08:24:21 | 113,963,451 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 311 | py | test.py | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
import math
input_num = input('input a number:')
maxnum = int(input_num)
for num in range(maxnum):
str_num = str(num)
sum = 0
for i in str_num:
sum += int(i)**len(str_num)
if sum == num:
print('the number '+ str_num + ' is that')
|
7c8127eae24075fdcb9a3427bebc7a6a7f2510ef | 61ebbf8768b273a3b2570fb7435d575e5358aa8a | /main.py | 8e003519742852a6e45d496a677c78d9db3478f0 | [
"MIT"
] | permissive | morganzwest/escaperoom | ad5ea040bc2ef0b9ece18a05ffa2a7dc2749fa1d | e7f02c62d8dfa8343d102dacbdf728e56b830a3b | refs/heads/main | 2023-02-08T07:17:26.722017 | 2021-01-01T21:08:39 | 2021-01-01T21:08:39 | 325,046,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,350 | py | main.py | from libs import hub
hub.check()
hub.CONSTANTS.initialize_databases()
def create_account(email: str, password: str, username: str):
while True:
try:
string = username + ":" + email.replace(".", "DOT")
print(string, password, username)
hub.CONSTANTS.DATABASE.update("/us... |
60527c823e899c7f3e059bf1e9f2bd230552501d | 7b446ae1d629a8c90c59bbe96f98f95955261675 | /raceresult.py | 0b2dfe5459b2fbd94e234c7ac999ff1ce93fc3af | [] | no_license | maukbe/horse-racing-tissue | dd877576efec0e1b2169d3098c80104a4e74cf35 | 08b4b874e618e5c71c035e49d0f4701d11dd09fe | refs/heads/master | 2021-05-09T00:18:21.484263 | 2018-02-13T22:23:44 | 2018-02-13T22:23:44 | 119,741,060 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 556 | py | raceresult.py | from position import Position
class RaceResult:
def __init__(self, distance, position):
self.distance = distance
self.position = position
# Distance in furlongs
@property
def distance(self):
return self.__distance
@distance.setter
def distance(self, dis... |
e147127a7f5cf3aac3dc049ba18cf976a2e5a6b4 | 47288e23d0248d7bfbda0cfae5bc138d389cbbb6 | /axiom/algebra/eq/given/eq/div.py | 09ab194a8b56ec7d9c36fc47635c7b9ecd7af869 | [] | no_license | cosmosZhou/sympy | d94ce6ad9028d143bb877f46fad4eda1d5dc2173 | 6160fff63636fd81755bd94e777ba450a09df517 | refs/heads/master | 2022-07-30T20:51:35.359580 | 2022-07-11T12:40:50 | 2022-07-11T12:40:50 | 199,948,191 | 3 | 1 | null | 2020-08-26T14:13:49 | 2019-08-01T00:34:25 | Python | UTF-8 | Python | false | false | 342 | py | div.py | from util import *
@apply
def apply(given, divisor=None):
lhs, rhs = given.of(Equal)
#assert divisor.is_nonzero
return Equal(lhs / divisor, rhs / divisor)
@prove
def prove(Eq):
x, y, d = Symbol(real=True)
Eq << apply(Equal(x, y), d)
Eq << Eq[-1] * d
if __name__ == '__main__':
run()
# ... |
feade4524259420dacd03cdd90309efb14c29ac3 | be5943e5ea5245c90a6543d4b1caa707d0a93ff4 | /app/website/migrations/0004_auto_20210505_2343.py | 16c1cd82d49b7f27532e6ee3b67e5a872e0baa6e | [] | no_license | Team-Poolside/teampoolside | 2c15499d25f53b0e2f34669cef9586aaa9ba1d86 | 27e1545c898ec4d773d0a69c3001559bde9fccf9 | refs/heads/master | 2023-06-25T10:13:47.108397 | 2021-07-31T01:25:45 | 2021-07-31T01:27:33 | 290,373,331 | 2 | 0 | null | 2021-05-09T20:21:43 | 2020-08-26T02:21:07 | CSS | UTF-8 | Python | false | false | 855 | py | 0004_auto_20210505_2343.py | # Generated by Django 3.1.6 on 2021-05-06 04:43
from django.db import migrations, models
import django.utils.timezone
import django_better_admin_arrayfield.models.fields
class Migration(migrations.Migration):
dependencies = [
('website', '0003_auto_20210505_2236'),
]
operations = [
migr... |
1e244095c0bed4f5d7ca5e063fc803cbe524d603 | 1bdb7275bea68ae8e52c880be99290a59732abc9 | /ChatRoom/ChatRoomApp/migrations/0005_auto_20210909_2338.py | 5b31f10c429b5d9453a5d2d595e8bd148648c436 | [] | no_license | Vladikyys/ChatRoom | 5eaece27f99596f0b3d0db5a4cac00bf36698cb8 | 87e396404fa0c884715339faef773815a9d64b66 | refs/heads/main | 2023-08-31T23:39:01.723807 | 2021-09-10T21:51:40 | 2021-09-10T21:51:40 | 405,218,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 549 | py | 0005_auto_20210909_2338.py | # Generated by Django 3.2.7 on 2021-09-09 20:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ChatRoomApp', '0004_auto_20210909_2337'),
]
operations = [
migrations.AlterField(
model_name='messages',
name='creat... |
a4cad233175536693edaee165964de61cdf99ae2 | 14f13d773cd3ad22e7838a3f543f9008bfedde99 | /hummingbot/connector/exchange/mexc/mexc_order_book_tracker.py | 1b93720d19e98d4da4ff3b94fbc17c12b032e51e | [
"Apache-2.0"
] | permissive | CoinAlpha/hummingbot | 0d1e2bd94de1280748647108c7d7800a09546eb8 | 82b1b47a0901ed8299c7176edaf21a9d6f49ef29 | refs/heads/master | 2023-09-01T11:24:43.322137 | 2023-04-26T15:02:09 | 2023-04-26T15:02:09 | 439,330,952 | 135 | 98 | Apache-2.0 | 2023-08-30T13:55:08 | 2021-12-17T12:50:42 | Python | UTF-8 | Python | false | false | 5,427 | py | mexc_order_book_tracker.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import asyncio
import logging
import time
from typing import (
List,
Optional
)
import aiohttp
from hummingbot.core.data_type.order_book import OrderBook
from hummingbot.core.api_throttler.async_throttler import AsyncThrottler
from hummingbot.core.data_type.order... |
92bfe126e15ee21b2ae25bebda84646829ad1d49 | 68c16dd8f2d31a6585be2e930584a14815808372 | /FakeSoapySDR.py | a83445a31246fbf43a08fd6e68c127bf2ec563ff | [] | no_license | weichenpku/ArgosWebGui | 2a2bc7f55ede4d04a33731f8f8764d77efb5950e | a8d8f4f30a1f07e73ad89838a6916d3488c8e907 | refs/heads/master | 2022-04-26T14:16:49.574222 | 2020-04-14T08:59:49 | 2020-04-14T08:59:49 | 162,383,512 | 1 | 0 | null | 2018-12-19T04:39:18 | 2018-12-19T04:39:18 | null | UTF-8 | Python | false | false | 5,765 | py | FakeSoapySDR.py | """
This is a FAKE SoapySDR file, just for debugging system without Iris or with saved data
I use this class for GUI testing wy@180804
"""
SOAPY_SDR_RX = 0
SOAPY_SDR_TX = 1
SOAPY_SDR_CF32 = None
SOAPY_SDR_TIMEOUT = None
SOAPY_SDR_WAIT_TRIGGER = 0
SOAPY_SDR_HAS_TIME = 1
SOAPY_SDR_END_BURST = 2
import ti... |
16fbf60f602890d08f12e8ba134e119ecf93c72e | 2679299fd580a8381ccdf1b52ea5f5dfab91e388 | /AbdomenDS.py | ed65d9a53610bd2e9ced332470ac72601da72941 | [] | no_license | deshanchathusanka/Attention-W-Net | 866a521ac8d9f7d8cdd8863805a99b8e1ca2bb6c | 77f374f2b40d573ea47cea4fc05dd093bd92a4d0 | refs/heads/master | 2023-03-17T19:53:23.654343 | 2019-10-04T18:26:12 | 2019-10-04T18:26:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,522 | py | AbdomenDS.py | import os
import numpy as np
import torch
import torch.utils.data as Data
from glob import glob
import pydicom
import cv2
from skimage.transform import resize
import matplotlib.pyplot as plt
from configure import Config
config = Config()
class AbdomenDS(Data.Dataset):
"""description of class"""
... |
2b7bc8f88817ea488ae9323444c836b0f26c990c | 6f2217cd15da6b7065d1bf6f44115bc08512ac04 | /saving data.py | e0fa847bdfc6c2593c0e395f5fde38316f50baf7 | [] | no_license | SteelHacks/TrialFinder | 292d67a139a012040c0ba723a4dbc615b2cd2aa5 | a32d0e2d68013361ce445df479cec3c81ca9fab8 | refs/heads/master | 2021-01-10T14:08:49.195881 | 2016-02-21T12:51:08 | 2016-02-21T12:51:08 | 52,132,862 | 0 | 0 | null | 2016-02-21T12:51:09 | 2016-02-20T02:40:43 | Python | UTF-8 | Python | false | false | 4,890 | py | saving data.py | # this is outline for the functions we use to store data of profiles
# data in profiles is stored as a dictionary in our computations
# the key is the name of the profile and it is linked to the set of diseases
# when the data is saved as a .txt file, the format is NAME:CONDITION,CONDITION,...
# the fucntions are:
# ... |
07bf0756c2814b8550222aea252e0f751cd22833 | 930309163b930559929323647b8d82238724f392 | /abc177_d.py | 96eee753d070a83db32c95475d05ff55fb5182f2 | [] | no_license | GINK03/atcoder-solvers | 874251dffc9f23b187faa77c439b445e53f8dfe1 | b1e7ac6e9d67938de9a85df4a2f9780fb1fbcee7 | refs/heads/master | 2021-11-07T14:16:52.138894 | 2021-09-12T13:32:29 | 2021-09-12T13:32:29 | 11,724,396 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,190 | py | abc177_d.py | import sys
sys.setrecursionlimit(1500)
class UnionFind:
def __init__(self, N):
# 最初はすべて根で初期化
self.par = [-1 for i in range(N)]
def root(self, x):
# print(x, self.par)
if self.par[x] == x:
return x
elif self.par[x] < 0:
# par = self.root(self.par... |
757d2c9f955556a347422fb580be0c092e402944 | 90861e62a2a65dc44e23b04d6c35460d10bd2037 | /singledigit.py | 7f5ff0d02daa7f06437d318bb0ff01eb42273755 | [] | no_license | prasanthreddympr/samplecode | fef6d604eaa63d0e9b03165aaf8f332197f691f3 | 9681362c19d2458b6c12cbc7d008aa69ed05284e | refs/heads/main | 2023-06-02T19:50:57.618348 | 2021-06-22T19:47:07 | 2021-06-22T19:47:07 | 379,375,397 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 311 | py | singledigit.py | t=int(input())
for i in range(t):
m,n,x=map(int,input().split())
su(m,n,x)
def su(m,n,x):
s=0
c=0
while m<=n:
while m!=0:
s=s+m%10
m=m//10
if s==x:
c=c+1
else:
return su(s)
print(c)
m=m+1
|
5bdf929e62b2c6364490e9a16993b205741c3c65 | 2c304b936472ce9ae6f43adce6d94161275712d3 | /DataChallenge.py | edd5c8742f39609db2b42de5b35645ed5cf0fbf5 | [] | no_license | subhankar-1/Data-Challenge-Submission- | be753c2eea7cd59fc8ab02c1ac44d9081474bb4b | fa662bdc566abccc134083f3953cfdc528707fdc | refs/heads/master | 2021-02-03T18:51:45.913395 | 2020-02-29T11:38:44 | 2020-02-29T11:38:44 | 243,528,626 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,358 | py | DataChallenge.py | #import all the necessary libraries.In our case CSV,pandas,selenium,BeautifulSoup
import csv
import pandas as pd
from selenium import webdriver
from bs4 import BeautifulSoup
#method to start the webdriver
def use_selenium_automation():
driver = webdriver.Firefox()
return driver
#method to crawl through web p... |
33312ce74527bc9c0d5dbfcabbb4783c03d9ef93 | e670d4f5ec751975f16f60f51fb4e2515be91251 | /emotion_id/model.py | ffd13626744c17860787568861c05c3360adc414 | [
"MIT"
] | permissive | chenchy/emotion_detection_cpc | 76b3b5037e6aba44f03b54d5426a41641355e9d2 | 92549a093721d7e7b89ef004c7a178bc759b4827 | refs/heads/master | 2023-02-17T21:32:16.648179 | 2021-01-16T23:44:07 | 2021-01-16T23:44:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,693 | py | model.py | from torch import nn
from math import ceil
from emotion_id.wavenet import Conv1dMasked, Conv1dSamePadding, ResidualStack
from util import GlobalNormalization, BatchNorm, Permute
class BaseModel:
@property
def num_params(self) -> int:
"""
:return: number of parameters in the module
"""
... |
f54efed9374be9b0e152b7b816927f738032e5de | 6d63fb09abb41f2c3f6ba66091b8c0507044104d | /verify_server.py | 4dcc2fc1901edc50b26e9012ac1d91d5a8b61c5f | [] | no_license | buaaswf/backup-my-projects | dbc3d0c4ac5af38b4b8ce07be7978e3ff36cf75c | 73577385da85fdd5899cb471220dd8334ca603bc | refs/heads/master | 2021-04-15T03:44:06.248881 | 2018-03-22T08:58:36 | 2018-03-22T08:58:36 | 126,304,153 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,355 | py | verify_server.py | import SocketServer
from SocketServer import StreamRequestHandler as SRH
from scipy.io import loadmat
import numpy as np
import cPickle as pickle
import math
from config import VERIFY_RATIO_HOST, VERIFY_RATIO_PORT
from sklearn import svm
from sklearn.externals import joblib
host = '192.168.1.1'
port = VER... |
9ce892a86e9550284201d63f4467acc65598384d | 9058ca37dc882743ad0b0920db7847e220f83ca9 | /Joshua David Sakharny - Mass and Velocity to Kinetic Energy and Momentum.py | a103604d201cae5b928742116ad44f308dca355a | [
"CC0-1.0"
] | permissive | joshuadavidsakharny/pythonProjects | a8cd6d0348fa368f53d667f4ab3b9d9ba81d7aef | f4f4a9ca771c5254f530e9e92cd9e32fe46be41f | refs/heads/main | 2023-03-24T03:56:50.961694 | 2021-03-12T19:50:54 | 2021-03-12T19:50:54 | 347,176,028 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 462 | py | Joshua David Sakharny - Mass and Velocity to Kinetic Energy and Momentum.py | # python program mass and velocity to kinetic energy and momentum
# input variables
objMass = float(input("Object Mass: "))
objVelocity = float(input("Object Velocity: "))
# calculate kinetic energy
objKineticEnergy = float(.5 * objMass * (objVelocity ** 2))
# calculate momentum
objMomentum = float(objMass * objVelo... |
ab473e48183d95ef12932b7c1151ce6c242a0d49 | 8d77f3b72dc52b85ee0c4ef6ba06f63a6920841f | /python/aitemplate/backend/profiler_runner.py | 26621a6a9c2f563e3fec1bd587e47ce4cd08f354 | [
"Apache-2.0"
] | permissive | facebookincubator/AITemplate | b643c217e1d15f7f17dab1eb1cc6855eab664b97 | c60dc19788217556ba12ea378c02b9fd0aea9ffe | refs/heads/main | 2023-08-28T18:22:15.828008 | 2023-08-28T14:43:41 | 2023-08-28T14:43:41 | 514,321,895 | 4,065 | 334 | Apache-2.0 | 2023-09-14T04:53:57 | 2022-07-15T15:40:58 | Python | UTF-8 | Python | false | false | 12,702 | py | profiler_runner.py | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
06bbcc04cca443060e28c772d2c86377f98ebcc8 | 35fc68fd80383c1be4fba160ae36a7ae3cc07f4a | /reproduction/Summarization/BertSum/dataloader.py | 6af797e4589cbb3c45d076f19634e3b199fc2c4d | [
"Apache-2.0"
] | permissive | irfan11111111/fastNLP | 38d5ec91fabc02ba43689a0f4ae91bdde68b8c89 | 148ad1dcb7aa4990ac30d9a62ae8b89b6e706f8c | refs/heads/master | 2023-01-04T18:38:00.058306 | 2020-10-30T08:39:53 | 2020-10-30T08:39:53 | 309,295,757 | 1 | 0 | Apache-2.0 | 2020-11-02T07:54:03 | 2020-11-02T07:54:02 | null | UTF-8 | Python | false | false | 6,057 | py | dataloader.py | from time import time
from datetime import timedelta
from fastNLP.io.dataset_loader import JsonLoader
from fastNLP.modules.encoder._bert import BertTokenizer
from fastNLP.io.data_bundle import DataBundle
from fastNLP.core.const import Const
class BertData(JsonLoader):
def __init__(self, max_nsents=60, max_nt... |
995f21f9ca870e6dd75b60f9e7396b2523f2feaa | ff0ae203d2a21680fe5301122b418b1e4655c638 | /textCaps/textCaps/model/textcaps.py | 75597ed5f58e407a75b9b6aecb94e76579ffd988 | [] | no_license | luwuming/textCaps-1 | 67dd23e28396ca9204cb73b1fae1bbde9e312382 | 08c086081058250d53e44e60286ef7f70aa4e567 | refs/heads/master | 2020-07-09T13:35:20.140088 | 2019-04-01T06:52:15 | 2019-04-01T06:52:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,748 | py | textcaps.py | # coding:utf-8
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
import tensorflow as tf
import numpy as np
from model.textcpas_model import TextCpas
from utils.model_serialize import ModelSerialize, ModelUnSerizlize
import os
import time
MODEL_NAME = 'textcn... |
de6eb5da8f8aef7845ab9675c99c0ed1c2e61776 | 8e6b0a3a3a651ace89317192490ae82bb0f38f95 | /coherency.py | 3866b6d08ed2b02e1014dbe9f0f120eee41e518a | [] | no_license | sslogar/coherency-tracker | 55b94998586bb3fdc31f59de04ac01d67f9d04bd | ca7aefbb323d0fd25d175e462eadb6b293c8b38b | refs/heads/master | 2021-05-18T20:36:58.227228 | 2020-04-08T20:13:46 | 2020-04-08T20:13:46 | 251,408,264 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,274 | py | coherency.py | from gensim.models import Word2Vec
from nltk.tokenize import WordPunctTokenizer
from gensim.models.ldamodel import LdaModel
from gensim.models.coherencemodel import CoherenceModel
import numpy as np
def tokenizeCorpus(text):
return [WordPunctTokenizer().tokenize(doc) for doc in text]
def w2v(text, size, window, c... |
63e006d6a55c05d7b81938835d37ae9ee41c0ebb | 14960f5082c0699d387ec4ae6c08b91d177f70ff | /mosega_backend/Initialization.py | 0fcb82fd70ec3e9f674f9e7810f823dbdc041224 | [] | no_license | aselarbd/text-analysis | fa3e3f30c310e3ef9e17858035560f21dab209c9 | 8ce8c300f08210e82c4b1be36950b1207d618611 | refs/heads/master | 2023-03-22T08:46:55.159037 | 2020-12-18T23:35:52 | 2020-12-18T23:35:52 | 311,016,235 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | Initialization.py | import Constants
from Cache.Main import get_cache_reference
from Database.Main import get_database_reference
def initialization():
term_database = get_database_reference(Constants.TERM)
term_cache = get_cache_reference(Constants.TERM)
terms = term_database.get_all()
term_cache.init_cache(items=terms)... |
ef051ab5e3f3d50573a308efe27678054bdc0954 | 2b275408031469257a84f2a9cac89ff54f900d16 | /yatt/parser.py | 32aad5c687e996fadf1abff2bd90dac1e1043aa0 | [
"MIT"
] | permissive | cborgolte/yatt | ba4e9341015ef51f37d043a9884ae24e02a43a09 | b175427a962e8e71df0f74470bb18e80d309229c | refs/heads/master | 2021-01-13T03:26:19.406526 | 2017-06-30T12:41:17 | 2017-06-30T12:41:17 | 77,554,782 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,403 | py | parser.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import dateparser
def set_day(date, context):
context['day'] = date
# start working day at 9:00 h
context['relative_base'] = datetime.datetime.combine(date,
datetime.time(9, 0))
def c... |
42c2271081c06a906137376b660df611331d5d82 | 569f41278a3b6cc46c0117da2f4a9b5b46848e25 | /demo_server.py | 5c94f6b96f21a1f6810d78fce8ee5e501bf7b96b | [
"MIT"
] | permissive | sebasguts/py-scscp | 9c7c72418e427e8913acda000b250dc9691ad62f | ec1753bcfc6e9ff3ad8be673f58840ea4b0d8a91 | refs/heads/master | 2021-01-19T17:26:10.848894 | 2017-02-17T10:40:00 | 2017-02-17T10:40:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,532 | py | demo_server.py | import socket
try:
import socketserver
except:
import SocketServer as socketserver
import logging
from openmath import openmath as om, convert as conv
from scscp.client import TimeoutError, CONNECTED
from scscp.server import SCSCPServer
from scscp.scscp import SCSCPQuit, SCSCPProtocolError
from scscp import sc... |
1f631f96881b420f066d0142147406869f1947cc | 3824f685da488724a75c093419969baa1cf38921 | /trash/lab6/lab6-7/task_1.py | 831368c9fbcba737e257371fe7e8fe450920dfa5 | [] | no_license | st2257st2257/mipt_inf | da4a04c49f20ad44573931d090a08e586a45ac21 | 1a34e32af40fe373409cd81ff779bd15ec345e1f | refs/heads/master | 2023-01-06T15:17:36.790902 | 2020-11-13T11:25:06 | 2020-11-13T11:25:06 | 298,484,287 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,923 | py | task_1.py | import pygame
from pygame.draw import *
from random import randint, uniform
pygame.init()
class User:
""" Создаём класс пользователя и вызываем его методы при обработка фвйловых данных """
def __init__(self, name="", score=0):
self.name = name
self.score = score
def __add__(self, number):... |
49d392d5b11e2abf9f9ae8197391970305d5dd6e | 4c94ff2a54141c430ad5ebca67cb676dd58805e8 | /tradingalgorithm.py | a3d7deb1148b70b6974ef3ee4916800afaf56604 | [] | no_license | rohithreddy12/Pythonsampleprojects | 84919c0407a169c17e9d64f1af6dfcd2f8892b73 | c66598586f6bd7014a3ce2fcd86ffb2451f5ee7a | refs/heads/master | 2022-07-06T15:45:31.181690 | 2020-05-19T02:34:37 | 2020-05-19T02:34:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,457 | py | tradingalgorithm.py | # -*- coding: utf-8 -*-
"""tradingalgorithm.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1h9liCxIV1-OuaY2wtdHj1t8-oVZW0MLZ
"""
# Import the libraries
import pandas as pd
import numpy as np
from datetime import datetime
import matplotlib.pyplot... |
ac6d252dd425abde73a6514949b52288c3d927b6 | cdc31f101033b69fc73e1d39c29ae7045da4ea61 | /scripts/makeRelease.py | 934773dc3b58e286ba619c14427f773694e95c6f | [
"MIT"
] | permissive | iosonofabio/ExpressionMatrix2 | 3e9f83f28d2f57dd84fd981cf3d20d11a56d0d46 | a6fc6938fe857fe1bd6a9200071957691295ba3c | refs/heads/master | 2021-01-24T13:18:56.834452 | 2018-02-27T18:00:50 | 2018-02-27T18:00:50 | 123,167,605 | 0 | 0 | MIT | 2018-02-27T18:00:01 | 2018-02-27T18:00:01 | null | UTF-8 | Python | false | false | 3,296 | py | makeRelease.py | #!/usr/bin/python3
"""
This script creates a tar file containing a release package containing
shared libraries for all supported platforms.
Is should be invoked with a single argument, the name of the release
package to create (e. g. 0.1.0).
This script must be invoked from the top level directory of the
Expr... |
f3b29e7f412d183f7b47d76aea86c8dc48c686a5 | a219071bf28605b7504d0aea2c0e35cdbaa10460 | /helpdesk_luismiguel/models/helpdesk.py | 63ed741a649c0e86b9815876c2a06cbe2779d0a6 | [] | no_license | e-lrl/curso2020-2 | 3c3106da39ad5a6e53dc6c1050e0ea08019c808a | 8fa5b0d702892b4ffceaf45ba7e75e781f3f2c76 | refs/heads/13.0 | 2023-02-03T04:19:07.290378 | 2020-12-20T21:11:55 | 2020-12-20T21:11:55 | 316,099,365 | 0 | 0 | null | 2020-11-26T02:06:22 | 2020-11-26T02:06:22 | null | UTF-8 | Python | false | false | 1,579 | py | helpdesk.py | # -*- coding: utf-8 -*-
from odoo import models, fields
class HelpdeskTicket(models.Model):
_name = "helpdesk.ticket"
_description = "Helpdesk Ticket"
name = fields.Char(string="Nombre")
description = fields.Text(string="Descripción")
date = fields.Date(string="Fecha")
state = fiel... |
b1e15358d9d8e9786dbfd31482098458e915311a | 3c2f0c50fb1bb46878ae5ae8b1c9d712d53a0cbe | /dynamodb/core/generics.py | 5dcc44f3ae55ed9648d0d6d92014e1ff60bedf80 | [] | no_license | venkatasaikatepalli/python | b9401c8e1cc4964989574ee91e71b4443e66f92f | e93e78738f58d90b93fcf2eeadbf2703fd1d8991 | refs/heads/master | 2020-04-15T10:19:53.218844 | 2019-02-28T05:05:44 | 2019-02-28T05:05:44 | 164,591,709 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,451 | py | generics.py | import json
# Helper class to convert a DynamoDB item to JSON.
class DecimalEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, decimal.Decimal):
if o % 1 > 0:
return float(o)
else:
return int(o)
return super(DecimalEncoder, self... |
84cc3912bfb3e529f0fad1342af9aacf1d431474 | 62086eb5321c45f58084fa0b1ebb774bd2f1f0ad | /get_planet_name_by_id.py | 26c5a26af763d92c4f6936c1bdc7d20fb55a34e9 | [
"MIT"
] | permissive | Kunalpod/codewars | 1ed04bdda9628b736c9846ef59ae835fbd0a6bb9 | 8dc1af2f3c70e209471045118fd88b3ea1e627e5 | refs/heads/master | 2021-01-19T19:01:49.916712 | 2017-07-10T10:38:07 | 2017-07-10T10:38:07 | 88,395,037 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 360 | py | get_planet_name_by_id.py | #Kunal Gautam
#Codewars : @Kunalpod
#Problem name: Get Planet Name By ID
#Problem level: 8 kyu
def get_planet_name(id):
if id==1: return "Mercury"
if id==2: return "Venus"
if id==3: return "Earth"
if id==4: return "Mars"
if id==5: return "Jupiter"
if id==6: return "Saturn"
if id==7: return ... |
04da49ff1c492ac77cb2ad53055a9503a243489a | 719d42753a6ec6da492276b83f505ce85d252e7f | /hanzo/warctools/log.py | 6111687c4aa9f5689931024ee33c6e96bac3d26b | [
"MIT"
] | permissive | checktor/warctools | 8e3e73dfa8110dd79960ced7c0a377788bbc7b04 | 6e92413700b8e67cd4779d70840f98fd73281269 | refs/heads/master | 2020-03-11T08:39:29.001663 | 2018-04-18T14:50:48 | 2018-04-18T14:50:48 | 129,889,357 | 0 | 0 | MIT | 2018-04-17T10:44:38 | 2018-04-17T10:44:38 | null | UTF-8 | Python | false | false | 204 | py | log.py | from __future__ import print_function
import sys
__all__ = ['debug']
if __debug__:
def debug(*args):
print('WARCTOOLS', args, file=sys.stderr)
else:
def debug(*args):
pass
|
31b56ff6fe19de9c624975879f00ca78077b44eb | ec266fcb0995f8af816f7a3bb1757e270228baca | /profit/sh.py | 19d6a3c381533928608f6a36952795f2616c78ad | [] | no_license | luteresa/tools | 39fb0ba2a8173a2263e6bc7d2fbb54def325bac9 | 989158447f975a71f04de0c33085200139d88153 | refs/heads/master | 2020-07-31T00:15:07.721663 | 2020-04-20T12:32:00 | 2020-04-20T12:32:00 | 66,351,057 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 995 | py | sh.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 18-11-28 下午5:00
# @Author : Leon
# @Site :
# @File : sh.py
# @Software: PyCharm
# shanghai
import tushare as ts
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = ts.get_hist_data('hs300',start='2018-11-12',end='2018-11-28')
... |
a21a0afc8bd89820983883b7f5549f8708bbbd99 | cab4a76fc9ab56ce17a4375e47647c73670c53f6 | /portfolio/users/migrations/0004_user_git_hub_link.py | 0db65d47de23fb75a845b08b7406239092c9499a | [] | no_license | Deserve82/web-portfolio | 379def39908216aa1fa1e83bccb622e0011b9ace | fb70a0021011b80e1904d54600ff2785395d738c | refs/heads/master | 2023-01-11T14:19:07.053198 | 2020-11-09T09:04:46 | 2020-11-09T09:04:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 405 | py | 0004_user_git_hub_link.py | # Generated by Django 3.1.1 on 2020-09-18 18:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0003_remove_user_git_hub_link'),
]
operations = [
migrations.AddField(
model_name='user',
name='git_hub_lin... |
7acd675fffe6773689cefaf15be5dee5119c8570 | c3ad00e07d448eacf717f70577d5642e5adea695 | /2022/day-2.2.py | 6aca28a3751071a22471031538d903d6974dba14 | [] | no_license | jiteshpubreja/adventofcode | 2cba2d1c7da6e00dafa2b140f4356befcf2f71a7 | d78d66cd77be4e6a1c607be439794c0f20c77869 | refs/heads/master | 2022-12-26T19:20:53.208470 | 2022-12-16T15:26:14 | 2022-12-16T15:26:14 | 247,480,979 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 491 | py | day-2.2.py | import re
data = None
with open("input.txt",encoding="utf-8") as inpf:
data = inpf.read().split("\n")
maps = {
"A":1,
"B":2,
"C":3,
"X":0,
"Y":3,
"Z":6,
}
steps = [list(map(maps.get,x.split(" "))) for x in data]
final_answer = 0
for x,y in steps:
if y == 0:
answer = x - 1
elif y == 3:
an... |
c5400ca45e3c209645b633a15bafedc98ab16e30 | 111b68adb6c41d555f8d2f7fa9b75394fb1819ea | /Input.py | 60d016710d5c0ab17be1ee84722554a9f842fe39 | [] | no_license | MM1132/PyMahjong | 27bd6476121713e6f04e394770633f695b07dbdd | 6b96a763f8ff6c4640bd3b01f03a39cdb57cb7c6 | refs/heads/master | 2022-03-29T06:33:38.314575 | 2022-03-01T04:37:24 | 2022-03-01T04:37:24 | 188,115,488 | 1 | 0 | null | 2020-02-21T18:16:48 | 2019-05-22T21:21:30 | null | UTF-8 | Python | false | false | 606 | py | Input.py | import pygame
class Input:
def __init__(self):
pass
def getEvent(self):
for event in pygame.event.get():
if event.type == pygame.QUIT:
return "back"
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
... |
94b82dff1b4bb5384d10bfef8d237cd2d35e638f | 09bcaa743c0c7226d7f3c9c2c0a969c433e39ed7 | /IA/Noelie/TD1/f2_grad.py | 3c65b734821949b12701bcf4c7099fc82da6af0e | [] | no_license | Pac0S/4A | 48195f75779c3573190df7dce487c22ecc4332bd | 9fb76eebec13163fc110d210490db1c77196c625 | refs/heads/master | 2023-05-11T16:23:38.372191 | 2018-11-12T23:05:12 | 2018-11-12T23:05:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,556 | py | f2_grad.py | #Imports from the matplotlib library
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import matplotlib.pyplot as plt
import numpy as np
import math
from opti1 import new_position_grad
#--------------------------------------
#Definition o... |
3bf10ea853c98cce877c055dc20f9b0ee86f1e77 | 2aeee5367edcde32765a381c4d5c7eb8ce3c68b9 | /ami_files/ami_file.py | ceb1fa9734ee110dbcea80798ecbc76a6b96c2b5 | [] | no_license | ablwr/ami-tools | 99a1588dd701ac0ae60cf2f43a4810452f773ef9 | 8a91672df0c061cdbdbd8e0e6a311aeeda10600d | refs/heads/master | 2021-01-01T18:20:32.023633 | 2017-07-24T21:53:32 | 2017-07-24T21:53:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,702 | py | ami_file.py | import os
from pymediainfo import MediaInfo
from datetime import datetime
class AMIFileError(Exception):
def __init__(self, message):
self.message = message
def __str__(self):
return repr(self.message)
class ami_file:
def __init__(self, filepath):
if os.path.isfile(filepath):
self.filepath = ... |
b3a8f01a41d0a9c3c0a82b54c48671cb15f3e8f8 | fa4d0959404d68e117b87df9c31cb2111ac88e90 | /python/di_extract_urls.py | 17a2858593f5e9552c0d58583f4caa5c01b47e36 | [] | no_license | nilicule/code | e252e210f5a23798b974b7e140eecd45b24ee524 | 8293c2c8f1cfef41e887ce6f3fa56d5191c4dded | refs/heads/master | 2021-01-22T13:38:17.169422 | 2014-10-12T07:58:28 | 2014-10-12T07:58:28 | 11,079,522 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,010 | py | di_extract_urls.py | #!/usr/bin/env python
"""
Download http://pub7.di.fm/ to index.html . Then run this script.
Written by Jabba Laci - http://ubuntuincident.wordpress.com/2013/06/06/digitally-imported-station-urls/
"""
import re
INPUT = 'index.html'
def main():
mp = []
st = []
with open(INPUT) as f:
for line in ... |
7edf7e1d3ef5970095fb08499e9ed45ea6d51d45 | feff6d5b36a005d06a3399c5a409ab09f516ff7e | /helpers.py | 158517fe3f5aef432f9e3bc3f9717f2cf73f1d62 | [] | no_license | DamienVassart/CS50-Final-Project | 0480a018d53a8a1a46f082db548a70b4b17a5231 | 84388771a881cc9715c97eea3442921edad2d583 | refs/heads/main | 2023-08-26T13:12:19.120906 | 2021-10-30T09:22:06 | 2021-10-30T09:22:06 | 422,834,551 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,914 | py | helpers.py | import re
import math
import base64
import hashlib
from flask import Flask, redirect, render_template, request, session
from functools import wraps
from cryptography.fernet import Fernet
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from cs50 import S... |
81416a2c9a4be6693c3364b0ded83214fe321a7b | e3805fa210d5e46d795b39abe5138ce167068084 | /Projekt/basex.py | 3e2c905a65e29db8cf9d48a988994d5703ceed5d | [] | no_license | NicolasHomolka/ermtk | feeca96775ae13debb3f8c33335fdd66f15a5307 | 756df439417075ab8f3baa0324c3e413d0fccf9b | refs/heads/master | 2022-11-12T15:43:34.667337 | 2020-06-23T13:54:52 | 2020-06-23T13:54:52 | 274,415,130 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,054 | py | basex.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import xml.etree.cElementTree as ET
import logicalModell
import xml.dom.minidom as minidom
from BaseXClient import BaseXClient
import random
import re
import os
import datetime
from colorama import Fore
import config
from datetime import timedelta
first = True
root2 = ET.... |
b6550ddd0ad10e023ad56c4301d3f18db34cffd3 | 28344e84383c284c34df17172d2e0734904459d5 | /flask/api.py | 18cfbe1e30ef6b234c2e0f9ff6eb3c1915040892 | [] | no_license | snipspin/hangmanAndFlask | 1b167002a7d74acd20af9e09a8f3348b94ebe6a6 | b890e397e9b2bb4c9576beb2dd2f0f0b9c5666d7 | refs/heads/master | 2021-05-21T03:17:18.653946 | 2020-04-02T17:21:28 | 2020-04-02T17:21:28 | 252,519,559 | 0 | 0 | null | 2021-03-20T03:21:44 | 2020-04-02T17:15:50 | Python | UTF-8 | Python | false | false | 3,524 | py | api.py | from models import app, User, Post, Tag, get_or_create
from flask import jsonify, request
from helpers import
from models import Publisher, Genre, Game
def error(err_locale, error):
print(f"🔥 Error in {err_locale}\n{error}")
return jsonify(error='Server Error')
# index
def get_all_publisher():
try:
... |
169de37e562b126e6362d5acfdff5e7b345bba05 | 3311b2bfb870b0e1f697be885db76aa6535baeb8 | /note/basic/04_串列結構/list_34_filter_迭代篩選為True者.py | 11adaa45494682e71c53be3b350d0d53afbd6da7 | [] | no_license | rogers228/Learn_python | 8f06ceceb553f47f59a2c6fe1f4dd5edc10a8079 | 494ef61545bc946e2ba105483b662beba204c263 | refs/heads/master | 2023-08-31T01:56:32.607799 | 2023-08-30T01:23:49 | 2023-08-30T01:23:49 | 245,773,918 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,513 | py | list_34_filter_迭代篩選為True者.py | def test1():
# filter 迭代取出 為True者 為新的list
lis = [1,2,2,2,3]
lis2 = list(filter(lambda e: e != 2,lis))
print(lis2)
def test2():
dic = {'rd02': 1, 'rd06': 0.78, 'rd10':2, 'rd21': 4}
# print(dic)
dic_rd = {
'rd06': '出', # 實際出勤(天)
'rd07': '缺', # 實際缺勤(天)
'rd08': '遲', # 核定遲到(分鐘)
... |
a26c765eb463bae79b518cda656f832416aea0bc | dec2c05faddf45ce6765d7f7087921b2c52979f1 | /db_setup.py | 922843d2d4696f3c6007e776dd2733d1895f9a39 | [] | no_license | veenamahalakshmi/regression_tool | 0497928523b40bcbddb6950cc8ec3a8816ba1204 | 5b92aa4d443a620fe2cd76f37f79e9cb562d9fbf | refs/heads/master | 2021-04-26T23:59:04.684047 | 2018-03-05T10:12:06 | 2018-03-05T10:12:06 | 123,889,139 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 327 | py | db_setup.py | import sqlite3
conn = sqlite3.connect('spirent.db')
cur = conn.cursor()
#cur.execute("drop table spirent")
#cur.execute("create table spirent(username varchar(255),password varchar(255),emailid varchar(255),empid Integer(255),ph_num Integer(10))")
cur.execute("select * from spirent")
for row in cur.fetchall():
pri... |
f74b2e14aabd5455dc5e2ca736e027b39bcdd3aa | 2482283b4bed58cb3652bd42f2a404920508ccc8 | /accounts/forms.py | ff1baf6b5bfd36acc9f26d35f7b7c53872b8fe8d | [] | no_license | michaeldg7/LessonsOnVideo | 6fa3bff104dc02a4c56e263ecbe2c9b3507c92fe | da0374b002703e90c62d6dc33277787cb4c5abff | refs/heads/master | 2021-01-21T12:08:02.485762 | 2015-01-27T18:55:38 | 2015-01-27T18:55:38 | 23,816,230 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,951 | py | forms.py | from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.models import User
from django.template.defaultfilters import slugify
from django.utils.translation import gettext_lazy as _
from annoying.functions import get_object_or_None
from accounts.utils import generate_username
c... |
aa70f2e3456e808d1409897b503c9470ec2fc17b | f3a6d2e757f996aaf15f65fd388b512d7cfe5d40 | /media/migrations/0001_initial.py | 25b7ca05bf1e8f89498d456713e233a4f9bb923b | [] | no_license | tanmaybane/rest_apis_crud | b228eaedd8d2230abdb061f4bcad13f2886336c6 | 99f1b78b808045fb2df9fc6afae135044dccfb20 | refs/heads/main | 2023-06-08T05:05:37.263680 | 2021-06-21T18:00:12 | 2021-06-21T18:00:12 | 378,891,471 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 731 | py | 0001_initial.py | # Generated by Django 3.2.4 on 2021-06-20 22:35
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
#
operations = [
migrations.CreateModel(
name='media',
fields=[
('id', models.BigAu... |
0b23b4b6f96dafa38b984a28f27a18368e1975a9 | f4d616a19efae3cfa54bab490b82cbc7e3a82e40 | /setup.py | 779678b167f2d7d9750b6c217d3cb46deeb4d94c | [] | no_license | kofei/librarian | 6ffafc8b90667e0192732547497a8ecc35603a3e | a1dd17925ba3d9d86110fcbc7718607011619bdb | refs/heads/master | 2021-01-18T00:48:01.606614 | 2015-07-16T13:14:55 | 2015-07-16T13:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,458 | py | setup.py | #!/bin/env python2
### setup.py ###
#from setuptools import setup
try:
from src import version
except: # If we can't find it build it
import os
from subprocess import call
last_commit = str(os.popen("/usr/bin/git show --format='%ci %cr' | head -n 1 | awk '{print $1}'").read())
commits = os.pope... |
e6169b2262f66143acf165b5c1ac5008f42dd74e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03085/s571532343.py | d106466e12ef6e752b631a922b3f09a0b5ca916d | [] | 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 | 99 | py | s571532343.py | s = input()
if s=='A': print("T")
if s=='T': print("A")
if s=='C': print("G")
if s=='G': print("C") |
b26651fda0cd84856ffcf39cc3914ffebe5c5b3e | 4d168df7d397963507cf8455e4281dfd323a8de0 | /ex/send.py | 945e7ffd77017dd64bb9aeb460e813b417d91f5b | [] | no_license | megharosejayan/gen-id-ticket-certificate-tedx- | 5f2b4b2cc2afa686c9fe652b03ba90664bb7fe00 | ad7aa1155447c5f525c4b5a58d2b0071019311e1 | refs/heads/master | 2022-04-13T01:24:35.081961 | 2020-03-28T07:12:02 | 2020-03-28T07:12:02 | 238,980,482 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,695 | py | send.py | import email, smtplib, ssl
import xlrd
from email import encoders
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
subject = "Tickets | TEDxCUSAT"
sender_email = "admin@tedxcusat.in"
password = ""
# password = input("Type your password and p... |
e2bb043d655ce2cf5a59617377fdb76857653a2f | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/176/usersdata/265/99481/submittedfiles/funcoes1.py | c51490abac92d2e0e30a3bf4be9c86921e5ca0fc | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 585 | py | funcoes1.py | # -*- coding: utf-8 -*-
def crescente(lista):
cont=0
cont1=0
cont2=0
cont3=0
for i in range(0,len(lista),1):
if i==0:
cont1=0
elif i==len(lista) and lista[i]>lista[i-1]:
cont2=1
if lista[i]>lista[i-1]:
cont3=1
cont=cont1+cont2+cont... |
c12cb99b3fab15cfa1b47d3e56837d5cbe86723d | 426b22ec99509bf74395d7e7c0d1e08eb359c90a | /static-analyzers/pyLint/testFormatOutput.py | bd343ff4bb6c281fc0a6ab661ac9f4bb4f205db5 | [] | no_license | googleinterns/static-analyzer | c37ff1d30dadb278b3a5c2d0073b2b6c480d34c5 | 9040e7fb8bd213de83aa1518c60cb9c0ecf17872 | refs/heads/master | 2022-11-30T16:46:04.725810 | 2020-08-14T19:20:52 | 2020-08-14T19:20:52 | 267,100,027 | 2 | 1 | null | 2020-08-14T19:20:53 | 2020-05-26T16:51:24 | Python | UTF-8 | Python | false | false | 299 | py | testFormatOutput.py | with open("../../test/testData/Test_ReportReader_data/pylint_sample_report.json", "r+") as output:
data = output.read()
with open("../../test/testData/Test_ReportReader_data/pylint_sample_report.json", "w+") as output:
newData = "{ \"vulList\": " + data + " }"
output.write(newData) |
10d8f96b08ce42b05b7fb43a7ac89ee9933975a5 | e2f4c4bce9671d426069feb61cfbb8b645632d77 | /Problem-2/functions.py | a75de531b36895647f654e2a89ccf33f93a84354 | [] | no_license | pankas87/Project-Euler---Python | d6be95a921917653f35667c09601f6395ba70bcb | 89d47d9fea286a30742fc1de376e76650000bb06 | refs/heads/master | 2021-01-11T20:10:22.355124 | 2017-02-08T18:24:14 | 2017-02-08T18:24:14 | 79,055,929 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | functions.py | def list_even_fibonacci_numbers(n):
even = []
a, b = 0, 1
n = n if n >= 1 else 1
while a < n:
if ( a % 2 == 0 ):
even.append( a )
a, b = b, a + b
return even |
f3eb4d395ff23eb70a4f92216f1172a1483d5868 | c471ee1fc7d49d5a8e6bec2a86c88db8f20e0f43 | /ainad/controller/mental_health_controller.py | 3cf992168a605a7aea7f9b923644f2d9b0350001 | [] | no_license | AINeedADoctor/AINAD-api | 3b7df8e99fd3d9e59fcd6a1a596df9f936f18105 | 5390109e97e60b8c3a07511e7449216cfb820542 | refs/heads/master | 2020-04-02T00:54:04.059199 | 2018-10-20T17:56:33 | 2018-10-20T17:56:33 | 153,827,364 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,811 | py | mental_health_controller.py | from sklearn.externals import joblib
from flask import Response
import json
class MentalHealthController(object):
def __init__(self, model_path):
self.model = joblib.load(model_path)
self.gender_encoder = joblib.load("ml/encoders/label_Gender.sav")
self.self_employee_encoder = joblib.load("... |
f1c2e41b4c6867f39233ed3b6e2a4c249b7598d2 | 315450354c6ddeda9269ffa4c96750783963d629 | /CMSSW_7_0_4/bin/slc6_amd64_gcc481/reco_template_RP_cfg.py | c9c28f8bd7b6e720511b033dec62dab382e5cdf6 | [] | no_license | elizamelo/CMSTOTEMSim | e5928d49edb32cbfeae0aedfcf7bd3131211627e | b415e0ff0dad101be5e5de1def59c5894d7ca3e8 | refs/heads/master | 2021-05-01T01:31:38.139992 | 2017-09-12T17:07:12 | 2017-09-12T17:07:12 | 76,041,270 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,656 | py | reco_template_RP_cfg.py | import FWCore.ParameterSet.Config as cms
process = cms.Process("rpReconstruction")
# minimum of logs
process.load("Configuration.TotemCommon.LoggerMin_cfi")
# raw-data source
process.load('TotemRawData.Readers.RawDataSource_cfi')
process.source.verbosity = 0
process.source.printProgressFrequency = 0
process.source.f... |
dfca6b54c2ff75024df0003eed606f4ec823290e | 57ae5bfbb24ba5fec90c9b3ecf1e15f06f1546ee | /6-10-1.py | 93aae600b0bf51ce08e8a2c4990d6c1b35ef8645 | [] | no_license | cjjhust/python_datastucture | f9104f1d5cae2df6436f56d4d3eaa212e6045943 | a222bbe4bfc145ee11f73676c8f033f451d45f78 | refs/heads/master | 2022-07-03T19:53:07.066387 | 2020-05-15T08:06:21 | 2020-05-15T08:06:21 | 260,272,705 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | 6-10-1.py | # -*- coding: utf-8 -*-
"""
Created on Sat Nov 10 17:31:23 2018
@author: CJJ
"""
# 判断n二进制码中1的个数
def countOne(n):
count =0 # 用来计数
while n >0:
if (n &1) ==1: # 判断最后一位是否为1
count +=1
n >>=1 # 移位丢掉最后一位
return count
if __name__=="__main__":
print countOne(7)
print ... |
3687c6f95adbd757cda605a3d244a2e14d26e8cb | a322dbffcda4eaa835939c1343ab537874516049 | /5th semester/ADALab/sudoku.py | 7f98977b3069d15cfeca2c3c32521b1065653e06 | [] | no_license | AnanyaMaruthi/CollegeCourseWork | 2657d2a4f114403e57deea4ef14d15957e1a1ba2 | 4cd2978d365142e144932cefa6c12a90a0d8758a | refs/heads/master | 2021-06-30T15:54:28.558949 | 2020-12-22T04:52:00 | 2020-12-22T04:52:00 | 201,225,288 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,897 | py | sudoku.py | class Sudoku:
#int N
def __init__(self, N):
self.N = N
self.grid = []
def setProblem(self):
for x in range(self.N):
row = list(map(int, input().split()))
self.grid.append(row)
def isSafeRow(self, row, digit):
for i in ran... |
43c2dc85ec0fbe85d76f2318795d80dd4f48406d | 444d69977ce435e522d0c4590321897e1d2dff96 | /DivisionTracker/Simulation/DivisionTrackerSteppables.py | 4d829c15cd4cfe1f45888458d619caecbb219b10 | [] | no_license | IsmailM/compucell3d-scripts | 323585f3aa404eb69077641333571d8977126ca0 | 3890c005a3a04fcf8f65cfc4d435a430e868b188 | refs/heads/master | 2021-01-11T02:03:48.671088 | 2015-06-16T15:23:24 | 2015-06-16T15:23:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,421 | py | DivisionTrackerSteppables.py |
from PySteppables import *
import CompuCell
import sys, os
from PySteppablesExamples import MitosisSteppableBase
## allows us to import the cc3dtools built.
pt = os.getcwd().split('/DivisionTracker/Simulation')[0].split('CC3D_3.7.3')[0]+'summer15/compucell3d-scripts/'
print '-->'+pt
sys.path.append(pt)
from cc3dtoo... |
c044214c9481af09729c0b49f389a2fd094e8aa9 | 48182bb0e24bd224e4a81f6831a4b0b8c9d1a58e | /dynamic-programming/partition.py | 2734128a84727126278321d9f29076e812d407c3 | [
"Apache-2.0"
] | permissive | oilshell/blog-code | e41cbb791489bb13d1e47f1e6b02bff4e8757f7d | bb9625244baf2fe49e58d6c5abac99bd8aa87460 | refs/heads/master | 2023-08-12T20:28:15.351652 | 2023-06-14T15:32:53 | 2023-06-15T05:20:37 | 77,171,733 | 56 | 11 | null | 2017-01-18T17:57:01 | 2016-12-22T19:50:21 | C++ | UTF-8 | Python | false | false | 1,490 | py | partition.py | #!/usr/bin/env python2
"""
partition.py
Copy of
https://stackoverflow.com/questions/7938809/how-to-understand-the-dynamic-programming-solution-in-linear-partitioning
"""
from __future__ import print_function
import sys
from operator import itemgetter
def linear_partition(seq, k):
if k <= 0:
return []
... |
fda4539267d86f7dc2452a81ce108a7fe4c0ccb3 | 421d7413317c36ce4f560e7be0c906db33f65199 | /boleta#09.py | 670877cd33319565a040034cee21684d0537df3b | [] | no_license | sanchezolivos-unprg/trabajo. | 5d3f4e87bca1116b97c060305406df433f55700a | c839955fc10cfbfcebf1ac91a3a568e02b7d478b | refs/heads/master | 2020-09-06T23:44:45.864442 | 2019-11-09T05:04:10 | 2019-11-09T05:04:10 | 220,592,231 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 480 | py | boleta#09.py | # VOLUMEN DE LA ESFERA
# INPUT
print(" ESFERA GOMETRICA ")
cuerpo_geometrico=input("ingrese la figura geometrica:")
radio=float(input("ingrese el radio de la esfera en cm:"))
# PROCESSING
pi= 3.14
volumen= 4*pi*(radio**3)/3
# OUTPUT
print("############################")
print(" FIGURA GEOMETRICA:", ... |
f3b7b7c927e742f1d47379f34f3018914cd24260 | 56698845ca8fd9aade61045490790de9e6a2973c | /book/notebook_test.py | cae722dfcd7f255e2fcfeb8a96effe129cde221b | [
"BSD-3-Clause"
] | permissive | elcorto/gp_playground | 78a2820c0d2c53e5d205d4c5f81337121822c2bf | b3d112e6d6579b1b9dba476aca4b5c25c9c2c3f6 | refs/heads/main | 2023-06-25T08:19:10.402475 | 2023-06-20T15:02:00 | 2023-06-20T15:04:14 | 493,275,233 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 807 | py | notebook_test.py | # %% [markdown]
# # Test!!1!1!
# This line is part of the Md cell above and will be shown.
#
# Hidden code below.
# %%
# :tags: [hide-input]
from icecream import ic
from matplotlib import pyplot as plt, is_interactive
def foo():
pass
# %%
# Code cell here. This is a normal comment part of the code cell. Will... |
44ae15b7d43365deb0e3e06e7fdda1548d780d71 | b0b6902b7d13c2596890cefc60d8eab1cb011dba | /public/home/rhodochrosited/tmp/server/imgs/ex.py | 3402f1857a23e768dd787c9787a426d45dacef79 | [] | no_license | hy-5inq/Mask-Shop | 4628823e62aee293c35270b4e945c1e28e496c69 | 9b8b7c4aab474e5eb371f86592de16744062f38a | refs/heads/master | 2022-12-25T13:08:04.214518 | 2019-06-25T09:38:05 | 2019-06-25T09:38:05 | 174,964,798 | 0 | 1 | null | 2022-12-09T17:11:06 | 2019-03-11T09:14:34 | JavaScript | UTF-8 | Python | false | false | 7,351 | py | ex.py | import os
s=['http://img.danawa.com/prod_img/500000/676/407/img/7407676_1.jpg&_v=20190327172724', 'http://image.auction.co.kr/itemimage/18/29/f9/1829f98776.jpg', 'http://mromart.co.kr/web/product/big/201903/ee5ce71c67d18f11b1555c38979a05e5.jpg', 'http://image.auction.co.kr/itemimage/17/e1/03/17e10326c6.jpg', 'http://i.... |
9e050860c35a15936038896304e3f5e034eb51a2 | d735b8354e06eb26aa5ed0ac25ebf96bdd8d67b6 | /python16/day1-21/day018 面向对象-类和类之间的关系/pdf/03 关联关系_一对一.py | 32b3718ba83748afd2a2c7c8f9dd1a9e4f49384c | [] | no_license | cn5036518/xq_py | e004766e6b2582ba37d7335320ed6b42f563c46c | ac932dc7fcb89a7a7faf8bda80791743755fd557 | refs/heads/master | 2021-07-15T18:44:19.244025 | 2020-09-12T09:38:25 | 2020-09-12T09:38:25 | 208,355,433 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,091 | py | 03 关联关系_一对一.py | #!/usr/bin/env python
#-*- coding:utf-8 -*-
#@time: 2019/12/17 7:58
#@author:wangtongpei
#@email: cn5036520@163.com
class Boy:
def __init__(self,name,gril_friend= None):
self.name = name
self.gril_friend = gril_friend
def meet(self,girl):
self.gril_friend = girl #这里的girl是女孩对象
def... |
698fe7bc4ca02ba48c1b8b4ccd8080d94195d305 | e42331a9544df48d9f316f90ce4d3c0776d6b99c | /client/service/filters/joined.py | 0b27ccbc6ea02b232fc65b776cd3af8d8dfdd1ae | [] | no_license | apanchenko/jani | ad85eba52b4f3f48f71561feccc715fe312db840 | 74ea69873388986012a1a0883cc9e4ecffc80ea6 | refs/heads/master | 2023-06-11T12:02:16.154916 | 2021-07-04T11:38:30 | 2021-07-04T11:38:30 | 278,820,873 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 945 | py | joined.py | import logging
from telethon import events
from telethon.tl.types import MessageActionChatJoinedByLink
from peano import measured
from ...entity.chat import Chat
def filter_joined(client) -> None:
""" Filter messages about user joined chat
"""
log = logging.getLogger('joined')
@events.register(even... |
2e489198704adbfa29fcc5a3df6ad53b323b632d | 190ad641bb5b0dd26feb914e44aaecc283e0aa98 | /profin/__init__.py | e448dd96d4ca2f73cc66f9fbf9802516f4767457 | [
"MIT"
] | permissive | MightyPork/profin | c25ef6c9062a860e4149d8b862b0cacd1f9f834b | 726c28ff4fb4015190b1a4f121fb51386faa1ef9 | refs/heads/master | 2020-03-13T02:14:44.517228 | 2018-04-25T20:55:30 | 2018-04-25T20:55:30 | 130,920,596 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,377 | py | __init__.py | from calendar import monthrange
import datetime
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import matplotlib.cbook as cbook
import pandas as pd
def parse_month(month) -> int:
""" Parse string month to a number 1-12 """
map = {
'jan': 1,
'feb': 2,
... |
580574a62540c7dcbc14546c9ca1b4e76f3efd66 | 47e68129cc5f5c6d0a98e0e14537883b96808a03 | /scripts/tests/screen_drawing.py | e3433287a8e86a5f01074279eca747d806f3c4c0 | [] | no_license | kailevy/sketchibot | 59eeeb4dbc87fbb1c9299eae11587a86a462876c | 245530caf03b8d1418d4b2ac7f0cd09bdad95ebf | refs/heads/master | 2021-01-10T09:38:13.427105 | 2015-12-29T06:32:59 | 2015-12-29T06:32:59 | 45,580,993 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,045 | py | screen_drawing.py | #!/usr/bin/env python
"""a script to filter contours into waypoints and scale them to the paper size the neato is drawing on"""
import numpy as np
import cv2
from math import pi, cos, sin, sqrt, atan2
import rospy
from edge_detect import EdgeDetector
class PathDrawing():
def __init__(self, strokes = [],imsize=(1... |
54c4faeccd9e8a457d5afe5571f7261e78e62a03 | ae8721252bfcb2dcfaf82554228a0d1ac930c8b8 | /app/migrations/0010_alter_users_is_active.py | 566c6886ca5effa822006582b96ea405ee772c91 | [] | no_license | OlyaPancyreva/Emphasoft | 2aac628f5187ba98e83fed98ae5080a194ed0a15 | e60b9836973e9fbb2e2343bffe5df8e304ff017e | refs/heads/main | 2023-08-16T02:51:28.290072 | 2021-10-01T11:38:35 | 2021-10-01T11:38:35 | 410,638,430 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 390 | py | 0010_alter_users_is_active.py | # Generated by Django 3.2.7 on 2021-10-01 10:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0009_alter_users_is_active'),
]
operations = [
migrations.AlterField(
model_name='users',
name='is_active',
... |
63200511dae769a0c24c77223be4dd5c8b707798 | 24397f8d6b383c8cf623fd15405ce269a6ef68a6 | /accounts/tests/test_models.py | cf341887e330b3dfb8fd317aedf8d4945054fcf9 | [] | no_license | sanyam1997/web_application | b2358a9bde5ea9c723b4ed1286020912f3b5112c | 879944cdee7b02a04458b79c190ae5f547f64a2b | refs/heads/master | 2022-06-04T15:37:33.652790 | 2020-04-27T21:38:24 | 2020-04-27T21:38:24 | 252,500,061 | 0 | 0 | null | 2022-04-22T23:11:50 | 2020-04-02T15:52:39 | JavaScript | UTF-8 | Python | false | false | 1,278 | py | test_models.py | from django.test import TestCase
from django.contrib.auth import get_user_model
from django.contrib import auth
from accounts.models import Token
User = auth.get_user_model( )
class UserModelTest( TestCase ) :
def test_user_is_valid_with_email_only( self ) :
user = User( email = 'a@b.com' )
user.f... |
073ed2a6f86f211a70172504eda80a2fdf5675f5 | 212355f3f40cd9a51aabcd32aa4ec61b4dcf6cc6 | /config.py | 00b77aa31a1e353c4a21d64b3d22caa0293d9390 | [] | no_license | SpringFlash/komp-set-bezop | f140e5646018eefd403bf77f7797e254e63681b1 | 355f6337f189dec54acfdc465f3416c836989b0d | refs/heads/master | 2023-04-22T11:19:02.591338 | 2021-05-08T10:27:10 | 2021-05-08T10:27:10 | 350,861,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,343 | py | config.py | TEXT = 'ВДЕЬПЖОА РФА? Д,Я САКЖ,Д Я ММ ОДРАОНУЦЗДНАААЕЛНРМО, НЯА ИК-АСВКА ЕН ,С П УО Т '
FIRST_PASSWORD = 'Дядя'
SECOND_PASSWORD = 'Вова педофил и еще цыганин'
# Я помню чудное мгновенье: Передо мной явилась ты, Как мимолетное веденье, Как гений чистой красоты.
# У лукоморья дуб зелёный; Злат... |
02188ab050c3d86dcc061df709875bc963e29207 | 37e5d49566ad6cfd942d9ca7e21d772dfa5f541f | /05_GitHub/05_GitHub_03_TheMostFrequentWeekdays.py | f1608a3613a0cd58de8379acf2ee250de322dd33 | [] | no_license | Kanaykinvv/py.checkio.org | 1cbf7e3d61a01587853ac071402100919d97a1b0 | eaa776bbb02a99301e06a0a446c3fff67603fa56 | refs/heads/master | 2023-05-29T04:14:59.893248 | 2021-06-09T19:37:01 | 2021-06-09T19:37:01 | 339,304,178 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,372 | py | 05_GitHub_03_TheMostFrequentWeekdays.py | # Вам дан год как целое число (например, 2001). Вы должны вернуть наиболее частые дни недели в этом году.
# Результатом должен быть список дней, отсортированный по порядку дней в неделе (например, [«Понедельник», «Вторник»]).
# Неделя начинается с понедельника.
#
# Входные данные: Год как целое число (int).
#
# Выходны... |
bcff3cd85035205aa1cc6e17f6048d1f6989aac3 | 0e1484f780358debd8b9d5f9482753e7acf8e543 | /stellapy/data/check/check_netcdfVariables.py | 22ae7ddc8e3438dc888702b7c1e2afcfa8d75785 | [
"MIT"
] | permissive | stellaGK/stella | e30d2645e8c7ea690c259e88d43cd6da4547c0f0 | a97880be340f43390fd185a452822a919cca41c6 | refs/heads/master | 2023-08-17T18:55:36.799115 | 2023-05-22T15:43:10 | 2023-05-22T15:43:10 | 376,207,831 | 16 | 12 | NOASSERTION | 2023-08-10T20:15:43 | 2021-06-12T05:14:24 | Fortran | UTF-8 | Python | false | false | 2,472 | py | check_netcdfVariables.py | #!/usr/bin/python3
import os, sys
import pathlib
import netCDF4 as nc
# Personal modules
sys.path.append(os.path.abspath(pathlib.Path(os.environ.get('STELLAPY')).parent)+os.path.sep)
from stellapy.utils.files.get_filesInFolder import get_filesInFolder
from stellapy.utils.commandprompt.bash import Bash
def check_net... |
76a517ee3a92046e194877bd39dd80e5e8798d95 | 6ab4265c551c475c39d471c79c371f941f1ff810 | /zippy_refresh.py | a8089c410196d1f0621d2fbc15fea3b89edb943f | [] | no_license | qstore2/zippy_refresh | 20c0141bbb5bfa553d97f66ff550d93211f65448 | 27b877c55ab57830dd7de3121e2e584817c39e0d | refs/heads/master | 2020-06-14T00:08:28.858383 | 2020-01-04T08:22:24 | 2020-01-04T08:22:24 | 194,831,179 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,149 | py | zippy_refresh.py | """
zippy_refresh will try to download a bit of the ZS program, so that ZS will reset the 30 days timer.
Put all the ZS links in txt files in the same folder or sub-folder of this program, then run this program.
Require *requests*
_pip install requests_
"""
import glob
import itertools
import requests
import... |
79f1db3a06fb314ab311dd6b11e80f14a2eb189b | 868747840c3cd8a7df2cc77ef8a88c0940b611b9 | /Tangerine/demo/FraudWasteAbuse/apps/esri/esri_travel_calculator.py | 3854d9e08f9101eab3947161063886d76c628088 | [
"MIT",
"LicenseRef-scancode-proprietary-license"
] | permissive | samant8/member-MITRE | f895cd476461e3ed5a7fd6a44a3832375d3f81a5 | 2336eba146a8ffe8783940ec98d674a576ecb21e | refs/heads/master | 2020-03-25T21:49:24.891314 | 2018-08-09T19:31:56 | 2018-08-09T19:31:56 | 144,191,117 | 0 | 0 | MIT | 2018-08-09T18:45:21 | 2018-08-09T18:45:20 | null | UTF-8 | Python | false | false | 4,716 | py | esri_travel_calculator.py | #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# NOTICE
#
# This software was produced for the U. S. Government
# under Basic Contract No. FA8702-17-C-0001, and is
# subject to the Rights in Noncommercial Computer Software
# and Noncommercial Computer Software Documentation
# Clause 252... |
9cf2038c42b08121786a645383c836cd60d6532b | 149660428ec7570b02b9e8b3d494dcd548e80005 | /05_python高级/16_mysql与python交互/05_sql注入.py | 4d3c4a33470e2a1c09db7045fe97d0f2fdb57406 | [] | no_license | kenzzuli/hm_15 | 603eb178e476f946eb57b1cdf0c85ba5d65e8d58 | db8a6d13776e55aa4e05ff9f39e9c8e98d59d8ee | refs/heads/master | 2023-08-07T01:57:01.993474 | 2021-09-23T15:49:19 | 2021-09-23T15:49:19 | 359,322,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,524 | py | 05_sql注入.py | from pymysql import *
class JD(object):
def __init__(self):
self.conn = connect(host="localhost", user="root", password="liulei123", database="jing_dong", port=3306,
charset="utf8")
self.cursor = self.conn.cursor()
self.tables = ["goods", "goods_brands", "goods_... |
62b8bbd58d3d9392efe2336246fbee24931aa777 | b7950fbe0ca56ad6d22f172c48061805cfb1d366 | /tests/common/test_common_utils.py | 09f3b9615bc0a12a7c05084e386b187df9725b30 | [
"MIT"
] | permissive | bdepebhe/handmadeML | afa6142f38e121144f08c5ccceef31d1abc572b7 | bcb9c011ffd7b3ee74cfbb3b37c142443743cfc9 | refs/heads/master | 2023-07-12T00:06:59.199346 | 2021-08-12T07:58:09 | 2021-08-12T07:58:09 | 346,033,748 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,224 | py | test_common_utils.py | import unittest
import sys
sys.path.append('../')
from handmadeML.common.utils import *
#---------------------------------------------------------------------------
### tests for function compute_metric - normal mode (not derivative)########
#-------------------------------------------------------------------------... |
f870e90293a4fa17ea4ccc195ea941852a6b6fda | d13cf366d924d09fe0dc2151b2fa8ea57226c2e3 | /sugercube/tests/__main__.py | 9542998dd3823f3701d18c43e36818b0412ab68d | [] | no_license | mmohiudd/sugercube | 0e891dbf8a62d7d72c298b03d45b546fcd9a7a83 | 8b85966d937ae66166d60198bc3b38d38e10d3a1 | refs/heads/master | 2021-01-24T06:31:05.395298 | 2015-08-18T00:43:13 | 2015-08-18T00:43:13 | 6,033,401 | 0 | 0 | null | 2015-08-18T00:43:14 | 2012-10-01T17:26:02 | Python | UTF-8 | Python | false | false | 55 | py | __main__.py | import facebook # import to run all top_friends tests
|